-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuilder.py
76 lines (67 loc) · 1.82 KB
/
builder.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import sys
from cx_Freeze import Executable, setup
from sportorg import config
base = None
if sys.platform == "win32":
base = "Win32GUI"
include_files = [
config.LOCALE_DIR,
config.TEMPLATE_DIR,
config.IMG_DIR,
config.SOUND_DIR,
config.base_dir("LICENSE"),
config.base_dir("changelog.md"),
config.base_dir("changelog_ru.md"),
config.base_dir("configs"),
config.STYLE_DIR,
config.COMMIT_VERSION_FILE,
]
includes = ["atexit", "codecs", "playsound", "pyImpinj"]
excludes = ["Tkinter", "unittest", "test", "pydoc"]
build_exe_options = {
"includes": includes,
"excludes": excludes,
"packages": ["idna", "requests", "encodings", "asyncio", "pywinusb"],
"include_files": include_files,
"zip_include_packages": ["PySide6"],
"optimize": 2,
"include_msvcr": True,
"silent": 1,
}
bdist_msi_options = {
"all_users": False,
"data": {
"Shortcut": [
(
"DesktopShortcut", # Shortcut
"DesktopFolder", # Directory
config.NAME, # Name
"TARGETDIR", # Component
"[TARGETDIR]SportOrg.exe", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
"TARGETDIR", # WkDir
),
]
},
}
options = {"build_exe": build_exe_options, "bdist_msi": bdist_msi_options}
executables = [
Executable(
"SportOrg.pyw",
base=base,
icon=config.icon_dir("sportorg.ico"),
copyright="GNU GENERAL PUBLIC LICENSE {}".format(config.NAME),
)
]
setup(
name=config.NAME,
version=config.VERSION,
description=config.NAME,
options=options,
executables=executables,
)