forked from suurjaak/InputScope
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinputscope.spec
More file actions
41 lines (37 loc) · 1.32 KB
/
inputscope.spec
File metadata and controls
41 lines (37 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# -*- mode: python -*-
"""
Pyinstaller spec file for InputScope, produces a Windows executable.
@created 13.04.2015
@modified 21.05.2015
"""
import os
import sys
APPPATH = os.path.join(os.path.dirname(os.path.abspath(SPEC)), "inputscope")
sys.path.append(APPPATH)
import conf
a = Analysis([(os.path.join(APPPATH, "main.py"))],)
# Workaround for PyInstaller 2.1 buggy warning about existing pyconfig.h
for d in a.datas:
if "pyconfig" in d[0]:
a.datas.remove(d)
break
a.datas += [(os.path.join(*x), os.path.join(APPPATH, *x), "DATA") for x in
(["static", "icon.ico"], ["static", "site.css"],
["static", "heatmap.min.js"], ["static", "keyboard.svg"],
["views", "base.tpl"], ["views", "heatmap.tpl"],
["views", "index.tpl"], ["views", "input.tpl"])]
pyz = PYZ(a.pure)
exename = "%s_%s.exe" % (conf.Title, conf.Version)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name=exename,
debug=False, # Verbose or non-verbose
strip=False, # EXE and all shared libraries run through cygwin's strip, tends to render Win32 DLLs unusable
upx=True, # Using Ultimate Packer for eXecutables
icon=os.path.join(APPPATH, "static", "icon.ico"),
console=False # Use the Windows subsystem executable instead of the console one
)