mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-26 23:03:53 +08:00
unify agnos/neos installers (#22023)
* c2 installer * remove old installer * move to its own dir * die immediately * fix that * init app
This commit is contained in:
@@ -52,7 +52,8 @@ qt_src = ["main.cc", "ui.cc", "paint.cc", "qt/sidebar.cc", "qt/onroad.cc",
|
||||
|
||||
qt_env.Program("_ui", qt_src, LIBS=qt_libs)
|
||||
|
||||
# setup, factory resetter, and installer
|
||||
|
||||
# setup, factory resetter, and agnos updater
|
||||
if arch != 'aarch64' and GetOption('setup'):
|
||||
|
||||
# TODO: do this for all resources once NEOS has rcc
|
||||
@@ -67,20 +68,26 @@ if arch != 'aarch64' and GetOption('setup'):
|
||||
qt_env.Program("qt/setup/setup", ["qt/setup/setup.cc", asset_obj],
|
||||
LIBS=qt_libs + ['curl', 'common', 'json11'])
|
||||
|
||||
|
||||
# build installers
|
||||
if GetOption('setup'):
|
||||
senv = qt_env.Clone()
|
||||
senv['LINKFLAGS'].append('-Wl,-strip-debug')
|
||||
|
||||
release = "release3" if arch == 'larch64' else "release2"
|
||||
dashcam = "dashcam3" if arch == 'larch64' else "dashcam"
|
||||
installers = [
|
||||
("openpilot", "release3"),
|
||||
("openpilot_test", "release3-staging"),
|
||||
("openpilot", release),
|
||||
("openpilot_test", f"{release}-staging"),
|
||||
("openpilot_nightly", "master-ci"),
|
||||
("openpilot_internal", "master"),
|
||||
("dashcam", "dashcam3"),
|
||||
("dashcam_test", "dashcam3-staging"),
|
||||
("dashcam", dashcam),
|
||||
("dashcam_test", f"{dashcam}-staging"),
|
||||
]
|
||||
|
||||
cont = {}
|
||||
for brand in ("openpilot", "dashcam"):
|
||||
cont[brand] = senv.Command(f"qt/setup/continue_{brand}.o", f"#installer/continue_{brand}.sh",
|
||||
cont[brand] = senv.Command(f"installer/continue_{brand}.o", f"installer/continue_{brand}.sh",
|
||||
"ld -r -b binary -o $TARGET $SOURCE")
|
||||
for name, branch in installers:
|
||||
brand = "dashcam" if "dashcam" in branch else "openpilot"
|
||||
@@ -92,8 +99,8 @@ if arch != 'aarch64' and GetOption('setup'):
|
||||
r = requests.get("https://github.com/commaci2.keys")
|
||||
r.raise_for_status()
|
||||
d['SSH_KEYS'] = f'\\"{r.text.strip()}\\"'
|
||||
obj = senv.Object(f"qt/setup/installer_{name}.o", ["qt/setup/installer.cc"], CPPDEFINES=d)
|
||||
f = senv.Program(f"qt/setup/installer_{name}", [obj, cont[brand]], LIBS=qt_libs)
|
||||
obj = senv.Object(f"installer/installers/installer_{name}.o", ["installer/installer.cc"], CPPDEFINES=d)
|
||||
f = senv.Program(f"installer/installers/installer_{name}", [obj, cont[brand]], LIBS=qt_libs)
|
||||
# keep installers small
|
||||
assert f[0].get_size() < 300*1e3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user