VMSharpInstallWizard.sleela
lib/vm/vmsharp/VMSharpInstallWizard.sleela · 275 line(s) · sleela
<< lib/vm/vmsharp/VMSharpInstallWizard.sleela
SLeeLa Standard Library Definition.
Definition: The VMSharp(TM) install wizard -- the ordered set of install
SCREENS and the selection flow that lead the user to either install VMSharp
as a limited (minimal) Desktop, or install an operating system from the
mearvk/OS.Sensitivity.III repository. It renders each screen to text and
holds the two primary mode options as selectable VMSharpInstallOption
components. It drives the real plan objects: VMSharp (the manifest),
VMSharpInstallPlan (the two modes + fail-closed designation gate), and
VMSharpOSCreatorRun (reach -> acquire -> OS Creator on OS.Sensitivity.III),
and it surfaces the VMSharpLevy disclosure before any confirmation.
Screen order:
1. welcome
2. cpu-admission (x86/x64, AMD/Intel; gates the rest)
3. mode-select (A = Limited Desktop, B = Install from OS.Sensitivity.III)
4a. desktop-confirm (when A)
4b. os-sensitivity-acquire (when B: reach + acquire + OS Creator)
5. levy-disclosure
6. confirm (fail-closed: requires an admitted CPU and a ready plan)
Honesty boundary: declarative UI model only. Selecting an option sets state
and renders text; it installs nothing, reaches nothing, writes nothing, and
moves no funds. The real install/reach/acquire/build runs on the host under
the VMSharp OS, honoring the user's confirmation and the levy disclosure.
Authored for the User MEARVK LLC, respectful of United States law and of the
persons and groupings of peoples it concerns. Family: vm. >>
#sleela 3.0
material;
class VMSharpInstallWizard {
< ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
<< Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
or catalog can read and (where appropriate) override this record.
Values are faithful to the subject's real origin where publicly known. >>
String metaVersion = "1.0.0";
int metaId = 38008;
String metaAuthor = "Max Rupplin 2026; George Soros a Kindness 2507+";
String metaDate = "2026-11-05";
String metaCopyright = "MEARVK LLC";
String metaTrademark = "VMSharp";
String metaCorporation = "MEARVK LLC";
< metaOrigin: National | <nation> | International | Galactic >
String metaOrigin = "United States";
String metaBirthDate = "2026-11-05";
< metaScienceRating: maturity/robustness on a 1..10 scale >
int metaScienceRating = 7;
< metaNationalSchedule: a real, citable instrument or "none" >
String metaNationalSchedule = "none";
String getMetaVersion() { return metaVersion; }
void setMetaVersion(String v) { metaVersion = v; }
int getMetaId() { return metaId; }
void setMetaId(int v) { metaId = v; }
String getAuthor() { return metaAuthor; }
void setAuthor(String v) { metaAuthor = v; }
String getDate() { return metaDate; }
void setDate(String v) { metaDate = v; }
String getCopyright() { return metaCopyright; }
void setCopyright(String v) { metaCopyright = v; }
String getTrademark() { return metaTrademark; }
void setTrademark(String v) { metaTrademark = v; }
String getCorporation() { return metaCorporation; }
void setCorporation(String v) { metaCorporation = v; }
String getOrigin() { return metaOrigin; }
void setOrigin(String v) { metaOrigin = v; }
String getBirthDate() { return metaBirthDate; }
void setBirthDate(String v) { metaBirthDate = v; }
int getScienceRating() { return metaScienceRating; }
void setScienceRating(int v) { metaScienceRating = v; }
String getNationalSchedule() { return metaNationalSchedule; }
void setNationalSchedule(String v) { metaNationalSchedule = v; }
int OPTION_LIMITED_DESKTOP = 1;
int OPTION_OS_SENSITIVITY = 2;
VMSharp vm;
VMSharpOSCreatorRun creatorRun;
VMSharpInstallOption[] options;
int optionCount;
< the host CPU facts the wizard was given (from oslsGetCPUInfo) >
String cpuArch = "";
String cpuVendor = "";
boolean cpuAdmitted = false;
int chosen = 0;
void configure() {
vm = new VMSharp();
vm.configure();
creatorRun = new VMSharpOSCreatorRun();
creatorRun.configure();
options = new VMSharpInstallOption[4];
optionCount = 0;
VMSharpInstallOption a = new VMSharpInstallOption();
a.configure("A", "Install VMSharp as a limited Desktop",
"Bring up a minimal desktop session from the VMSharp image. No download or OS install.");
options[0] = a;
VMSharpInstallOption b = new VMSharpInstallOption();
b.configure("B", "Install an OS from OS.Sensitivity.III",
"Reach github.com/mearvk/OS.Sensitivity.III over the network, acquire it, and run the OS Creator for its installation instructions, data and code.");
options[1] = b;
optionCount = 2;
}
VMSharp manifest() { return vm; }
VMSharpOSCreatorRun osCreatorRun() { return creatorRun; }
int getOptionCount() { return optionCount; }
VMSharpInstallOption optionAt(int i) {
if (i < 0 || i >= optionCount) { return null; }
return options[i];
}
< ---- Screen 1: welcome ---- >
String welcomeScreen() {
String s = "============================================================\n";
s = s + " VMSharp(TM) Installer\n";
s = s + " self-installer bootloader -- limited Desktop or designated OS\n";
s = s + " owner: " + vm.getOwner() + "\n";
s = s + "============================================================";
return s;
}
< ---- Screen 2: CPU admission ---- >
<< Record the host CPU facts (arch + CPUID vendor from oslsGetCPUInfo) and
gate the wizard: the rest proceeds only on an admitted x86/x64 AMD/Intel
processor. >>
void recordCpu(String arch, String vendor) {
cpuArch = arch; cpuVendor = vendor;
cpuAdmitted = vm.canBootOn(arch, vendor);
}
boolean isCpuAdmitted() { return cpuAdmitted; }
String cpuScreen() {
VMSharpBootloader boot = vm.getBootloader();
String s = "-- Processor check --\n";
s = s + boot.admissionReport(cpuArch, cpuVendor);
if (cpuAdmitted) { s = s + "\nProcessor admitted. You may choose an install path."; }
else { s = s + "\nProcessor not admitted. Installation cannot continue."; }
return s;
}
< ---- Screen 3: mode selection ---- >
String modeSelectScreen() {
String s = "-- Choose how to install --\n";
int i = 0;
while (i < optionCount) {
VMSharpInstallOption opt = options[i];
s = s + opt.render() + "\n";
s = s + opt.renderDetail();
if (i + 1 < optionCount) { s = s + "\n"; }
i = i + 1;
}
return s;
}
<< Select an install path by key. "A" -> limited Desktop; "B" -> OS from
OS.Sensitivity.III. Selection is refused unless the CPU is admitted
(fail-closed), and selecting one option deselects the other. Choosing a
path also prepares the matching plan object. >>
boolean choose(String key) {
if (!cpuAdmitted) { return false; }
int i = 0;
while (i < optionCount) {
VMSharpInstallOption opt = options[i];
opt.deselect();
i = i + 1;
}
if (key == "A") {
VMSharpInstallOption a = options[0];
a.select();
chosen = OPTION_LIMITED_DESKTOP;
vm.startMinimalDesktop();
return true;
}
if (key == "B") {
VMSharpInstallOption b = options[1];
b.select();
chosen = OPTION_OS_SENSITIVITY;
vm.startDownloadAndDesignate();
<< Choosing path B pre-designates the plan's SOURCE: it is the
OS.Sensitivity.III repository itself, known up front. Only the install
TARGET remains for the user to designate, so the plan's fail-closed
gate reduces to "target confirmed" for this path. >>
VMSharpInstallPlan plan = vm.getPlan();
VMSharpRepoAcquisition acq = creatorRun.acquisition();
plan.designateSource(acq.resourceUrl());
return true;
}
return false;
}
int getChosen() { return chosen; }
< ---- Screen 4a: limited Desktop confirm ---- >
String desktopScreen() {
VMSharpInstallPlan plan = vm.getPlan();
String s = "-- Limited Desktop --\n";
s = s + "mode: " + plan.getModeName() + "\n";
s = s + "steps: " + plan.stepCount() + "\n";
s = s + "ready: " + plan.isReady();
return s;
}
< ---- Screen 4b: OS.Sensitivity.III acquire ---- >
<< Record the host resolver result for github.com and render the acquisition
screen for OS.Sensitivity.III. The OS Creator step stays gated until the
repo is reachable and acquired. >>
String osSensitivityScreen(String resolvedAddresses, boolean acquired) {
creatorRun.recordReach(resolvedAddresses);
if (acquired) { creatorRun.markAcquired(); }
VMSharpRepoAcquisition acq = creatorRun.acquisition();
acq.useClone();
String s = "-- Install from OS.Sensitivity.III --\n";
s = s + "repo: " + creatorRun.getTargetRepo() + "\n";
s = s + "reachable: " + creatorRun.isReachable() + "\n";
s = s + "acquire (clone): " + creatorRun.acquisitionCommand() + "\n";
s = s + "os-creator ready: " + creatorRun.osCreatorReady() + "\n";
s = s + creatorRun.provenanceLine() + "\n";
s = s + "os-creator: " + creatorRun.osCreatorCommand();
return s;
}
< ---- Screen 4c: disk layout (filesystem choice + partition manifest) ---- >
<< Choose the root filesystem (EXT4 default, or a similar rootable one) and
designate the target disk, then render the initial hard-drive manifest and
the partition/format plan. Choosing an unrootable filesystem is refused;
the plan is fail-closed until a target disk is designated. >>
String diskLayoutScreen(String rootFs, String targetDisk) {
VMSharpDiskLayout disk = creatorRun.diskLayout();
boolean okFs = disk.chooseRootFilesystem(rootFs);
if (targetDisk != "") { disk.designateTarget(targetDisk); }
String s = "-- Initial hard drive: filesystem + partitioning --\n";
s = s + "root filesystem choice accepted: " + okFs + " (" + disk.getRootFilesystem() + ")\n";
s = s + "available root filesystems: " + disk.rootChoices() + "\n";
s = s + "partition table: " + disk.getPartitionTable() + "\n";
s = s + "partition manifest:\n";
SLList man = disk.partitionManifest();
int i = 0;
while (i < man.length()) { s = s + " " + man.get(i) + "\n"; i = i + 1; }
s = s + "partition plan steps: " + disk.partitionPlanSteps() + "\n";
s = s + "layout ready: " + disk.isReady();
return s;
}
< ---- Screen 5: levy disclosure ---- >
String levyScreen() {
VMSharpLevy levy = vm.getLevy();
return "-- Fee disclosure --\n" + levy.disclosure();
}
< ---- Screen 6: confirm (fail-closed) ---- >
<< The install may be confirmed only when the CPU is admitted and the chosen
path's plan is ready. Limited Desktop is ready once chosen; the
OS.Sensitivity.III path is ready only when reachable AND acquired AND its
install target is designated. >>
boolean canConfirm() {
if (!cpuAdmitted) { return false; }
if (chosen == OPTION_LIMITED_DESKTOP) {
VMSharpInstallPlan plan = vm.getPlan();
return plan.isReady();
}
if (chosen == OPTION_OS_SENSITIVITY) {
VMSharpInstallPlan plan = vm.getPlan();
return creatorRun.osCreatorReady() && plan.isReady();
}
return false;
}
String confirmScreen() {
String s = "-- Confirm --\n";
if (canConfirm()) { s = s + "Ready to install. This screen is the point of user confirmation."; }
else { s = s + "Not ready. Complete the required selections first (fail-closed)."; }
return s;
}
}