Skip to content

Commit

Permalink
ci: add spec file for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jan 29, 2021
1 parent 31153d9 commit 79b657c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ MANIFEST
# 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.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand Down
46 changes: 46 additions & 0 deletions build-recipes/win_pyjibe.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import os
from os.path import abspath, exists, join, dirname, relpath
import platform
import sys
import warnings

cdir = abspath(".")
sys.path.insert(0, cdir)

if not exists(join(cdir, "pyjibe")):
warnings.warn("Cannot find 'pyjibe'! Please run pyinstaller "+
"from git root folder.")

name = "PyJibe"
pyinstdir = os.path.realpath(cdir+"/build-recipes/")
script = os.path.join(pyinstdir, name+".py")

# Icon
icofile = os.path.join(pyinstdir,"PyJibe.ico")

a = Analysis([script],
pathex=[cdir],
hookspath=[pyinstdir],
runtime_hooks=None)

options = [ ('u', None, 'OPTION'), ('W ignore', None, 'OPTION') ]

pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
options,
exclude_binaries=True,
name=name+"_ui.exe",
debug=False,
strip=False,
upx=False,
icon=icofile,
console=False)

coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name=name)

0 comments on commit 79b657c

Please sign in to comment.