ee2e6143c5fbd4636915bad8bca4733a16aca9ed
[supernova.git] / src / INSTALL.PAS
1 {//-------------------------------------------------------------------------}\r
2 {/*                                                                         }\r
3 {Copyright (C) 1990, 2009 - Apogee Software, Ltd.                           }\r
4 {                                                                           }\r
5 {This file is part of Supernova.  Supernova is free software; you can       }\r
6 {redistribute it and/or modify it under the terms of the GNU General Public }\r
7 {License as published by the Free Software Foundation; either version 3     }\r
8 {of the License, or (at your option) any later version.                     }\r
9 {                                                                           }\r
10 {This program is distributed in the hope that it will be useful,            }\r
11 {but WITHOUT ANY WARRANTY; without even the implied warranty of             }\r
12 {MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                       }\r
13 {                                                                           }\r
14 {See the GNU General Public License for more details.                       }\r
15 {                                                                           }\r
16 {You should have received a copy of the GNU General Public License          }\r
17 {along with this program; if not, see https://gnu.org/licenses or write to: }\r
18 {  Free Software Foundation, Inc.                                           }\r
19 {  51 Franklin Street, Fifth Floor                                          }\r
20 {  Boston, MA 02110-1301                                                    }\r
21 {  USA                                                                      }\r
22 {                                                                           }\r
23 {Original Source: 1990 Scott Miller                                         }\r
24 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }\r
25 {*/                                                                         }\r
26 {//-------------------------------------------------------------------------}\r
27 program Install;  { Used to add FILES=16 to a CONFIG.SYS file. }\r
28 \r
29 uses crt, dos, turbo3;\r
30 \r
31 {$V-}\r
32 label JUMP;\r
33 \r
34 var x,y,i    :integer;\r
35     Fil      :Text;\r
36     ComTest  :File;\r
37     TestStr  :string[200];\r
38     ch       :char;\r
39     result   :registers;\r
40 \r
41 procedure Pause(X:integer);\r
42  begin\r
43   textcolor(7);\r
44   if X=1 then write('Press any key to continue . . .')\r
45   else write('Press any key to end installation program . . .');\r
46   read(kbd,CH);textcolor(15);writeln;\r
47  end;\r
48 \r
49 BEGIN JUMP:\r
50 textbackground(0);clrscr;textcolor(15);\r
51 clrscr;with Result do begin ax:=$b00;bx:=$1;end;intr($10,result);\r
52 gotoxy(25,2);writeln('SUPERNOVA INSTALLATION PROGRAM');\r
53 gotoxy(25,3);writeln('------------------------------');writeln;\r
54 textcolor(7);\r
55 writeln;\r
56 writeln('NOTE: Hard disk users don''t need to install SUPERNOVA! Hit <Ctrl-C> to abort.');\r
57 writeln;\r
58 writeln\r
59 ('This program will prepare a "boot" disk for SUPERNOVA.  The disk you wish');\r
60 writeln\r
61 ('to make your "boot" disk MUST have DOS already on it (version 2.0 or higher.)');\r
62 writeln\r
63 ('SUPERNOVA makes use of DOS file handles (explained in your DOS manual.)');\r
64 writeln\r
65 ('Everytime you play SUPERNOVA you must use this "boot" disk--which you are in');\r
66 writeln\r
67 ('the process of making--to power-on your computer.');writeln;\r
68 writeln('This program will either:');\r
69 writeln\r
70 ('* Create a CONFIG.SYS with the Files=16 DOS option,');\r
71 writeln\r
72 ('* Add the Files=16 DOS option to a CONFIG.SYS file that is found on the disk,');\r
73 writeln\r
74 ('* Modify a CONFIG.SYS file that already has the Files=# option in it.');\r
75 writeln;textcolor(15);\r
76 writeln('Insert the disk you wish to have installed for SUPERNOVA.');Pause(1);\r
77 gotoxy(1,wherey-1);delline;\r
78 writeln;\r
79 assign(ComTest,'command.com');\r
80 {$I-}\r
81 reset(ComTest);\r
82 {$I+}\r
83 if IOResult<>0 then\r
84  begin textbackground(0);textcolor(15);close(ComTest);\r
85   writeln('This disk does not have the DOS system on it (it''s missing COMMAND.COM).',^g);\r
86   write('You must install a disk that already has DOS, please find another disk...');\r
87   textbackground(0);textcolor(7);\r
88   writeln;writeln;Pause(1);goto JUMP;\r
89  end;\r
90 close(ComTest);\r
91 write('Searching for CONFIG.SYS...');\r
92 assign(Fil,'config.sys');\r
93 {$I-}\r
94 reset(Fil);\r
95 {$I+}\r
96 if IOResult<>0 then  { config.sys file needs to be created! }\r
97  begin\r
98   writeln('not found...will create one for you!');\r
99   rewrite(Fil);\r
100   writeln(Fil,'Files=16');\r
101   close(Fil);\r
102  end\r
103 else                 { config.sys file exists already! }\r
104  begin\r
105   writeln('found...will now modify it correctly.');\r
106   append(Fil);\r
107   writeln(Fil);\r
108   writeln(Fil,'Files=16');\r
109   close(Fil);\r
110  end;\r
111 writeln;\r
112 writeln('Your CONFIG.SYS file is now configured correctly for SUPERNOVA.');\r
113 Pause(1);\r
114 textbackground(0);textcolor(15);\r
115 clrscr;with Result do begin ax:=$b00;bx:=$1;end;intr($10,result);\r
116 gotoxy(25,3);writeln('SUPERNOVA INSTALLATION PROGRAM');\r
117 gotoxy(25,4);writeln('------------------------------');writeln;\r
118 textcolor(7);\r
119 writeln;\r
120 writeln\r
121 ('From now on you MUST use this disk (or any other "boot" disk you make) when');\r
122 writeln\r
123 ('you want to play SUPERNOVA, or the game will crash after you load it!');\r
124 writeln;\r
125 writeln\r
126 ('Simply turn on your computer with this "boot" disk in drive A: when you want');\r
127 writeln\r
128 ('to play SUPERNOVA, then after you see the DOS prompt A> type in NOVA and');\r
129 writeln\r
130 ('press <enter>.');writeln;\r
131 writeln\r
132 ('Before you can play SUPERNOVA you must turn your computer off, then follow');\r
133 writeln\r
134 ('the above instructions.');\r
135 writeln;\r
136 writeln('REMEMBER: If you boot from a hard disk you don''t need to make a "boot" disk.');\r
137 writeln;Pause(2);\r
138 \r
139 textbackground(0);textcolor(7);\r
140 clrscr;with Result do begin ax:=$b00;bx:=$0;end;intr($10,result);\r
141 \r
142 \r
143 END.\1a\r