-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
59 lines (53 loc) · 1.61 KB
/
setup.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#setup.py
import sys, os
from cx_Freeze import setup, Executable
__version__ = "0.5.3"
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
include_files = [
'images',
'audio',
('lang\es\LC_MESSAGES\globals.mo', 'lang\es\LC_MESSAGES\globals.mo'),
('lang\en\LC_MESSAGES\globals.mo', 'lang\en\LC_MESSAGES\globals.mo'),
]
# packages to include/exclude
includes = {
"external": [],
"zip": ["base64", "collections", "ctypes", "encodings", "importlib", "io", "json", "logging", "platform", "playsound", "sqlite3", "subprocess", "sys", "urllib", "widgets", "windows", "win32com", "wx"]
}
excludes = {
"external": ["OpenGL", "email", "distutils", "html", "pydoc_data", "unittest", "http", "xml", "pkg_resources"],
"zip": []
}
# find translations and add files
for root, folders, files in os.walk('lang'):
for fName in files:
if ".mo" in fName:
include_files.append(
(
os.path.join(root, fName),
os.path.join(root, fName)
)
)
setup (
name = "Savegame Linker",
description='Program that allow you to keep all saves in one folder using symlinks.',
version=__version__,
options = {
'build_exe': {
'include_files': include_files,
'includes': includes['external'],
'excludes': excludes['external'],
'include_msvcr': True,
'zip_include_packages': includes['zip'],
'zip_exclude_packages': excludes['zip'],
"optimize": 2,
}
},
executables = [
Executable(
"mainWindow.py",
base="Win32GUI",
icon="images/icons.ico",
)
]
)