84 lines
2.1 KiB
Plaintext
84 lines
2.1 KiB
Plaintext
//This is the startup file for new local users
|
|
UseConsoleLtf("USER.MUZ");
|
|
Fs->answers_displayed=2; //from 0-8
|
|
|
|
LoadAdam3;
|
|
|
|
U8 F(I1 *pattern,I1 *flags="+r+i")
|
|
{
|
|
return Grep(pattern,"/LT/"TEXT_FILE_MASK,flags);
|
|
}
|
|
|
|
U8 R(I1 *pattern,I1 *replace_text=NULL,I1 *flags="+r+l")
|
|
{
|
|
return Grep(pattern,"/LT/"TEXT_FILE_MASK,flags,replace_text);
|
|
}
|
|
|
|
U8 FD(I1 *pattern,I1 *flags="+r+i")
|
|
{
|
|
return Grep(pattern,TEXT_FILE_MASK,flags);
|
|
}
|
|
|
|
U8 RD(I1 *pattern,I1 *replace_text=NULL,I1 *flags="+r+l")
|
|
{
|
|
return Grep(pattern,TEXT_FILE_MASK,flags,replace_text);
|
|
}
|
|
|
|
|
|
PutSysText("ST_USER_STARTUP");
|
|
Type("/LT/DOC/Help.TXZ");
|
|
Fs->scroll_speed=10;
|
|
Bts(&Fs->crt_flags,CRTf_SHOW);
|
|
|
|
|
|
Type("/LT/DOC/StartUp.TXZ");
|
|
|
|
I1 src,dst,*st1,*st2;
|
|
I4 i;
|
|
|
|
if (Fs->user_num==1) {
|
|
for (i=0;i<10;i++) CrLf;
|
|
coutln "This will reformat or delete old installations, "
|
|
"copy files onto a partition, recompile "
|
|
"and modify the boot sector. For this "
|
|
"to work, your hard disk partition must "
|
|
"already be bootable with a boot loader like LILO. "
|
|
"Obviously, the partition "
|
|
"you select will lose data and be destroyed. ";
|
|
cout "Continue ";
|
|
if (YorN) {
|
|
cout "\r\nWould you like to view notes on installation, first";
|
|
if (YorN)
|
|
Edit("/LT/DOC/Install.TXZ");
|
|
coutln "\r\n$$BK,1$$$$FG,PURPLE$$Add Drives so you can install.$$FG$$$$BK,0$$";
|
|
AddDrives;
|
|
src=default_drive;
|
|
cout "\r\n\r\n\r\n$$BK,1$$$$FG,PURPLE$$Destination Drive:$$FG$$$$BK,0$$";
|
|
dst=GetChar;
|
|
coutln;
|
|
st1=MSPrintF("%c:/LT",src);
|
|
st2=MSPrintF("%c:/LT",dst);
|
|
|
|
PrintF("Format %c drive ",dst);
|
|
if (YorN) {
|
|
coutln;
|
|
Format(dst,TRUE,FALSE,PT_LT);
|
|
} else {
|
|
cout "\r\n$$BK 1$$WARNING$$BK 0$$ if you answer yes to the following "
|
|
"you will lose all files in your /LT directory.\r\n";
|
|
cout "Delete ",st2," Directory ";
|
|
if (YorN)
|
|
DelTree(st2);
|
|
coutln;
|
|
}
|
|
CopyTree(st1,st2);
|
|
st2=MSPrintF("%c:/0000BOOT",dst);
|
|
MkDir(st2);
|
|
Free(st2);
|
|
st2=MSPrintF("%c:/TEMP",dst);
|
|
MkDir(st2);
|
|
Free(st2);
|
|
InstallBoot(dst);
|
|
}
|
|
|
|
} |