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 # 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. # before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest *.manifest
#*.spec *.spec
# Installer logs # Installer logs
pip-log.txt 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 #!/usr/bin/env bash
pyinstaller --noconfirm --log-level=INFO \ rm -fr build dist
--onefile --windowed \ pyinstaller --log-level=DEBUG \
--name="NodeMCU PyFlasher" \ --windowed \
--icon=./images/icon-256.icns \ --icon=./images/icon-256.icns \
--osx-bundle-identifier=com.frightanic.nodemcu-pyflasher \ --name="NodeMCU-PyFlasher" \
--upx-dir=/usr/local/share/ \ --noconfirm \
nodemcu-pyflasher.spec --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 block_cipher = None
a = Analysis(['nodemcu-pyflasher.py', 'Main.py'], a = Analysis(['nodemcu-pyflasher.py'],
pathex=['/Users/marcelstoer/Data/Python/NodeMCU-PyFlasher'], pathex=['/Users/marcelstoer/Data/Python/NodeMCU-PyFlasher'],
binaries=None, binaries=None,
datas=None, datas=None,
@ -18,16 +18,15 @@ pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher) cipher=block_cipher)
exe = EXE(pyz, exe = EXE(pyz,
a.scripts, a.scripts,
exclude_binaries=True, a.binaries,
name='nodemcu-pyflasher', a.zipfiles,
a.datas,
name='NodeMCU-PyFlasher',
debug=False, debug=False,
strip=False, strip=False,
upx=True, upx=True,
console=True ) console=False , icon='images/icon-256.icns')
coll = COLLECT(exe, app = BUNDLE(exe,
a.binaries, name='NodeMCU-PyFlasher.app',
a.zipfiles, icon='./images/icon-256.icns',
a.datas, bundle_identifier='com.frightanic.nodemcu-pyflasher')
strip=False,
upx=True,
name='nodemcu-pyflasher')