@DefineProject
   @Name = "Adams Resumes & Cover Letters"
   @Version = "1.0a"              
   @Subdir = "\\AResume"
   @OutDrive = C
   @Requires @HardDisk
   @AssumeHardDisk = @TRUE
   @InDiskBell = @TRUE
   @Immediate = @TRUE
@EndProject

@DefineVars
   @Integer @Software     = 9300  // Size for core software
   @Integer @OnLine       = 2000  // Size for Adams OnLine
   @Integer @RSamples     = 3600  // Size for resume samples
   @Integer @CSamples     = 2100  // Size for cover letter samples
   @Integer @Speller      = 600   // Size for speller/thesaurus
   @Integer @Sound        = 800   // Size for sound *.wav files
   @Integer @TSIZE        = @Eval(@Software+@OnLine+@RSamples+@CSamples+@Speller+@Sound) // Total Sizes
   @Integer @Red          = @RGB(255,0,0)
   @Integer @Blue         = @RGB(0,0,255)
   @Integer @Black        = @RGB(0,0,0)  
   @Integer @V            = @VideoCard
   @Integer @Count        = 0
   @QString @PartPath     = ""
   @QString @Product      = "Adams Resumes && Cover Letters"
   @Qstring @MainRETLABEL = "PATCHRETURN" // Label used for returning from sub-script
   @Qstring @AI10         = "" // used for Adding Item 10 command  
   @Qstring @AI11         = "" // used for Adding Item 11 command  
   @Qstring @AI12         = "" // used for Adding Item 12 command  
   @Qstring @AI13         = "" // used for Adding Item 13 command  
   @Qstring @AI14         = "" // used for Adding Item 14 command  
   @Qstring @AI15         = "" // used for Adding Item 15 command  
   @Qstring @AI16         = "" // used for Adding Item 16 command  
   @Qstring @SG           = "" // used for Show Group command
   @Qstring @PMLIST       = "" // used for the @ProgramManager command
   @Drive   @WinDrv       = C  // default drive location of Windows subdir
   @Dir     @WinSub       = "WINDOWS"  // deault subdir name for Windows
   @Drive   @InPlace      = A
   @Drive   @InPlace2     = A
   @Drive   @OutPlace     = C
   @Drive   @OutPlace2    = C
@EndVars
@Name = "Adams Resumes && Cover Letters"

@BackgroundMode(3,@Blue,@Black)
@Display 
					       Welcome!!

Congratulations on your purchase of @Product!  

This program will install the software onto your computer.

@Prompt = "Adams Resumes & Cover Letters"
@TitlePause
@EndDisplay

NEWDRIVE:  // re-select drive if needed

@BackgroundMode(3,@Blue,@Black)

@DlgCtrlSize(0,8,20,14,32)

@GetOutDrive @OutDrive @Prompt = "Enter Target Drive"
@Suppress(0,17)
Select the drive where @Product@!
will 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

//@DefineVars
@InPlace   = @InDrive
@InPlace2  = @InDrive
@OutPlace  = @OutDrive
@OutPlace2 = @OutDrive
//@EndVars

NEWDIR: // goto label for reselecting the base path (if needed).

@BackgroundMode(3,@Blue,@Black)

SubdirName:
@DlgCtrlSize(0,7,0,8,35)
@GetSubdir @Subdir @Prompt = "Enter Target Subdirectory"
Please select the main subdirectory path where
you wish @Product@!'s files 
to be installed.  Additional subdirectories under
this path will be created.
@EndSubdir

Loop0:
@PartPath = @StrToken("@SubDir", @Count, "\\")
@If (!"@PartPath" == "")
   @If (@StrLen("@PartPath") > 8)
      @Display
	 Please re-enter a subdirectory name of 8 characters or less.
				@Pause
	 @Goto SubdirName
      @EndDisplay
   @Else
      @Count = (@Count + 1)
      @Goto Loop0
   @EndIf
@EndIf

@SetOption(1000)  
@SetOption(1001)  
@SetOption(1002)  
@SetOption(1003)  
@SetOption(1004)

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

@DlgCtrlSize(0,6,0,11,42)  // set coordinates & size of list box
@GetOption @Checkbox @Prompt = "Select Files to Install"
@Product requires about 
18,000 KB of hard disk space.  To save room on your 
hard drive, you may remove one or more of the below 
options by clicking the item.

@Option 1000 = "Adams JobBank OnLine  . . . . .    2,000 KB"
@Option 1001 = "600 Resume Samples . . . . . . .    3,700 KB"
@Option 1002 = "600 Cover Letter Samples . . . .    2,100 KB"
@Option 1003 = "Speller & Thesaurus  . . . . . . . .       600 KB"
@Option 1004 = "Sound . . . . . . . . . . . . . . . . . . . .       800 KB"    
@EndOption

@if(1000 [! @option) @OnLine=0   @EndIf
@if(1001 [! @option) @RSamples=0 @EndIf
@if(1002 [! @option) @CSamples=0 @EndIf
@if(1003 [! @option) @Speller=0  @EndIf
@if(1004 [! @option) @Sound=0    @Endif

@TSIZE = @Eval((@Software+@OnLine+@RSamples+@CSamples+@Speller+@Sound))

@If(@TSIZE*1024 > @DiskFree(@OutDrive))
   @BackgroundMode(3,@Red,@Red)        //put up red background
   @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  // tsize>diskfree

@BackgroundMode(3,@Blue,@Black)
@SetOption(1600) @ClearOption(1700)

@DlgCtrlSize(0,13,12,15,40)
@GetOption @Prompt = "Selected Files Summary"
You have chosen the following options:

	    @If(1000 [= @option) Adams JobBank OnLine --> @OnLine K @Else Adams OnLine --> will not be installed @EndIf
	    @If(1001 [= @option) 600 Resume Samples --> @RSamples K @Else 600 Resume Samples --> will not be installed @EndIf
	    @If(1002 [= @option) 600 Cover Letter Samples --> @CSamples K @Else 600 Cover Letter Samples --> will not be installed @EndIf
	    @If(1003 [= @option) Speller/Thesaurus --> @Speller K @Else Speller/Thesaurus --> will not be installed @EndIf
	    @If(1004 [= @option) Sound files --> @Sound K @Else Sound files -> will not be installed @EndIf

	    The selected files will require a total of:   @TSIZE KB.
	    The drive currently selected for installation has:   @Eval(@DiskFree(@OutDrive)/1K) KB free.


You may:
@Option 1600 = "CONTINUE"
@Option 1700 = "RESELECT OPTIONS"
@EndOption

/*////////////////////////////////////////////////////////////////////////
// if user choses to re-select, then loop back and allow user to re-select
// the sets of files to install
////////////////////////////////////////////////////////////////////////*/
@If(1700 [= @Option) @GOTO Loop @EndIf

@MkDir("@OutDrive:\\@Subdir\\cover")
@MkDir("@OutDrive:\\@Subdir\\data")
@MkDir("@OutDrive:\\@Subdir\\docs")
@MkDir("@OutDrive:\\@Subdir\\resume")
@MkDir("@OutDrive:\\@Subdir\\samples")
@If(1000 [= @Option)
   @MkDir("@OutDrive:\\@Subdir\\FCWIN")
   @MkDir("@OutDrive:\\@Subdir\\FCWIN\\SETTINGS")
   @MkDir("@OutDrive:\\@SubDir\\FCWIN\\MODEMS")
   @MkDir("@OutDrive:\\@SubDir\\FCWIN\\FCP")
   @MkDir("@OutDrive:\\@SubDir\\FCWIN\\DOWNLOAD")
   @MkDir("@OutDrive:\\@SubDir\\FCWIN\\SCRIPTS")
@EndIf

//Find Windows drive and subdirectory location
@WinDrv = @WindowsDrive
@WinSub = "@WindowsDir"

@DefineDisk
   @Label = "Disk #1"
   @BeginLib ADAMS.LIB                                  // ADAMS.LIB
      @File *.* @Out\@SubDir\*.*
   @EndLib
   @If (1004 [= @Option)
      @BeginLib QWAV.LIB                                // QWAV.LIB
	 @File *.* @Out\@SubDir\*.* 
      @EndLib
   @Endif
   @If (1003 [= @Option)
      @BeginLib SPELL.LIB                               // SPELL.LIB
	 @File *.* @Out\@SubDir\*.*
      @EndLib
   @EndIf
   @BeginLib WIN7.LIB                                   // WIN7.LIB
      @File *.* @Out\@SubDir\*.* 
   @EndLib
@EndDisk      
@Chain("Disk #2") 
