mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-30 19:43:41 +08:00
embed continue scripts in installer (#21846)
* embed continue scripts in installer * cleanup old-commit-hash: 31a4b55218b3e28b155bd34c3cca589a65f65ad7
This commit is contained in:
@@ -76,9 +76,14 @@ if arch != 'aarch64' and GetOption('setup'):
|
||||
("dashcam", "dashcam3"),
|
||||
("dashcam_test", "dashcam3-staging"),
|
||||
]
|
||||
|
||||
cont = {}
|
||||
for brand in ("openpilot", "dashcam"):
|
||||
cont[brand] = senv.Command(f"qt/setup/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"
|
||||
d = {'BRANCH': f"'\"{branch}\"'", 'CONTINUE_SRC_PATH': f"'\"installer/continue_{brand}.sh\"'"}
|
||||
d = {'BRANCH': f"'\"{branch}\"'", 'BRAND': f"'\"{brand}\"'"}
|
||||
if "internal" in name:
|
||||
d['INTERNAL'] = "1"
|
||||
|
||||
@@ -87,7 +92,7 @@ if arch != 'aarch64' and GetOption('setup'):
|
||||
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, LIBS=qt_libs)
|
||||
f = senv.Program(f"qt/setup/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