Skip to content

Commit a1cf266

Browse files
authored
Merge pull request #3 from Redex-Developers/archipelago_pkgs
Add a build option to utilize only the packages required for TTAP
2 parents ceda4a2 + 2198aaf commit a1cf266

File tree

3 files changed

+49
-73
lines changed

3 files changed

+49
-73
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,7 @@ jobs:
2929
--optimize 3 `
3030
--lzma `
3131
--threads=4 `
32-
--nothing `
33-
--use-python `
34-
--use-direct `
35-
--use-gl `
36-
--use-gles `
37-
--use-gles2 `
38-
--use-tinydisplay `
39-
--use-nvidiacg `
40-
--use-egl `
41-
--use-eigen `
42-
--use-openal `
43-
--use-vorbis `
44-
--use-opus `
45-
--use-ffmpeg `
46-
--use-swscale `
47-
--use-swresample `
48-
--use-ode `
49-
--use-pandaphysics `
50-
--use-zlib `
51-
--use-png `
52-
--use-jpeg `
53-
--use-squish `
54-
--use-assimp `
55-
--use-egg `
56-
--use-freetype `
57-
--use-harfbuzz `
58-
--use-openssl `
59-
--use-directcam `
60-
--use-vision `
61-
--use-pandatool `
62-
--use-pview `
63-
--use-deploytools `
64-
--use-skel `
65-
--use-pandafx `
66-
--use-pandaparticlesystem `
67-
--use-contrib `
68-
--use-sse2 `
69-
--use-neon `
70-
--use-toontown `
32+
--archipelago `
7133
--msvc-version=14.3 `
7234
--windows-sdk=10
7335
@@ -116,30 +78,7 @@ jobs:
11678
--optimize 3 \
11779
--lzma \
11880
--threads=4 \
119-
--nothing \
120-
--use-python \
121-
--use-direct \
122-
--use-gl \
123-
--use-tinydisplay \
124-
--use-egl \
125-
--use-eigen \
126-
--use-ode \
127-
--use-pandaphysics \
128-
--use-zlib \
129-
--use-png \
130-
--use-jpeg \
131-
--use-squish \
132-
--use-assimp \
133-
--use-egg \
134-
--use-freetype \
135-
--use-harfbuzz \
136-
--use-openssl \
137-
--use-directcam \
138-
--use-skel \
139-
--use-pandaparticlesystem \
140-
--use-contrib \
141-
--use-sse2 \
142-
--use-toontown \
81+
--archipelago \
14382
--python-incdir="$pythonLocation/include" \
14483
--python-libdir="$pythonLocation/lib"
14584
@@ -175,23 +114,20 @@ jobs:
175114
python makepanda/makepanda.py \
176115
--wheel \
177116
--threads=4 \
178-
--everything \
179-
--use-toontown \
117+
--archipelago \
180118
--python-incdir="$pythonLocation/include" \
181119
--python-libdir="$pythonLocation/lib"
182120
183121
arch -x86_64 python makepanda/makepanda.py \
184122
--wheel \
185123
--threads=4 \
186-
--everything \
187-
--use-toontown \
124+
--archipelago \
188125
189126
# universal
190127
python makepanda/makepanda.py \
191128
--wheel \
192129
--threads=4 \
193-
--everything \
194-
--use-toontown \
130+
--archipelago \
195131
--universal
196132
197133

makepanda/makepanda.py

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,31 @@
105105
"TOONTOWN", # ToonTown DNA, Suits etc
106106
])
107107

108+
PkgListSetArchipelago([
109+
"PYTHON", "DIRECT", # Python support
110+
"GL", "GLES", "GLES2", "TINYDISPLAY", # 3D graphics
111+
"EGL", # OpenGL (ES) integration
112+
"EIGEN", # Linear algebra acceleration
113+
"OPENAL", "FMODEX", # Audio playback
114+
"VORBIS", "OPUS", "FFMPEG", "SWSCALE", "SWRESAMPLE", # Audio decoding
115+
"ODE", "PANDAPHYSICS", # Physics
116+
"ZLIB", "PNG", "JPEG", "SQUISH", # 2D Formats support
117+
"ASSIMP", "EGG", # 3D Formats support
118+
"FREETYPE", "HARFBUZZ", # Text rendering
119+
"OPENSSL", # Transport
120+
"DIRECTCAM", "VISION", # Augmented Reality
121+
"COCOA", # macOS toolkits
122+
"X11", # Unix platform support
123+
"PANDATOOL", "PVIEW", "DEPLOYTOOLS", # Toolchain
124+
"SKEL", # Example SKEL project
125+
"PANDAFX", # Some distortion special lenses
126+
"PANDAPARTICLESYSTEM", # Built in particle system
127+
"CONTRIB", # Experimental
128+
"SSE2", "NEON", # Compiler features
129+
"MIMALLOC", # Memory allocators
130+
"TOONTOWN", # ToonTown DNA, Suits etc
131+
])
132+
108133
CheckPandaSourceTree()
109134

110135
def keyboardInterruptHandler(x,y):
@@ -154,6 +179,7 @@ def usage(problem):
154179
print(" --<PKG>-libdir (custom location for library files of thirdparty package)")
155180
print("")
156181
print(" --nothing (disable every third-party lib)")
182+
print(" --archipelago (enable third-party libraries utilized by Toontown: Archipelago)")
157183
print(" --everything (enable every third-party lib)")
158184
print(" --directx-sdk=X (specify version of DirectX SDK to use: jun2010, aug2009)")
159185
print(" --windows-sdk=X (specify Windows SDK version, eg. 7.1, 8.1, 10 or 11. Default is 8.1)")
@@ -162,7 +188,7 @@ def usage(problem):
162188
print("")
163189
print("The simplest way to compile panda is to just type:")
164190
print("")
165-
print(" makepanda --everything")
191+
print(" makepanda --archipelago")
166192
print("")
167193
os._exit(1)
168194

@@ -182,7 +208,7 @@ def parseopts(args):
182208
# All recognized options.
183209
longopts = [
184210
"help","distributor=","verbose","tests",
185-
"optimize=","everything","nothing","installer","wheel","rtdist","nocolor",
211+
"optimize=","archipelago","everything","nothing","installer","wheel","rtdist","nocolor",
186212
"version=","lzma","no-python","threads=","outputdir=","override=",
187213
"static","debversion=","rpmversion=","rpmrelease=","p3dsuffix=","rtdist-version=",
188214
"directx-sdk=", "windows-sdk=", "msvc-version=", "clean", "use-icl",
@@ -213,6 +239,7 @@ def parseopts(args):
213239
elif (option=="--verbose"): SetVerbose(True)
214240
elif (option=="--distributor"): DISTRIBUTOR=value
215241
elif (option=="--genman"): GENMAN=1
242+
elif (option=="--archipelago"): EnableArchipelagoPkgs()
216243
elif (option=="--everything"): PkgEnableAll()
217244
elif (option=="--nothing"): PkgDisableAll()
218245
elif (option=="--threads"): THREADCOUNT=int(value)
@@ -267,8 +294,11 @@ def parseopts(args):
267294
PkgSetCustomLocation(pkg)
268295
LibDirectory(pkg, value)
269296
break
270-
if (option == "--everything" or option.startswith("--use-")
271-
or option == "--nothing" or option.startswith("--no-")):
297+
if (option == "--everything"
298+
or option == "--archipelago"
299+
or option.startswith("--use-")
300+
or option == "--nothing"
301+
or option.startswith("--no-")):
272302
anything = 1
273303
except:
274304
usage(sys.exc_info()[1])

makepanda/makepandacore.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,7 @@ def UnsetLinkAllStatic():
14831483
########################################################################
14841484

14851485
PKG_LIST_ALL = []
1486+
PKG_LIST_ARCHIPELAGO = []
14861487
PKG_LIST_OMIT = {}
14871488
PKG_LIST_CUSTOM = set()
14881489

@@ -1493,6 +1494,10 @@ def PkgListSet(pkgs):
14931494
PKG_LIST_OMIT={}
14941495
PkgEnableAll()
14951496

1497+
def PkgListSetArchipelago(pkgs):
1498+
global PKG_LIST_ARCHIPELAGO
1499+
PKG_LIST_ARCHIPELAGO = pkgs
1500+
14961501
def PkgListGet():
14971502
return PKG_LIST_ALL
14981503

@@ -1507,6 +1512,11 @@ def PkgDisableAll():
15071512
def PkgEnable(pkg):
15081513
PKG_LIST_OMIT[pkg] = 0
15091514

1515+
def EnableArchipelagoPkgs():
1516+
PkgDisableAll()
1517+
for package in PKG_LIST_ARCHIPELAGO:
1518+
PKG_LIST_OMIT[package] = 0
1519+
15101520
def PkgDisable(pkg):
15111521
PKG_LIST_OMIT[pkg] = 1
15121522

0 commit comments

Comments
 (0)