@DefineProject
	@Name     = "MAS 90 for Windows"
	@Version = "3.00"
	@Immediate = 1
	@Subdir   = "\\"
	@OutDrive = C
	@AssumeHardDisk = 2
@EndProject

@DefineVars
	@Integer        @Len = 0
	@Integer        @IsChain = 0
	@Integer        @IsMD = 0
	@Integer        @IsLM = 0
	@Integer	@IsIN = 0
	@Integer        @Error = 0
	@QString        @SubPointer = ""
	@QString        @Module = @Name
	@QString        @DiskID = "@InDrive:\\DISK.ID"
	@QString        @FLP = "@InDrive:\\STATUS.FLP"
	@QString        @Status = ""
	@QString        @MDStatus = ""
	@QString        @Space = "                                                                               "
	@QString        @Fill = ""
	@QString        @Level = ""
	@QString        @Title = ""
	@QString        @NxtAppName = ""
	@QString	@CheckMD = ""
        @QString        @AppStatus = ""
@EndVars

@Error = @Readln("@DiskID", "@@Module")
@Error = @Readln(,"@@Level")
@IF (@Error == -1)
 @Display
 Error reading the file '@InDrive:\DISK.ID'
 @Abort
 @EndDisplay
@ENDIF
 @Name = @Module
 @Version = @Level
@Error = @Readln("@FLP","@@Status")
@IF (@Error == -1)
 @Display
 Error reading the file '@InDrive:\STATUS.FLP'
 @Abort
 @EndDisplay
@ENDIF

@IF ("@StrMid("@Status",37,5)" != "     " && "@StrHead("@Status",2)"=="MD")
 @IsMD = 1
@ENDIF 
@IF ("@StrHead("@Status",2)"=="LM") @IsLM = 1 @ENDIF
@IF ("@StrHead("@Status",2)"=="IN") @IsIN = 1 @ENDIF

@IF (@Platform == 1)
 @Title = " @Module Installation - MAS 90 @Level"
 @Len = (78 - @StrLen(@Title))
 @Fill = @StrHead(@Space,@Len)
@ELSEIF (@Platform == 3)
 @Title = " @Module - MAS 90 for Windows"
@ENDIF

@If (@Platform == 1)
@GetOption
 
 To prevent any installation problems State Of The Art 
 has incorporated the System Check as an OPTIONAL
 function. While this check is optional, the requirements 
 for running MAS 90 should be adhered to in order to
 eliminate any future problems.
	       
 Would you like to perform a System Check at this time?
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")
 @LocalWindow(14,39)
 @Option 1 = "Yes"
 @Option 2 = "No"
 @EndOption
@ELSEIF (@Platform == 3)
 @GetOption
 @Prompt = "@Title"
 To prevent any installation problems State Of The Art
 has incorporated the System Check as an OPTIONAL 
 function. While this check is optional, the requirements 
 for running MAS 90 should be adhered to in order to
 eliminate any future problems.
	       
 Would you like to perform a System Check at this time?
 @DlgCtrlSize(0,10,0,12,51)
 @Option 1 = "Yes, I would like to run the System Check"
 @Option 2 = "No, I do not want to run the System Check"
 @EndOption
@EndIf

@IF (1 [= @Option)
@Display
 @IF (@Platform == 1) 
 System Check Results...

 Processor@If(@CPU>286) Passed @Else Failed @EndIf............................... 80@CPU
 DOS Version@If(@OSMajor>4) Passed @Else Failed @EndIf............................. @OSMajor.@OSMinor
 Conventional Memory@If(@RAMTotal>600K) Passed @Else Failed @EndIf..................... @Eval(@RAMTotal/1024)K
 Total Memory@If(@EXTTotal>1000K) Passed @Else Failed @EndIf............................ @Eval(@EXTTotal/1024)K
 SHARE ..........................................@If(@DosShare) Loaded @Else Not Loaded @EndIf
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")
@ELSE
 System Check Results...
 
 Processor@If(@CPU>286) Passed @Else Failed @EndIf............................................. 80@CPU
 Windows Version @If(@WinMajor == 3 && @WinMinor == 0) Failed @Else Passed @EndIf................................ @WinMajor.@WinMinor 
 DOS Version@If(@OSMajor>4) Passed @Else Failed @EndIf......................................... @OSMajor.@OSMinor
 Conventional Memory@If(@RAMTotal > 600K) Passed @Else Failed @EndIf.......................... @Eval(@RAMTotal/1024)K
 Total Memory@If(@EXTTotal>4000K) Passed @Else Failed @EndIf....................................... @Eval(@EXTTotal/1024)K
 SHARE ...............................................................@If(@DosShare) Loaded @Else Not Loaded @EndIf
@ENDIF

				       @Pause
 @EndDisplay
@ENDIF
@ClearOption(1)
@ClearOption(2)

GETDRIVE:
@SubPointer = ""
@If (@Platform == 1) 
 @GetOutDrive @OutDrive
 @IF (@IsIN ==1)
 Please select the drive you want to install @Module to...
 @ELSE
 Please enter the drive where MAS 90 is currently installed...
 @ENDIF
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")
 @Suppress(A)
 @Suppress(B)
 @Suppress(0,1)  /* Removable Drives */
 @Suppress(0,16) /* CD-Rom Drives */ 
 @EndOutDrive
@ELSEIF (@Platform == 3)
 @GetOutDrive @OutDrive
 @IF (@IsIN == 1)
 Please select the drive you want to install @Module to...
 @ELSE
 Please enter the drive where MAS 90 is currently installed...
 @ENDIF
 @Suppress(A)
 @Suppress(B)
 @Suppress(0,1)  /* Removable Drives */
 @Suppress(0,16) /* CD-Rom Drives */ 
 @Prompt = "@Title"
 @DlgCtrlSize(0,4,0,11,30)
 @EndOutDrive
@ENDIF

@Error = 0
@Error = @Exists("@OutDrive:\\MASPATH")
@IF (@Error)
 @Error = @Readln("@OutDrive:\\MASPATH", "@@SubPointer")
@ENDIF

@IF (@Platform == 1) 
 @GetSubDir @SubDir
 @IF (@IsIN == 1)
 To install to the directory of @OutDrive:\MAS90 leave 
 this field blank and press ENTER. Otherwise, the 
 subdirectory '.\MAS90' will be appended to the 
 subdirectory(s) you enter in...
 @ELSE
 If MAS 90 is currently installed in @OutDrive:\MAS90, leave
 this field blank and press ENTER. Otherwise, enter the
 subdirectory where MAS 90 is currently installed.
 @ENDIF
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")
 @Prompt = "Subdirectory(s) to install to"
 @Default = "@SubPointer"
 @EndSubDir
@ELSEIF (@Platform == 3)
 @GetSubDir @SubDir
 @IF (@IsIN == 1)
 To install to the directory of @OutDrive:\MAS90 leave 
 this field blank and press ENTER. Otherwise, the 
 subdirectory '.\MAS90' will be appended to the 
 subdirectory(s) you enter in...
 @ELSE
 If MAS 90 is currently installed in @OutDrive:\MAS90, leave
 this field blank and press ENTER. Otherwise, enter the
 subdirectory where MAS 90 is currently installed.
 @ENDIF
 @Prompt = "@Title"
 @Default = "@SubPointer"
 @DlgCtrlSize(0,7,0,8,50)
 @EndSubDir
@ENDIF

@SubDir = "@SubDir\\MAS90"

@IF (@IsIN != 1)
 @Error = @Exists("@OutDrive:@SubDir\\HOME\\PVX.EXE")
 @IF (@Error == 0)
  @IF (@PlatForm == 1)
 @Display  
 
 The ProvideX Interpreter cannot be located in
 the directory...
 
 @OutDrive:@SubDir\HOME

 Please select the drive and path where MAS 90 
 is currently installed.
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")

				       @Pause
 @EndDisplay
  @ELSEIF (@PlatForm == 3)
 @Display
 The ProvideX Interpreter cannot be located in
 the directory...
 
 @OutDrive:@SubDir\HOME

 Please select the drive and path where MAS 90 
 is currently installed.
 @Pause
 @EndDisplay
  @ENDIF
  @Goto GETDRIVE
 @ENDIF
@ENDIF

@IF (@IsIN==1)
 @Error = @Exists("@OutDrive:@SubDir\\SOA\\SY0CTL.SOA")
 @IF (@Error == 1)
  @IF (@PlatForm == 1)
 @GetOption  
 
 A previous installation of MAS 90 has been detected.
 Do you want to install over this ?
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")
 @LocalWindow(14,39)
 @Option 1 = "Yes"
 @Option 2 = "No"
 @EndOption
  @ELSEIF (@Platform == 3)
 @GetOption
 @Prompt = "@Title"
 A previous installation of MAS 90 has been detected.
 Do you want to install over this ?
 @DlgCtrlSize(0,8,0,10,57)
 @Option 1 = "Yes, I want to install over this"
 @Option 2 = "No, I want to change the installation path"
 @EndOption
  @ENDIF
 @ENDIF
@ENDIF

@IF (2 [= @Option)
 @ClearOption(1)
 @ClearOption(2)
 @Goto GETDRIVE
@ELSE
 @ClearOption(1)
 @ClearOption(2)
@ENDIF

@IF (@IsIN == 0 && @IsMD == 0)
 @CheckMD = @StrHead("@Status",2)
 @Error = @Exists("@OutDrive:@SubDir\\@CheckMD\\STATUS.FLP")
 @IF (@Error == 1)
  @Error = @Readln("@OutDrive:@SubDir\\@CheckMD\\STATUS.FLP","@@AppStatus")
  @IF (@Error == -1)
 @Display
 Error reading the file '@InDrive:\STATUS.FLP'
 @Abort
 @EndDisplay
  @ENDIF
 @IF ("@StrMid("@@AppStatus",37,5)" != "     " && "@StrHead("@AppStatus",2)"=="MD")
  @IF (@PlatForm == 1)
 @GetOption  
 
 A modified version of @Module has been detected.
 Do you want to install over this ?
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")
 @LocalWindow(14,39)
 @Option 1 = "Yes"
 @Option 2 = "No"
 @EndOption
  @ELSEIF (@Platform == 3)
 @GetOption
 @Prompt = "@Title"
 A modified version of @Module has been detected.
 Do you want to install over this ?
 @DlgCtrlSize(0,8,0,10,57)
 @Option 1 = "Yes, I want to install over this"
 @Option 2 = "No, I want to change the installation path"
 @EndOption
  @ENDIF
 @ENDIF 
@ENDIF
@ENDIF

@IF (2 [= @Option)
 @ClearOption(1)
 @ClearOption(2)
 @Goto GETDRIVE
@ELSE
 @ClearOption(1)
 @ClearOption(2)
@ENDIF

CHAINED:
@IF (@IsChain != 0)
 @Module = "@Name"
 @Level = "@Version"
 @Error = @Readln("@InDrive:\\STATUS.FLP","@@Status")
@IF (@Error == -1)
 @Display
 Error reading the file '@InDrive:\STATUS.FLP'
 @Abort
 @EndDisplay
@ENDIF
 @IF ("@StrMid("@Status",37,5)" != "     " && "@StrHead("@Status",2)"=="MD")
  @IsMD = 1
 @ELSE
  @IsMD = 0
 @ENDIF 

 @IF ("@StrHead("@Status",2)"=="LM") @IsLM = 1 @ELSE @IsLM = 0 @ENDIF
 @IF ("@StrHead("@Status",2)"=="IN") @IsIN = 1 @ELSE @IsIN = 0 @ENDIF

 @IF (@Platform == 1)
  @Title = " @Module Installation - MAS 90 @Level"
  @Len = (78 - @StrLen(@Title))
  @Fill = @StrHead(@Space,@Len)
 @ELSEIF (@Platform == 3)
  @Title = " @Module Setup - MAS 90 for Windows"
 @ENDIF
@ENDIF

@If (@Platform == 1)
@GetOption
 
 @Module will be installed to the following directory...
 
 @OutDrive:@SubDir

 Is this correct? If it is not, select 'No' and you will
 be allowed to reselect the drive and path again.
 @MoveCstr(0,0,47,"@Title@Fill")
 @MoveCstr(25,0,47,"@StrHead(@Space,78)")
 @LocalWindow(14,39)
 @Option 1 = "Yes"
 @Option 2 = "No"
 @EndOption
@ELSEIF (@Platform == 3)
 @GetOption
 @Prompt = "@Title"
 @Module will be installed to the following directory...
 
 @OutDrive:@SubDir

 Is this correct?
 @DlgCtrlSize(0,8,0,10,57)
 @Option 1 = "Yes, the above installation path is correct"
 @Option 2 = "No, I want to change the installation path"
 @EndOption
@ENDIF

@IF (2 [= @Option)
 @ClearOption(1)
 @ClearOption(2)
 @Goto GETDRIVE
@ELSE
 @MkDir("@OutDrive:@SubDir")
@ENDIF

@DefineDisk
	@Label = "Disk #1"
	@BeginLib AP.001
		@F APZRTA. @S 19001 @O AP\APZRTA             
		@F APZCAA. @S 23582 @O AP\APZCAA             
		@F APZCAB. @S 18920 @O AP\APZCAB             
		@F APZDAA. @S 30800 @O AP\APZDAA             
		@F APZDAB. @S 19228 @O AP\APZDAB             
		@F APZDAC. @S 448 @O AP\APZDAC             
		@F APZDAD. @S 7081 @O AP\APZDAD             
		@F APZDAE. @S 28403 @O AP\APZDAE             
		@F APZDAF. @S 5063 @O AP\APZDAF             
		@F APZDAG. @S 7015 @O AP\APZDAG             
		@F APZDBA. @S 7352 @O AP\APZDBA             
		@F APZDBB. @S 26125 @O AP\APZDBB             
		@F APZDBC. @S 4731 @O AP\APZDBC             
		@F APZDBD. @S 449 @O AP\APZDBD             
		@F APZDBE. @S 7004 @O AP\APZDBE             
		@F APZDCA. @S 15081 @O AP\APZDCA             
		@F APZDDA. @S 11479 @O AP\APZDDA             
		@F APZDDB. @S 15041 @O AP\APZDDB             
		@F APZDEA. @S 15944 @O AP\APZDEA             
		@F APZDFA. @S 13440 @O AP\APZDFA             
		@F APZDGA. @S 19751 @O AP\APZDGA             
		@F APZDGB. @S 14840 @O AP\APZDGB             
		@F APZDHA. @S 11185 @O AP\APZDHA             
		@F APZDL1. @S 22314 @O AP\APZDL1             
		@F APZDL2. @S 6358 @O AP\APZDL2             
		@F APZDL3. @S 3784 @O AP\APZDL3             
		@F APZDL4. @S 14143 @O AP\APZDL4             
		@F APZDL5. @S 14533 @O AP\APZDL5             
		@F APZDL6. @S 15938 @O AP\APZDL6             
		@F APZDL7. @S 9176 @O AP\APZDL7             
		@F APZDL8. @S 4395 @O AP\APZDL8             
		@F APZDL9. @S 4509 @O AP\APZDL9             
		@F APZDPA. @S 17632 @O AP\APZDPA             
		@F APZFOG. @S 19484 @O AP\APZFOG             
		@F APZIAA. @S 15469 @O AP\APZIAA             
		@F APZIAB. @S 17750 @O AP\APZIAB             
		@F APZIAC. @S 14121 @O AP\APZIAC             
		@F APZIAD. @S 12597 @O AP\APZIAD             
		@F APZIAE. @S 3201 @O AP\APZIAE             
		@F APZIM0. @S 1051 @O AP\APZIM0             
		@F APZIM1. @S 4713 @O AP\APZIM1             
		@F APZJAA. @S 20150 @O AP\APZJAA             
		@F APZJAB. @S 18506 @O AP\APZJAB             
		@F APZJAC. @S 24879 @O AP\APZJAC             
		@F APZJBA. @S 26052 @O AP\APZJBA             
		@F APZJBB. @S 26781 @O AP\APZJBB             
		@F APZJDA. @S 17561 @O AP\APZJDA             
		@F APZJGA. @S 23464 @O AP\APZJGA             
		@F APZJXA. @S 2043 @O AP\APZJXA             
		@F APZLAA. @S 3505 @O AP\APZLAA             
		@F APZLL1. @S 23676 @O AP\APZLL1             
		@F APZLMA. @S 4571 @O AP\APZLMA             
		@F APZLMB. @S 5372 @O AP\APZLMB             
		@F APZLST. @S 774 @O AP\APZLST             
		@F APZMAA. @S 25763 @O AP\APZMAA             
		@F APZMAB. @S 10490 @O AP\APZMAB             
		@F APZMAC. @S 7531 @O AP\APZMAC             
		@F APZMAD. @S 6669 @O AP\APZMAD             
		@F APZMAE. @S 8168 @O AP\APZMAE             
		@F APZMAF. @S 7103 @O AP\APZMAF             
		@F APZMBA. @S 8689 @O AP\APZMBA             
		@F APZMNA. @S 17720 @O AP\APZMNA             
		@F APZPAA. @S 21026 @O AP\APZPAA             
		@F APZPMA. @S 4091 @O AP\APZPMA             
		@F APZR99. @S 18083 @O AP\APZR99             
		@F APZRAA. @S 9206 @O AP\APZRAA             
		@F APZRAB. @S 13556 @O AP\APZRAB             
		@F APZRBA. @S 10802 @O AP\APZRBA             
		@F APZRBB. @S 12975 @O AP\APZRBB             
		@F APZRBC. @S 4203 @O AP\APZRBC             
		@F APZRCA. @S 9124 @O AP\APZRCA             
		@F APZRCB. @S 11594 @O AP\APZRCB             
		@F APZRDA. @S 6959 @O AP\APZRDA             
		@F APZRDB. @S 7183 @O AP\APZRDB             
		@F APZREA. @S 8718 @O AP\APZREA             
		@F APZREB. @S 9759 @O AP\APZREB             
		@F APZRFA. @S 7916 @O AP\APZRFA             
		@F APZRFB. @S 7420 @O AP\APZRFB             
		@F APZRGA. @S 10546 @O AP\APZRGA             
		@F APZRGB. @S 14767 @O AP\APZRGB             
		@F APZRGC. @S 3175 @O AP\APZRGC             
		@F APZRHA. @S 8435 @O AP\APZRHA             
		@F APZRHB. @S 6627 @O AP\APZRHB             
		@F APZRHC. @S 455 @O AP\APZRHC             
		@F APZRIA. @S 11258 @O AP\APZRIA             
		@F APZRJA. @S 14404 @O AP\APZRJA             
	@EndLib
@EndDisk

@Chain("Disk #2")

/* end-of-file */