forked from RareDevs/Rare
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfreeze.py
More file actions
123 lines (111 loc) · 2.81 KB
/
Copy pathfreeze.py
File metadata and controls
123 lines (111 loc) · 2.81 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
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
from cx_Freeze import Executable, setup
from rare import __version__ as _version
_name = 'Rare'
_author = 'RareDevs'
_description = 'Open source alternative for Epic Games Launcher, using Legendary'
_icon = 'rare/resources/images/Rare'
_license = 'LICENSE'
build_exe_options = {
'bin_excludes': [
'qpdf.dll',
'libqpdf.so',
'libqpdf.dylib',
'libqgtk3.so',
],
'excludes': [
'tkinter',
'unittest',
'pydoc',
],
'include_msvcr': True,
'optimize': 2,
}
shortcut_table = [
(
'DesktopShortcut', # Shortcut
'DesktopFolder', # Directory_
'Rare', # Name
'TARGETDIR', # Component_
'[TARGETDIR]Rare.exe', # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR', # WkDir
),
(
'StartMenuShortcut', # Shortcut
'StartMenuFolder', # Directory_
'Rare', # Name
'TARGETDIR', # Component_
'[TARGETDIR]Rare.exe', # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR', # WkDir
),
]
msi_data = {
'Shortcut': shortcut_table,
'ProgId': [
('Prog.Id', None, None, _description, 'IconId', None),
],
'Icon': [('IcodId', f'{_icon}.ico')],
}
bdist_msi_options = {
'product_name': _name,
'license_file': f'{_license}.rtf',
'data': msi_data,
'install_icon': f'{_icon}.ico',
# generated with str(uuid.uuid3(uuid.NAMESPACE_DNS, 'io.github.dummerle.rare')).upper()
'upgrade_code': '{85D9FCC2-733E-3D74-8DD4-8FE33A07ADF8}',
'launch_on_finish': True,
}
bdist_appimage_options = {
'target_name': _name,
'target_version': _version,
}
bdist_mac_options = {
'bundle_name': f'{_name}',
'iconfile': f'{_icon}.icns',
}
bdist_dmg_options = {
'volume_label': _name,
'applications_shortcut': True,
'show_icon_preview': True,
'license': {
'default-language': 'en_US',
'licenses': {
'en_US': _license,
},
'buttons': {'en_US': ['English', 'Agree', 'Disagree', 'Print', 'Save', 'License']},
},
}
executables = [
Executable(
script='rare/main.py',
copyright=f'Copyright (C) 2024 {_author}',
base='gui',
icon=_icon,
target_name=_name,
),
]
setup(
name=_name,
version=_version,
author=_author,
description=_description,
executables=executables,
options={
'build_exe': build_exe_options,
'bdist_msi': bdist_msi_options,
'bdist_appimage': bdist_appimage_options,
'bdist_mac': bdist_mac_options,
'bdist_dmg': bdist_dmg_options,
},
)