mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 16:26:35 +00:00
156 lines
15 KiB
HTML
Executable file
156 lines
15 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V1.07">
|
|
<style type="text/css">
|
|
body {background-color:#1f1f1f;}
|
|
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
|
|
.cF1{color:#4f84a6;background-color:#1f1f1f;}
|
|
.cF2{color:#73a255;background-color:#1f1f1f;}
|
|
.cF3{color:#297582;background-color:#1f1f1f;}
|
|
.cF4{color:#b34f4b;background-color:#1f1f1f;}
|
|
.cF5{color:#8a52c3;background-color:#1f1f1f;}
|
|
.cF6{color:#b7822f;background-color:#1f1f1f;}
|
|
.cF7{color:#444444;background-color:#1f1f1f;}
|
|
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
|
|
.cF9{color:#94bfde;background-color:#1f1f1f;}
|
|
.cFA{color:#a1ce97;background-color:#1f1f1f;}
|
|
.cFB{color:#6db4be;background-color:#1f1f1f;}
|
|
.cFC{color:#e88e88;background-color:#1f1f1f;}
|
|
.cFD{color:#ca94e8;background-color:#1f1f1f;}
|
|
.cFE{color:#d4b475;background-color:#1f1f1f;}
|
|
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF1>U0</span><span class=cF0> InstallDrive(</span><span class=cF1>U8</span><span class=cF0> drv_let)
|
|
<a name="l2"></a>{
|
|
<a name="l3"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l4"></a>
|
|
<a name="l5"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF5>DriveCheck</span><span class=cF7>(</span><span class=cFB>blkdev</span><span class=cF0>.let_to_drive[drv_let - </span><span class=cF6>'A'</span><span class=cF0>], </span><span class=cF3>FALSE</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l6"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l7"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1000</span><span class=cF0>);
|
|
<a name="l8"></a>
|
|
<a name="l9"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>"CopyTree(\"::/\",\"%C:/\");"</span><span class=cF0>, drv_let);
|
|
<a name="l10"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>"DirMake(\"%C:/Tmp\");"</span><span class=cF0>, drv_let);
|
|
<a name="l11"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>"DirMake(\"%C:/Tmp/ScreenShots\");"</span><span class=cF0>, drv_let);
|
|
<a name="l12"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>"DirMake(\"%C:/Home\");"</span><span class=cF0>, drv_let);
|
|
<a name="l13"></a>
|
|
<a name="l14"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%C:/Home/DoDistro.ZC"</span><span class=cF0>, drv_let);
|
|
<a name="l15"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>FileFind</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l16"></a> </span><span class=cF5>Copy</span><span class=cF0>(</span><span class=cF6>"::/Misc/DoDistro.ZC"</span><span class=cF0>, st);
|
|
<a name="l17"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l18"></a>
|
|
<a name="l19"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%C:/Home/MakeHome.ZC"</span><span class=cF0>, drv_let);
|
|
<a name="l20"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>FileFind</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l21"></a> </span><span class=cF5>Copy</span><span class=cF0>(</span><span class=cF6>"::/MakeHome.ZC"</span><span class=cF0>, st);
|
|
<a name="l22"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l23"></a>}
|
|
<a name="l24"></a>
|
|
<a name="l25"></a></span><span class=cF1>Bool</span><span class=cF0> VMPartDisk(</span><span class=cF9>CTask</span><span class=cF0> *task, </span><span class=cF9>I64</span><span class=cF0> ata_port)
|
|
<a name="l26"></a>{
|
|
<a name="l27"></a> </span><span class=cF1>if</span><span class=cF0> (ata_port > -</span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l28"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l29"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"DiskPart(,1.0);\nC\n%d\nY"</span><span class=cF0>, ata_port); </span><span class=cF2>// DOUBLE CHECK INFILE</span><span class=cF0>
|
|
<a name="l30"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l31"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l32"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l33"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l34"></a>}
|
|
<a name="l35"></a>
|
|
<a name="l36"></a></span><span class=cF1>U0</span><span class=cF0> VMInstallDrive(</span><span class=cF9>CTask</span><span class=cF0> *task, </span><span class=cF1>U8</span><span class=cF0> drv_let, </span><span class=cF9>I64</span><span class=cF0> ata_port, </span><span class=cF9>I64</span><span class=cF0> atapi_port)
|
|
<a name="l37"></a>{</span><span class=cF2>// DOUBLE CHECK INFILE</span><span class=cF0>
|
|
<a name="l38"></a> InstallDrive(drv_let);
|
|
<a name="l39"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"BootHDIns('%C');\n\nB\n0x20000\n"</span><span class=cF0>, drv_let);
|
|
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (ata_port > -</span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l41"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"C\n%d\n"</span><span class=cF0>, ata_port);
|
|
<a name="l42"></a> </span><span class=cF1>if</span><span class=cF0> (atapi_port > -</span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l43"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"T%d\n"</span><span class=cF0>, atapi_port);
|
|
<a name="l44"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"\n1024\n768\n\n\n"</span><span class=cF0>); </span><span class=cF2>//Exit Drives, set Screen Resolution, skip Disk Cache and Options</span><span class=cF0>
|
|
<a name="l45"></a>}
|
|
<a name="l46"></a>
|
|
<a name="l47"></a></span><span class=cF1>U0</span><span class=cF0> VMInstallWiz()
|
|
<a name="l48"></a>{
|
|
<a name="l49"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
|
|
<a name="l50"></a> </span><span class=cF9>I64</span><span class=cF0> i, atapi_port = -</span><span class=cFE>1</span><span class=cF0>, ata_port = -</span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l51"></a> </span><span class=cF9>CAHCIPort</span><span class=cF0> *port;
|
|
<a name="l52"></a> </span><span class=cF1>U8</span><span class=cF0> *in_str;
|
|
<a name="l53"></a>
|
|
<a name="l54"></a> task = </span><span class=cF5>User</span><span class=cF0>;
|
|
<a name="l55"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
|
|
<a name="l56"></a> task->border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
|
|
<a name="l57"></a> task->border_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF5>DriveTextAttrGet</span><span class=cF0>(</span><span class=cF6>':'</span><span class=cF0>) & </span><span class=cFE>15</span><span class=cF0>;
|
|
<a name="l58"></a> task->text_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLUE</span><span class=cF0>;
|
|
<a name="l59"></a> task->win_inhibit = </span><span class=cF3>WIG_TASK_DEFAULT</span><span class=cF0> - </span><span class=cF3>WIF_SELF_BORDER</span><span class=cF0>;
|
|
<a name="l60"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->win_left, </span><span class=cF5>Fs</span><span class=cF0>->win_right, task);
|
|
<a name="l61"></a> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->win_top, </span><span class=cF7>(</span><span class=cF5>Fs</span><span class=cF0>->win_top + </span><span class=cF5>Fs</span><span class=cF0>->win_bottom</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>2</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>, task);
|
|
<a name="l62"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task->win_bottom + </span><span class=cFE>3</span><span class=cF0>, </span><span class=cF5>Fs</span><span class=cF0>->win_bottom);
|
|
<a name="l63"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
|
|
<a name="l64"></a>
|
|
<a name="l65"></a>
|
|
<a name="l66"></a> </span><span class=cF2>////////////////////////////////////</span><span class=cF0>
|
|
<a name="l67"></a> </span><span class=cF5>SATARep</span><span class=cF0>;
|
|
<a name="l68"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF0>; i++)
|
|
<a name="l69"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l70"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports_implemented, i</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l71"></a> {
|
|
<a name="l72"></a> port = &</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports[i];
|
|
<a name="l73"></a> </span><span class=cF1>if</span><span class=cF0> (port->signature == </span><span class=cF3>AHCI_PxSIG_ATA</span><span class=cF0>)
|
|
<a name="l74"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l75"></a> ata_port = i;
|
|
<a name="l76"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l77"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l78"></a> }
|
|
<a name="l79"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l80"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF0>; i++)
|
|
<a name="l81"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l82"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports_implemented, i</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l83"></a> {
|
|
<a name="l84"></a> port = &</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports[i];
|
|
<a name="l85"></a> </span><span class=cF1>if</span><span class=cF0> (port->signature == </span><span class=cF3>AHCI_PxSIG_ATAPI</span><span class=cF0>)
|
|
<a name="l86"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l87"></a> atapi_port = i;
|
|
<a name="l88"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l89"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l90"></a> }
|
|
<a name="l91"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l92"></a>
|
|
<a name="l93"></a> </span><span class=cF1>if</span><span class=cF0> (VMPartDisk</span><span class=cF7>(</span><span class=cF0>task, ata_port</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l94"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l95"></a> VMInstallDrive(task, </span><span class=cF6>'C'</span><span class=cF0>, ata_port, atapi_port);
|
|
<a name="l96"></a> </span><span class=cF5>BootMHDIns</span><span class=cF0>(</span><span class=cF6>'C'</span><span class=cF0>);
|
|
<a name="l97"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l98"></a>
|
|
<a name="l99"></a> </span><span class=cF5>Copy</span><span class=cF0>(</span><span class=cF6>"::/Misc/Auto/BootMHD2.ZC"</span><span class=cF0>, </span><span class=cF6>"C:/System/Boot/BootMHD2.ZC"</span><span class=cF0>);
|
|
<a name="l100"></a>
|
|
<a name="l101"></a> </span><span class=cF2>////////////////////////////////////</span><span class=cF0>
|
|
<a name="l102"></a>
|
|
<a name="l103"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task->win_top, </span><span class=cF5>Fs</span><span class=cF0>->win_bottom);
|
|
<a name="l104"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
|
|
<a name="l105"></a>}
|
|
<a name="l106"></a>
|
|
<a name="l107"></a></span><span class=cF1>Bool</span><span class=cF0> DoInstall(</span><span class=cF1>Bool</span><span class=cF0> prompt_reboot)
|
|
<a name="l108"></a>{
|
|
<a name="l109"></a> </span><span class=cF9>I64</span><span class=cF0> res = </span><span class=cF3>FALSE</span><span class=cF0>, vm_install = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l110"></a>
|
|
<a name="l111"></a> vm_install = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l112"></a> </span><span class=cF5>DocBottom</span><span class=cF0>;
|
|
<a name="l113"></a> VMInstallWiz();
|
|
<a name="l114"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l115"></a> </span><span class=cF5>OnceDrive</span><span class=cF0>(</span><span class=cF6>'C'</span><span class=cF0>, </span><span class=cF6>"PopUp(\"#include \\\"/Misc/Auto/AutoFullDistro0\\\";\");"</span><span class=cF0>);
|
|
<a name="l116"></a> </span><span class=cF5>BootRAM</span><span class=cF0>(</span><span class=cF6>"C:"</span><span class=cF0> </span><span class=cF3>BOOT_DIR_KERNEL_BIN_C</span><span class=cF0>);
|
|
<a name="l117"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l118"></a>}
|
|
<a name="l119"></a>
|
|
<a name="l120"></a></span><span class=cF1>Bool</span><span class=cF0> OSInstall(</span><span class=cF1>Bool</span><span class=cF0> prompt_reboot=</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l121"></a>{
|
|
<a name="l122"></a> </span><span class=cF1>return</span><span class=cF0> DoInstall(prompt_reboot);
|
|
<a name="l123"></a>}
|
|
<a name="l124"></a>
|
|
<a name="l125"></a>#</span><span class=cF1>if</span><span class=cF0> </span><span class=cF3>__CMD_LINE__</span><span class=cF0>
|
|
<a name="l126"></a>OSInstall(</span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l127"></a>#</span><span class=cF1>endif</span><span class=cF0>
|
|
</span></pre></body>
|
|
</html>
|