VMSharpInstallWizardDemo.sleela
lib/vm/vmsharp/examples/VMSharpInstallWizardDemo.sleela · 114 line(s) · sleela
<< lib/vm/vmsharp/examples/VMSharpInstallWizardDemo.sleela
SLeeLa example: walk the VMSharp(TM) install wizard screens for both paths --
installing VMSharp as a limited Desktop, and installing an OS from
mearvk/OS.Sensitivity.III. Shows the CPU-admission gate, the two selectable
options, the path-specific screens, the fee disclosure, and the fail-closed
confirm gate. Runnable model only -- it installs, reaches, and writes
nothing. >>
#sleela 3.0
material;
class VMSharpInstallWizardDemo {
< ---- 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 = 38013;
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 = 6;
< 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; }
void main() {
VMSharpInstallWizard wiz = new VMSharpInstallWizard();
wiz.configure();
print(wiz.welcomeScreen());
print("");
< Screen 2: record the host CPU (as oslsGetCPUInfo would report it). >
wiz.recordCpu("x64", "GenuineIntel");
print(wiz.cpuScreen());
print("");
< Screen 3: the two selectable options. >
print(wiz.modeSelectScreen());
print("");
< ---- Path A: limited Desktop ---- >
print("### Path A: Limited Desktop ###");
boolean pickedA = wiz.choose("A");
print("chose A: " + pickedA);
print(wiz.desktopScreen());
print(wiz.levyScreen());
print(wiz.confirmScreen());
print("");
< ---- Path B: install from OS.Sensitivity.III ---- >
print("### Path B: Install from OS.Sensitivity.III ###");
VMSharpInstallWizard wizB = new VMSharpInstallWizard();
wizB.configure();
wizB.recordCpu("x64", "AuthenticAMD");
boolean pickedB = wizB.choose("B");
print("chose B: " + pickedB);
< reachable but not yet acquired -> os-creator not ready >
print(wizB.osSensitivityScreen("140.82.112.3,140.82.113.3", false));
print("confirm before acquire + target:");
print(wizB.confirmScreen());
print("");
< choose the root filesystem and lay out the initial hard drive >
print("...choose filesystem + partition the disk...");
print(wizB.diskLayoutScreen("ext4", "/dev/sda"));
print("");
< now acquired, and designate the install target through the plan gate >
print("...after acquire and target designation...");
String screen2 = wizB.osSensitivityScreen("140.82.112.3,140.82.113.3", true);
print(screen2);
VMSharp vmB = wizB.manifest();
VMSharpInstallPlan planB = vmB.getPlan();
planB.designateTarget("vmsharp-desktop-disk-0");
print(wizB.levyScreen());
print(wizB.confirmScreen());
< ---- fail-closed: an unadmitted CPU refuses selection ---- >
print("");
print("### Fail-closed: unsupported CPU ###");
VMSharpInstallWizard wizC = new VMSharpInstallWizard();
wizC.configure();
wizC.recordCpu("arm64", "Apple");
print(wizC.cpuScreen());
print("choose A on unadmitted CPU (should be false): " + wizC.choose("A"));
}
}