@DEFINEPROJECT
	@Name = "DIGGERS"
	@Version = "1.94"
	@OutDrive = C
	@SubDir = "\\DIGGERS"
@EndProject


@DefineVars
	@Integer @NEEDK = 7670

	@Integer @Red        = @RGB(255,0,0)             //DEFINE COLOR RED
	@Integer @Green      = @RGB(0,255,0)             //DEFINE COLOR GREEN
	@Integer @Blue       = @RGB(0,0,255)             //DEFINE COLOR BLUE
	@Integer @Black      = @RGB(0,0,0)               //DEFINE COLOR BLACK

//@If(@Platform == 3)
	@Qstring @PMIDel     = "[DeleteGroup(@Name)]"
	@Qstring @PMIAdd     = "[CreateGroup(@Name)]"
	@Qstring @PMIShow    = "[ShowGroup(@Name, 2)]"
	@Qstring @PMItem1    = "[AddItem(@Outdrive:\\@Subdir\\DIGGERS.PIF, @Name, @Outdrive:\\@Subdir\\DIGGERS.ICO,0)]"
	@Qstring @PMItem2    = "[AddItem(@Outdrive:\\@Subdir\\INSTALL.EXE, INSTALL, @Outdrive:\\@Subdir\\INSTALL.EXE,0)]"

//@EndIf
@EndVars

@BackgroundMode(3,@Blue,@Black)



@Display
      **** @Name Version @Version CD-ROM INSTALL ****

   This program allows you to configure @Name CD-ROM for
   a sound card and saved game directory.


   @Pause
@EndDisplay

@GetOption
   @DlgCtrlSize(0,5,5,8,40)
   Please Select An Option

	   @Option 200 ="Install on Hard Disk"
	   @Option 201 ="Exit"

@EndOption


@If(201 [= @Option)
@Exit
@Endif


@If(200 [= @Option)

@GetOption
   @DlgCtrlSize(0,6,5,10,40)
   Please Select a Sound Option
   

		@Option 300 ="Sound Blaster"
		@Option 301 ="Gravis Ultrasound"
		@Option 302 ="None"

@EndOption


@Endif

@Display 
@If(300 [= @Option)
   Sound Option: Sound Blaster

@Endif
@If(301 [= @Option)
   Sound Option: Gravis Ultrasound

@Endif
@If(302 [= @Option)
   Sound Option: None

@Endif
@Pause
@EndDisplay


@Display 
 
 This program will install @Name Version @Version onto your
 computer system and verify the integrity of the distribution files.
 
   Please consult the READ.ME file which contains up to date 
 information on @Name Version @Version.
 
 All of us at Millennium Media Group hope you have fun digging!
 Good luck and thanks for your support.

@Pause
@EndDisplay

NEWDRIVE:  // Goto label for reselecting drive
/*
	wINSTALL will now prompt the end-user for the
	drive they wish wINSTALL to be installed onto.
*/
@BackgroundMode(3,@Blue,@Black)

@If(@Platform == 3)

@DlgCtrlSize(0,8,15,15,27)
@GetOutDrive @OutDrive @Prompt = "Enter target drive"
@Suppress(0,17) // Suppress floppies & CD-ROM drives
Please select the drive where you wish @Name
to be installed on your machine.  Any drive
available can be used assuming you have
access rights to the drive you select, and
there is enough space available for installation.
@EndOutDrive

@Else

@GetOutDrive @OutDrive
@Prompt = "Enter target drive"
@LocalWindow(14,40)
@Suppress(0,17) // Suppress floppies & CD-ROM drives
  Please select the drive where you wish @Name to be installed on your
  machine.  Any drive available can be used assuming you have access
  rights to the drive you select, and there is enough space available
  for installation.
@EndOutDrive

@Endif

/*
	wINSTALL will now prompt the end-user for the
	main directory they wish wINSTALL to be installed
	onto.
*/

NEWDIR:
@BackgroundMode(3,@Blue,@Black)


@DlgCtrlSize(0,7,0,8,35)
@GetSubdir @Subdir @Prompt = "Enter target subdirectory"
Please select the main subdirectory PATH
you wish @Name to be installed under.
Additional subdirectories under this path
will be created depending upon which
options you choose to install.
@EndSubdir



// if total size > free space, then display
// red background and set default to loop back and select again.
@If(@NEEDK*1024 > @DiskFree(@OutDrive))
	@BackgroundMode(3,@Red,@Red)
	@Display
		The drive you have selected does not have
		enough available space free to install
		all of the options you have selected.

		Please select another drive.
	@Pause
	@EndDisplay
	@GOTO NEWDRIVE
@EndIf	


@BackgroundMode(3,@Blue,@Black)


@DefineDisk
	@Label = "Disk #1"


	//@File DIGGERS.CFG @Size 2
	@File READ.ME

	@File DIGGERS.ICO @Size 766
	@File DIGGERS.PIF @Size 545

@EndDisk


@PMItem1="[AddItem(@Outdrive:\\@Subdir\\DIGGERS.PIF, @Name, @Outdrive:\\@Subdir\\DIGGERS.ICO)]"
@PMItem2="[AddItem(notepad.exe @Outdrive:\\@Subdir\\read.me, READ.ME)]"

@Finish

   @If(300 [= @Option)
      @Write("@Outdrive:\\@Subdir\\DIGGERS.CFG","wt","ES")
   @Endif

   @If(301 [= @Option)
      @Write("@Outdrive:\\@Subdir\\DIGGERS.CFG","wt","EG")
   @Endif

   @If(302 [= @Option)
      @Write("@Outdrive:\\@Subdir\\DIGGERS.CFG","wt","EN")
   @Endif


   @Write("@Outdrive:\\@Subdir\\DIGGERS.BAT","wt","@@SET DIGGERS=@Outdrive:\\@Subdir\n")
   @Write(,,"@@@CDRomFirst:\n")
   @Write(,,"@@DIGGERS.EXE\n")

@If(@Platform == 3)
   @ProgramManager("@PMIAdd@PMItem1@PMItem2")
@Else
   @ChDrive(@OutDrive)
   @ChDir("@SubDir")
@Endif

@EndFinish

