DefineVariables
Text [CompanyName] := AVANCE LOGIC, INC.
Text [ProductName] := Avance Logic,Inc. GUIEngine
Logical [OfferInstallationDirectoryChoice] := Y
Directory [DefaultInstallationDirectory] := \WIN\SYSTEM
Directory [TempDirectory]
Text [Bitmap1] := ali.bmp
Text [TempDriveLetter] := A
Text [ModifyMode] := MODIFY
Number [MinimumFilesSetting] := 20
Number [MinimumBuffersSetting] := 20
Directory [ReadmeFileName]
Logical [InquireAboutSystemFileLocation] := Y
Logical [AskBeforeFileReplacement] := N
Text [ExitMessage] := Thank again!
Directory [ProgramToRun]
Logical [AddInstallDirectoryToPath] := N
Text [MinimumOSVersion]
Number [MinimumSystemMemoryRequiredPresent]
Number [SpaceWeNeedToInstall] := 700000
Logical [AllowCGA] := N
Logical [AllowMDA] := N
Logical [Allow808x] := N
Logical [Allow80286] := Y
Logical [MathCoprocessorRecommended] := N
Logical [FixedDiskRequired] := Y
Text [NetWorkInstallation] := DisallowNetwork
Logical [UseShadows] := Y
Text [MainBorder] := None
Text [PopupBorder] := Single
Text [TopLine] := Installing Avance Logic GUI-Resolutions
Text [TopLineColors] := WhiteOnBrown
Text [BottomLineColors] := WhiteOnLightGray
Text [PopupColors] := WhiteOnCyan
Text [AttentionColors] := WhiteOnRed
Text [SpecialPopupColors] := WhiteOnBrown
Text [Module1Name] := Windows 3.0
Text [Module1Groups] := 1
Text [Module1Description] := Windows 3.0 Drivers
Text [Module2Name] := Windows 3.1
Text [Module2Groups] := 2
Text [Module2Description] := Windows 3.1 Drivers
Text [ExpressSetupDescription]
Text [CustomSetupDescription] := Please Sellect Which Which Windows Version
Text [ExtractionOptions]
;; remaining variables are not initialized from external Script Data File
Logical [NeedToTerminate] := N
Logical [Installed] := N
Text [DisplayAdapterSummary]
Text [CPUTypeSummary]
Text [NetworkActive]
Text [MathCoprocessorStatus]
Text [InstallationDriveSummary]
Text [OSVersionSummary]
Text [SystemMemorySummary]
Logical [InsufficientSystem] := N
Logical [CompatibilityNoticeGiven] := N
Logical [NeedToModify] := N
Text [PathTask]
Text [BuffersTask]
Text [FilesTask]
Text [BackgroundCharacter] := B0
Text [ScreenColors] := WhiteOnBlue
Text [BottomLine]
Number [Black]
Number [White]
EndDefineVariables
;; Set up basic screen appearance since there will be a brief delay
;; before the external data is ready to use
;;SetScreenAttrTo Default
SetBackgroundCharTo [BackgroundCharacter]
ClearScreen
;;[TempDirectory] := [TempDriveLetter]:
Procedure Logo
LoadBitMap 1 [InstallationDirectory]\[Bitmap1] @xy(Center,2)
ShowBitMap 1
EndProcedure
Do InstallSupportFiles
Procedure InstallSupportFiles
If DriveIsRemoveable [InstallFromDrive]
[InstallationDirectory] := [InstallFromDrive]:
Do Logo
Do Install
Do InstallProgramGroup
Else
[InstallationDirectory] := [InstallFromDirectory]
If [InstallFromDirectory] Contains \ALI\
If FileExists [InstallFromDirectory]\V531F8.DRV
Dialog @xy(Center,Center) WhiteOnBlack
Please copy windows drivers into another
directory except [InstallFromDirectory]
EndDialog
SoLong Quietly
Else
Do Logo
EndIf
Else
Do Logo
Do Install
Do InstallProgramGroup
EndIf
EndIf
EndProcedure
Procedure InstallProgramGroup
Dialog [YesOrNo1] @xy(Center,Center) WhiteOnBlack UseHeader "INSTALL for Windows Program Manager Group"
Would you like to place INSTALL in a Windows program group?
EndDialog
If [YesOrNo1] = Y
BuildProgramGroup "Avance Logic GUI-Resolutions" ALI.GRP
[TempDirectory]\WIN31.EXE "AvanceLogic,Inc"
EndBuildProgramGroup
EndIf
EndProcedure
Procedure Install
SetMouseCursor Wait
TextBox @xy(Center,Center)
Copying Installation Files ....
EndTextBox
SetReplacementInquiry off
QueAllFiles to [WindowsSystemDirectory]
GetQuedFiles Quietly
[String1] := C
[TempDriveLetter] := BlankString
[Number1] := [TempDirSpaceRequired]
:CheckNextDrive
If [String1] > B
If DriveIsPresent [String1]
If DriveIsRemoveable [String1]
;;do nothing
Else
If FreeSpaceOnDrive [String1] > [Number1]
[TempDriveLetter] := [String1]
[Number1] := FreeSpaceOnDrive [String1]
Else
:NextDrive
IncrementString [String1]
If DriveIsCDROM [String1]
GoTo NextDrive
EndIf
If DriveIsRemote [String1]
GoTo NextDrive
EndIf
GoTo CheckNextDrive
EndIf
EndIf
EndIf
EndIf
If [String1] = Z
GoTo ExitGetTempDir
EndIf
:ExitGetTempDir
;; ClearScreen
;; UpdateWindow
If [TempDriveLetter] = BlankString
Dialog @xy(Center,Center) UseHeader "Disk Space Error"
.LSorry, This Installation requires at least [TempDirSpaceRequired] bytes of Fixed Disk
.LSpace in order to successfully install!
EndDialog
SoLong
Else
[TempDirectory] := [TempDriveLetter]:\ALI
CreateDirectoryIfNecessary [TempDirectory]
Delay 2000
;;ClearScreen
;;UpdateWindow
EndIf
SetMouseCursor Wait
CopyFiles from [InstallationDirectory] to [TempDirectory] Quietly
ALI.BMP
ALI.INF
WIN31.EXE
EndCopyFiles
EndProcedure
Do SetupInstalit
;;Do PrepareSystemReport
If [CommandLine1] = -ReplaceFiles
SetReplacementInquiry Off
EndIf
If [CommandLine2] = -ReplaceFiles
SetReplacementInquiry Off
EndIf
If [CommandLine3] = -ReplaceFiles
SetReplacementInquiry Off
EndIf
If [InquireAboutSystemFileLocation] = NoCharacter
If DriveIsPresent [BootDrive] ;; if not, COMSPEC has been changed
NoSysFileConfirmation
EndIf
EndIf
If [AskBeforeFileReplacement] = NoCharacter
SetReplacementInquiry Off
EndIf
;;:Again
ClearScreen
TextBox @xy(0,4)
Thank you for purchasing
[ProductName].
EndTextBox
GetMenuChoice @xy(Center,10) UseHeader "MAIN MENU"
1024x768 256 Colors(Large Fonts) V1.0
1024x768 256 Colors(Small Fonts) V1.0
1024x768 16 Colors V1.0
800x600 256 Colors V1.0
640x480 256 Colors V1.0
640x400 256 Colors V1.0
800x600 64K Colors V1.0
640x480 64K Colors V1.0
1280x1024 16 Colors V1.0
1600x1200 16 Colors V1.0
EndGetMenuChoice
ClearScreen
InCase choice is
=1: Do ALI1KL
=2: Do ALI1KS
=3: Do ALI1K16
=4: Do ALI8
=5: Do ALI6
=6: Do ALI4
=7: Do ALI864K
=8: Do ALI664K
=9: Do ALI1280
=10: Do ALI1600
;;GoTo Continue
EndInCase
;;ChangeDirectoryTo [InstallationDirectory]
;;Run C:\ALI\PKUNZIP.EXE -o C:\ALI\[String1] NoPrompt
Dialog [YesOrNo1] @xy(Center,Center) WhiteOnBlack
Would you like to RESTART WINDOWS ?
Choose YES to activate the change you made!
Or choose NO to keep unchanged and exit to
windows!
EndDialog
If [YesOrNo1] = Y
Do SetUp
ReBoot WINDOWS
else
SoLong Quietly
EndIf
Procedure SetUp
[Installed] := YesCharacter
ModifyTextFile [WindowsDirectory]\SYSTEM.INI NoBackup
InSection [boot]
AddOrChangeLineWith (386grabber=,,) as "386grabber=[String1]" at Beginning
AddOrChangeLineWith (oemfonts.fon=,,oem) as "oemfonts.fon=[String2]" at Beginning
AddOrChangeLineWith (286grabber=,,) as "286grabber=[String3]" at Beginning
AddOrChangeLineWith (fixedfon.fon=,,) as "fixedfon.fon=[String4]" at Beginning
AddOrChangeLineWith (fonts.fon=,,sys) as "fonts.fon=[String5]" at Beginning
AddOrChangeLineWith (display.drv=,,.drv) as "display.drv=[String6]" at Beginning
InSection [boot.description]
AddOrChangeLineWith (aspect=,,) as "aspect=[String7]" at Beginning
AddOrChangeLineWith (display.drv=,,) as "display.drv=[String8]" at Beginning
InSection [386Enh]
AddOrChangeLineWith (display=,,) as "display=[String9]" at Beginning
EndModifyTextFile
If [String6] = al314.drv
else
If [String6] = v31280.drv
else
If [String6] = avs1600.drv
else
ExamineTextFile [WindowsDirectory]\SYSTEM.INI
If [String6] Contains v531f8.drv
[String13] := LineWith ([,v531f8.drv,])
[Number1] := LineNumberWith ([,v531f8.drv,])
else
If [String6] Contains v53164.drv
[String13] := LineWith ([,v53164.drv,])
[Number1] := LineNumberWith ([,v53164.drv,])
EndIf
EndIf
If [String13] = BlankString
AppendFile [WindowsDirectory]\SYSTEM.INI
[[String6]]
[String10]
[String11]
[String12]
EndAppendFile
else
If [String13] Contains [String6]
IncrementNumber [Number1]
:Check
ExamineTextFile [WindowsDirectory]\SYSTEM.INI
[String13] := Line [Number1]
If [String13] = BlankString
ModifyTextFile [WindowsDirectory]\SYSTEM.INI NoBackup
InSection [[String6]]
InsertAtLine 1 [String10]
InsertAtLine 2 [String11]
InsertAtLine 3 [String12]
EndModifyTextFile
else
If [String13] Contains [
ModifyTextFile [WindowsDirectory]\SYSTEM.INI NoBackup
InSection [[String6]]
InsertAtLine 1 [String10]
InsertAtLine 2 [String11]
InsertAtLine 3 [String12]
InsertAtLine 4
EndModifyTextFile
else
ModifyTextFile [WindowsDirectory]\SYSTEM.INI NoBackup
DeleteLine [Number1]
EndModifyTextFile
GoTo Check
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
EndProcedure
;;:Continue
;;GoTo Again
Procedure ALI1KL
Do Same
[String2] := 8514oem.fon
[String4] := 8514fix.fon
[String5] := 8514sys.fon
[String7] := 100,120,120
[String8] := ALI2101 1024x768 256C(Large Fonts)
[String11] := FontSize=large
[String12] := WidthXHeight=1024x768
EndProcedure
Procedure ALI1KS
Do Same
Do Same1
[String7] := 100,96,96
[String8] := ALI2101 1024x768 256C(Small Fonts)
[String11] := FontSize=small
[String12] := WidthXHeight=1024x768
EndProcedure
Procedure ALI1K16
Do Same
Do Same1
[String6] := al314.drv
[String7] := 100,96,96
[String8] := ALI2101 1024x768 16C(Small Fonts)
EndProcedure
Procedure ALI8
Do Same
Do Same1
[String7] := 100,96,96
[String8] := ALI2101 800x600 256C
[String11] := FontSize=small
[String12] := WidthXHeight=800x600
EndProcedure
Procedure ALI6
Do Same
Do Same1
[String7] := 100,96,96
[String8] := ALI2101 640x480 256C
[String11] := FontSize=small
[String12] := WidthXHeight=640x480
EndProcedure
Procedure ALI4
Do Same
Do Same1
[String7] := 100,96,96
[String8] := ALI2101 640x400 256C
[String11] := FontSize=small
[String12] := WidthXHeight=640x400
EndProcedure
Procedure ALI864K
Do Same
Do Same1
[String6] := v53164.drv
[String7] := 100,96,96
[String8] := ALI2101 800x600 64KC
[String10] := EnableHwCursor=0
[String11] := FontSize=small
[String12] := WidthXHeight=800x600
EndProcedure
Procedure ALI664K
Do Same
Do Same1
[String6] := v53164.drv
[String7] := 100,96,96
[String8] := ALI2101 640x480 64KC
[String10] := EnableHwCursor=0
[String11] := FontSize=small
[String12] := WidthXHeight=640x480
EndProcedure
Procedure ALI1280
Do Same
Do Same1
[String6] := v31280.drv
[String7] := 100,96,96
[String8] := ALI2101 1280x1024 16C
EndProcedure
Procedure ALI1600
Do Same
[String2] := 8514oem.fon
[String4] := 8514fix.fon
[String5] := 8514sys.fon
[String6] := avs1600.drv
[String9] := alvdd.386
[String7] := 100,120,120
[String8] := ALI2101 1600x1200 16C
EndProcedure
Procedure Same
[String1] := alvga.3gr
[String3] := vgacolor.2gr
[String6] := v531f8.drv
[String9] := alvdd31.386
[String10] := EnableHwCursor=0
EndProcedure
Procedure Same1
[String2] := vgaoem.fon
[String4] := vgafix.fon
[String5] := vgasys.fon
EndProcedure
Procedure ExitInstallation
ClearScreen
If [Installed] = YesCharacter
Dialog ;; Final Farewell
Thanks for using [ProductName]!
After exit, Please change to your Windows
Directory and run SETUP to select the
screen resolution you want!
EndDialog
else
Dialog ;; Final Farewell
Thanks for using [ProductName]!
EndDialog
EndIf
SoLong
EndProcedure
Procedure SetupInstalit
SetCoordinatesTo 80x25
If [UseShadows] = YesCharacter
SetShadows On
else
SetShadows Off
EndIf
If [InquireAboutSystemFileLocation] = NoCharacter
NoSysFileConfirmation
EndIf
[Black] := RGB(0,0,0)
[White] := RGB(255,255,255)
;;SetMainBorderTo [MainBorder]
SetPopupBorderTo [PopupBorder]
SetModifyModeTo [ModifyMode]
SetShadowAttrTo DarkGrayOnBlack
;;SetScreenAttrTo [White]On[Black]
SetPopupAttrTo [PopupColors]
SetAttentionAttrTo [AttentionColors]
;;SetTopLineAttrTo WhiteOnBrown
SetTopLineTo [TopLine]
;;SetExitMessageTo "Installation complete!"
;;SetAllowExit
EndProcedure