mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-29 00:36:32 +00:00
dbf8647d59
Added top & right borders to RawDr. Improved spacing in some debug and compiler reporting. Fixed RawPutChar and EdLite tab width. Fixed Ui missing '0x' prefix syntax highlighter bug. Added 32BitPaint demo.
463 lines
48 KiB
HTML
Executable file
463 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.08">
|
|
<style type="text/css">
|
|
body {background-color:#000000;}
|
|
.cF0{color:#ffffff;background-color:#000000;}
|
|
.cF1{color:#3465a4;background-color:#000000;}
|
|
.cF2{color:#4e9a06;background-color:#000000;}
|
|
.cF3{color:#06989a;background-color:#000000;}
|
|
.cF4{color:#a24444;background-color:#000000;}
|
|
.cF5{color:#75507b;background-color:#000000;}
|
|
.cF6{color:#ce982f;background-color:#000000;}
|
|
.cF7{color:#bcc0b9;background-color:#000000;}
|
|
.cF8{color:#555753;background-color:#000000;}
|
|
.cF9{color:#729fcf;background-color:#000000;}
|
|
.cFA{color:#82bc49;background-color:#000000;}
|
|
.cFB{color:#34e2e2;background-color:#000000;}
|
|
.cFC{color:#ac3535;background-color:#000000;}
|
|
.cFD{color:#ad7fa8;background-color:#000000;}
|
|
.cFE{color:#fce94f;background-color:#000000;}
|
|
.cFF{color:#000000;background-color:#000000;}
|
|
</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->name, haystack_list->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->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 && !</span><span class=cF7>(</span><span class=cF0>*_df_flags & </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>"$BROWN$Does Not Exist:%s$FG$\n"</span><span class=cF0>, tmpde1->full_name;
|
|
<a name="l24"></a> new = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde1->full_name);
|
|
<a name="l25"></a> new[</span><span class=cFE>0</span><span class=cF0>] = tmpde2->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->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->attr & </span><span class=cF3>RS_ATTR_DIR</span><span class=cF0>)
|
|
<a name="l32"></a> OSFilesMergeInner(tmpde1->sub, tmpde->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->datetime - tmpde->datetime</span><span class=cF7>)</span><span class=cF0> > </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>"%s"</span><span class=cF0>, tmpde1->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->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->full_name, tmpde1->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->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>"/*"</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *src_files_find_mask=</span><span class=cF6>"/*"</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://tomawezome.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>(&fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>"ST_FILE_UTIL_FLAGS"</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF6>"+r"</span><span class=cF0>);
|
|
<a name="l56"></a> </span><span class=cF5>FlagsScan</span><span class=cF0>(&fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>"ST_FILE_UTIL_FLAGS"</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 & ~</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>"This is based strictly on file dates.\n"</span><span class=cF0>);
|
|
<a name="l60"></a> tmpde1 = </span><span class=cF5>FilesFind</span><span class=cF0>(src_files_find_mask, fuf_flags & </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 & </span><span class=cF3>FUG_FILES_FIND</span><span class=cF0>);
|
|
<a name="l62"></a> fuf_flags &= </span><span class=cF3>FUF_DIFF</span><span class=cF0>;
|
|
<a name="l63"></a> OSFilesMergeInner(tmpde1, tmpde2, &fuf_flags, &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>"%C:/"</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>"%C:/"</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>"B:/"</span><span class=cF0>);
|
|
<a name="l75"></a> OSFilesMerge(</span><span class=cF6>"B:/"</span><span class=cF0>, dst, </span><span class=cF6>"+d"</span><span class=cF0>);
|
|
<a name="l76"></a> </span><span class=cF6>"Format %C:/ ? "</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>"B:/"</span><span class=cF0>, dst);
|
|
<a name="l79"></a>
|
|
<a name="l80"></a></span><span class=cF2>//</span><span class=cF0> </span><span class=cF2>BootHDIns(dst_drv);</span><span class=cF0>
|
|
<a name="l81"></a>}
|
|
<a name="l82"></a>
|
|
<a name="l83"></a></span><span class=cF1>U0</span><span class=cF0> OSUpgrade()
|
|
<a name="l84"></a>{
|
|
<a name="l85"></a> </span><span class=cF9>I64</span><span class=cF0> drv_let;
|
|
<a name="l86"></a> </span><span class=cF1>U8</span><span class=cF0> *st, *port_st;
|
|
<a name="l87"></a> </span><span class=cF9>I64</span><span class=cF0> res_num;
|
|
<a name="l88"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
|
|
<a name="l89"></a>
|
|
<a name="l90"></a> task = </span><span class=cF5>User</span><span class=cF0>;
|
|
<a name="l91"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
|
|
<a name="l92"></a> task->border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
|
|
<a name="l93"></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="l94"></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="l95"></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="l96"></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="l97"></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="l98"></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="l99"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
|
|
<a name="l100"></a>
|
|
<a name="l101"></a> </span><span class=cF5>XTalk</span><span class=cF0>(task, </span><span class=cF6>"Mount;\nC\n"</span><span class=cF0>);
|
|
<a name="l102"></a>
|
|
<a name="l103"></a> </span><span class=cF6>"\n\nSelect the port of the ATA drive with an existing installation.\n\n"</span><span class=cF0>;
|
|
<a name="l104"></a>
|
|
<a name="l105"></a> </span><span class=cF6>"Hard Drive Port: "</span><span class=cF0>;
|
|
<a name="l106"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l107"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l108"></a> port_st = </span><span class=cF5>StrGet</span><span class=cF0>;
|
|
<a name="l109"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cFE>0</span><span class=cF0> <= </span><span class=cF5>Str2I64</span><span class=cF0>(port_st) < </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF7>)</span><span class=cF0> &&
|
|
<a name="l110"></a> </span><span class=cF7>(</span><span class=cF0>(&</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports[</span><span class=cF5>Str2I64</span><span class=cF7>(</span><span class=cF0>port_st</span><span class=cF7>)</span><span class=cF0>])->signature == </span><span class=cF3>AHCI_PxSIG_ATA</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l111"></a> {
|
|
<a name="l112"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l113"></a> }
|
|
<a name="l114"></a> </span><span class=cF5>Free</span><span class=cF0>(port_st);
|
|
<a name="l115"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l116"></a>
|
|
<a name="l117"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"%s\n\n"</span><span class=cF0>, port_st);
|
|
<a name="l118"></a>
|
|
<a name="l119"></a> </span><span class=cF5>DriveRep</span><span class=cF0>;
|
|
<a name="l120"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l121"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l122"></a> st = </span><span class=cF5>StrGet</span><span class=cF0>(</span><span class=cF6>"\nInstallation Partition Letter: "</span><span class=cF0>);
|
|
<a name="l123"></a> </span><span class=cF1>if</span><span class=cF0> (*st)
|
|
<a name="l124"></a> drv_let = </span><span class=cF5>Letter2Letter</span><span class=cF0>(*st);
|
|
<a name="l125"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l126"></a> drv_let = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l127"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l128"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l129"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF6>'A'</span><span class=cF0> <= drv_let <= </span><span class=cF6>'Z'</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l130"></a>
|
|
<a name="l131"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l132"></a>
|
|
<a name="l133"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>"\nFILE1 is new changes.\n"</span><span class=cF0>
|
|
<a name="l134"></a> </span><span class=cF6>"$CYAN$FILE2$FG$ is from existing install.\n\n"</span><span class=cF0>
|
|
<a name="l135"></a> </span><span class=cF6>"You can hold $GREEN$SPACE$FG$ down to just merge everything."</span><span class=cF0>);
|
|
<a name="l136"></a> OSMerge(drv_let); </span><span class=cF2>// src_drv needed?</span><span class=cF0>
|
|
<a name="l137"></a>
|
|
<a name="l138"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"BootHDIns('%C');\n\nB\n0x20000\n%C\n%s\n\n"</span><span class=cF0>, drv_let, drv_let, port_st);
|
|
<a name="l139"></a> </span><span class=cF5>VideoRep</span><span class=cF0>;
|
|
<a name="l140"></a> res_num = </span><span class=cF5>I64Get</span><span class=cF0>(</span><span class=cF6>"Enter desired list num ($PURPLE$<ENTER>$FG$ for max res): "</span><span class=cF0>,, </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l141"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"%d\n\n\n"</span><span class=cF0>, res_num); </span><span class=cF2>//skip through Disk Cache, Options</span><span class=cF0>
|
|
<a name="l142"></a>
|
|
<a name="l143"></a></span><span class=cF2>//</span><span class=cF0> </span><span class=cF2>"$RED$Install Master Boot loader?$FG$";</span><span class=cF0>
|
|
<a name="l144"></a></span><span class=cF2>//</span><span class=cF0> </span><span class=cF2>if (YorN)</span><span class=cF0>
|
|
<a name="l145"></a></span><span class=cF2>//</span><span class=cF0> </span><span class=cF2>{</span><span class=cF0>
|
|
<a name="l146"></a></span><span class=cF2>//</span><span class=cF0> </span><span class=cF2>'\n';</span><span class=cF0>
|
|
<a name="l147"></a></span><span class=cF2>//</span><span class=cF0> </span><span class=cF2>BootMHDIns(drv_let);</span><span class=cF0>
|
|
<a name="l148"></a></span><span class=cF2>//</span><span class=cF0> </span><span class=cF2>}</span><span class=cF0>
|
|
<a name="l149"></a>
|
|
<a name="l150"></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="l151"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
|
|
<a name="l152"></a>}
|
|
<a name="l153"></a>
|
|
<a name="l154"></a></span><span class=cF1>U0</span><span class=cF0> InstallDrive(</span><span class=cF1>U8</span><span class=cF0> drv_let)
|
|
<a name="l155"></a>{
|
|
<a name="l156"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l157"></a>
|
|
<a name="l158"></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="l159"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l160"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1000</span><span class=cF0>);
|
|
<a name="l161"></a>
|
|
<a name="l162"></a> </span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>"CopyTree(\"::/\",\"%C:/\");"</span><span class=cF0>, drv_let);
|
|
<a name="l163"></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="l164"></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="l165"></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="l166"></a>
|
|
<a name="l167"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%C:/Home/DoDistro.CC"</span><span class=cF0>, drv_let);
|
|
<a name="l168"></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="l169"></a> </span><span class=cF5>Copy</span><span class=cF0>(</span><span class=cF6>"::/Misc/DoDistro.CC"</span><span class=cF0>, st);
|
|
<a name="l170"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l171"></a>
|
|
<a name="l172"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%C:/Home/MakeHome.CC"</span><span class=cF0>, drv_let);
|
|
<a name="l173"></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="l174"></a> </span><span class=cF5>Copy</span><span class=cF0>(</span><span class=cF6>"::/MakeHome.CC"</span><span class=cF0>, st);
|
|
<a name="l175"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l176"></a>}
|
|
<a name="l177"></a>
|
|
<a name="l178"></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="l179"></a>{
|
|
<a name="l180"></a> </span><span class=cF1>if</span><span class=cF0> (ata_port > -</span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l181"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l182"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"DiskPart(,0.5,0.5);\nC\n%d\nY"</span><span class=cF0>, ata_port); </span><span class=cF2>// DOUBLE CHECK INFILE</span><span class=cF0>
|
|
<a name="l183"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l184"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l185"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l186"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l187"></a>}
|
|
<a name="l188"></a>
|
|
<a name="l189"></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="l190"></a>{</span><span class=cF2>// DOUBLE CHECK INFILE</span><span class=cF0>
|
|
<a name="l191"></a> InstallDrive(drv_let);
|
|
<a name="l192"></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="l193"></a> </span><span class=cF1>if</span><span class=cF0> (ata_port > -</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>"C\n%d\n"</span><span class=cF0>, ata_port);
|
|
<a name="l195"></a> </span><span class=cF1>if</span><span class=cF0> (atapi_port > -</span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l196"></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="l197"></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="l198"></a>}
|
|
<a name="l199"></a>
|
|
<a name="l200"></a></span><span class=cF1>U0</span><span class=cF0> VMInstallWiz()
|
|
<a name="l201"></a>{
|
|
<a name="l202"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
|
|
<a name="l203"></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="l204"></a> </span><span class=cF9>CAHCIPort</span><span class=cF0> *port;
|
|
<a name="l205"></a>
|
|
<a name="l206"></a> task = </span><span class=cF5>User</span><span class=cF0>;
|
|
<a name="l207"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
|
|
<a name="l208"></a> task->border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
|
|
<a name="l209"></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="l210"></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="l211"></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="l212"></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="l213"></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="l214"></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="l215"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
|
|
<a name="l216"></a>
|
|
<a name="l217"></a>
|
|
<a name="l218"></a> </span><span class=cF2>////////////////////////////////////</span><span class=cF0>
|
|
<a name="l219"></a> </span><span class=cF5>SATARep</span><span class=cF0>;
|
|
<a name="l220"></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="l221"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l222"></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="l223"></a> {
|
|
<a name="l224"></a> port = &</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports[i];
|
|
<a name="l225"></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="l226"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l227"></a> ata_port = i;
|
|
<a name="l228"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l229"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l230"></a> }
|
|
<a name="l231"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l232"></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="l233"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l234"></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="l235"></a> {
|
|
<a name="l236"></a> port = &</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports[i];
|
|
<a name="l237"></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="l238"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l239"></a> atapi_port = i;
|
|
<a name="l240"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l241"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l242"></a> }
|
|
<a name="l243"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l244"></a>
|
|
<a name="l245"></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="l246"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l247"></a> VMInstallDrive(task, </span><span class=cF6>'C'</span><span class=cF0>, ata_port, atapi_port);
|
|
<a name="l248"></a> VMInstallDrive(task, </span><span class=cF6>'D'</span><span class=cF0>, ata_port, atapi_port);
|
|
<a name="l249"></a> </span><span class=cF5>BootMHDIns</span><span class=cF0>(</span><span class=cF6>'C'</span><span class=cF0>);
|
|
<a name="l250"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l251"></a>
|
|
<a name="l252"></a> </span><span class=cF2>////////////////////////////////////</span><span class=cF0>
|
|
<a name="l253"></a>
|
|
<a name="l254"></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="l255"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
|
|
<a name="l256"></a>}
|
|
<a name="l257"></a>
|
|
<a name="l258"></a></span><span class=cF1>U0</span><span class=cF0> RegularInstallWiz()
|
|
<a name="l259"></a>{
|
|
<a name="l260"></a> </span><span class=cF9>I64</span><span class=cF0> drv_let;
|
|
<a name="l261"></a> </span><span class=cF1>U8</span><span class=cF0> *st, *port_st;
|
|
<a name="l262"></a> </span><span class=cF9>I64</span><span class=cF0> ch, res_num;
|
|
<a name="l263"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
|
|
<a name="l264"></a>
|
|
<a name="l265"></a> task = </span><span class=cF5>User</span><span class=cF0>;
|
|
<a name="l266"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
|
|
<a name="l267"></a> task->border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
|
|
<a name="l268"></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="l269"></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="l270"></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="l271"></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="l272"></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="l273"></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="l274"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
|
|
<a name="l275"></a>
|
|
<a name="l276"></a> </span><span class=cF5>XTalk</span><span class=cF0>(task, </span><span class=cF6>"Mount;\nC\n"</span><span class=cF0>);
|
|
<a name="l277"></a>
|
|
<a name="l278"></a> </span><span class=cF6>"\nSelect the port of the ATA drive to install on.\n"</span><span class=cF0>;
|
|
<a name="l279"></a>
|
|
<a name="l280"></a> </span><span class=cF6>"Hard Drive Port: "</span><span class=cF0>;
|
|
<a name="l281"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l282"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l283"></a> port_st = </span><span class=cF5>StrGet</span><span class=cF0>;
|
|
<a name="l284"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cFE>0</span><span class=cF0> <= </span><span class=cF5>Str2I64</span><span class=cF0>(port_st) < </span><span class=cF3>AHCI_MAX_PORTS</span><span class=cF7>)</span><span class=cF0> &&
|
|
<a name="l285"></a> </span><span class=cF7>(</span><span class=cF0>(&</span><span class=cFB>blkdev</span><span class=cF0>.ahci_hba->ports[</span><span class=cF5>Str2I64</span><span class=cF7>(</span><span class=cF0>port_st</span><span class=cF7>)</span><span class=cF0>])->signature == </span><span class=cF3>AHCI_PxSIG_ATA</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l286"></a> {
|
|
<a name="l287"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l288"></a> }
|
|
<a name="l289"></a> </span><span class=cF5>Free</span><span class=cF0>(port_st);
|
|
<a name="l290"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l291"></a>
|
|
<a name="l292"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"%s\n\n"</span><span class=cF0>, port_st);
|
|
<a name="l293"></a>
|
|
<a name="l294"></a> </span><span class=cF5>DriveRep</span><span class=cF0>;
|
|
<a name="l295"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l296"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l297"></a> st = </span><span class=cF5>StrGet</span><span class=cF0>(</span><span class=cF6>"\nDestination Partition Letter: "</span><span class=cF0>);
|
|
<a name="l298"></a> </span><span class=cF1>if</span><span class=cF0> (*st)
|
|
<a name="l299"></a> drv_let = </span><span class=cF5>Letter2Letter</span><span class=cF0>(*st);
|
|
<a name="l300"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l301"></a> drv_let = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l302"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l303"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l304"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF6>'A'</span><span class=cF0> <= drv_let <= </span><span class=cF6>'Z'</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l305"></a>
|
|
<a name="l306"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l307"></a>
|
|
<a name="l308"></a> </span><span class=cF6>"$RED$Format %C Partition?$FG$\n"</span><span class=cF0>, drv_let;
|
|
<a name="l309"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
|
|
<a name="l310"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l311"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l312"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l313"></a> {
|
|
<a name="l314"></a> </span><span class=cF6>"$PURPLE$1$FG$) Use FAT32\n"</span><span class=cF0>
|
|
<a name="l315"></a> </span><span class=cF6>"$PURPLE$2$FG$) Use RedSea\n"</span><span class=cF0>
|
|
<a name="l316"></a> </span><span class=cF6>"\nFile System Type: "</span><span class=cF0>;
|
|
<a name="l317"></a> ch = </span><span class=cF5>CharGet</span><span class=cF0>;
|
|
<a name="l318"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l319"></a> }
|
|
<a name="l320"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF6>'1'</span><span class=cF0> <= ch <= </span><span class=cF6>'2'</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l321"></a>
|
|
<a name="l322"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'1'</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_FAT32</span><span class=cF0>);
|
|
<a name="l324"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l325"></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="l326"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l327"></a> InstallDrive(drv_let);
|
|
<a name="l328"></a>
|
|
<a name="l329"></a>
|
|
<a name="l330"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"BootHDIns('%C');\n\nB\n0x20000\nC\n%s\n\n"</span><span class=cF0>, drv_let, port_st);
|
|
<a name="l331"></a> </span><span class=cF5>VideoRep</span><span class=cF0>;
|
|
<a name="l332"></a> res_num = </span><span class=cF5>I64Get</span><span class=cF0>(</span><span class=cF6>"Enter desired list num ($PURPLE$<ENTER>$FG$ for max res): "</span><span class=cF0>,, </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l333"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task, </span><span class=cF6>"%d\n\n\n"</span><span class=cF0>, res_num); </span><span class=cF2>//skip through Disk Cache, Options</span><span class=cF0>
|
|
<a name="l334"></a> </span><span class=cF6>"$RED$Install Master Boot loader?$FG$"</span><span class=cF0>;
|
|
<a name="l335"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
|
|
<a name="l336"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l337"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l338"></a> </span><span class=cF5>BootMHDIns</span><span class=cF0>(drv_let);
|
|
<a name="l339"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l340"></a>
|
|
<a name="l341"></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="l342"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
|
|
<a name="l343"></a>}
|
|
<a name="l344"></a>
|
|
<a name="l345"></a></span><span class=cF1>U0</span><span class=cF0> DoInstructions()
|
|
<a name="l346"></a>{
|
|
<a name="l347"></a> </span><span class=cF9>CTask</span><span class=cF0> *task = </span><span class=cF5>User</span><span class=cF0>;
|
|
<a name="l348"></a>
|
|
<a name="l349"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
|
|
<a name="l350"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
|
|
<a name="l351"></a> </span><span class=cF5>WinTileVert</span><span class=cF0>;
|
|
<a name="l352"></a> </span><span class=cF5>XTalk</span><span class=cF0>(task, </span><span class=cF6>"Ed(\"::/Doc/Install.DD\");\n"</span><span class=cF0>);
|
|
<a name="l353"></a>}
|
|
<a name="l354"></a>
|
|
<a name="l355"></a></span><span class=cF1>Bool</span><span class=cF0> DoInstall(</span><span class=cF1>Bool</span><span class=cF0> prompt_reboot)
|
|
<a name="l356"></a>{
|
|
<a name="l357"></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="l358"></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="l359"></a> </span><span class=cF1>U8</span><span class=cF0> *company = </span><span class=cF5>SMBIOSStr</span><span class=cF0>(sys_info, sys_info->manufacturer);
|
|
<a name="l360"></a>
|
|
<a name="l361"></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>"VMware, Inc."</span><span class=cF7>)</span><span class=cF0> && </span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>company, </span><span class=cF6>"innotek GmbH"</span><span class=cF7>)</span><span class=cF0> && </span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>company, </span><span class=cF6>"QEMU"</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l362"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l363"></a> </span><span class=cF6>"\n\n\n\n\nAre you installing inside VMware, QEMU, VirtualBox or a similar virtual machine? "</span><span class=cF0>;
|
|
<a name="l364"></a> vm_install = </span><span class=cF5>YorN</span><span class=cF0>;
|
|
<a name="l365"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l366"></a> </span><span class=cF5>DocBottom</span><span class=cF0>;
|
|
<a name="l367"></a> </span><span class=cF1>if</span><span class=cF0> (vm_install)
|
|
<a name="l368"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l369"></a> </span><span class=cF6>"\n\nUpgrade an existing install,"</span><span class=cF0>
|
|
<a name="l370"></a> </span><span class=cF6>"\nor create new Installation? (U/I): "</span><span class=cF0>;
|
|
<a name="l371"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l372"></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="l373"></a> </span><span class=cF1>while</span><span class=cF0> (ch != </span><span class=cF6>'U'</span><span class=cF0> && ch != </span><span class=cF6>'I'</span><span class=cF0>);
|
|
<a name="l374"></a>
|
|
<a name="l375"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'U'</span><span class=cF0>)
|
|
<a name="l376"></a> {
|
|
<a name="l377"></a> OSUpgrade;
|
|
<a name="l378"></a> prompt_reboot = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l379"></a> }
|
|
<a name="l380"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l381"></a> VMInstallWiz();
|
|
<a name="l382"></a>
|
|
<a name="l383"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l384"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l385"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l386"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l387"></a> </span><span class=cF6>"\n\nThis wizard works if you have a partition ready. You can partition the drive or BootHDIns() "</span><span class=cF0>
|
|
<a name="l388"></a> </span><span class=cF6>"with more options if you do it by hand, not using this wizard.\n\n"</span><span class=cF0>
|
|
<a name="l389"></a> </span><span class=cF6>"Continue Install Wizard "</span><span class=cF0>;
|
|
<a name="l390"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
|
|
<a name="l391"></a> {
|
|
<a name="l392"></a> </span><span class=cF6>"\n\nUpgrade an existing install,"</span><span class=cF0>
|
|
<a name="l393"></a> </span><span class=cF6>"\nor create new Installation? (U/I): "</span><span class=cF0>;
|
|
<a name="l394"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l395"></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="l396"></a> </span><span class=cF1>while</span><span class=cF0> (ch != </span><span class=cF6>'U'</span><span class=cF0> && ch != </span><span class=cF6>'I'</span><span class=cF0>);
|
|
<a name="l397"></a>
|
|
<a name="l398"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'I'</span><span class=cF0>)
|
|
<a name="l399"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l400"></a> RegularInstallWiz();
|
|
<a name="l401"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l402"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l403"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l404"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l405"></a> OSUpgrade;
|
|
<a name="l406"></a> prompt_reboot = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l407"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l408"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l409"></a> }
|
|
<a name="l410"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l411"></a> prompt_reboot = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l412"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l413"></a> </span><span class=cF1>if</span><span class=cF0> (prompt_reboot)
|
|
<a name="l414"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l415"></a> </span><span class=cF6>"Reboot Now "</span><span class=cF0>;
|
|
<a name="l416"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>YorN</span><span class=cF0>)
|
|
<a name="l417"></a> {
|
|
<a name="l418"></a> </span><span class=cF5>DiscEject</span><span class=cF0>(</span><span class=cF6>':'</span><span class=cF0>);
|
|
<a name="l419"></a> </span><span class=cF5>Reboot</span><span class=cF0>;
|
|
<a name="l420"></a> };
|
|
<a name="l421"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l422"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l423"></a>}
|
|
<a name="l424"></a>
|
|
<a name="l425"></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="l426"></a>{
|
|
<a name="l427"></a> DoInstructions;
|
|
<a name="l428"></a>
|
|
<a name="l429"></a> </span><span class=cF1>return</span><span class=cF0> DoInstall(prompt_reboot);
|
|
<a name="l430"></a>}
|
|
<a name="l431"></a>
|
|
<a name="l432"></a>#</span><span class=cF1>if</span><span class=cF0> </span><span class=cF3>__CMD_LINE__</span><span class=cF0>
|
|
<a name="l433"></a>OSInstall(</span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l434"></a>#</span><span class=cF1>endif</span><span class=cF0>
|
|
</span></pre></body>
|
|
</html>
|