Difference between revisions of "Example pyinstaller spec file"

From Bitmessage Wiki
Jump to navigation Jump to search
(Created page with "<pre> # -*- mode: python -*- a = Analysis(['src\\bitmessagemain.py'], pathex=['C:\\example\\pyinstaller'], hiddenimports=[], hookspath=N...")
 
m (this is a stub)
Line 1: Line 1:
 +
{{Stub}}
 
<pre>
 
<pre>
 
# -*- mode: python -*-
 
# -*- mode: python -*-

Revision as of 06:02, 24 October 2013

# -*- mode: python -*-
a = Analysis(['src\\bitmessagemain.py'],
             pathex=['C:\\example\\pyinstaller'],
             hiddenimports=[],
             hookspath=None)
			 
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)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
		  a.binaries + [('libeay32.dll', 'c:\\windows\\system32\\libeay32.dll', 'BINARY')],
          name=os.path.join('dist', 'bitmessagemain.exe'),
          debug=False,
          strip=None,
          upx=True,
          console=False , icon='src\\images\\can-icon.ico')
app = BUNDLE(exe,
             name=os.path.join('dist', 'bitmessagemain.exe.app'))