home *** CD-ROM | disk | FTP | other *** search
- { INSTALL.INS - CD-ROM Installation File - DOS-platform }
-
- InstName := 'C/C++ Users Journal CD-ROM';
- Cls;
- StrRet := InstName;
- DoFunc(0);
-
- GetFrom:
- DoFunc(5);
- Mssg(6,3,'Enter the Drive letter of your CD-ROM drive.');
- DoFunc(11);
- DoFunc(2);
- CDROMDrive := StrRet;
- BranchEq(IntRet,0,Leaving);
- BranchEq(IntRet,2,GetFrom);
-
- GetDrive:
- DoFunc(5);
- Mssg(6,3,'Enter the Drive letter of your hard disk.');
- StrRet := 'C';
- DoFunc(2);
- ToDrive := StrRet;
- BranchEq(IntRet,0,Leaving);
- BranchEq(IntRet,2,GetDrive);
-
- GetPath:
- DoFunc(5);
- Mssg(6,3,'Enter the Path to Install the CD into. The default');
- Mssg(6,4,'path is \CUJ');
- StrRet := '\CUJ';
- DoFunc(3);
- SysPath := '';
- Concat(SysPath,ToDrive,':',StrRet);
-
- {Make SysPath2 contain the full path to the Batch file on their hard disk}
- StrRet := SysPath;
- DoFunc(6);
- SysPath2 := StrRet;
- ConCat(SysPath2,'CUJ.BAT');
-
- DoFunc(5);
- Mssg(6,3,'You have specified the following:');
- a := '';
- Concat(a,'- CD-ROM is in Drive ',CDROMDrive,':');
- Mssg(6,5,a);
- a := '';
- Concat(a,'- Application will be installed into ',SysPath);
- Mssg(6,6,a);
- DoFunc(7);
- DoFunc(5);
- BranchEq(IntRet,0,Leaving);
- BranchEq(IntRet,2,GetFrom);
- BranchEq(IntRet,3,Leaving);
-
- {Check if they have (IntRet*2+100) Kilobytes available on their hard disk}
- IntRet := 1100;
- DoFunc(4);
- BranchEq(IntRet,0,Leaving);
- BranchEq(IntRet,2,Leaving);
- BranchEq(IntRet,3,Leaving);
-
- DoFunc(5);
- Mssg(6,3,'Installing CD-ROM start up batch file now:');
-
- {Make The Directories Here}
- Mssg(5,21,'Creating Directory...');
- ChDir(CDROMDrive,':');
- ChDir('\CUJ'); {built in directory name on the CD}
- ChDir(ToDrive,':');
- MkDir(SysPath);
- ChDir(SysPath);
-
- Copy(CDROMDrive,':\CUJ\CUJ.BAT');
- DoFunc(22);
- Mssg(5,21,'Creating Batch File...');
-
- StrRet := SysPath2;
- IntRet := 0;
- DoFunc(23);
- BranchEq(IntRet,0,BOpen);
- Goto Error;
-
- BOpen:
- DoFunc(18); {Open or Create the Batch File}
- BranchEq(IntRet,0,IsOpen);
- Goto Error;
-
- IsOpen:
- StrRet := 'HR /Q';
- DoFunc(19);
- BranchEq(IntRet,0,WroteIt);
- Goto Error;
-
- WroteIt:
- DoFunc(20);
- BranchEq(IntRet,0,IsClosed);
- Goto Error;
-
- IsClosed:
- StrRet := SysPath;
- DoFunc(6);
- ConCat(StrRet,'HR.INI');
-
- IntRet := 0;
- DoFunc(23);
- BranchEq(IntRet,0,DoCopy);
- Goto Error;
-
- DoCopy:
- Copy(CDROMDrive,':\CUJ\HR.INI');
- DoFunc(22);
- Mssg(5,21,'Modifying Initialization File...');
-
- IntRet := 0;
- DoFunc(23);
- BranchEq(IntRet,0,DoOpen);
- Goto Error;
-
- DoOpen:
- DoFunc(18);
- BranchEq(IntRet,0,INIOpen);
- Goto Error;
-
- INIOpen:
- StrRet := 'Document Path = ';
- Concat(StrRet,CDROMDrive,':\CUJ');
- DoFunc(19);
- BranchEq(IntRet,0,Wrote1);
- Goto Error;
-
- Wrote1:
- StrRet := 'Alternate Picture Path = ';
- Concat(StrRet,SysPath);
- DoFunc(19);
- BranchEq(IntRet,0,Wrote2);
- Goto Error;
-
- Wrote2:
- StrRet := 'Text Path=';
- Concat(StrRet,SysPath);
- DoFunc(19);
- BranchEq(IntRet,0,Wrote3);
- Goto Error;
-
- Wrote3:
- StrRet := 'Use Directories=2';
- DoFunc(19);
- BranchEq(IntRet,0,WroteINI);
- Goto Error;
-
- WroteINI:
- DoFunc(20);
- BranchEq(IntRet,0,INIClose);
- Goto Error;
-
- INIClose:
- StrRet := SysPath;
- DoFunc(6);
- ConCat(StrRet,'HR.INI');
- IntRet := 1;
- DoFunc(23);
- BranchEq(IntRet,0,INIROOK);
- Goto Error;
-
- INIROOK:
-
- {Mssg(5,21,'Copying Files... ');}
- DoFunc(22);
- {Copy Files}
- Copy(CDROMDrive,':\CUJ\HR.EXE');
- Copy(CDROMDrive,':\CUJ\HR.OVR');
- Copy(CDROMDrive,':\CUJ\HR.DIA');
- Copy(CDROMDrive,':\CUJ\HR.CFG');
- Copy(CDROMDrive,':\CUJ\HR.HS2');
- Copy(CDROMDrive,':\CUJ\HWSYSTEM.VGA');
- Copy(CDROMDrive,':\CUJ\SANS.VGA');
- Copy(CDROMDrive,':\CUJ\SERIF.VGA');
- Copy(CDROMDrive,':\CUJ\STEM.KS');
- Copy(CDROMDrive,':\CUJ\THES.KS');
- Copy(CDROMDrive,':\CUJ\HRW.HW4');
- Copy(CDROMDrive,':\CUJ\HRW.HWT');
- Copy(CDROMDrive,':\CUJ\HRW.HWN');
- Copy(CDROMDrive,':\CUJ\HRW.HWA');
- Copy(CDROMDrive,':\CUJ\HRW.HWX');
- Copy(CDROMDrive,':\CUJ\HRW.HWI');
- Copy(CDROMDrive,':\CUJ\HRW.HWY');
- Copy(CDROMDrive,':\CUJ\INDEX.HWY');
-
- Copy(CDROMDrive,':\CUJ\1990.PCX');
- Copy(CDROMDrive,':\CUJ\1991.PCX');
- Copy(CDROMDrive,':\CUJ\1992.PCX');
- Copy(CDROMDrive,':\CUJ\1993.PCX');
- Copy(CDROMDrive,':\CUJ\1994.PCX');
- Copy(CDROMDrive,':\CUJ\1995.PCX');
-
- Copy(CDROMDrive,':\CUJ\_STARTUP.PCX');
- Copy(CDROMDrive,':\CUJ\ALLYEARS.PCX');
- Copy(CDROMDrive,':\CUJ\CLOSERCH.PCX');
- Copy(CDROMDrive,':\CUJ\CONTENTS.PCX');
- Copy(CDROMDrive,':\CUJ\INDEXSEL.PCX');
- Copy(CDROMDrive,':\CUJ\MAIN.PCX');
- Copy(CDROMDrive,':\CUJ\METAYEAR.PCX');
- Copy(CDROMDrive,':\CUJ\_SEARCH.PCX');
- Copy(CDROMDrive,':\CUJ\_RESULTS.PCX');
-
- Copy(CDROMDrive,':\CUJ\1990.HWN');
- Copy(CDROMDrive,':\CUJ\1991.HWN');
- Copy(CDROMDrive,':\CUJ\1992.HWN');
- Copy(CDROMDrive,':\CUJ\1993.HWN');
- Copy(CDROMDrive,':\CUJ\1994.HWN');
- Copy(CDROMDrive,':\CUJ\1995.HWN');
- Copy(CDROMDrive,':\CUJ\CONTENTS.HWN');
- Copy(CDROMDrive,':\CUJ\INDEX.HWN');
- Copy(CDROMDrive,':\CUJ\INDEXART.HWN');
- Copy(CDROMDrive,':\CUJ\INDEXFUL.HWN');
- Copy(CDROMDrive,':\CUJ\INDEXAUT.HWN');
- Copy(CDROMDrive,':\CUJ\INDEXLIS.HWN');
-
- Copy(CDROMDrive,':\README.TXT');
-
- { Copy(CDROMDrive,':\CUJ\_CONTENT.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_EXIT.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_EXPORT.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_FIND.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_HELP.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_HIGHLIG.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_HITS.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_INDEX.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_NEXT.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_NOICON.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_NOTES.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_NSEARCH.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_OUTLINE.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_PREV.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_PRINT.PCX'); }
- { Copy(CDROMDrive,':\CUJ\_PSEARCH.PCX'); }
-
- Complete:
- StrRet := InstName;
- DoFunc(0);
- Mssg(0,0,'Installation Complete');
- Cls;
- Mssg(6,22,'For important information, please see README.TXT file');
- Mssg(6,23,'Type CUJ to begin C/C++ Users Journal CD-ROM');
- Goto Exit;
-
- Error:
- StrRet := InstName;
- DoFunc(0);
- Mssg(0,0,'An error has occurred during the installation process.');
- Cls;
- Goto Exit;
-
- Leaving:
- StrRet := InstName;
- DoFunc(0);
- Mssg(0,0,'Installation aborted by User');
- Cls;
- Goto Exit;
-
- Exit:
-