-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py~
62 lines (52 loc) · 1.84 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
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = [], excludes = [])
import sys
base = 'Win32GUI' if sys.platform=='win32' else None
executables = [
Executable('main.py',
base=base,
targetName='A^2_Player.exe',
icon='./icon.png'
)
]
shortcut_table = [
("DesktopShortcut", # Shortcut
"DesktopFolder", # Directory_
"A^2_Player", # Name
"TARGETDIR", # Component_
"[TARGETDIR]A^2_Player.exe", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
),
("StartupShortcut", # Shortcut
"StartupFolder", # Directory_
"PyPlayer", # Name
"TARGETDIR", # Component_
"[TARGETDIR]A^2_Player.exe", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
)
]
# Now create the table dictionary
msi_data = {"Shortcut": shortcut_table}
# Change some default MSI options and specify the use of the above defined tables
bdist_msi_options = {'data': msi_data}
setup(
name = "A^2_Player",
version = '0.1',
description = "A Python-based media player",
options = {'bdist_msi':bdist_msi_options},
executables = executables
)