home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 May
/
PCW596.iso
/
wtest
/
bentley
/
mstation
/
dos
/
mstation.inf
< prev
next >
Wrap
INI File
|
1995-10-20
|
36KB
|
925 lines
DefineVariables
Number [UnAttended]
Text [UnattendedSwitchString] := -S:
Number [SkipUnattendedSwitchString]
Text [InstallType]
Text [BentleyProductName] := MicroStation 95
Text [DefaultRootDirectoryName] := USTN55
Text [BetaInstallationDirectory]
Text [BetaRootDirectoryName] := USTN55
Text [InstallationDirectoryCFGFormat]
Text [PercentChar] := %
Text [FileName]
Text [ExtKey]
Text [ConfirmationDialogHeader]
Text [DLLCopyCommand]
Text [DLLCopyDestDirectory]
Text [DLLCopyDestFile]
Text [DLLCopySourceDirectory]
Text [DLLCopySourceFile]
Text [CheckDLLVersionDifferencesResult]
Text [DialogHeader]
Text [DialogItems]
;; Count of DialogOptions
Text [DialogOption1]
Text [DialogOption2]
Text [DialogOption3]
Text [DialogOption4]
Text [DialogOption5]
;; DialogButtons only handles 5 now
Text [CommentString] ;; For BreakStringIntoThreeLines Func
Text [CommentString1] ;; For BreakStringIntoThreeLines Func
Text [CommentString2] ;; For BreakStringIntoThreeLines Func
Text [CommentString3] ;; For BreakStringIntoThreeLines Func
Number [CommentLineBreak] ;; For BreakStringIntoThreeLines Func
Number [CommentLineStart] ;; For BreakStringIntoThreeLines Func
Text [DialogComment1]
Text [DialogComment1a]
Text [DialogComment1b]
Text [DialogComment1c]
Text [DialogComment2]
Text [DialogComment2a]
Text [DialogComment2b]
Text [DialogComment2c]
Text [DialogComment3]
Text [DialogComment3a]
Text [DialogComment3b]
Text [DialogComment3c]
Text [DialogComment4]
Text [DialogComment4a]
Text [DialogComment4b]
Text [DialogComment4c]
Text [DialogComment5]
Text [DialogComment5a]
Text [DialogComment5b]
Text [DialogComment5c]
;; DialogButtons only handles 5 now
Number [DialogResponse]
;; Option selected.
Number [DialogHeight]
Number [DialogWidth]
Number [DialogItemHeight]
Number [DialogItemWidth]
Number [DialogPositionX]
Number [DialogPositionY]
;; Group Sizes
Number [SizeRequiredFiles]
Number [SizeRecommendedAdditions]
Number [SizeOnlineDocumentation]
Number [SizeUtilities]
Number [SizeMDETools]
Number [SizeMDEExamples]
Number [SizeDatabaseOracle]
Number [SizeDatabaseDBaseIV]
Number [SizeDatabaseDBaseIII]
Number [SizeDatabaseFoxBase]
Number [SizeDatabaseRIS]
Number [SizeWorkspaceArchitectural]
Number [SizeWorkspaceCivil]
Number [SizeWorkspaceMechanical]
Number [SizeWorkspaceMapping]
;; Choices
Number [ChoiceEnumerator]
Number [ChoiceRequiredFiles]
Number [ChoiceRecommendedAdditions]
Number [ChoiceOnlineDocumentation]
Number [ChoiceUtilities]
Number [ChoiceMDETools]
Number [ChoiceMDEExamples]
Number [ChoiceDatabaseOracle]
Number [ChoiceDatabaseDBaseIV]
Number [ChoiceDatabaseDBaseIII]
Number [ChoiceDatabaseFoxBase]
Number [ChoiceDatabaseRIS]
Number [ChoiceWorkspaceArchitectural]
Number [ChoiceWorkspaceCivil]
Number [ChoiceWorkspaceMechanical]
Number [ChoiceWorkspaceMapping]
Number [GroupRequiredFiles] := 1
Number [GroupRecommendedAdditions] := 2
Number [GroupOnlineDocumentation] := 4
Number [GroupUtilities] := 5
Number [GroupMDETools] := 6
Number [GroupMDEExamples] := 7
Number [GroupDatabaseOracle] := 10
Number [GroupDatabaseDBaseIV] := 11
Number [GroupDatabaseDBaseIII] := 12
Number [GroupDatabaseFoxBase] := 13
Number [GroupDatabaseRIS] := 14
Number [GroupWorkspaceArchitectural] := 91
Number [GroupWorkspaceCivil] := 92
Number [GroupWorkspaceMechanical] := 94
Number [GroupWorkspaceMapping] := 93
EndDefineVariables
;; Set installer configuration
;;If .NOT. DirectoryExists [InstallFromDirectory]
;; Dialog
;; If you are trying to install from a network drive,
;; please mount the drive before running [BentleyProductName] Setup.
;; EndDialog
;; SoLong
;;EndIf
SetReadOnlyInquiry off
SetReplacementInquiry off
SetAllowExit on
SetCheckmarks Off
[ExtKey] := <Esc>
LetButton <Esc> Do dosExitProc
Procedure dosExitProc
Dialog [YesOrNo1]
Please confirm that you wish to quit installing.
EndDialog
If [YesOrNo1] = YesCharacter
SoLong
EndIf
EndProcedure
SetTopLineAttrTo WhiteOnBlue
SetTopLineTo "[BentleyProductName] Installation Program"
SetCompletionStatusTo Unfinished
[UnAttended] := 0
;; Check if user requests unattended installation
Procedure ShowUnattendedInstallAnnounceBox
TextBox
;; StartTranslateAllLines
Welcome to the [BentleyProductName] Installation Program
The program is performing an unattended
installation of [BentleyProductName] files
from the options described in [FileName].
You need take no further action until the
installation is complete.
;; EndTranslateAllLines
EndTextBox
EndProcedure
;; Get File Name
[SkipUnattendedSwitchString] := LengthOf [UnattendedSwitchString]
[SkipUnattendedSwitchString] := [SkipUnattendedSwitchString] + 1
if [CommandLine1] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine1] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine2] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine2] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine3] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine3] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine4] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine4] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine5] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine5] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine6] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine6] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine7] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine7] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine8] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine8] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
if [CommandLine9] contains [UnattendedSwitchString]
[FileName] := SubstringOf [CommandLine9] from [SkipUnattendedSwitchString] to End
GoTo [Point10]
endif
GoTo Label_BeginAttendedInstallation
;; Check if settings file exists
[Point10]
do ShowUnattendedInstallAnnounceBox
if FileExists [FileName]
Else
Dialog UseHeader "[BentleyProductName] Unattended Installation Error"
;; StartTranslateAllLines
The specified unattended installation options description file
("[FileName]") was not found.
;; EndTranslateAllLines
EndDialog
Goto [Point30]
EndIf
;; Examine file to get settings
ExamineTextFile [FileName]
[String4] := SettingFor DestPath
[InstallType] := SettingFor InstallType
[String1] := SettingFor Name
[String2] := SettingFor Organization
[String3] := SettingFor Serial
ForgetTextFile
TextBox @xy(Center,18)
;; StartTranslateAllLines
Installing to directory [String4],
installation type : [InstallType]
;; EndTranslateAllLines
endTextBox
;; Select installation mode
[InstallationDirectory] := [string4]
if [InstallType] = complete
do doinstallall
Endif
if [InstallType] = fullnomde
do doinstallfull
Endif
if [InstallType] = minmde
do dominimalmde
Endif
if [InstallType] = minimum
do dominimal
Endif
if [InstallType] = absmin
do doabsmin
Endif
[Number1] := quesize
if [Number1] = 0
If [InstallType] = BlankString
[InstallType] := <Undefined In File>
EndIf
Dialog UseHeader "[BentleyProductName] Unattended Installation Error"
;; StartTranslateAllLines
Invalid option in Unattended Installation description file
for InstallType: "[InstallType]"
Use complete, fullnomde, minmde, minimum, or absmin.
;; EndTranslateAllLines
EndDialog
goto [Point30]
endif
;; Doublecheck if there is space on target drive
[Number1] := FreeSpaceOnDrive InstallationDrive
[Number2] := QueSize
if [Number1] < [Number2]
Dialog UseHeader "[BentleyProductName] Unattended Installation Error"
;; StartTranslateAllLines
Insufficient space on installation drive: InstallationDrive.
Available: [Number1]
Required: [Number2]
;; EndTranslateAllLines
EndDialog
goto [Point30]
endif
;; Copy files...
[UnAttended] := 1
goto [Point50]
;; end if commandline contains /s:
:Label_BeginAttendedInstallation
;; We get here if installation is interactive
[YesOrNo1] := YesCharacter
Dialog [YesOrNo1] UseHeader "[BentleyProductName] Installation"
;; StartTranslateAllLines
Welcome to the [BentleyProductName] Installation Program
This program installs [BentleyProductName] on your system.
Press arrows to select options, the space bar to include
in installation list (where applicable), then press Enter
or Return to execute them. To exit this program, press [ExtKey].
Do you consent to be bound by the terms and conditions
of the license accompanying this software? The license
is in the file "license.txt" at the root of the media
containing the software.
;; EndTranslateAllLines
EndDialog
If [YesOrNo1] = NoCharacter
SoLong
EndIf
;; This is Main installation Dialog box
[Point1]
DefineDrive [InstallFromDrive] FIXED
SetBottomLineAttrTo BlueOnLightGray
SetBottomLineTo " Arrows - Select <Enter> - Execute [ExtKey] - Quit "
[Number1] := sizeofgroup 1
[Number2] := [Number1] + sizeofgroup 2 + sizeofgroup 4 + sizeofgroup 5
[Number2] := [Number2] + sizeofgroup 10 + sizeofgroup 11 + sizeofgroup 12
[Number2] := [Number2] + sizeofgroup [GroupDatabaseRIS]
[Number2] := [Number2] + sizeofgroup 13 + sizeofgroup 91
[Number2] := [Number2] + sizeofgroup 92 + sizeofgroup 93 + sizeofgroup 94
[Number3] := [Number2] + sizeofgroup 6 + sizeofgroup 7
[Number1] := [Number1] / 1048576
[Number2] := [Number2] / 1048576
[Number3] := [Number3] / 1048576
[DialogHeader] := "Please Select Type Of Installation"
[DialogItems] := 4
[DialogOption1] := "Complete Installation"
[DialogComment1] := "Approximately [Number3] MB Disk Space Required."
[DialogOption2] := "[BentleyProductName] without MDE"
[DialogComment2] := "Omit the [BentleyProductName] Development Environment. Approximately [Number2] MB Disk Space Required."
[DialogOption3] := "Minimum Installation"
[DialogComment3] := "VERY limited installation. No help files or examples will be installed. Approximately [Number1] MB Disk Space Required."
[DialogOption4] := "Custom Installation..."
[DialogComment4] := "Select your own specific set of files to install."
do DialogButtons
InCase [DialogResponse] is
=1: do doinstallall
=2: do doinstallfull
=3: do doabsmin
=4: do docustom
EndInCase
;; Full installation
procedure doinstallall
UnQueAllFiles
quefilegroup [GroupRequiredFiles]
quefilegroup [GroupRecommendedAdditions]
quefilegroup [GroupOnlineDocumentation]
quefilegroup [GroupUtilities]
quefilegroup [GroupMDETools]
quefilegroup [GroupMDEExamples]
quefilegroup [GroupDatabaseOracle]
quefilegroup [GroupDatabaseDBaseIV]
quefilegroup [GroupDatabaseDBaseIII]
quefilegroup [GroupDatabaseFoxBase]
quefilegroup [GroupDatabaseRIS]
quefilegroup [GroupWorkspaceArchitectural]
quefilegroup [GroupWorkspaceCivil]
quefilegroup [GroupWorkspaceMechanical]
quefilegroup [GroupWorkspaceMapping]
endprocedure
;; Everything but MDL
procedure doinstallfull
UnQueAllFiles
quefilegroup [GroupRequiredFiles]
quefilegroup [GroupRecommendedAdditions]
quefilegroup [GroupOnlineDocumentation]
quefilegroup [GroupUtilities]
quefilegroup [GroupDatabaseOracle]
quefilegroup [GroupDatabaseDBaseIV]
quefilegroup [GroupDatabaseDBaseIII]
quefilegroup [GroupDatabaseFoxBase]
quefilegroup [GroupDatabaseRIS]
quefilegroup [GroupWorkspaceArchitectural]
quefilegroup [GroupWorkspaceCivil]
quefilegroup [GroupWorkspaceMechanical]
quefilegroup [GroupWorkspaceMapping]
endprocedure
;; Minimum installation
procedure dominimal
UnQueAllFiles
quefilegroup [GroupRequiredFiles]
quefilegroup [GroupRecommendedAdditions]
quefilegroup [GroupUtilities]
endprocedure
;; Minimal & MDL
procedure dominimalmde
UnQueAllFiles
quefilegroup [GroupRequiredFiles]
quefilegroup [GroupRecommendedAdditions]
quefilegroup [GroupUtilities]
quefilegroup [GroupMDETools]
endprocedure
;; Absolute minimum
procedure doabsmin
UnQueAllFiles
quefilegroup [GroupRequiredFiles]
endprocedure
;; Custom install
procedure docustom
SetBottomLineTo " <Space> - Mark <Enter> - Execute [ExtKey] - Quit "
UnQueAllFiles
[SizeRequiredFiles] := SizeOfGroup [GroupRequiredFiles] / 1024
[SizeRecommendedAdditions] := SizeofGroup [GroupRecommendedAdditions] / 1024
[SizeOnlineDocumentation] := SizeOfGroup [GroupOnlineDocumentation] / 1024
[SizeUtilities] := SizeOfGroup [GroupUtilities] / 1024
[SizeMDETools] := SizeOfGroup [GroupMDETools] / 1024
[SizeMDEExamples] := SizeOfGroup [GroupMDEExamples] / 1024
[SizeDatabaseOracle] := SizeOfGroup [GroupDatabaseOracle] / 1024
[SizeDatabaseDBaseIV] := SizeOfGroup [GroupDatabaseDBaseIV] / 1024
[SizeDatabaseDBaseIII] := SizeOfGroup [GroupDatabaseDBaseIII] / 1024
[SizeDatabaseFoxBase] := SizeOfGroup [GroupDatabaseFoxBase] / 1024
[SizeDatabaseRIS] := SizeOfGroup [GroupDatabaseRIS] / 1024
[SizeWorkspaceArchitectural] := sizeofgroup [GroupWorkspaceArchitectural] / 1024
[SizeWorkspaceCivil] := sizeofgroup [GroupWorkspaceCivil] / 1024
[SizeWorkspaceMechanical] := sizeofgroup [GroupWorkspaceMechanical] / 1024
[SizeWorkspaceMapping] := sizeofgroup [GroupWorkspaceMapping] / 1024
;; Set up enumerated variables
[ChoiceEnumerator] := 1
[ChoiceRequiredFiles] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceRecommendedAdditions] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceOnlineDocumentation] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceUtilities] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceMDETools] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceMDEExamples] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceDatabaseOracle] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceDatabaseDBaseIV] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceDatabaseDBaseIII] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceDatabaseFoxBase] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceDatabaseRIS] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceWorkspaceArchitectural] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceWorkspaceCivil] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceWorkspaceMechanical] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
[ChoiceWorkspaceMapping] := [ChoiceEnumerator]
[ChoiceEnumerator] := [ChoiceEnumerator] + 1
GetMenuChoice AllowMultiple UseHeader "Files to be Installed"
;; StartTranslateAllLines
Install [BentleyProductName] system files [SizeRequiredFiles] Kilobytes
; These files are required for [BentleyProductName].
Install Recommended Additions to [BentleyProductName] [SizeRecommendedAdditions] Kilobytes
; These files are highly recommended - this set of files includes
; rendering materials and sample design files.
Install help and documentation files [SizeOnlineDocumentation] Kilobytes
; These files contain on-line documentation.
Install utility programs and files [SizeUtilities] Kilobytes
; These files contain utilities to use with [BentleyProductName].
Install MDE programming tools [SizeMDETools] Kilobytes
; These files are necessary for MDE development, but do not include
; sample files.
Install MDE examples [SizeMDEExamples] Kilobytes
; These files contain sample MDE programs.
Install Oracle Database files [SizeDatabaseOracle] Kilobytes
; These files contain the Oracle Database files and examples.
Install Xbase Database(dBASE IV) files [SizeDatabaseDBaseIV] Kilobytes
; These files contain the Xbase Database files and examples for
; dBASE IV compatibility.
Install Xbase Database(dBASE III+) files [SizeDatabaseDBaseIII] Kilobytes
; These files contain the Xbase Database files and examples for
; dBASE III+ compatibility.
Install Xbase Database(FoxBase) files [SizeDatabaseFoxBase] Kilobytes
; These files contain the Xbase Database files and examples for
; FoxBase compatibility.
Install RIS Database files [SizeDatabaseRIS] Kilobytes
; These files contain the RIS Database files and examples for
; RIS compatibility.
Install Architectural Workspace [SizeWorkspaceArchitectural] Kilobytes
; These files contain architectural examples and interface.
Install Civil Engineering Workspace [SizeWorkspaceCivil] Kilobytes
; These files contain civil engineering examples and interface.
Install Mechanical Drafting Workspace [SizeWorkspaceMechanical] Kilobytes
; These files contain mechanical drafting examples and interface.
Install Mapping Workspace [SizeWorkspaceMapping] Kilobytes
; These files contain mapping examples and interface.
;; EndTranslateAllLines
endGetMenuChoice
incase choice is
=[ChoiceRequiredFiles]: quefilegroup [GroupRequiredFiles]
=[ChoiceRecommendedAdditions]: quefilegroup [GroupRecommendedAdditions]
=[ChoiceOnlineDocumentation]: quefilegroup [GroupOnlineDocumentation]
=[ChoiceUtilities]: quefilegroup [GroupUtilities]
=[ChoiceMDETools]: quefilegroup [GroupMDETools]
=[ChoiceMDEExamples]: quefilegroup [GroupMDEExamples]
=[ChoiceDatabaseOracle]: quefilegroup [GroupDatabaseOracle]
=[ChoiceDatabaseDBaseIV]: quefilegroup [GroupDatabaseDBaseIV]
=[ChoiceDatabaseDBaseIII]: quefilegroup [GroupDatabaseDBaseIII]
=[ChoiceDatabaseFoxBase]: quefilegroup [GroupDatabaseFoxBase]
=[ChoiceDatabaseRIS]: quefilegroup [GroupDatabaseRIS]
=[ChoiceWorkspaceArchitectural]: quefilegroup [GroupWorkspaceArchitectural]
=[ChoiceWorkspaceCivil]: quefilegroup [GroupWorkspaceCivil]
=[ChoiceWorkspaceMechanical]: quefilegroup [GroupWorkspaceMechanical]
=[ChoiceWorkspaceMapping]: quefilegroup [GroupWorkspaceMapping]
endincase
SetBottomLineTo " Arrows - Select <Enter> - Execute [ExtKey] - Quit "
[Number2] := QueSize
If [number2] = 0
Goto [Point1]
Endif
endprocedure
;; PROCEDURE: queueMinimal
;; PROCEDURE: queueMDE
;; PROCEDURE: queueDatabases
;; PROCEDURE: queueWorkspaces
;; Select target drive
[Point2]
if commandline contains -bernoulli
determineinstallationdrive QueSize RequireFixed BernoulliAsFixed
else
determineinstallationdrive QueSize RequireFixed
endif
If InstallationDrive = BlankString
;; StartTranslateAllLines
Popup Please specify an installation drive.
;; EndTranslateAllLines
Goto [Point2]
EndIf
;; Confirm if space is insufficient
:GetFinalDestinationConfirmation
[Number1] := FreeSpaceOnDrive InstallationDrive
[Number2] := QueSize
[Number3] := ([Number2] - [Number1]) / 1024
if [number1] < [number2]
[DialogHeader] := "WARNING: Insufficient Disk Space!"
[DialogComment1] := "Warning: You will need to free [Number3] KB. Proceed only if you are going to delete or install over an existing installation."
else
[DialogHeader] := "Please confirm..."
[DialogComment1] := "This is an acceptable install type for this drive."
endif
[Number1] := [Number1]/1024
[Number2] := [Number2]/1024
[DialogItems] := 3
[DialogOption1] := "Proceed With Installation"
[DialogOption2] := "Change Installation Type"
[DialogComment2] := "The files you have selected require [Number2] KB."
[DialogOption3] := "Change Target Drive"
[String1] := InstallationDrive
[DialogComment3] := "You have selected drive [String1] ([Number1] KB free)."
do DialogButtons
InCase [DialogResponse] is
=2: goto [Point1]
=3: goto [Point2]
endInCase
;; Get directory name
[Point3]
[BetaInstallationDirectory] := InstallationDrive:\[BetaRootDirectoryName]
If .NOT. [BetaRootDirectoryName] = [DefaultRootDirectoryName]
If DirectoryExists [BetaInstallationDirectory]
[YesOrNo1] := NoCharacter
Dialog [YesOrNo1] UseHeader "Thank You Beta Testers!"
;; StartTranslateAllLines
Would you like to delete your Beta Installation of [BentleyProductName]
([BetaInstallationDirectory]) at this time?
;; EndTranslateAllLines
EndDialog
If [YesOrNo1] = YesCharacter
RemoveDirectoryTree [BetaInstallationDirectory]
EndIf
EndIf
EndIf
[InstallationDirectory] := InstallationDrive:\[DefaultRootDirectoryName]
if commandline contains -bernoulli
determineinstallationdirectory
else
determineinstallationdirectory RequireFixed
endif
;; If directory is not empty, let user delete it
[point40]
if DirectoryExists [InstallationDirectory]
if DirectoryIsEmpty [InstallationDirectory]
else
[DialogItems] := 4
[DialogHeader] := "Caution: '[InstallationDirectory]' Exists"
[DialogOption1] := "Select Alternate Directory"
[DialogComment1] := "Preserve the existing directory."
[DialogOption2] := "Delete Entire Directory"
[DialogComment2] := "Install from scratch."
[DialogOption3] := "Retain Personalized Information"
[DialogComment3] := "Delete everything except for existing licenses, workspaces, and design files."
[DialogOption4] := "Install Over Directory"
[DialogComment4] := "Union the files you've selected with the directory's existing contents."
do DialogButtons
InCase [DialogResponse] is
=1: GoTo [Point3]
=2:
Dialog [YesOrNo1] WhiteOnRed UseHeader "[BentleyProductName] Installation"
;; StartTranslateAllLines
You are about to delete the entire [BentleyProductName]
directory. Please confirm that you want to do this.
;; EndTranslateAllLines
EndDialog
if [YesOrNo1] = NoCharacter
goto [point40]
endif
TextBox
;; StartTranslateAllLines
Please wait while files are deleted...
;; EndTranslateAllLines
EndTextBox
RemoveDirectoryTree [InstallationDirectory]
ClearScreen
=3:
Dialog [YesOrNo1] WhiteOnRed UseHeader "[BentleyProductName] Installation"
;; StartTranslateAllLines
You are about to delete most of the [BentleyProductName]
directory. Please confirm that you want to do this.
;; EndTranslateAllLines
EndDialog
if [YesOrNo1] = NoCharacter
goto [point40]
endif
TextBox
;; StartTranslateAllLines
Please wait while files are deleted...
;; EndTranslateAllLines
EndTextBox
RemoveDirectoryTree [InstallationDirectory]\chartran
RemoveDirectoryTree [InstallationDirectory]\config
RemoveDirectoryTree [InstallationDirectory]\data
RemoveDirectoryTree [InstallationDirectory]\database
RemoveDirectoryTree [InstallationDirectory]\docs
if DirectoryExists [InstallationDirectory]\drivers
DeleteFiles from [InstallationDirectory]\drivers Quietly
bsi*.*
ver4tiga.*
EndDeleteFiles
endif
RemoveDirectoryTree [InstallationDirectory]\edg
RemoveDirectoryTree [InstallationDirectory]\help
RemoveDirectoryTree [InstallationDirectory]\image
RemoveDirectoryTree [InstallationDirectory]\macros
RemoveDirectoryTree [InstallationDirectory]\material
RemoveDirectoryTree [InstallationDirectory]\mdl\bin
RemoveDirectoryTree [InstallationDirectory]\mdl\examples
RemoveDirectoryTree [InstallationDirectory]\mdl\include
RemoveDirectoryTree [InstallationDirectory]\mdl\library
RemoveDirectoryTree [InstallationDirectory]\mdl\objects
RemoveDirectoryTree [InstallationDirectory]\mdlapps
RemoveDirectoryTree [InstallationDirectory]\mdlsys
RemoveDirectoryTree [InstallationDirectory]\menus
RemoveDirectoryTree [InstallationDirectory]\plotcfg
RemoveDirectoryTree [InstallationDirectory]\tables
RemoveDirectoryTree [InstallationDirectory]\tagcfg
RemoveDirectoryTree [InstallationDirectory]\tmp
RemoveDirectoryTree [InstallationDirectory]\utils
RemoveDirectoryTree [InstallationDirectory]\wsmod\arch
RemoveDirectoryTree [InstallationDirectory]\wsmod\civil
RemoveDirectoryTree [InstallationDirectory]\wsmod\default
RemoveDirectoryTree [InstallationDirectory]\wsmod\mapping
RemoveDirectoryTree [InstallationDirectory]\wsmod\mechdrft
RemoveDirectoryTree [InstallationDirectory]\wsui\arch
RemoveDirectoryTree [InstallationDirectory]\wsui\autocad
RemoveDirectoryTree [InstallationDirectory]\wsui\civil
RemoveDirectoryTree [InstallationDirectory]\wsui\default
RemoveDirectoryTree [InstallationDirectory]\wsui\mapping
RemoveDirectoryTree [InstallationDirectory]\wsui\mde
RemoveDirectoryTree [InstallationDirectory]\wsui\mechdrft
RemoveDirectoryTree [InstallationDirectory]\wsui\newuser
RemoveDirectoryTree [InstallationDirectory]\wsui\v50
ClearScreen
endincase
endif
endif
[Point50]
;; Actually copy files...
CreateDirectoryIfNecessary [installationdirectory]
setBottomLineTo " Any key interrupts the installation process... "
Procedure MyFatalError
Dialog
;; StartTranslateAllLines
FatalError: FatalErrorMessage (Script Line: ScriptErrorLine)
Please make sure the [BentleyProductName] Installer and its
associated files are intact.
;; EndTranslateAllLines
EndDialog
SoLong
EndProcedure
SetCallbackFor FatalError to MyFatalError
getquedfiles ShowJustOne
setBottomLineTo ""
[Number1] := quesize
If [Number1] = 0
SetCompletionStatusTo Finished
else
SetCompletionStatusTo UnFinished
Goto [Point30]
Endif
;; Do some postinstallation stuff...
;; First, create empty directories
CreateDirectoryIfNecessary [installationdirectory]\install
CreateDirectoryIfNecessary [installationdirectory]\config\appl
CreateDirectoryIfNecessary [installationdirectory]\license
CreateDirectoryIfNecessary [installationdirectory]\material
CreateDirectoryIfNecessary [installationdirectory]\material\bump
CreateDirectoryIfNecessary [installationdirectory]\material\pattern
CreateDirectoryIfNecessary [installationdirectory]\wsui\default
CreateDirectoryIfNecessary [installationdirectory]\out
CreateDirectoryIfNecessary [installationdirectory]\out\plot
CreateDirectoryIfNecessary [installationdirectory]\out\cgm
CreateDirectoryIfNecessary [installationdirectory]\out\iges
CreateDirectoryIfNecessary [installationdirectory]\out\image
CreateDirectoryIfNecessary [installationdirectory]\out\tag
CreateDirectoryIfNecessary [installationdirectory]\out\dwgordxf
CreateDirectoryIfNecessary [installationdirectory]\out\dgn
CreateDirectoryIfNecessary [installationdirectory]\out\grd
CreateDirectoryIfNecessary [installationdirectory]\tagcfg
CreateDirectoryIfNecessary [installationdirectory]\tmp
CreateDirectoryIfNecessary [Installationdirectory]\dgn
CreateDirectoryIfNecessary [Installationdirectory]\dgn\default
;; Some directories only need to be created if certain install
;; options are picked...
if DirectoryExists [installationdirectory]\database\ris
CreateDirectoryIfNecessary [installationdirectory]\database\ris\examples\tables
endif
if DirectoryExists [installationdirectory]\mdl
CreateDirectoryIfNecessary [installationdirectory]\mdl\objects
endif
if DirectoryExists [installationdirectory]\database\oracle
CreateDirectoryIfNecessary [installationdirectory]\database\oracle\examples\forms
endif
;; Create plotfile.bat on WIN machines - usconfig creates it on DOS.
[Point30]
If completionstatus = Finished
If [UnAttended] = 1
SoLong
EndIf
if FileExists [InstallationDirectory]\usconfig.exe
Dialog [YesOrNo1]
;; StartTranslateAllLines
Would you like to configure [BentleyProductName] for DOS?
You will need to configure [BentleyProductName] before
you run it the first time. However, you may not
want to configure if this is a network server
installation, unless you would like to provide
all local systems with the same default
configuration.
;; EndTranslateAllLines
EndDialog
if [YesOrNo1] = YesCharacter
ChangeDirectoryTo [InstallationDirectory]
Run [InstallationDirectory]\usconfig.exe -dos NoPrompt SwapOut
endif
endif
;; Final message: success
Dialog UseHeader "[BentleyProductName] Installation"
;; StartTranslateAllLines
[BentleyProductName] installation completed.
Do not forget to register your new software.
;; EndTranslateAllLines
EndDialog
else ;; COMPLETIONSTATUS if clause
If [UnAttended] = 1
SoLong
EndIf
;; Final message: failure
Endif
;; Procedure DetermineEndOfLine
;; - Move the variable "CommentLineBreak" forward to the next
;; space of string "CommentString"
Procedure DetermineEndOfLine
:Label_MoveForwardToEndOfWord
[String1] := SubStringOf [CommentString] from [CommentLineBreak] to [CommentLineBreak]
If [String1] = BlankString
Exit
EndIf
If [String1] = " "
:Label_SkipTrailingSpaces
[CommentLineBreak] := [CommentLineBreak] + 1
[String1] := SubStringOf [CommentString] from [CommentLineBreak] to [CommentLineBreak]
If [String1] = " "
GoTo Label_SkipTrailingSpaces
EndIf
Else
[CommentLineBreak] := [CommentLineBreak] + 1
GoTo Label_MoveForwardToEndOfWord
EndIf
EndProcedure ;; DetermineEndOfLine
;; Procedure BreakStringIntoThreeLines
;; - Change the string "CommentString" into CommentString1, CommentString2, CommentString3.
Procedure BreakStringIntoThreeLines
[CommentLineBreak] := 60
do DetermineEndOfLine
[CommentString1] := SubStringOf [CommentString] from Beginning to [CommentLineBreak]
If [CommentString1] = BlankString
[CommentString1] := " "
[CommentString2] := " "
[CommentString3] := " "
Exit
EndIf
[CommentLineStart] := [CommentLineBreak] + 1
[CommentLineBreak] := [CommentLineStart] + 60
do DetermineEndOfLine
[CommentString2] := SubStringOf [CommentString] from [CommentLineStart] to [CommentLineBreak]
If [CommentString2] = BlankString
[CommentString2] := " "
[CommentString3] := " "
Exit
EndIf
[CommentLineStart] := [CommentLineBreak] + 1
[CommentString3] := SubStringOf [CommentString] from [CommentLineStart] to End
If [CommentString3] = BlankString
[CommentString3] := " "
EndIf
EndProcedure ;; BreakStringIntoThreeLines
;; DialogButtons
Procedure DialogButtons
If [DialogItems] >= 1
[CommentString] := [DialogComment1]
do BreakStringIntoThreeLines
[DialogComment1a] := [CommentString1]
[DialogComment1b] := [CommentString2]
[DialogComment1c] := [CommentString3]
EndIf
If [DialogItems] >= 2
[CommentString] := [DialogComment2]
do BreakStringIntoThreeLines
[DialogComment2a] := [CommentString1]
[DialogComment2b] := [CommentString2]
[DialogComment2c] := [CommentString3]
EndIf
If [DialogItems] >= 3
[CommentString] := [DialogComment3]
do BreakStringIntoThreeLines
[DialogComment3a] := [CommentString1]
[DialogComment3b] := [CommentString2]
[DialogComment3c] := [CommentString3]
EndIf
If [DialogItems] >= 4
[CommentString] := [DialogComment4]
do BreakStringIntoThreeLines
[DialogComment4a] := [CommentString1]
[DialogComment4b] := [CommentString2]
[DialogComment4c] := [CommentString3]
EndIf
If [DialogItems] >= 5
[CommentString] := [DialogComment5]
do BreakStringIntoThreeLines
[DialogComment5a] := [CommentString1]
[DialogComment5b] := [CommentString2]
[DialogComment5c] := [CommentString3]
EndIf
If ([DialogItems] = 2)
GetMenuChoice UseHeader "[DialogHeader]"
[DialogOption1]
;[DialogComment1a]
;[DialogComment1b]
;[DialogComment1c]
[DialogOption2]
;[DialogComment2a]
;[DialogComment2b]
;[DialogComment2c]
EndGetMenuChoice
EndIf
If ([DialogItems] = 3)
GetMenuChoice UseHeader "[DialogHeader]"
[DialogOption1]
;[DialogComment1a]
;[DialogComment1b]
;[DialogComment1c]
[DialogOption2]
;[DialogComment2a]
;[DialogComment2b]
;[DialogComment2c]
[DialogOption3]
;[DialogComment3a]
;[DialogComment3b]
;[DialogComment3c]
EndGetMenuChoice
EndIf
If ([DialogItems] = 4)
GetMenuChoice UseHeader "[DialogHeader]"
[DialogOption1]
;[DialogComment1a]
;[DialogComment1b]
;[DialogComment1c]
[DialogOption2]
;[DialogComment2a]
;[DialogComment2b]
;[DialogComment2c]
[DialogOption3]
;[DialogComment3a]
;[DialogComment3b]
;[DialogComment3c]
[DialogOption4]
;[DialogComment4a]
;[DialogComment4b]
;[DialogComment4c]
EndGetMenuChoice
EndIf
If ([DialogItems] = 5)
GetMenuChoice UseHeader "[DialogHeader]"
[DialogOption1]
;[DialogComment1a]
;[DialogComment1b]
;[DialogComment1c]
[DialogOption2]
;[DialogComment2a]
;[DialogComment2b]
;[DialogComment2c]
[DialogOption3]
;[DialogComment3a]
;[DialogComment3b]
;[DialogComment3c]
[DialogOption4]
;[DialogComment4a]
;[DialogComment4b]
;[DialogComment4c]
[DialogOption5]
;[DialogComment5a]
;[DialogComment5b]
;[DialogComment5c]
EndGetMenuChoice
EndIf
InCase Choice is
=1: [DialogResponse] := 1
=2: [DialogResponse] := 2
=3: [DialogResponse] := 3
=4: [DialogResponse] := 4
=5: [DialogResponse] := 5
EndInCase
EndProcedure
;; ExitProcedure - called at exit.
Procedure ExitProcedure
If completionstatus = Finished
Else
If [UnAttended] = 0
Dialog UseHeader "[BentleyProductName] Installation"
;; StartTranslateAllLines
[BentleyProductName] was not completely installed.
You should run the installation program again.
;; EndTranslateAllLines
EndDialog
EndIf
EndIf
EndProcedure
;; The END