-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
129 lines (108 loc) · 3.63 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# https://github.com/Futura-Py/TimerX/tree/master
import sys,os
from cx_Freeze import Executable, setup
base = None
if sys.platform == "win32":
base = "Win32GUI"
icon = "./assets/icon.ico"
executables = [
Executable(
"uploadergenius.py",
base=base,
icon=icon,
shortcut_name="UploaderGenius",
target_name="UploaderGenius.exe",
shortcut_dir="ProgramMenuFolder",
)
]
elif sys.platform == "darwin":
# icon = "./assets/logo_new.icns"
icon = "./assets/icon.ico"
executables = [
Executable(
"uploadergenius.py",
base=base,
icon=icon,
shortcut_name="UploaderGenius",
target_name="UploaderGenius",
)
]
else:
# icon = "./assets/logo_new.png"
icon = "./assets/icon.ico"
executables = [
Executable(
"uploadergenius.py",
base=base,
icon=icon,
shortcut_name="UploaderGenius",
target_name="UploaderGenius.exe",
)
]
# directory_table = [
# ("ProgramMenuFolder", "TARGETDIR", "."),
# ("MyProgramMenu", "ProgramMenuFolder", "MYPROG~1|My Program"),
# ]
# msi_data = {
# "Directory": directory_table,
# "ProgId": [
# ("UploaderGenius", None, None, "A simple, lightweight, & beautiful timer app built in Python and tkinter.ttk using rdbende's Sun Valley TTk Theme", "IconId", None),
# ],
# "Icon": [
# ("IconId", "assets/logo.ico"),
# ],
# }
import uuid
upgradeid = (
"{" + str(uuid.uuid3(uuid.NAMESPACE_DNS, "UploaderGenius-App.UploaderGenius.org")).upper() + "}"
)
build_exe_options = {
"include_msvcr": True,
"packages":["src"],
"include_files": [
( './assets/', 'assets' ),
( './locales/', 'locales' ),
( './static/', 'static' )
],
'includes': ['uvicorn',"PIL",'moviepy','upgenius',"requests",'i18n_json','jsons','lastversion','jsonschema','pystray','bcrypt','peewee','fastapi','pycountry','pyperclip','async_tkinter_loop'], # list of extra modules to include (from your virtualenv of system path),
}
bdist_rpm_options = {"icon": icon}
bdist_msi_options = {
"add_to_path": False,
"install_icon": "assets/icon.ico",
"upgrade_code": upgradeid,
"target_name": "UploaderGenius",
}
bdist_mac_options = {"bundle_name": "UploaderGenius", "iconfile": "./assets/icon.ico",
"custom_info_plist": None, # Set this to use a custom info.plist file
"codesign_entitlements": os.path.join(
os.path.dirname(__file__), "codesign-entitlements.plist"
),
"codesign_identity":None, # Set this to enable signing with custom identity (replaces adhoc signature)
"codesign_options": "runtime", # Ensure codesign uses 'hardened runtime'
"codesign_verify": False, # Enable to get more verbose logging regarding codesign
"spctl_assess": False, # Enable to get more verbose logging regarding codesigns
"include_resources":[
( './assets/', 'assets' ),
( './locales/', 'locales' ),
( './static/', 'static' )
]
}
bdist_dmg_options = {
"volume_label": "UploaderGenius",
"applications_shortcut": True,
}
version = "0.9.0"
setup(
name="UploaderGenius",
version=version,
description="The only social media videos publish management tool you'll ever need",
executables=executables,
options={
"build_exe": build_exe_options,
"bdist_mac": bdist_mac_options,
"bdist_dmg": bdist_dmg_options,
"bdist_msi": bdist_msi_options,
"bdist_rpm": bdist_rpm_options,
},
)