Difference between revisions of "Example pyinstaller spec file"
Jump to navigation
Jump to search
m (this is a stub) |
(Update spec file to reflect and work with pyinstaller updates) |
||
Line 2: | Line 2: | ||
<pre> | <pre> | ||
# -*- mode: python -*- | # -*- mode: python -*- | ||
− | a = Analysis(['src\\bitmessagemain.py'], | + | |
− | pathex=['C:\\example\\pyinstaller'], | + | block_cipher = None |
+ | |||
+ | a = Analysis(['..\\src\\bitmessagemain.py'], | ||
+ | pathex=['C:\\example\\pyinstaller\\bitmessagemain'], | ||
+ | binaries=None, | ||
+ | datas=None, | ||
hiddenimports=[], | hiddenimports=[], | ||
− | hookspath=None) | + | hookspath=None, |
− | + | runtime_hooks=None, | |
+ | excludes=None, | ||
+ | win_no_prefer_redirects=None, | ||
+ | win_private_assemblies=None, | ||
+ | cipher=block_cipher) | ||
+ | |||
def addTranslations(): | def addTranslations(): | ||
import os | import os | ||
Line 16: | Line 26: | ||
# append the translations directory | # append the translations directory | ||
a.datas += addTranslations() | a.datas += addTranslations() | ||
− | + | ||
− | pyz = PYZ(a.pure) | + | pyz = PYZ(a.pure, a.zipped_data, |
+ | cipher=block_cipher) | ||
exe = EXE(pyz, | exe = EXE(pyz, | ||
a.scripts, | a.scripts, | ||
Line 23: | Line 34: | ||
a.zipfiles, | a.zipfiles, | ||
a.datas, | a.datas, | ||
− | + | a.binaries + [('libeay32.dll', 'c:\\windows\\system32\\libeay32.dll', 'BINARY')], | |
− | name= | + | name='bitmessagemain', |
debug=False, | debug=False, | ||
strip=None, | strip=None, | ||
upx=True, | upx=True, | ||
console=False , icon='src\\images\\can-icon.ico') | console=False , icon='src\\images\\can-icon.ico') | ||
− | |||
− | |||
</pre> | </pre> |
Latest revision as of 22:48, 22 October 2015
This page is a stub, you can help by expanding it.
# -*- mode: python -*- block_cipher = None a = Analysis(['..\\src\\bitmessagemain.py'], pathex=['C:\\example\\pyinstaller\\bitmessagemain'], binaries=None, datas=None, hiddenimports=[], hookspath=None, runtime_hooks=None, excludes=None, win_no_prefer_redirects=None, win_private_assemblies=None, cipher=block_cipher) def addTranslations(): import os extraDatas = [] for file in os.listdir('src\\translations'): extraDatas.append(('translations\\'+file, 'src\\translations\\' + file, 'DATA')) return extraDatas # append the translations directory a.datas += addTranslations() pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, a.binaries + [('libeay32.dll', 'c:\\windows\\system32\\libeay32.dll', 'BINARY')], name='bitmessagemain', debug=False, strip=None, upx=True, console=False , icon='src\\images\\can-icon.ico')