// Display default backdrop if screen size not recognised
ShowBackDrop("", 0, 0, 0)
:DONEBACKDROP
// Welcome Dialog
:BACK
SET %Message1%="Welcome to the %Application% Installation Program."
SET %Message2%="This program will install the %Application% software in the directory you specify on your hard disk."
SET %Message3%="(Compuserve ID: 100105,536)||Setup is supplied with the Setup Builder|software and is the copyright of G.Plowman"
DialogBox("Welcome")
IF %ERROR% == IDCANCEL GOTO :EXIT
// Ask the user where to install the software
// but only if the software isn't already installed
IF %Installed% == TRUE GOTO :INSTALLED
:RETRY
SET %Message1%="The install program will copy the %Application% files into the following directory:"
DialogBox("AskPath")
IF %ERROR% == IDBACK GOTO :BACK
IF %ERROR% == IDCANCEL GOTO :EXIT
:INSTALLED
// Check for space availability
GetDiskSpace(%InstallDrive%)
SET %Space% = %ERROR%
IF %Space% >= 1356800 GOTO :GOTSPACE
MessageBox("The %Application% software requires 1356800 bytes of disk space and there is only %Space% bytes free on your %InstallDrive% drive.||Do you wish to continue to install the software ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
IF %ERROR% == IDCANCEL GOTO :EXIT
// Copy files from disk & show in gauge
CopyFile(17)
"BWCC.DLL", "%InstallPath%", "Copying:", TRUE
"BWCC32.DLL", "%InstallPath%", "Copying:", TRUE
"BYEWIN.WAV", "%InstallPath%", "Copying:", TRUE
"CHAAH.WAV", "%InstallPath%", "Copying:", TRUE
"HOUSTON.WAV", "%InstallPath%", "Copying:", TRUE
"KICK.WAV", "%InstallPath%", "Copying:", TRUE
"LATER.WAV", "%InstallPath%", "Copying:", TRUE
"LAUGH.WAV", "%InstallPath%", "Copying:", TRUE
"MOM.WAV", "%InstallPath%", "Copying:", TRUE
"OHYEAH.WAV", "%InstallPath%", "Copying:", TRUE
"README.TXT", "%InstallPath%", "Copying:", TRUE
"SCRATCH1.WAV", "%InstallPath%", "Copying:", TRUE
"SNARE7.WAV", "%InstallPath%", "Copying:", TRUE
"UHOH.WAV", "%InstallPath%", "Copying:", TRUE
"VIBES1.WAV", "%InstallPath%", "Copying:", TRUE
"WAVEIT.EXE", "%InstallPath%", "Copying:", TRUE
"WAVEIT32.EXE", "%InstallPath%", "Copying:", TRUE
// Now setup a new program manager group and its icons
MessageBox("Setup can create a Program Manager group|for the %Application% application.||Do you wish to create a Program Manager group and icons ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
IF %ERROR% == IDNO GOTO :NOPMGROUP
MakeGroup("WaveIt", "")
MakeIcon("Read This !", "%InstallPath%README.TXT ")
MakeIcon("WaveIt For Windows 3.1x", "%InstallPath%WAVEIT.EXE ")
MakeIcon("WaveIt For Windows 95", "%InstallPath%WAVEIT32.EXE ")
:NOPMGROUP
// Done
:SUCCESS
SET %Message1%="|%Application% installation has been successfully completed."
SET %Message2%=""
DialogBox("OkBox")
// User defined code - installation completion
MessageBox("If you want WaveIt to start each time Windows starts, put the icon for the right version (Windows 3 or 95) into the startup group","WaveIt",MB_OK,MB_ICONINFORMATION)
GOTO :END
// User decided to quit
:EXIT
SET %Message1%="Installation has been terminated. You should re-run this installation program at a later time to install %Application%."
SET %Message2%="|The %Application% software has not been installed."
DialogBox("OkBox")
GOTO :END
// Error
:ERROR
SET %Message1%="An error occured during installation of the %Application% software."
SET %Message2%="|The %Application% software has not been fully installed."
DialogBox("OkBox")
GOTO :END
:END
// Final tidy up - close files and remove components from H/D
Close()
CheckExists("%CurrentDirectory%CLEANUP.EXE", "Please insert the diskette labelled 'DISK01'")
IF %ERROR% == IDOK WinExec("%CurrentDirectory%CLEANUP.EXE")