Subversion Repositories shark

Rev

Blame | Last modification | View Log | RSS feed

@echo off
cls
echo -----------------------------------------------------------------------------
echo S.Ha.R.K. MS-DOS Installation
echo by Paolo Gai 2001 - pj@sssup.it
echo -----------------------------------------------------------------------------
echo This batch file will:
echo.
echo - Install S.Ha.R.K. under the C:\SHARK directory
echo - Set up the C:\SHARK\BIN Directory with a minimal set of DOS utilities
echo - Compile the Kernel
echo                 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo                 º BEFORE running this script remember to:º
echo                 º  - Install DJGPP under C:\DJGPP        º
echo                 º  - Remove the C:\SHARK Directory       º
echo                 ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo WARNING: To Compile the kernel a batch file called SHARK.BAT will be created
echo and run. SHARK.BAT will load also a 16Mb SMARTDRV to reduce compile time.
echo.
echo -----------------------------------------------------------------------------
echo IMPORTANT: Please send any comment, question or bug directly to:
echo            shark-help@gandalf.sssup.it
echo    ReTiS Lab - Scuola Superiore S. Anna - Via Carducci, 40 - Pisa - Italy
echo -----------------------------------------------------------------------------
pause
cls

echo Checking system configuration...
rem echo Checking Command Line parameters...
if a%1==a goto PARAMERROR
if NOT a%2==a goto PARAMERROR
rem echo ... Ok: Installing S.Ha.R.K. into %1

rem echo Checking long names...

echo goofy >goofy6789
cls
if NOT exist goofy678 goto LONGNAMES
del goofy678
cls
rem echo ...Ok! It seems You are using MS-DOS or Windows 9x in DOS mode...

rem echo Detecting your software....


rem Detecting if current dir is correct

rem ---------------------------------------------------------------
rem echo Checking .\INSTALL.BAT...
if not exist INSTALL.BAT goto NOBATCH
rem echo ... INSTALL.BAT found!


rem Detecting if GCC is present

rem ---------------------------------------------------------------
rem echo Checking gcc...
del goofy
cls
gcc --version >goofy
cls
if not exist goofy NODJGPP
cls
rem echo ...GCC found!

rem Detecting if MAKE is present

rem ---------------------------------------------------------------
rem echo Checking make...
del goofy
cls
make --version >goofy
cls
if not exist goofy NOMAKE
rem echo ...MAKE found!
del goofy
cls

rem Detecting if C:\SHARK is present

rem ---------------------------------------------------------------
rem echo Checking absence of C:\SHARK (some error messages printed!)...
if exist %1\GOOFY YESSHARKDIR
echo goofy >%1\GOOFY
cls
if exist %1\GOOFY goto YESSHARKDIR2
rem echo ...Ok!
cls

rem Second Banner

rem ---------------------------------------------------------------
echo -----------------------------------------------------------------------
echo The batch file is now ready to install S.Ha.R.K. under %1
echo -----------------------------------------------------------------------
echo Please note:
echo.
echo If SMARTDRV is currently loaded the system can stay a few
echo seconds idle after unzip32 has finished its work.
echo.
echo In that case the system is not crashed but it is flushing the
echo SMARTDRV cache to the disk!
echo -----------------------------------------------------------------------
pause
cls

rem Decompressing the files

rem ----------------------------------
md %1
unzip32 -a *.zip -d %1
rem unzip32 -ao *.zi1 -d %1
rem unzip32 -ao *.zi2 -d %1

rem Creating SHARK.BAT

rem ------------------
echo &echo off                                                                  > %1\SHARK.BAT
echo rem This file was created by                                               >> %1\SHARK.BAT
echo rem The S.Ha.R.K. Install script by Paolo Gai 2001 - pj@sssup.it           >> %1\SHARK.BAT
echo.                                                                           >> %1\SHARK.BAT
echo rem Please do not modify this file unless you know what you are doing!!!   >> % style="color: #448888;">1\SHARK.BAT
echo.                                                                           >> %1\SHARK.BAT
echo rem updating the PATH...                                                   >> %1\SHARK.BAT
echo set PATH=%1\bin;c:\djgpp\bin;%%PATH%%                                      >> %1\SHARK.BAT
echo.                                                                           >> %1\SHARK.BAT
echo rem This variable is needed for the S.Ha.R.K. Makefile (use / and not \ !!!) >> % style="color: #448888;">1\SHARK.BAT
myfilter %1                                                                     >> %1\SHARK.BAT
echo.                                                                           >> %1\SHARK.BAT
echo rem this is for the DJGPP; check if the environment settings are OK!       >> % style="color: #448888;">1\SHARK.BAT
echo set DJGPP=C:\DJGPP\DJGPP.ENV                                               >> %1\SHARK.BAT
echo.                                                                           >> %1\SHARK.BAT
echo rem Remember that if you use smartdrv you also have to check               >> %1\SHARK.BAT
echo rem   the link offset into the c:\shark\config\msdos.mak file              >> %1\SHARK.BAT
echo rem   (look at the LINK_OPT environment variable, option -Ttext)           >> %1\SHARK.BAT
echo smartdrv 16000                                                             >> %1\SHARK.BAT
echo.                                                                           >> %1\SHARK.BAT
echo cls                                                                        >> %1\SHARK.BAT


rem ... and now we compile!!!

cd %1
call shark.bat
make
cd demos
rem make demo

rem Final Banner

rem ----------------
cls
echo  ÛÛÛÛÛÛ Û     Û    Û    ÛÛÛÛÛÛ  Û     Û  ³ by
echo Û       Û     Û  ÛÛ ÛÛ  Û    Û  Û    Û   ³   The ReTiS Lab and others
echo Û       Û     Û Û     Û Û    Û  Û   Û    ³    http://shark.sssup.it
echo  ÛÛÛÛÛ  ÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ ÛÛÛÛÛÛ  ÛÛÛÛ     ³
echo       Û Û     Û Û     Û Û  Û    Û   Û    ³   Full Author list at
echo       Û Û     Û Û     Û Û   Û   Û    Û   ³    http://shark.sssup.it/people.html
echo ÛÛÛÛÛÛ  Û     Û Û     Û Û    Û  Û     Û  ³
echo ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
echo.
echo S.Ha.R.K. has been installed on your system.
echo Please run SHARK.BAT every time you use the Kernel...
echo.
echo If you have any problem, please sen an e-mail to shark-help@gandalf.sssup.it!
echo.
echo.
echo Have Fun,
echo.
echo     The S.Ha.R.K. Team
echo.
goto end

:LONGNAMES
cls
echo ...Error! It seems you are running this script from a Windows DOS Prompt.
echo.
echo Please Run this script in DOS Mode...
goto end

:NOBATCH
cls
echo ... Error! The current directory seems not be the directory from that
echo you have called this script.
echo.

:PARAMERROR
cls
echo ... Error in command line parameters.
echo.
echo Usage: install zipdir
echo.
echo Example:
echo The install.bat and all the .zip files should be into the current
echo directory; to install S.Ha.R.K. into C:\SHARK you have to type:
echo.
echo install C:\SHARK
echo.
goto end


:NODJGPP
del goofy
cls
echo ... GCC not found.
echo.
echo Please install DJGPP in C:\DJGPP before running this script!!!
goto end

:NOMAKE
del goofy
cls
echo ... MAKE not found.
echo.
echo Please install MAKE in C:\DJGPP before running this script!!!
goto end

:YESSHARKDIR2
del %1\GOOFY
:YESSHARKDIR
cls
echo ... Directory: %1 found.
echo.
echo This script creates all the directory needed to install S.Ha.R.K.
echo Please remove %1 to run this script correctly.
goto end



:end