forked from yinghuocho/firefly-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_win.py
54 lines (49 loc) · 1.48 KB
/
setup_win.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
import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
"packages": ["os"],
"excludes": ["tkinter"],
"include_files": [
("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT\\", "."),
"config.json",
"firefly-blacklist.txt",
"firefly-blacklist.meta.json",
"firefly-hosts.txt",
"firefly-hosts.meta.json",
"firefly-hosts-disabled.txt",
"custom-blacklist.txt",
"custom-whitelist.txt",
"meek-relays.txt",
"cacert.pem",
"README.md",
"LICENSE",
("webpanel\\static", "webpanel\\static"),
("webpanel\\templates", "webpanel\\templates"),
("tools\\", "tools"),
],
}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
exe = Executable(
# what to build
script = "main.py", # the name of your main python script goes here
initScript = None,
base = base, # if creating a GUI instead of a console app, type "Win32GUI"
targetName = "firefly.exe", # this is the name of the executable file
copyDependentFiles = True,
compress = True,
appendScriptToExe = True,
appendScriptToLibrary = True,
icon = "firefly.ico" # if you want to use an icon file, specify the file name here
)
setup(
name = "firefly",
version = "0.3.0",
description = "an Internet censorship circumvention tool",
options = {"build_exe": build_exe_options},
executables = [exe]
)