-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
76 lines (63 loc) · 1.69 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
import sys
from cx_Freeze import setup, Executable
from Version import server_version
# python setup.py build
# python setup.py bdist_msi
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
includeFiles = [
"./images/",
"./lang/",
]
includes = ["pyDes", "web", "requests"] # 'SerialMonitor'
excludes = ['tkinter']
packages = ["time", "sys", "datetime", "traceback", "os", "io", "atexit", "inspect", "getopt", "socket", "wmi",
"threading", "json", "subprocess", "pyDes", "web", "requests", "getmac", "platform"]
requires = ['pyDes', 'requests', 'web.py', 'pyserial', 'wmi', 'getmac'] # RPi.GPIO
build_exe_options = {
'includes': includes,
'excludes': excludes,
'packages': packages,
'include_files': includeFiles
}
shortcut_table = [
("DesktopShortcut", # Shortcut
"DesktopFolder", # Directory_
"DMS", # Name
"TARGETDIR", # Component_
"[TARGETDIR]DMS.exe", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
)
]
msi_data = {
"Shortcut": shortcut_table
}
bdist_msi_options = {
'data': msi_data
}
options = {
"build_exe": build_exe_options,
"bdist_msi": bdist_msi_options
}
executables = [
Executable('Server.py',
base=base,
targetName='DMS',
icon="icon.ico",
shortcutName="DMS",
shortcutDir="DesktopFolder")
]
setup(name='TekinRad DMS',
version=server_version,
description='TekinRad application to control remote doors',
options=options,
executables=executables,
requires=requires
)