-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
113 lines (103 loc) · 3.82 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Windows-only cx_freeze setup file
from cx_Freeze import *
import sys
from version import buildVersion
if sys.version_info < (3, 0, 0):
sys.exit("Python versions lower than 3 are not supported.")
def is_64bit() -> bool:
return sys.maxsize > 2**32
base = None
if sys.platform == "win32":
base = "Win32GUI"
includefiles = ["quirks",
"smilies",
"themes",
"docs",
"README-Dpeta.md",
"README.md",
"LICENSE",
"CHANGELOG-Dpeta.md",
"CHANGELOG.md",
"PCskins.png",
"Pesterchum.png"]
build_exe_options = {
## "includes": [""],
"includes": ["PyQt5.QtCore",
"PyQt5.QtGui",
"PyQt5.QtWidgets",
"pygame",
"feedparser",
"magic",
"ostools",
"requests",
"urllib",
"pytwmn",
"re",
"oyoyo",
"ssl"],
"excludes": ["collections.sys",
"collections._sre",
"collections._json",
"collections._locale",
"collections._struct",
"collections.array",
"collections._weakref"],
"include_files": includefiles,
"include_msvcr": True
}
bdist_mac_options = {
'iconfile': 'trayicon32.icns',
'bundle_name': "Pesterchum"
}
description = "Достанькореша"
icon = "pesterchum.ico"
# See https://stackoverflow.com/questions/15734703/use-cx-freeze-to-create-an-msi-that-adds-a-shortcut-to-the-desktop
shortcut_table = [
("DesktopShortcut", # Shortcut
"DesktopFolder", # Directory_
"Достанькореша", # Name
"TARGETDIR", # Component_
"[TARGETDIR]pesterchum.exe",# Target
None, # Arguments
description, # Description
None, # Hotkey
None, # Icon (Is inherited from pesterchum.exe)
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
),
("StartMenuShortcut", # Shortcut
"StartMenuFolder", # Directory_
"Достанькореша", # Name
"TARGETDIR", # Component_
"[TARGETDIR]pesterchum.exe",# Target
None, # Arguments
description, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
)
]
msi_data = {"Shortcut": shortcut_table}
bdist_msi_options = {'data': msi_data,
'summary_data': {
'comments': "FL1P",
'keywords': "Pesterchum"},
'upgrade_code': "{86740d75-f1f2-48e8-8266-f36395a2d77f}",
'add_to_path': False, # !!!
'all_users': True,
'install_icon': "pesterchum.ico"}
setup(
name = "Pesterchum",
version = buildVersion,
url = "https://github.com/Daosp/pesterchum-Dpeta-altservers-rus/releases",
description = description,#"P3ST3RCHUM",
options = {"build_exe": build_exe_options,
"bdist_msi": bdist_msi_options,
"bdist_mac": bdist_mac_options},
executables = [Executable("pesterchum.py",
base=base,
icon=icon
)])