Commit 6caf64e4 authored by sumpfralle's avatar sumpfralle

added a pyinstaller spec file for creating standalone binaries for Windows

git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@627 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 0169a353
This diff is collapsed.
# keysyms does not seem to be recognized by pyinstaller
# There will be exceptions after any keypress without this line.
hiddenimports = ["gtk.keysyms"]
\ No newline at end of file
# -*- mode: python -*-
BASE_DIR = os.getcwd()
a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), os.path.join(BASE_DIR, 'pycam')],
pathex=[os.path.join(BASE_DIR, "src")],
hookspath=[os.path.join(BASE_DIR, "pyinstaller", "hooks")])
pyz = PYZ(a.pure)
data = [("pycam-project.ui", os.path.join(BASE_DIR, "share", "gtk-interface", "pycam-project.ui"), "DATA"),
("menubar.xml", os.path.join(BASE_DIR, "share", "gtk-interface", "menubar.xml"), "DATA"),
("logo_gui.bmp", os.path.join(BASE_DIR, "share", "gtk-interface", "logo_gui.bmp"), "DATA"),
]
# import VERSION for the output filename
sys.path.insert(0, os.path.join(BASE_DIR, "src"))
from pycam import VERSION
samples = Tree(os.path.join(BASE_DIR, "samples"), prefix="samples")
exe = EXE(pyz, data, samples,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name=os.path.join(BASE_DIR, "pycam-%s_standalone.exe" % VERSION),
debug=False,
strip=False,
upx=True,
console=True )
PyInstaller (http://pyinstaller.org) can be used to create standalone binaries for Windows.
How to build a standalone exe file (on Windows only):
1) download pyinstaller
2) run "cmd"
3) "cd PATH_TO_PYCAM"
4) "python PYINSTALLER_PATH\Build.py pyinstaller\pycam.spec"
5) test and upload the binary file "pycam-VERSION_standalone.exe"
Known issues:
- the "logo_gui.png" image is not displayed in the "Preferences" window
(the dll for png support is not included; the "pixbuf.loaders" file does not exist)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment