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