Move main program files to 'prog', add support for CLI-based interfaces (no boot file).

This commit is contained in:
Anna Rose 2021-08-04 18:41:13 -04:00
parent c0d61d132b
commit 20da3947d9
5 changed files with 15 additions and 4 deletions

View File

@ -4,7 +4,7 @@ parameter debug is false.
Bootstrap(
"/boot/helicopter",
"/init/helicopter",
"/prog/helicopter",
list("/lib/stabilize_helicopter"),
list("/lib/ui"),
debug

View File

@ -16,7 +16,7 @@ local copied is list(
Bootstrap(
"/boot/rocket",
"/init/rocket",
"/prog/rocket",
compiled,
copied,
debug

View File

@ -8,11 +8,17 @@ function Bootstrap {
if debug {
// Open a terminal and run init.
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
if init <> "" {
run "/init".
}
} else {
DeletePath("1:" + bootfile).
// Set OS to boot and restart.
set core:bootfilename to "/init".
if init = "" {
set CORE:BOOTFILENAME to init.
} else {
set CORE:BOOTFILENAME to "/init".
}
reboot.
}
}
@ -38,6 +44,11 @@ function copyLibs {
function compileInit {
parameter init, debug is false.
if init = "" {
return.
}
if debug {
copypath("0:" + init, "1:/init").
return.