@ECHO OFF
REM Shane Land OpenGEM Installer Release 2
REM Copyright Shane Land 2001-2004
REM Copyright Chris Evans 2003
REM Chris made this installer a lot better.  Thanks!
REM http://gem.shaneland.co.uk email:gem@shaneland.co.uk

:MAIN
CLS
ECHO Welcome to OpenGEM Installer Release 2
ECHO.
ECHO Would you like to install OpenGEM to:
ECHO.
ECHO 1 - Drive C:
ECHO.
ECHO 2 - Drive D:
ECHO.
ECHO.
ECHO 3 - Help
ECHO 4 - Exit
ECHO.
CHOICE /C:1234
IF ERRORLEVEL 4 GOTO END
IF ERRORLEVEL 3 GOTO HELP
IF ERRORLEVEL 2 SET IDRV=D:
IF ERRORLEVEL 1 SET IDRV=C:
GOTO INSTALL

:INSTALL
REM You sure you want to install to Drive %IDRV%?
ECHO OFF
CLS
ECHO You have selected to install OpenGEM to Drive %IDRV%
ECHO.
ECHO 1 - Yes, install OpenGEM to Drive %IDRV%
ECHO.
ECHO 2 - No, take me back to the main menu
ECHO.
ECHO.
ECHO 3 - Help
ECHO 4 - Exit
ECHO.
CHOICE /C:1234
IF ERRORLEVEL 4 GOTO END
IF ERRORLEVEL 3 GOTO HELP
IF ERRORLEVEL 2 GOTO MAIN
IF ERRORLEVEL 1 GOTO FENGSHOI

:FENGSHOI
REM Installing OpenGEM to Drive %IDRV%
ECHO OFF
CLS
UNZIP OGEM3 -d %IDRV%\
CD\
CLS
ECHO OpenGEM is now installed to Drive %IDRV%
ECHO.
PAUSE
GOTO WIN

:HELP
REM OpenGEM Installer Help
ECHO OFF
CLS
ECHO OpenGEM can install itself to Drive C or Drive D on any DOS system
ECHO running DOS 3.3 or above (you need a 386 or above to run some
ECHO GEM applications.
ECHO.
ECHO OpenGEM is around 9.5mb in size when installed.  Please make sure
ECHO your computer has enough room before starting to install!
ECHO.
ECHO OpenGEM does not alter any existing DOS, Windows or OS/2 files.
ECHO It simply creates new files and folders for itself.  Installing OpenGEM
ECHO will not effect your existing system status (though the FreeGEM
ECHO development community cannot accept any liability if it does!).
ECHO.
ECHO Don't forget to read the GNU GPL licence that OpenGEM is released
ECHO under.  You'll find it in the root directory in the drive OpenGEM is
ECHO installed to.
ECHO.
ECHO Press any key to return to the main menu...
PAUSE >NUL
GOTO MAIN

:WIN
ECHO OFF
CLS
ECHO Do you have a copy of Windows 9X or ME installed on your machine?
ECHO.
CHOICE /C:YN
IF ERRORLEVEL 2 GOTO END
IF ERRORLEVEL 1 GOTO X

:X
ECHO OFF
CLS
ECHO Would you like to add OpenGEM to your start menu?
ECHO.
ECHO Please note that this only works if OpenGEM is installed
ECHO to Drive C:, and Windows is in the folder C:\WINDOWS
ECHO.
CHOICE /C:YN
IF ERRORLEVEL 2 GOTO END
IF ERRORLEVEL 1 GOTO Y

:Y
ECHO OFF
CLS
CD\WINDOWS\STARTM~1\PROGRAMS
MD OPENGEM
CD\GEMAPPS\GEMSYS
XCOPY C:\GEM.BAT C:\WINDOWS\STARTM~1\PROGRAMS\OPENGEM
XCOPY C:\GEMAPPS\HELPZONE\README.TXT C:\WINDOWS\STARTM~1\PROGRAMS\OPENGEM
XCOPY C:\GEMAPPS\HELPZONE\FAQ.TXT C:\WINDOWS\STARTM~1\PROGRAMS\OPENGEM
XCOPY C:\GEMAPPS\HELPZONE\LICENSE.TXT C:\WINDOWS\STARTM~1\PROGRAMS\OPENGEM
XCOPY C:\GEMAPPS\HELPZONE\SVS.TXT C:\WINDOWS\STARTM~1\PROGRAMS\OPENGEM
XCOPY C:\GEMAPPS\HELPZONE\WEBSITES.TXT C:\WINDOWS\STARTM~1\PROGRAMS\OPENGEM
CD\
GOTO END

:END
REM Exit OpenGEM Installer
ECHO OFF
CLS
ECHO Thank you for using OpenGEM Installer.
ECHO.
ECHO If you have any comments about this software (or OpenGEM)
ECHO please email them to us at gem@shaneland,co.uk
ECHO.
rem remove variables
set IDRV=
:exit