@echo off
echo * GOMOKU 1.0 - Installationsprogramm                              *
echo * ==================================                              *
if x%1==x goto noparm
set _drive=xx
if x%_drive%==x goto noenv
for %%i in ( a a: A A: ) do if %%i==%1 set _drive=a:
for %%i in ( b b: B B: ) do if %%i==%1 set _drive=b:
if x%_drive%==xxx goto noparm
if not exist %_drive%\gomoku10.zip goto lh
if not exist %_drive%\pkunzip.exe goto nopkunzip
%_drive%\pkunzip -n %_drive%\gomoku10
if errorlevel 1 goto huch
goto ok
:lh
if not exist %_drive%\gomoku10.lzh goto noarchive
if not exist %_drive%\lha.exe goto nolha
%_drive%\lha e -m %_drive%\gomoku10
if errorlevel 1 goto huch
:ok
echo * GOMOKU 1.0 erfolgreich installiert! Gib                         *
echo *       gomoku                                                    *
echo * ein, um das Spiel zu beginnen. Viel Spaá!                       *
goto ende
:noarchive
echo Archiv GOMOKU10.ZIP bzw. GOMOKU10.LZH nicht gefunden!
echo Installation nicht m”glich.
goto ende
:noenv
echo Installation war nicht m”glich, weil im Environment zuwenig Platz war! Bitte
echo r„ume Dein Environment auf oder installiere GOMOKU von Hand.
goto ende
:noparm
echo * Bitte erzeuge zuerst ein Verzeichnis, in das GOMOKU installiert *
echo * werden soll. Beispiel: md c:\gomoku                             *
echo * Dann wechsle in dieses Verzeichnis, z.B.                        *
echo *        c:                                                       *
echo *        cd \gomoku                                               *
echo * Dann gib                                                        *
echo *        a:\install a:                                            *
echo * ein, wenn von Laufwerk a: installiert werden soll, oder         *
echo *        b:\install b:                                            *
echo * wenn von Laufwerk b: installiert werden soll.                   *
goto ende
:nopkunzip
echo * Das Entpackprogramm PKUNZIP.EXE fehlt! Falls Du dieses Programm *
echo * besitzt, gib bitte ein:                                         *
echo *       pkunzip %_drive%\gomoku10                                 *
echo * Sonst ist die Installation leider nicht m”glich!                *
goto ende
:nolha
echo * Das Entpackprogramm LHA.EXE fehlt! Falls Du dieses Programm     *
echo * besitzt, gib bitte ein:                                         *
echo *       lha e %_drive%\gomoku10                                   *
echo * Sonst ist die Installation leider nicht m”glich!                *
goto ende
:huch
echo Installation war nicht m”glich, weil ein Fehler auftrat.
:ende
set _drive=
