-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
69 lines (62 loc) · 1.86 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
import cx_Freeze
# First of compile of the source files, since they
# take up less storage space when compiled
"""
source_files = ["source/guard_parts.py",
"source/constants.py",
"source/covers.py",
"source/entities.py",
"source/guards.py",
"source/progressbar.py",
"source/level.py",
"source/text.py",
"source/platforms.py",
"source/player.py",
"source/spritesheet.py",
"source/terrain.py",
"source/torches.py",
"source/funcs.py",
"source/game.py",
"source/menu.py",
"source/hud.py",
"source/saves.py",
"source/sounds.py",
"source/GIFImage.py"]
# Compile each of the source files
for file in source_files:
py_compile.compile(file, os.path.join("compiled", file[7:]+"c"))
"""
# Set up the executable
executables = [cx_Freeze.Executable(script="source/main.py",
icon="source/src/resources/icon.ico",
targetName="Stealth.exe")]
# All of the files that need to be included
include_files = ["source/src"]
# All of the packages we don't want
excludes = ["OpenGL",
"email",
"html",
"http",
"multiprocessing",
"numpy",
"urllib",
"xml",
"socket"]
# The required packages
packages = ["pygame",
"json",
"os",
"PIL",
"logging"]
# Then finally set it up
cx_Freeze.setup(
name="Stealth",
options={
"build_exe": {
"packages": packages,
"excludes": excludes,
"include_files": include_files
}
},
executables=executables
)