ZealOS/docs/Misc/OSInstall.CC.html
TomAwezome 2b03787cc8 Fix OSUpgrade not updating master boot record.
Fix Mount2 AHCI Port value not being cleared on loop.
Change ordering of PersonalMenu links.
Increase Raw mode screen scroll from 1 line to 8 to improve bare-metal performance.
2021-08-06 01:07:27 -04:00

461 lines
48 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V0.13">
<style type="text/css">
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF9>CDirEntry</span><span class=cF0> OSFilesMGFind(</span><span class=cF9>CDirEntry</span><span class=cF0> *needle_entry, </span><span class=cF9>CDirEntry</span><span class=cF0> *haystack_list)
<a name="l2"></a>{
<a name="l3"></a> </span><span class=cF1>while</span><span class=cF0> (haystack_list)
<a name="l4"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l5"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>needle_entry-&gt;name, haystack_list-&gt;name</span><span class=cF7>)</span><span class=cF0>)
<a name="l6"></a> </span><span class=cF1>return</span><span class=cF0> haystack_list;
<a name="l7"></a> haystack_list = haystack_list-&gt;next;
<a name="l8"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l9"></a>
<a name="l10"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l11"></a>}
<a name="l12"></a>
<a name="l13"></a></span><span class=cF1>U0</span><span class=cF0> OSFilesMergeInner(</span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde1, </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde2, </span><span class=cF9>I64</span><span class=cF0> *_fuf_flags, </span><span class=cF9>I64</span><span class=cF0> *_df_flags)
<a name="l14"></a>{
<a name="l15"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
<a name="l16"></a> </span><span class=cF1>U8</span><span class=cF0> *new;
<a name="l17"></a>
<a name="l18"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde1 &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>*_df_flags &amp; </span><span class=cF3>DF_ABORT_ALL_FILES</span><span class=cF7>)</span><span class=cF0>)
<a name="l19"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l20"></a> tmpde = OSFilesMGFind(tmpde1, tmpde2);
<a name="l21"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpde)
<a name="l22"></a> {
<a name="l23"></a> </span><span class=cF6>&quot;$BROWN$Does Not Exist:%s$FG$\n&quot;</span><span class=cF0>, tmpde1-&gt;full_name;
<a name="l24"></a> new = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde1-&gt;full_name);
<a name="l25"></a> new[</span><span class=cFE>0</span><span class=cF0>] = tmpde2-&gt;full_name[</span><span class=cFE>0</span><span class=cF0>]; </span><span class=cF2>// shortcut to quickly get drive letter</span><span class=cF0>
<a name="l26"></a> </span><span class=cF5>Copy</span><span class=cF0>(tmpde1-&gt;full_name, new);
<a name="l27"></a> </span><span class=cF5>Free</span><span class=cF0>(new);
<a name="l28"></a> }
<a name="l29"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l30"></a> {
<a name="l31"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde1-&gt;attr &amp; </span><span class=cF3>RS_ATTR_DIR</span><span class=cF0>)
<a name="l32"></a> OSFilesMergeInner(tmpde1-&gt;sub, tmpde-&gt;sub, _fuf_flags, _df_flags);
<a name="l33"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l34"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l35"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>AbsI64</span><span class=cF7>(</span><span class=cF0>tmpde1-&gt;datetime - tmpde-&gt;datetime</span><span class=cF7>)</span><span class=cF0> &gt; </span><span class=cF3>CDATE_FREQ</span><span class=cF0> * </span><span class=cFE>2</span><span class=cF0>) {</span><span class=cF2>//slop</span><span class=cF0>
<a name="l36"></a> </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, tmpde1-&gt;full_name;
<a name="l37"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l38"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>_fuf_flags, </span><span class=cF3>FUf_DIFF</span><span class=cF7>)</span><span class=cF0>)
<a name="l39"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>FilesFindMatch</span><span class=cF7>(</span><span class=cF0>tmpde1-&gt;full_name, </span><span class=cF3>FILEMASK_TXT</span><span class=cF7>)</span><span class=cF0>)
<a name="l41"></a> </span><span class=cF5>Diff</span><span class=cF0>(tmpde-&gt;full_name, tmpde1-&gt;full_name, _df_flags);
<a name="l42"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l43"></a> }
<a name="l44"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l45"></a> }
<a name="l46"></a> tmpde1 = tmpde1-&gt;next;
<a name="l47"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l48"></a>}
<a name="l49"></a>
<a name="l50"></a></span><span class=cF1>U0</span><span class=cF0> OSFilesMerge(</span><span class=cF1>U8</span><span class=cF0> *dst_files_find_mask=</span><span class=cF6>&quot;/*&quot;</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *src_files_find_mask=</span><span class=cF6>&quot;/*&quot;</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *fu_flags=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l51"></a>{ </span><span class=cF2>// See </span><a href="https://zeal-operating-system.github.io/ZealOS/System/Utils/Merge.CC.html#l44"><span class=cF4>Merge</span></a><span class=cF2>.</span><span class=cF0>
<a name="l52"></a> </span><span class=cF9>I64</span><span class=cF0> df_flags = </span><span class=cFE>0</span><span class=cF0>, fuf_flags = </span><span class=cFE>0</span><span class=cF0>;
<a name="l53"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde1 = </span><span class=cF3>NULL</span><span class=cF0>, *tmpde2 = </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l54"></a>
<a name="l55"></a> </span><span class=cF5>FlagsScan</span><span class=cF0>(&amp;fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>&quot;ST_FILE_UTIL_FLAGS&quot;</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF6>&quot;+r&quot;</span><span class=cF0>);
<a name="l56"></a> </span><span class=cF5>FlagsScan</span><span class=cF0>(&amp;fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>&quot;ST_FILE_UTIL_FLAGS&quot;</span><span class=cF7>)</span><span class=cF0>, fu_flags);
<a name="l57"></a> </span><span class=cF1>if</span><span class=cF0> (fuf_flags &amp; ~</span><span class=cF7>(</span><span class=cF3>FUG_FILES_FIND</span><span class=cF0> | </span><span class=cF3>FUF_DIFF</span><span class=cF7>)</span><span class=cF0>)
<a name="l58"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'FUF'</span><span class=cF0>);
<a name="l59"></a> </span><span class=cF5>PrintWarn</span><span class=cF0>(</span><span class=cF6>&quot;This is based strictly on file dates.\n&quot;</span><span class=cF0>);
<a name="l60"></a> tmpde1 = </span><span class=cF5>FilesFind</span><span class=cF0>(src_files_find_mask, fuf_flags &amp; </span><span class=cF3>FUG_FILES_FIND</span><span class=cF0>);
<a name="l61"></a> tmpde2 = </span><span class=cF5>FilesFind</span><span class=cF0>(dst_files_find_mask, fuf_flags &amp; </span><span class=cF3>FUG_FILES_FIND</span><span class=cF0>);
<a name="l62"></a> fuf_flags &amp;= </span><span class=cF3>FUF_DIFF</span><span class=cF0>;
<a name="l63"></a> OSFilesMergeInner(tmpde1, tmpde2, &amp;fuf_flags, &amp;df_flags);
<a name="l64"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(tmpde1);
<a name="l65"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(tmpde2);
<a name="l66"></a>}
<a name="l67"></a>
<a name="l68"></a>
<a name="l69"></a></span><span class=cF1>U0</span><span class=cF0> OSMerge(</span><span class=cF1>U8</span><span class=cF0> dst_drv, </span><span class=cF1>U8</span><span class=cF0> src_drv=</span><span class=cF6>':'</span><span class=cF0>)
<a name="l70"></a>{
<a name="l71"></a> </span><span class=cF1>U8</span><span class=cF0> *dst = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%C:/&quot;</span><span class=cF0>, dst_drv);
<a name="l72"></a> </span><span class=cF1>U8</span><span class=cF0> *src = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%C:/&quot;</span><span class=cF0>, src_drv);
<a name="l73"></a>
<a name="l74"></a> </span><span class=cF5>CopyTree</span><span class=cF0>(src, </span><span class=cF6>&quot;B:/&quot;</span><span class=cF0>);
<a name="l75"></a> OSFilesMerge(</span><span class=cF6>&quot;B:/&quot;</span><span class=cF0>, dst, </span><span class=cF6>&quot;+d&quot;</span><span class=cF0>);
<a name="l76"></a> </span><span class=cF6>&quot;Format %C:/ ? &quot;</span><span class=cF0>, dst_drv;
<a name="l77"></a> </span><span class=cF5>Format</span><span class=cF0>(dst_drv);
<a name="l78"></a> </span><span class=cF5>CopyTree</span><span class=cF0>(</span><span class=cF6>&quot;B:/&quot;</span><span class=cF0>, dst);
<a name="l79"></a>}
<a name="l80"></a>
<a name="l81"></a></span><span class=cF1>U0</span><span class=cF0> OSUpgrade()
<a name="l82"></a>{
<a name="l83"></a> </span><span class=cF9>I64</span><span class=cF0> drv_let;
<a name="l84"></a> </span><span class=cF1>U8</span><span class=cF0> *st, *port_st;
<a name="l85"></a> </span><span class=cF9>I64</span><span class=cF0> res_num;
<a name="l86"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
<a name="l87"></a>
<a name="l88"></a> task = </span><span class=cF5>User</span><span class=cF0>;
<a name="l89"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
<a name="l90"></a> task-&gt;border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
<a name="l91"></a> task-&gt;border_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </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>) &amp; </span><span class=cFE>15</span><span class=cF0>;
<a name="l92"></a> task-&gt;text_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLUE</span><span class=cF0>;
<a name="l93"></a> task-&gt;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="l94"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_left, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_right, task);
<a name="l95"></a> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_top, </span><span class=cF7>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_top + </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom</span><span class=cF7>)</span><span class=cF0> &gt;&gt; </span><span class=cFE>2</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>, task);
<a name="l96"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_bottom + </span><span class=cFE>3</span><span class=cF0>, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom);
<a name="l97"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l98"></a>
<a name="l99"></a> </span><span class=cF5>XTalk</span><span class=cF0>(task, </span><span class=cF6>&quot;Mount;\nC\n&quot;</span><span class=cF0>);
<a name="l100"></a>
<a name="l101"></a> </span><span class=cF6>&quot;\n\nSelect the port of the ATA drive with an existing installation.\n\n&quot;</span><span class=cF0>;
<a name="l102"></a>
<a name="l103"></a> </span><span class=cF6>&quot;Hard Drive Port: &quot;</span><span class=cF0>;
<a name="l104"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l105"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l106"></a> port_st = </span><span class=cF5>StrGet</span><span class=cF0>;
<a name="l107"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cFE>0</span><span class=cF0> &lt;= </span><span class=cF5>Str2I64</span><span class=cF0>(port_st) &lt; </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l108"></a> </span><span class=cF7>(</span><span class=cF0>(&amp;</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba-&gt;ports[</span><span class=cF5>Str2I64</span><span class=cF7>(</span><span class=cF0>port_st</span><span class=cF7>)</span><span class=cF0>])-&gt;signature == </span><span class=cF3>AHCI_PxSIG_ATA</span><span class=cF7>)</span><span class=cF0>)
<a name="l109"></a> {
<a name="l110"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l111"></a> }
<a name="l112"></a> </span><span class=cF5>Free</span><span class=cF0>(port_st);
<a name="l113"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l114"></a>
<a name="l115"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;%s\n\n&quot;</span><span class=cF0>, port_st);
<a name="l116"></a>
<a name="l117"></a> </span><span class=cF5>DriveRep</span><span class=cF0>;
<a name="l118"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l119"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l120"></a> st = </span><span class=cF5>StrGet</span><span class=cF0>(</span><span class=cF6>&quot;\nInstallation Partition Letter: &quot;</span><span class=cF0>);
<a name="l121"></a> </span><span class=cF1>if</span><span class=cF0> (*st)
<a name="l122"></a> drv_let = </span><span class=cF5>Letter2Letter</span><span class=cF0>(*st);
<a name="l123"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l124"></a> drv_let = </span><span class=cFE>0</span><span class=cF0>;
<a name="l125"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l126"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l127"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF6>'A'</span><span class=cF0> &lt;= drv_let &lt;= </span><span class=cF6>'Z'</span><span class=cF7>)</span><span class=cF0>);
<a name="l128"></a>
<a name="l129"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l130"></a>
<a name="l131"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>&quot;\nFILE1 is new changes.\n&quot;</span><span class=cF0>
<a name="l132"></a> </span><span class=cF6>&quot;$CYAN$FILE2$FG$ is from existing install.\n\n&quot;</span><span class=cF0>
<a name="l133"></a> </span><span class=cF6>&quot;You can hold $GREEN$SPACE$FG$ down to just merge everything.&quot;</span><span class=cF0>);
<a name="l134"></a> OSMerge(drv_let); </span><span class=cF2>// src_drv needed?</span><span class=cF0>
<a name="l135"></a>
<a name="l136"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;BootHDIns('%C');\n\nB\n0x20000\n%C\n%s\n\n&quot;</span><span class=cF0>, drv_let, drv_let, port_st);
<a name="l137"></a> </span><span class=cF5>VideoRep</span><span class=cF0>;
<a name="l138"></a> res_num = </span><span class=cF5>I64Get</span><span class=cF0>(</span><span class=cF6>&quot;Enter desired list num ($PURPLE$&lt;ENTER&gt;$FG$ for max res): &quot;</span><span class=cF0>,, </span><span class=cFE>1</span><span class=cF0>);
<a name="l139"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;%d\n\n\n&quot;</span><span class=cF0>, res_num); </span><span class=cF2>//skip through Disk Cache, Options</span><span class=cF0>
<a name="l140"></a>
<a name="l141"></a> </span><span class=cF6>&quot;$RED$Install Master Boot Loader?$FG$&quot;</span><span class=cF0>;
<a name="l142"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
<a name="l143"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l144"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l145"></a> </span><span class=cF5>BootMHDIns</span><span class=cF0>(drv_let);
<a name="l146"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l147"></a>
<a name="l148"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_top, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom);
<a name="l149"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
<a name="l150"></a>}
<a name="l151"></a>
<a name="l152"></a></span><span class=cF1>U0</span><span class=cF0> InstallDrive(</span><span class=cF1>U8</span><span class=cF0> drv_let)
<a name="l153"></a>{
<a name="l154"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
<a name="l155"></a>
<a name="l156"></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="l157"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1</span><span class=cF0>);
<a name="l158"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1000</span><span class=cF0>);
<a name="l159"></a>
<a name="l160"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>&quot;CopyTree(\&quot;::/\&quot;,\&quot;%C:/\&quot;);&quot;</span><span class=cF0>, drv_let);
<a name="l161"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>&quot;DirMake(\&quot;%C:/Tmp\&quot;);&quot;</span><span class=cF0>, drv_let);
<a name="l162"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>&quot;DirMake(\&quot;%C:/Tmp/ScreenShots\&quot;);&quot;</span><span class=cF0>, drv_let);
<a name="l163"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>&quot;DirMake(\&quot;%C:/Home\&quot;);&quot;</span><span class=cF0>, drv_let);
<a name="l164"></a>
<a name="l165"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%C:/Home/DoDistro.CC&quot;</span><span class=cF0>, drv_let);
<a name="l166"></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="l167"></a> </span><span class=cF5>Copy</span><span class=cF0>(</span><span class=cF6>&quot;::/Misc/DoDistro.CC&quot;</span><span class=cF0>, st);
<a name="l168"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l169"></a>
<a name="l170"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%C:/Home/MakeHome.CC&quot;</span><span class=cF0>, drv_let);
<a name="l171"></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="l172"></a> </span><span class=cF5>Copy</span><span class=cF0>(</span><span class=cF6>&quot;::/MakeHome.CC&quot;</span><span class=cF0>, st);
<a name="l173"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l174"></a>}
<a name="l175"></a>
<a name="l176"></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="l177"></a>{
<a name="l178"></a> </span><span class=cF1>if</span><span class=cF0> (ata_port &gt; -</span><span class=cFE>1</span><span class=cF0>)
<a name="l179"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l180"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;DiskPart(,0.5,0.5);\nC\n%d\nY&quot;</span><span class=cF0>, ata_port); </span><span class=cF2>// DOUBLE CHECK INFILE</span><span class=cF0>
<a name="l181"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l182"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l183"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l184"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l185"></a>}
<a name="l186"></a>
<a name="l187"></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="l188"></a>{</span><span class=cF2>// DOUBLE CHECK INFILE</span><span class=cF0>
<a name="l189"></a> InstallDrive(drv_let);
<a name="l190"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;BootHDIns('%C');\n\nB\n0x20000\n&quot;</span><span class=cF0>, drv_let);
<a name="l191"></a> </span><span class=cF1>if</span><span class=cF0> (ata_port &gt; -</span><span class=cFE>1</span><span class=cF0>)
<a name="l192"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;C\n%d\n&quot;</span><span class=cF0>, ata_port);
<a name="l193"></a> </span><span class=cF1>if</span><span class=cF0> (atapi_port &gt; -</span><span class=cFE>1</span><span class=cF0>)
<a name="l194"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;T%d\n&quot;</span><span class=cF0>, atapi_port);
<a name="l195"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;\n1024\n768\n\n\n&quot;</span><span class=cF0>); </span><span class=cF2>//Exit Drives, set Screen Resolution, skip Disk Cache and Options</span><span class=cF0>
<a name="l196"></a>}
<a name="l197"></a>
<a name="l198"></a></span><span class=cF1>U0</span><span class=cF0> VMInstallWiz()
<a name="l199"></a>{
<a name="l200"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
<a name="l201"></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="l202"></a> </span><span class=cF9>CAHCIPort</span><span class=cF0> *port;
<a name="l203"></a>
<a name="l204"></a> task = </span><span class=cF5>User</span><span class=cF0>;
<a name="l205"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
<a name="l206"></a> task-&gt;border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
<a name="l207"></a> task-&gt;border_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </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>) &amp; </span><span class=cFE>15</span><span class=cF0>;
<a name="l208"></a> task-&gt;text_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLUE</span><span class=cF0>;
<a name="l209"></a> task-&gt;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="l210"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_left, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_right, task);
<a name="l211"></a> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_top, </span><span class=cF7>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_top + </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom</span><span class=cF7>)</span><span class=cF0> &gt;&gt; </span><span class=cFE>2</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>, task);
<a name="l212"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_bottom + </span><span class=cFE>3</span><span class=cF0>, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom);
<a name="l213"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l214"></a>
<a name="l215"></a>
<a name="l216"></a> </span><span class=cF2>////////////////////////////////////</span><span class=cF0>
<a name="l217"></a> </span><span class=cF5>SATARep</span><span class=cF0>;
<a name="l218"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF0>; i++)
<a name="l219"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l220"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba-&gt;ports_implemented, i</span><span class=cF7>)</span><span class=cF0>)
<a name="l221"></a> {
<a name="l222"></a> port = &amp;</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba-&gt;ports[i];
<a name="l223"></a> </span><span class=cF1>if</span><span class=cF0> (port-&gt;signature == </span><span class=cF3>AHCI_PxSIG_ATA</span><span class=cF0>)
<a name="l224"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l225"></a> ata_port = i;
<a name="l226"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l227"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l228"></a> }
<a name="l229"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l230"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF0>; i++)
<a name="l231"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l232"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba-&gt;ports_implemented, i</span><span class=cF7>)</span><span class=cF0>)
<a name="l233"></a> {
<a name="l234"></a> port = &amp;</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba-&gt;ports[i];
<a name="l235"></a> </span><span class=cF1>if</span><span class=cF0> (port-&gt;signature == </span><span class=cF3>AHCI_PxSIG_ATAPI</span><span class=cF0>)
<a name="l236"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l237"></a> atapi_port = i;
<a name="l238"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l239"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l240"></a> }
<a name="l241"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l242"></a>
<a name="l243"></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="l244"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l245"></a> VMInstallDrive(task, </span><span class=cF6>'C'</span><span class=cF0>, ata_port, atapi_port);
<a name="l246"></a> VMInstallDrive(task, </span><span class=cF6>'D'</span><span class=cF0>, ata_port, atapi_port);
<a name="l247"></a> </span><span class=cF5>BootMHDIns</span><span class=cF0>(</span><span class=cF6>'C'</span><span class=cF0>);
<a name="l248"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l249"></a>
<a name="l250"></a> </span><span class=cF2>////////////////////////////////////</span><span class=cF0>
<a name="l251"></a>
<a name="l252"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_top, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom);
<a name="l253"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
<a name="l254"></a>}
<a name="l255"></a>
<a name="l256"></a></span><span class=cF1>U0</span><span class=cF0> RegularInstallWiz()
<a name="l257"></a>{
<a name="l258"></a> </span><span class=cF9>I64</span><span class=cF0> drv_let;
<a name="l259"></a> </span><span class=cF1>U8</span><span class=cF0> *st, *port_st;
<a name="l260"></a> </span><span class=cF9>I64</span><span class=cF0> ch, res_num;
<a name="l261"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
<a name="l262"></a>
<a name="l263"></a> task = </span><span class=cF5>User</span><span class=cF0>;
<a name="l264"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
<a name="l265"></a> task-&gt;border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
<a name="l266"></a> task-&gt;border_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </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>) &amp; </span><span class=cFE>15</span><span class=cF0>;
<a name="l267"></a> task-&gt;text_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLUE</span><span class=cF0>;
<a name="l268"></a> task-&gt;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="l269"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_left, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_right, task);
<a name="l270"></a> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_top, </span><span class=cF7>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_top + </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom</span><span class=cF7>)</span><span class=cF0> &gt;&gt; </span><span class=cFE>2</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>, task);
<a name="l271"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_bottom + </span><span class=cFE>3</span><span class=cF0>, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom);
<a name="l272"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l273"></a>
<a name="l274"></a> </span><span class=cF5>XTalk</span><span class=cF0>(task, </span><span class=cF6>&quot;Mount;\nC\n&quot;</span><span class=cF0>);
<a name="l275"></a>
<a name="l276"></a> </span><span class=cF6>&quot;\nSelect the port of the ATA drive to install on.\n&quot;</span><span class=cF0>;
<a name="l277"></a>
<a name="l278"></a> </span><span class=cF6>&quot;Hard Drive Port: &quot;</span><span class=cF0>;
<a name="l279"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l280"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l281"></a> port_st = </span><span class=cF5>StrGet</span><span class=cF0>;
<a name="l282"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cFE>0</span><span class=cF0> &lt;= </span><span class=cF5>Str2I64</span><span class=cF0>(port_st) &lt; </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l283"></a> </span><span class=cF7>(</span><span class=cF0>(&amp;</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba-&gt;ports[</span><span class=cF5>Str2I64</span><span class=cF7>(</span><span class=cF0>port_st</span><span class=cF7>)</span><span class=cF0>])-&gt;signature == </span><span class=cF3>AHCI_PxSIG_ATA</span><span class=cF7>)</span><span class=cF0>)
<a name="l284"></a> {
<a name="l285"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l286"></a> }
<a name="l287"></a> </span><span class=cF5>Free</span><span class=cF0>(port_st);
<a name="l288"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l289"></a>
<a name="l290"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;%s\n\n&quot;</span><span class=cF0>, port_st);
<a name="l291"></a>
<a name="l292"></a> </span><span class=cF5>DriveRep</span><span class=cF0>;
<a name="l293"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l294"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l295"></a> st = </span><span class=cF5>StrGet</span><span class=cF0>(</span><span class=cF6>&quot;\nDestination Partition Letter: &quot;</span><span class=cF0>);
<a name="l296"></a> </span><span class=cF1>if</span><span class=cF0> (*st)
<a name="l297"></a> drv_let = </span><span class=cF5>Letter2Letter</span><span class=cF0>(*st);
<a name="l298"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l299"></a> drv_let = </span><span class=cFE>0</span><span class=cF0>;
<a name="l300"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l301"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l302"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF6>'A'</span><span class=cF0> &lt;= drv_let &lt;= </span><span class=cF6>'Z'</span><span class=cF7>)</span><span class=cF0>);
<a name="l303"></a>
<a name="l304"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l305"></a>
<a name="l306"></a> </span><span class=cF6>&quot;$RED$Format %C Partition?$FG$\n&quot;</span><span class=cF0>, drv_let;
<a name="l307"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
<a name="l308"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l309"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l310"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l311"></a> {
<a name="l312"></a> </span><span class=cF6>&quot;$PURPLE$1$FG$) Use FAT32\n&quot;</span><span class=cF0>
<a name="l313"></a> </span><span class=cF6>&quot;$PURPLE$2$FG$) Use RedSea\n&quot;</span><span class=cF0>
<a name="l314"></a> </span><span class=cF6>&quot;\nFile System Type: &quot;</span><span class=cF0>;
<a name="l315"></a> ch = </span><span class=cF5>CharGet</span><span class=cF0>;
<a name="l316"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l317"></a> }
<a name="l318"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF6>'1'</span><span class=cF0> &lt;= ch &lt;= </span><span class=cF6>'2'</span><span class=cF7>)</span><span class=cF0>);
<a name="l319"></a>
<a name="l320"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'1'</span><span class=cF0>)
<a name="l321"></a> </span><span class=cF5>Format</span><span class=cF0>(drv_let,, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FSt_FAT32</span><span class=cF0>);
<a name="l322"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l323"></a> </span><span class=cF5>Format</span><span class=cF0>(drv_let,, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FSt_REDSEA</span><span class=cF0>);
<a name="l324"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l325"></a> InstallDrive(drv_let);
<a name="l326"></a>
<a name="l327"></a>
<a name="l328"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;BootHDIns('%C');\n\nB\n0x20000\nC\n%s\n\n&quot;</span><span class=cF0>, drv_let, port_st);
<a name="l329"></a> </span><span class=cF5>VideoRep</span><span class=cF0>;
<a name="l330"></a> res_num = </span><span class=cF5>I64Get</span><span class=cF0>(</span><span class=cF6>&quot;Enter desired list num ($PURPLE$&lt;ENTER&gt;$FG$ for max res): &quot;</span><span class=cF0>,, </span><span class=cFE>1</span><span class=cF0>);
<a name="l331"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>&quot;%d\n\n\n&quot;</span><span class=cF0>, res_num); </span><span class=cF2>//skip through Disk Cache, Options</span><span class=cF0>
<a name="l332"></a> </span><span class=cF6>&quot;$RED$Install Master Boot loader?$FG$&quot;</span><span class=cF0>;
<a name="l333"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
<a name="l334"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l335"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l336"></a> </span><span class=cF5>BootMHDIns</span><span class=cF0>(drv_let);
<a name="l337"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l338"></a>
<a name="l339"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_top, </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom);
<a name="l340"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
<a name="l341"></a>}
<a name="l342"></a>
<a name="l343"></a></span><span class=cF1>U0</span><span class=cF0> DoInstructions()
<a name="l344"></a>{
<a name="l345"></a> </span><span class=cF9>CTask</span><span class=cF0> *task = </span><span class=cF5>User</span><span class=cF0>;
<a name="l346"></a>
<a name="l347"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l348"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l349"></a> </span><span class=cF5>WinTileVert</span><span class=cF0>;
<a name="l350"></a> </span><span class=cF5>XTalk</span><span class=cF0>(task, </span><span class=cF6>&quot;Ed(\&quot;::/Doc/Install.DD\&quot;);\n&quot;</span><span class=cF0>);
<a name="l351"></a>}
<a name="l352"></a>
<a name="l353"></a></span><span class=cF1>Bool</span><span class=cF0> DoInstall(</span><span class=cF1>Bool</span><span class=cF0> prompt_reboot)
<a name="l354"></a>{
<a name="l355"></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>, ch;
<a name="l356"></a> </span><span class=cF9>CSMBIOSSystemInfo</span><span class=cF0> *sys_info = </span><span class=cF5>SMBIOSStructGet</span><span class=cF0>(</span><span class=cF3>SMBIOSt_SYSTEM</span><span class=cF0>);
<a name="l357"></a> </span><span class=cF1>U8</span><span class=cF0> *company = </span><span class=cF5>SMBIOSStr</span><span class=cF0>(sys_info, sys_info-&gt;manufacturer);
<a name="l358"></a>
<a name="l359"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>company, </span><span class=cF6>&quot;VMware, Inc.&quot;</span><span class=cF7>)</span><span class=cF0> &amp;&amp; </span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>company, </span><span class=cF6>&quot;innotek GmbH&quot;</span><span class=cF7>)</span><span class=cF0> &amp;&amp; </span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>company, </span><span class=cF6>&quot;QEMU&quot;</span><span class=cF7>)</span><span class=cF0>)
<a name="l360"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l361"></a> </span><span class=cF6>&quot;\n\n\n\n\nAre you installing inside VMware, QEMU, VirtualBox or a similar virtual machine? &quot;</span><span class=cF0>;
<a name="l362"></a> vm_install = </span><span class=cF5>YorN</span><span class=cF0>;
<a name="l363"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l364"></a> </span><span class=cF5>DocBottom</span><span class=cF0>;
<a name="l365"></a> </span><span class=cF1>if</span><span class=cF0> (vm_install)
<a name="l366"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l367"></a> </span><span class=cF6>&quot;\n\nUpgrade an existing install,&quot;</span><span class=cF0>
<a name="l368"></a> </span><span class=cF6>&quot;\nor create new Installation? (U/I): &quot;</span><span class=cF0>;
<a name="l369"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l370"></a> ch = </span><span class=cF5>ToUpper</span><span class=cF0>(</span><span class=cF5>CharGet</span><span class=cF7>(</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF7>)</span><span class=cF0>);
<a name="l371"></a> </span><span class=cF1>while</span><span class=cF0> (ch != </span><span class=cF6>'U'</span><span class=cF0> &amp;&amp; ch != </span><span class=cF6>'I'</span><span class=cF0>);
<a name="l372"></a>
<a name="l373"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'U'</span><span class=cF0>)
<a name="l374"></a> {
<a name="l375"></a> OSUpgrade;
<a name="l376"></a> prompt_reboot = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l377"></a> }
<a name="l378"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l379"></a> VMInstallWiz();
<a name="l380"></a>
<a name="l381"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l382"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l383"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l384"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l385"></a> </span><span class=cF6>&quot;\n\nThis wizard works if you have a partition ready. You can partition the drive or BootHDIns() &quot;</span><span class=cF0>
<a name="l386"></a> </span><span class=cF6>&quot;with more options if you do it by hand, not using this wizard.\n\n&quot;</span><span class=cF0>
<a name="l387"></a> </span><span class=cF6>&quot;Continue Install Wizard &quot;</span><span class=cF0>;
<a name="l388"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
<a name="l389"></a> {
<a name="l390"></a> </span><span class=cF6>&quot;\n\nUpgrade an existing install,&quot;</span><span class=cF0>
<a name="l391"></a> </span><span class=cF6>&quot;\nor create new Installation? (U/I): &quot;</span><span class=cF0>;
<a name="l392"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l393"></a> ch = </span><span class=cF5>ToUpper</span><span class=cF0>(</span><span class=cF5>CharGet</span><span class=cF7>(</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF7>)</span><span class=cF0>);
<a name="l394"></a> </span><span class=cF1>while</span><span class=cF0> (ch != </span><span class=cF6>'U'</span><span class=cF0> &amp;&amp; ch != </span><span class=cF6>'I'</span><span class=cF0>);
<a name="l395"></a>
<a name="l396"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'I'</span><span class=cF0>)
<a name="l397"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l398"></a> RegularInstallWiz();
<a name="l399"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l400"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l401"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l402"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l403"></a> OSUpgrade;
<a name="l404"></a> prompt_reboot = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l405"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l406"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l407"></a> }
<a name="l408"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l409"></a> prompt_reboot = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l410"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l411"></a> </span><span class=cF1>if</span><span class=cF0> (prompt_reboot)
<a name="l412"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l413"></a> </span><span class=cF6>&quot;Reboot Now &quot;</span><span class=cF0>;
<a name="l414"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
<a name="l415"></a> {
<a name="l416"></a> </span><span class=cF5>DiscEject</span><span class=cF0>(</span><span class=cF6>':'</span><span class=cF0>);
<a name="l417"></a> </span><span class=cF5>Reboot</span><span class=cF0>;
<a name="l418"></a> };
<a name="l419"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l420"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l421"></a>}
<a name="l422"></a>
<a name="l423"></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="l424"></a>{
<a name="l425"></a> DoInstructions;
<a name="l426"></a>
<a name="l427"></a> </span><span class=cF1>return</span><span class=cF0> DoInstall(prompt_reboot);
<a name="l428"></a>}
<a name="l429"></a>
<a name="l430"></a>#</span><span class=cF1>if</span><span class=cF0> </span><span class=cF3>__CMD_LINE__</span><span class=cF0>
<a name="l431"></a>OSInstall(</span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l432"></a>#</span><span class=cF1>endif</span><span class=cF0>
</span></pre></body>
</html>