Skip to content
Browse files

Added spec file for pyinstaller

  • Loading branch information...
1 parent 4801338 commit 8cc17123f6a47267723493abf95c819f12cdf5bc unknown committed Mar 23, 2012
View
2 .gitignore
@@ -3,3 +3,5 @@
~*
*.pyc
*.pyo
+build/
+dist/
View
BIN pyinstaller/nodereviver.ico
Binary file not shown.
View
0 nodereviver.png → pyinstaller/nodereviver.png
File renamed without changes
View
41 pyinstaller/nodereviver.spec
@@ -0,0 +1,41 @@
+# -*- mode: python -*-
+projectpath = 'C:\\MinGW\\msys\\1.0\\home\\vincent\\workspace\\minild33\\'
+pyinstallerpath = 'C:\\MinGW\\msys\\1.0\\home\\vincent\\pyinstaller-1.5.1'
+datapath = projectpath + "data\\"
+a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), projectpath + 'nodereviver.py'],
+ pathex=[pyinstallerpath])
+pyz = PYZ(a.pure)
+a.binaries = [x for x in a.binaries if not
+ (os.path.basename(x[1]).lower() in ("msvcr90.dll", "msvcm90.dll", "kernel32.dll", "msvcp90.dll") or ("microsoft" in x[1].lower()))]
+
+pyd = []
+other = []
+for binary in a.binaries:
+ if os.path.splitext(binary[1])[1].lower() == ".pyd":
+ pyd.append(binary)
+ else:
+ other.append(binary)
+
+for file in os.listdir(datapath):
+ a.datas.append(("data/" + os.path.basename(file), datapath + file, 'DATA'))
+
+a.datas.append(("README.txt", projectpath + "README.txt", "DATA"))
+
+exe = EXE( pyz,
+ a.scripts,
+ a.zipfiles,
+ pyd,
+ name=os.path.join('dist', 'nodereviver.exe'),
+ debug=False,
+ strip=False,
+ upx=True,
+ console=False , icon=projectpath + 'misc/nodereviver.ico')
+
+coll = COLLECT( exe,
+ a.datas,
+ other,
+ strip=False,
+ upx=True,
+ name=os.path.join('dist', 'nodereviver'))
+app = BUNDLE(coll,
+ name=os.path.join('dist', 'nodereviver.exe.app'))

0 comments on commit 8cc1712

Please sign in to comment.
Something went wrong with that request. Please try again.