Skip to content

Commit dffef90

Browse files
committed
Add support for self-contained bundle build for macOS and Windows
1 parent e0f8089 commit dffef90

4 files changed

Lines changed: 60 additions & 12 deletions

File tree

build-on-mac.spec

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- mode: python -*-
2+
3+
block_cipher = None
4+
5+
6+
a = Analysis(['nodemcu-pyflasher.py'],
7+
binaries=None,
8+
datas=[("images", "images")],
9+
hiddenimports=[],
10+
hookspath=[],
11+
runtime_hooks=[],
12+
excludes=[],
13+
win_no_prefer_redirects=False,
14+
win_private_assemblies=False,
15+
cipher=block_cipher)
16+
pyz = PYZ(a.pure, a.zipped_data,
17+
cipher=block_cipher)
18+
exe = EXE(pyz,
19+
a.scripts,
20+
a.binaries,
21+
a.zipfiles,
22+
a.datas,
23+
name='NodeMCU-PyFlasher',
24+
debug=False,
25+
strip=False,
26+
upx=True,
27+
console=False , icon='images/icon-256.icns')
28+
app = BUNDLE(exe,
29+
name='NodeMCU-PyFlasher.app',
30+
icon='./images/icon-256.icns',
31+
bundle_identifier='com.frightanic.nodemcu-pyflasher')

build-on-win.spec

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# -*- mode: python -*-
2+
3+
block_cipher = None
4+
5+
a = Analysis(['nodemcu-pyflasher.py'],
6+
binaries=[],
7+
datas=[("images", "images")],
8+
hiddenimports=[],
9+
hookspath=[],
10+
runtime_hooks=[],
11+
excludes=[],
12+
win_no_prefer_redirects=False,
13+
win_private_assemblies=False,
14+
cipher=block_cipher)
15+
pyz = PYZ(a.pure, a.zipped_data,
16+
cipher=block_cipher)
17+
exe = EXE(pyz,
18+
a.scripts,
19+
a.binaries,
20+
a.zipfiles,
21+
a.datas,
22+
name='NodeMCU-PyFlasher',
23+
debug=False,
24+
strip=False,
25+
upx=True,
26+
console=False , icon='images\\icon-256.ico')

build.bat

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
pyinstaller --log-level=DEBUG ^
2-
--windowed ^
3-
--icon=.\images\icon-256.png ^
4-
--name="NodeMCU-PyFlasher" ^
52
--noconfirm ^
6-
--onefile ^
7-
nodemcu-pyflasher.py
3+
build-on-win.spec

build.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#!/usr/bin/env bash
2-
rm -fr build dist
2+
#rm -fr build dist
33
pyinstaller --log-level=DEBUG \
4-
--windowed \
5-
--icon=./images/icon-256.icns \
6-
--name="NodeMCU-PyFlasher" \
74
--noconfirm \
8-
--onefile \
9-
--osx-bundle-identifier=com.frightanic.nodemcu-pyflasher \
10-
nodemcu-pyflasher.py
5+
build-on-mac.spec

0 commit comments

Comments
 (0)