feat: redesign installer on MTK toolkit with component selection
Rewrite the Installer app on the Montauk Toolkit (Canvas + gui/mtk widgets, theme, hover states, scrollbar) replacing the hand-rolled px_* renderer and bespoke TrueType usage. Add a new "Software" step: an expandable checkbox tree for optional components (Montauk SDK with gcc/g++, binutils, tcc, lua sub-items; Games; Office; Internet apps; Printing; experimental httpd and SDR). Unchecked components' paths are excluded from the install copy, with a longest-path ownership rule so e.g. sdk/tcc installs even when the rest of the SDK is deselected. The update flow refreshes only the components the target already has. Add tri-state checkbox and disclosure-arrow widgets to the MTK toolkit (anti-aliased, supersampled). Merge tcc and lua into 0:/sdk (0:/sdk/tcc, 0:/sdk/lua) and drop 0:/lib: update tcc config.h, lua luaconf.h, both Makefiles, the devkit clean scope, man pages and montaukos.org notices. Make printing optional: init skips printd when 0:/os/printd.elf is absent. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
@@ -124,6 +124,13 @@ static void log_err(const char* msg) { log(LOG_ERR, msg); }
|
||||
|
||||
// ---- Service runner ----
|
||||
|
||||
static bool service_installed(const char* path) {
|
||||
int fd = montauk::open(path);
|
||||
if (fd < 0) return false;
|
||||
montauk::close(fd);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool run_service(const char* path, const char* name, bool wait = true) {
|
||||
char msg[128];
|
||||
|
||||
@@ -156,7 +163,12 @@ extern "C" void _start() {
|
||||
|
||||
// ---- Stage 1: Network configuration (non-blocking) ----
|
||||
run_service("0:/os/dhcp.elf", "dhcp", false);
|
||||
run_service("0:/os/printd.elf", "print spooler", false);
|
||||
|
||||
// Printing is an optional install component; skip quietly when absent.
|
||||
if (service_installed("0:/os/printd.elf"))
|
||||
run_service("0:/os/printd.elf", "print spooler", false);
|
||||
else
|
||||
log_info("Print spooler not installed, skipping");
|
||||
|
||||
// ---- Stage 2: Login screen -> desktop (falls back to desktop, then shell) ----
|
||||
if (!run_service("0:/os/login.elf", "login")) {
|
||||
|
||||
Reference in New Issue
Block a user