mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-21 08:03:42 +08:00
openpilot v0.10.1 release
date: 2025-10-24T00:30:59 master commit: 405631baf9685e171a0dd19547cb763f1b163d18
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import os
|
||||
import json
|
||||
Import('env', 'arch', 'common')
|
||||
|
||||
# compile gettext .po -> .mo translations
|
||||
with open(File("translations/languages.json").abspath) as f:
|
||||
languages = json.loads(f.read())
|
||||
|
||||
po_sources = [f"#selfdrive/ui/translations/app_{l}.po" for l in languages.values()]
|
||||
po_sources = [src for src in po_sources if os.path.exists(File(src).abspath)]
|
||||
mo_targets = [src.replace(".po", ".mo") for src in po_sources]
|
||||
mo_build = []
|
||||
for src, tgt in zip(po_sources, mo_targets):
|
||||
mo_build.append(env.Command(tgt, src, "msgfmt -o $TARGET $SOURCE"))
|
||||
mo_alias = env.Alias('mo', mo_build)
|
||||
env.AlwaysBuild(mo_alias)
|
||||
|
||||
if GetOption('extras'):
|
||||
# build installers
|
||||
if 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", "EGL", "gbm", "drm"]
|
||||
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:
|
||||
d = {'BRANCH': f"'\"{branch}\"'"}
|
||||
if "internal" in name:
|
||||
d['INTERNAL'] = "1"
|
||||
|
||||
obj = raylib_env.Object(f"installer/installers/installer_{name}.o", ["installer/installer.cc"], CPPDEFINES=d)
|
||||
f = raylib_env.Program(f"installer/installers/installer_{name}", [obj, cont, inter], LIBS=raylib_libs)
|
||||
# keep installers small
|
||||
assert f[0].get_size() < 1900*1e3, f[0].get_size()
|
||||
Reference in New Issue
Block a user