mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-22 00:23:43 +08:00
ui: rewrite installer using raylib, remove qt (#33756)
* update SConscript Co-authored-by: Dean Lee <deanlee3@gmail.com> * can't build on mac * raylib installer Co-authored-by: Dean Lee <deanlee3@gmail.com> * rm * debug pls * cleanup * quotes * libs? * bump * hmm * progress bar color * more * not rounded * hardcode a font path..? * embed (a subset of) inter into the installer * different in CI * closer font sizes * closer * add that back * unnecessary * closer to previous impl * prefix is at start of string, substr between prefix and % * Revert "prefix is at start of string, substr between prefix and %" This reverts commit bc53fe8e356ca642680e90682285bd5e8d98ecb5. * bigger on device? * rm --------- Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
This commit is contained in:
+17
-9
@@ -1,6 +1,5 @@
|
||||
import os
|
||||
import json
|
||||
Import('qt_env', 'arch', 'common', 'messaging', 'visionipc', 'transformations')
|
||||
Import('env', 'qt_env', 'arch', 'common', 'messaging', 'visionipc', 'transformations')
|
||||
|
||||
base_libs = [common, messaging, visionipc, transformations,
|
||||
'm', 'OpenCL', 'ssl', 'crypto', 'pthread'] + qt_env["LIBS"]
|
||||
@@ -76,8 +75,15 @@ if GetOption('extras'):
|
||||
|
||||
if arch != "Darwin":
|
||||
# build installers
|
||||
senv = qt_env.Clone()
|
||||
senv['LINKFLAGS'].append('-Wl,-strip-debug')
|
||||
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 = [
|
||||
@@ -87,17 +93,19 @@ if GetOption('extras'):
|
||||
("openpilot_internal", "nightly-dev"),
|
||||
]
|
||||
|
||||
cont = senv.Command(f"installer/continue_openpilot.o", f"installer/continue_openpilot.sh",
|
||||
"ld -r -b binary -o $TARGET $SOURCE")
|
||||
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 = senv.Object(f"installer/installers/installer_{name}.o", ["installer/installer.cc"], CPPDEFINES=d)
|
||||
f = senv.Program(f"installer/installers/installer_{name}", [obj, cont], LIBS=qt_libs)
|
||||
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() < 370*1e3
|
||||
assert f[0].get_size() < 1300*1e3, f[0].get_size()
|
||||
|
||||
# build watch3
|
||||
if arch in ['x86_64', 'aarch64', 'Darwin'] or GetOption('extras'):
|
||||
|
||||
Reference in New Issue
Block a user