@ECHO OFF

REM This batch file will install the season 99 track pack graphics.
REM Please, refer to TPACK99.TXT for more info. 
REM Always run this file despite updating from previous version(s) !!!!!
REM (c) Matti Laitinen 1998-1999. All rights reserved.

CLS

ECHO Loading ...
ECHO.
ECHO.
ECHO.

IF NOT EXIST ..\GP2.EXE goto wrong_dir

IF NOT EXIST INSTALL.BAT goto wrong_zip
IF NOT EXIST PKUNZIP.EXE goto wrong_zip
IF NOT EXIST TPACK99.TXT goto wrong_zip
IF NOT EXIST DATA00.Z goto wrong_zip
IF NOT EXIST DATA01.Z goto wrong_zip
IF NOT EXIST DATA02.Z goto wrong_zip
IF NOT EXIST DATA03.Z goto wrong_zip
IF NOT EXIST DATA04.Z goto wrong_zip
IF NOT EXIST DATA05.Z goto wrong_zip
IF NOT EXIST DATA06.Z goto wrong_zip
IF NOT EXIST DATA07.Z goto wrong_zip
IF NOT EXIST DATA08.Z goto wrong_zip
IF NOT EXIST DATA09.Z goto wrong_zip
IF NOT EXIST DATA10.Z goto wrong_zip
IF NOT EXIST DATA11.Z goto wrong_zip
IF NOT EXIST DATA12.Z goto wrong_zip
IF NOT EXIST DATA13.Z goto wrong_zip
IF NOT EXIST DATA14.Z goto wrong_zip
IF NOT EXIST DATA15.Z goto wrong_zip
IF NOT EXIST DATA16.Z goto wrong_zip
IF NOT EXIST DATA17.Z goto wrong_zip


IF NOT EXIST ..\GAMEJAMS\FERRARI.JAM goto no_jam
IF NOT EXIST ..\GAMEJAMS\WILLIAMS.JAM goto no_jam
IF NOT EXIST ..\GAMEJAMS\ADVERTS1.JAM goto no_jam
IF NOT EXIST ..\GAMEJAMS\MONACO22.JAM goto no_jam


CLS

CLS
ECHO   Welcome to GP2 Season 1999 Track Pack v1.9
ECHO   ==========================================
ECHO.  
ECHO   Please follow the instruction on the screen.
ECHO   If you want to quit now, press CTRL-BREAK.
ECHO.
ECHO   The installation of this track pack consist of:
ECHO   1. Graphics installation
ECHO      - Creating subdirectories
ECHO      - Uncompressing JAD files
ECHO      - Converting JAD files
ECHO   2. Track data files installation
ECHO   3. Changing track slot properties
ECHO.
ECHO   I'll now proceed to step #1 which is will be
ECHO   done automatically by this program.
ECHO.
ECHO.
PAUSE

CLS

ECHO   Step #1 - Graphics Installation
ECHO   ===============================
ECHO.
ECHO   Note!
ECHO     During the installation, the program may ask
ECHO     if to overwrite an existing file. Please answer
ECHO     "a" (=all) or "y" (=yes) to all questions.
ECHO.
ECHO.
PAUSE

CLS

ECHO   Creating subdirectories ...
ECHO   ===========================
ECHO.
mkdir ..\GAMEJAMS\TP99JAMS
mkdir ..\GAMEJAMS\TP99JAMS\GENERAL
mkdir ..\GAMEJAMS\TP99JAMS\MELBOURN
mkdir ..\GAMEJAMS\TP99JAMS\INTERLAG
mkdir ..\GAMEJAMS\TP99JAMS\BUENOSAI
mkdir ..\GAMEJAMS\TP99JAMS\IMOLA
mkdir ..\GAMEJAMS\TP99JAMS\BARCELON
mkdir ..\GAMEJAMS\TP99JAMS\MONACO
mkdir ..\GAMEJAMS\TP99JAMS\MONTREAL
mkdir ..\GAMEJAMS\TP99JAMS\MAGNYCOU
mkdir ..\GAMEJAMS\TP99JAMS\SILVERST
mkdir ..\GAMEJAMS\TP99JAMS\A1-RING
mkdir ..\GAMEJAMS\TP99JAMS\HOCKENHE
mkdir ..\GAMEJAMS\TP99JAMS\HUNGAROR
mkdir ..\GAMEJAMS\TP99JAMS\SPA
mkdir ..\GAMEJAMS\TP99JAMS\MONZA
mkdir ..\GAMEJAMS\TP99JAMS\NURBURG
mkdir ..\GAMEJAMS\TP99JAMS\SUZUKA
mkdir ..\GAMEJAMS\TP99JAMS\SEPANG
ECHO Done.


CLS
ECHO   Uncompressing JAD files ...
ECHO   ===========================
ECHO.
ECHO.
ECHO.
ECHO a|PKUNZIP.EXE DATA00.Z ..\gamejams\tp99jams\general
ECHO a|PKUNZIP.EXE DATA01.Z ..\gamejams\tp99jams\melbourn
ECHO a|PKUNZIP.EXE DATA02.Z ..\gamejams\tp99jams\interlag
ECHO a|PKUNZIP.EXE DATA03.Z ..\gamejams\tp99jams\imola
ECHO a|PKUNZIP.EXE DATA04.Z ..\gamejams\tp99jams\monaco
ECHO a|PKUNZIP.EXE DATA05.Z ..\gamejams\tp99jams\barcelon
ECHO a|PKUNZIP.EXE DATA06.Z ..\gamejams\tp99jams\montreal
ECHO a|PKUNZIP.EXE DATA07.Z ..\gamejams\tp99jams\magnycou
ECHO a|PKUNZIP.EXE DATA08.Z ..\gamejams\tp99jams\silverst
ECHO a|PKUNZIP.EXE DATA09.Z ..\gamejams\tp99jams\a1-ring
ECHO a|PKUNZIP.EXE DATA10.Z ..\gamejams\tp99jams\hockenhe
ECHO a|PKUNZIP.EXE DATA11.Z ..\gamejams\tp99jams\hungaror
ECHO a|PKUNZIP.EXE DATA12.Z ..\gamejams\tp99jams\spa
ECHO a|PKUNZIP.EXE DATA13.Z ..\gamejams\tp99jams\monza
ECHO a|PKUNZIP.EXE DATA14.Z ..\gamejams\tp99jams\nurburg
ECHO a|PKUNZIP.EXE DATA15.Z ..\gamejams\tp99jams\sepang
ECHO a|PKUNZIP.EXE DATA16.Z ..\gamejams\tp99jams\suzuka
ECHO a|PKUNZIP.EXE DATA17.Z ..\gamejams\tp99jams\buenosai
ECHO.
ECHO Done.


CLS
ECHO   Converting JAD files ...
ECHO   ========================
ECHO.
ECHO.
ECHO.

CD ..\gamejams\tp99jams\general
del *.jam
CONVERT.EXE

CD ..\melbourn
del *.jam
CONVERT.EXE

CD ..\interlag
del *.jam
CONVERT.EXE

CD ..\imola
del *.jam
CONVERT.EXE

CD ..\monaco
del *.jam
CONVERT.EXE

CD ..\barcelon
del *.jam
CONVERT.EXE

CD ..\montreal
del *.jam
CONVERT.EXE

CD ..\magnycou
del *.jam
CONVERT.EXE

CD ..\silverst
del *.jam
CONVERT.EXE

CD ..\a1-ring
del *.jam
CONVERT.EXE

CD ..\hockenhe
del *.jam
CONVERT.EXE

CD ..\hungaror
del *.jam
CONVERT.EXE

CD ..\spa
del *.jam
CONVERT.EXE

CD ..\monza
del *.jam
CONVERT.EXE

CD ..\nurburg
del *.jam
CONVERT.EXE

CD ..\sepang
del *.jam
CONVERT.EXE

CD ..\suzuka
del *.jam
CONVERT.EXE

CD ..\buenosai
del *.jam
CONVERT.EXE

CD ..\..\..\tpack99

ECHO.
ECHO Done.


GOTO accomplished

:wrong_dir
CLS
ECHO            INSTALLATION FAILED !!! 
ECHO.            
ECHO            You must unzip the 99TP_*.ZIP packet
ECHO            to the GP2\TPACK99 directory !!!!!!!
ECHO.
ECHO            Example: 1. Create a directory
ECHO                        J:\F1GAMES\GP2\TPACK99
ECHO                     2. Unzip 99TP_*.ZIP to this
ECHO                        directory
ECHO                     3. Run INSTALL.BAT
ECHO.
ECHO            Please check TPACK99.TXT for more info.
ECHO.
ECHO.               
ECHO.
GOTO bye

:wrong_zip
CLS
ECHO            INSTALLATION FAILED !!! 
ECHO.            
ECHO            Cannot install, because there are missing
ECHO            some essential files. Please re-unzip
ECHO            99TP*.ZIP to GP2\TPACK99 directory.
ECHO.
ECHO            Have you downloaded all the 99TP*.ZIP files?
ECHO.
ECHO            Please check TPACK99.TXT for more info.
ECHO.
ECHO.               
ECHO.
GOTO bye

:no_jam
CLS
ECHO            INSTALLATION FAILED !!! 
ECHO.            
ECHO            Cannot install, because the GAMEJAMS directory
ECHO            does not exist, or there are some files missing.
ECHO            Restore the original GAMEJAMS directory from the
ECHO            GP2 CD-ROM (use xcopy /s command). Of course, the
ECHO            game must be installed with the "optimal install"
ECHO            option.
ECHO.
ECHO            Please check TPACK99.TXT for more info.
ECHO.
ECHO.               
ECHO.
GOTO bye


:accomplished
CLS
ECHO       Track graphics succesfully installed !!!!!!!!!
ECHO.
ECHO       Now do MANUALLY Steps #2 and Steps #3:
ECHO.
ECHO       STEP #2 - Install track data files
ECHO        * Copy F1CT*.DAT files to GP2\CIRCUITS directory
ECHO.
ECHO       STEP #3 - Change track slot properties
ECHO        * See TPACK99.TXT for documentation
ECHO.
ECHO.      
ECHO       Please visit the official 99 Track Pack website
ECHO          http://www.AlphaF1.com/gp2/
ECHO.
ECHO.
GOTO bye
:bye

