mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-20 15:54:13 +08:00
34 lines
1.3 KiB
Python
34 lines
1.3 KiB
Python
Import('env', 'arch', 'common')
|
|
|
|
if GetOption('extras') and arch != "Darwin":
|
|
raylib_env = env.Clone()
|
|
raylib_env['LIBPATH'] += [f'#third_party/raylib/{arch}/']
|
|
raylib_env['LINKFLAGS'].append('-Wl,-strip-debug')
|
|
|
|
raylib_libs = common + ["raylib"]
|
|
if arch == "larch64":
|
|
raylib_libs += ["GLESv2", "wayland-client", "wayland-egl", "EGL"]
|
|
else:
|
|
raylib_libs += ["GL"]
|
|
|
|
release = "release3"
|
|
installers = [
|
|
("openpilot", release),
|
|
("openpilot_test", f"{release}-staging"),
|
|
("openpilot_nightly", "nightly"),
|
|
("openpilot_internal", "nightly-dev"),
|
|
]
|
|
|
|
cont = raylib_env.Command("installer/continue_openpilot.o", "installer/continue_openpilot.sh",
|
|
"ld -r -b binary -o $TARGET $SOURCE")
|
|
inter = raylib_env.Command("installer/inter_ttf.o", "installer/inter-ascii.ttf",
|
|
"ld -r -b binary -o $TARGET $SOURCE")
|
|
for name, branch in installers:
|
|
defines = {'BRANCH': f"'\"{branch}\"'"}
|
|
if "internal" in name:
|
|
defines['INTERNAL'] = "1"
|
|
|
|
obj = raylib_env.Object(f"installer/installers/installer_{name}.o", ["installer/installer.cc"], CPPDEFINES=defines)
|
|
installer = raylib_env.Program(f"installer/installers/installer_{name}", [obj, cont, inter], LIBS=raylib_libs)
|
|
assert installer[0].get_size() < 1900*1e3, installer[0].get_size()
|