Change PyInstaller setup

This commit is contained in:
Marcel Stör 2016-12-31 00:17:59 +01:00
parent 15b36b923a
commit d63b5e11cd
6 changed files with 1350 additions and 19 deletions

2
.gitignore vendored
View File

@ -30,7 +30,7 @@ var/
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
#*.spec
*.spec
# Installer logs
pip-log.txt

7
build.bat Executable file
View File

@ -0,0 +1,7 @@
pyinstaller --log-level=DEBUG ^
--windowed ^
--icon=.\images\icon-256.png ^
--name="NodeMCU-PyFlasher" ^
--noconfirm ^
--onefile ^
nodemcu-pyflasher.py

View File

@ -1,8 +1,10 @@
#!/usr/bin/env bash
pyinstaller --noconfirm --log-level=INFO \
--onefile --windowed \
--name="NodeMCU PyFlasher" \
--icon=./images/icon-256.icns \
--osx-bundle-identifier=com.frightanic.nodemcu-pyflasher \
--upx-dir=/usr/local/share/ \
nodemcu-pyflasher.spec
rm -fr build dist
pyinstaller --log-level=DEBUG \
--windowed \
--icon=./images/icon-256.icns \
--name="NodeMCU-PyFlasher" \
--noconfirm \
--onefile \
--osx-bundle-identifier=com.frightanic.nodemcu-pyflasher \
nodemcu-pyflasher.py

12
esptool-py-why-here.txt Normal file
View File

@ -0,0 +1,12 @@
If esptool.py is installed using python setup.py` from a checked out version it creates something like the following
in the Python environment
esptool.py file containing
#!/usr/local/opt/python/bin/python2.7
# EASY-INSTALL-SCRIPT: 'esptool==1.3.dev0','esptool.py'
__requires__ = 'esptool==1.3.dev0'
__import__('pkg_resources').run_script('esptool==1.3.dev0', 'esptool.py')
PyInstaller (and cx_Freeze) doesn't support pkg_resources and complains about 'ImportError: "No module named
pkg_resources"'. This can be avoided if the application maintains a local copy of esptool.py.

1311
esptool.py Executable file

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
block_cipher = None
a = Analysis(['nodemcu-pyflasher.py', 'Main.py'],
a = Analysis(['nodemcu-pyflasher.py'],
pathex=['/Users/marcelstoer/Data/Python/NodeMCU-PyFlasher'],
binaries=None,
datas=None,
@ -18,16 +18,15 @@ pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='nodemcu-pyflasher',
a.binaries,
a.zipfiles,
a.datas,
name='NodeMCU-PyFlasher',
debug=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='nodemcu-pyflasher')
console=False , icon='images/icon-256.icns')
app = BUNDLE(exe,
name='NodeMCU-PyFlasher.app',
icon='./images/icon-256.icns',
bundle_identifier='com.frightanic.nodemcu-pyflasher')