Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
140 trimarchi 1
@echo off
2
cls
3
echo -----------------------------------------------------------------------------
4
echo S.Ha.R.K. MS-DOS Installation
5
echo by Paolo Gai 2001 - pj@sssup.it
6
echo -----------------------------------------------------------------------------
7
echo This batch file will:
8
echo.
9
echo - Install S.Ha.R.K. under the C:\SHARK directory
10
echo - Set up the C:\SHARK\BIN Directory with a minimal set of DOS utilities
11
echo - Compile the Kernel
12
echo                 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
13
echo                 º BEFORE running this script remember to:º
14
echo                 º  - Install DJGPP under C:\DJGPP        º
15
echo                 º  - Remove the C:\SHARK Directory       º
16
echo                 ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
17
echo WARNING: To Compile the kernel a batch file called SHARK.BAT will be created
18
echo and run. SHARK.BAT will load also a 16Mb SMARTDRV to reduce compile time.
19
echo.
20
echo -----------------------------------------------------------------------------
21
echo IMPORTANT: Please send any comment, question or bug directly to:
22
echo            shark-help@gandalf.sssup.it
23
echo    ReTiS Lab - Scuola Superiore S. Anna - Via Carducci, 40 - Pisa - Italy
24
echo -----------------------------------------------------------------------------
25
pause
26
cls
27
 
28
echo Checking system configuration...
29
rem echo Checking Command Line parameters...
30
if a%1==a goto PARAMERROR
31
if NOT a%2==a goto PARAMERROR
32
rem echo ... Ok: Installing S.Ha.R.K. into %1
33
 
34
rem echo Checking long names...
35
echo goofy >goofy6789
36
cls
37
if NOT exist goofy678 goto LONGNAMES
38
del goofy678
39
cls
40
rem echo ...Ok! It seems You are using MS-DOS or Windows 9x in DOS mode...
41
 
42
rem echo Detecting your software....
43
 
44
rem Detecting if current dir is correct
45
rem ---------------------------------------------------------------
46
rem echo Checking .\INSTALL.BAT...
47
if not exist INSTALL.BAT goto NOBATCH
48
rem echo ... INSTALL.BAT found!
49
 
50
 
51
rem Detecting if GCC is present
52
rem ---------------------------------------------------------------
53
rem echo Checking gcc...
54
del goofy
55
cls
56
gcc --version >goofy
57
cls
58
if not exist goofy NODJGPP
59
cls
60
rem echo ...GCC found!
61
 
62
rem Detecting if MAKE is present
63
rem ---------------------------------------------------------------
64
rem echo Checking make...
65
del goofy
66
cls
67
make --version >goofy
68
cls
69
if not exist goofy NOMAKE
70
rem echo ...MAKE found!
71
del goofy
72
cls
73
 
74
rem Detecting if C:\SHARK is present
75
rem ---------------------------------------------------------------
76
rem echo Checking absence of C:\SHARK (some error messages printed!)...
77
if exist %1\GOOFY YESSHARKDIR
78
echo goofy >%1\GOOFY
79
cls
80
if exist %1\GOOFY goto YESSHARKDIR2
81
rem echo ...Ok!
82
cls
83
 
84
rem Second Banner
85
rem ---------------------------------------------------------------
86
echo -----------------------------------------------------------------------
87
echo The batch file is now ready to install S.Ha.R.K. under %1
88
echo -----------------------------------------------------------------------
89
echo Please note:
90
echo.
91
echo If SMARTDRV is currently loaded the system can stay a few
92
echo seconds idle after unzip32 has finished its work.
93
echo.
94
echo In that case the system is not crashed but it is flushing the
95
echo SMARTDRV cache to the disk!
96
echo -----------------------------------------------------------------------
97
pause
98
cls
99
 
100
rem Decompressing the files
101
rem ----------------------------------
102
md %1
103
unzip32 -a *.zip -d %1
104
rem unzip32 -ao *.zi1 -d %1
105
rem unzip32 -ao *.zi2 -d %1
106
 
107
rem Creating SHARK.BAT
108
rem ------------------
109
echo &echo off                                                                  > %1\SHARK.BAT
110
echo rem This file was created by                                               >> %1\SHARK.BAT
111
echo rem The S.Ha.R.K. Install script by Paolo Gai 2001 - pj@sssup.it           >> %1\SHARK.BAT
112
echo.                                                                           >> %1\SHARK.BAT
113
echo rem Please do not modify this file unless you know what you are doing!!!   >> % style="color: #448888;">1\SHARK.BAT
114
echo.                                                                           >> %1\SHARK.BAT
115
echo rem updating the PATH...                                                   >> %1\SHARK.BAT
116
echo set PATH=%1\bin;c:\djgpp\bin;%%PATH%%                                      >> %1\SHARK.BAT
117
echo.                                                                           >> %1\SHARK.BAT
118
echo rem This variable is needed for the S.Ha.R.K. Makefile (use / and not \ !!!) >> % style="color: #448888;">1\SHARK.BAT
119
myfilter %1                                                                     >> %1\SHARK.BAT
120
echo.                                                                           >> %1\SHARK.BAT
121
echo rem this is for the DJGPP; check if the environment settings are OK!       >> % style="color: #448888;">1\SHARK.BAT
122
echo set DJGPP=C:\DJGPP\DJGPP.ENV                                               >> %1\SHARK.BAT
123
echo.                                                                           >> %1\SHARK.BAT
124
echo rem Remember that if you use smartdrv you also have to check               >> %1\SHARK.BAT
125
echo rem   the link offset into the c:\shark\config\msdos.mak file              >> %1\SHARK.BAT
126
echo rem   (look at the LINK_OPT environment variable, option -Ttext)           >> %1\SHARK.BAT
127
echo smartdrv 16000                                                             >> %1\SHARK.BAT
128
echo.                                                                           >> %1\SHARK.BAT
129
echo cls                                                                        >> %1\SHARK.BAT
130
 
131
 
132
rem ... and now we compile!!!
133
cd %1
134
call shark.bat
135
make
136
cd demos
137
rem make demo
138
 
139
rem Final Banner
140
rem ----------------
141
cls
142
echo  ÛÛÛÛÛÛ Û     Û    Û    ÛÛÛÛÛÛ  Û     Û  ³ by
143
echo Û       Û     Û  ÛÛ ÛÛ  Û    Û  Û    Û   ³   The ReTiS Lab and others
144
echo Û       Û     Û Û     Û Û    Û  Û   Û    ³    http://shark.sssup.it
145
echo  ÛÛÛÛÛ  ÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ ÛÛÛÛÛÛ  ÛÛÛÛ     ³
146
echo       Û Û     Û Û     Û Û  Û    Û   Û    ³   Full Author list at
147
echo       Û Û     Û Û     Û Û   Û   Û    Û   ³    http://shark.sssup.it/people.html
148
echo ÛÛÛÛÛÛ  Û     Û Û     Û Û    Û  Û     Û  ³
149
echo ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
150
echo.
151
echo S.Ha.R.K. has been installed on your system.
152
echo Please run SHARK.BAT every time you use the Kernel...
153
echo.
154
echo If you have any problem, please sen an e-mail to shark-help@gandalf.sssup.it!
155
echo.
156
echo.
157
echo Have Fun,
158
echo.
159
echo     The S.Ha.R.K. Team
160
echo.
161
goto end
162
 
163
:LONGNAMES
164
cls
165
echo ...Error! It seems you are running this script from a Windows DOS Prompt.
166
echo.
167
echo Please Run this script in DOS Mode...
168
goto end
169
 
170
:NOBATCH
171
cls
172
echo ... Error! The current directory seems not be the directory from that
173
echo you have called this script.
174
echo.
175
 
176
:PARAMERROR
177
cls
178
echo ... Error in command line parameters.
179
echo.
180
echo Usage: install zipdir
181
echo.
182
echo Example:
183
echo The install.bat and all the .zip files should be into the current
184
echo directory; to install S.Ha.R.K. into C:\SHARK you have to type:
185
echo.
186
echo install C:\SHARK
187
echo.
188
goto end
189
 
190
 
191
:NODJGPP
192
del goofy
193
cls
194
echo ... GCC not found.
195
echo.
196
echo Please install DJGPP in C:\DJGPP before running this script!!!
197
goto end
198
 
199
:NOMAKE
200
del goofy
201
cls
202
echo ... MAKE not found.
203
echo.
204
echo Please install MAKE in C:\DJGPP before running this script!!!
205
goto end
206
 
207
:YESSHARKDIR2
208
del %1\GOOFY
209
:YESSHARKDIR
210
cls
211
echo ... Directory: %1 found.
212
echo.
213
echo This script creates all the directory needed to install S.Ha.R.K.
214
echo Please remove %1 to run this script correctly.
215
goto end
216
 
217
 
218
 
219
:end