home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Toolworks Interactive
/
Toolworks_Interactive.mdf
/
stw.inf
< prev
next >
Wrap
INI File
|
1992-12-04
|
7KB
|
239 lines
;; This is the installation script Software Toolworks for Windows
DefineVariables
Text [Title] := The Software Toolworks Multimedia Encyclopedia
Text [InitFile] := STW.INI
Text [BackgroundBitmap] := stw.bmp
Text [AppName] := STW
Text [AppExe] := stw.exe
Text [AppHelp] := stw.hlp
Text [UserVersion]
Text [NewVersion]
EndDefineVariables
[Number8] := 0
Do SetupGro
;; LoadBitMap 1 [InstallFromDirectory]\[BackgroundBitmap] @xy(5,5)
;; ShowBitMap 1
ShowWindow Maximized
Dialog
.cThanks for purchasing [Title]
EndDialog
[Point1]
GetMenuChoice
Install [Title]
; Use this choice initially for a
; complete installation.
Finished
; Exit this installation process
EndGetMenuChoice
InCase Choice is
=1: Do Install
=2: Do ByeBye
EndInCase
Procedure Install
[InstallationDirectory] := C:\STW_WIN
Dialog [InstallationDirectory] 44
Please indicate the drive and directory where the
encyclopedia should be installed.
EndDialog
CreateDirectoryIfNecessary [InstallationDirectory]
ChangeDirectoryTo [InstallationDirectory]
CopyFiles from [InstallFromDirectory] to [InstallationDirectory]
[AppExe]
[InitFile]
[AppHelp]
eesc.dll
EndCopyFiles
SetFileAttrTo 00 for [InstallationDirectory]\[AppExe]
SetFileAttrTo 00 for [InstallationDirectory]\[InitFile]
SetFileAttrTo 00 for [InstallationDirectory]\[AppHelp]
SetFileAttrTo 00 for [InstallationDirectory]\eesc.dll
if FileExists [WindowsSystemDirectory]\ver.dll
else
CopyFiles from [InstallFromDirectory] to [WindowsSystemDirectory]
VER.DLL
EndCopyFiles
SetFileAttrTo 00 for [WindowsSystemDirectory]\ver.dll
Endif
CopyFiles from [InstallFromDirectory] to [WindowsSystemDirectory]
AAPLAY.DLL
EndCopyFiles
SetFileAttrTo 00 for [WindowsSystemDirectory]\aaplay.dll
if FileExists [WindowsSystemDirectory]\commdlg.dll
[UserVersion] := ProductVersion [WindowsSystemDirectory]\commdlg.dll
[NewVersion] := ProductVersion [InstallFromDirectory]\commdlg.dll
if UserVersion < NewVersion
CopyFiles from [InstallFromDirectory] to [WindowsSystemDirectory]
COMMDLG.DLL
EndCopyFiles
SetFileAttrTo 00 for [WindowsSystemDirectory]\commdlg.dll
Endif
else
CopyFiles from [InstallFromDirectory] to [WindowsSystemDirectory]
COMMDLG.DLL
EndCopyFiles
SetFileAttrTo 00 for [WindowsSystemDirectory]\commdlg.dll
Endif
if FileExists [WindowsSystemDirectory]\shell.dll
[UserVersion] := ProductVersion [WindowsSystemDirectory]\shell.dll
[NewVersion] := ProductVersion [InstallFromDirectory]\shell.dll
if UserVersion < NewVersion
CopyFiles from [InstallFromDirectory] to [WindowsSystemDirectory]
SHELL.DLL
EndCopyFiles
SetFileAttrTo 00 for [WindowsSystemDirectory]\shell.dll
Endif
else
CopyFiles from [InstallFromDirectory] to [WindowsSystemDirectory]
SHELL.DLL
EndCopyFiles
SetFileAttrTo 00 for [WindowsSystemDirectory]\shell.dll
Endif
;; Setup win.ini file with the approriate startup directory
[Array1][1] := [AppName]
[Array1][2] := dir
[Array1][3] := [InstallationDirectory]
WriteProfileString Using [Array1]
Dialog [InstallFromDrive] 1
Please indicate the drive letter of the CD-ROM
drive where the encyclopedia will be located.
EndDialog
;; Setup disk to get database from
[Array1][1] := Database
[Array1][2] := Disk
[Array1][3] := [InstallFromDrive]
[Array1][4] := [InstallationDirectory]\[InitFile]
WritePrivateProfileString Using [Array1]
;; Setup help directory
[Array1][1] := Database
[Array1][2] := Help
[Array1][3] := [InstallationDirectory]\[AppHelp]
[Array1][4] := [InstallationDirectory]\[InitFile]
WritePrivateProfileString Using [Array1]
;; Setup notes directory
[Array1][1] := Database
[Array1][2] := Notes
[Array1][3] := [InstallationDirectory]
[Array1][4] := [InstallationDirectory]\[InitFile]
WritePrivateProfileString Using [Array1]
Dialog [YesOrNo1]
Do you have a Windows-supported sound card installed
in your computer?
EndDialog
[Number9] := 0
if [YesOrNo1] = YesCharacter
Dialog [YesOrNo2]
Do you want [Title] to use the card?
EndDialog
if [YesOrNo2] = NoCharacter
[Number9] := 0
else
[Number9] := 1
Endif
Endif
if [Number9] = 0
[Array1][1] := Database
[Array1][2] := RedBook
[Array1][3] := 1
[Array1][4] := [InstallationDirectory]\[InitFile]
WritePrivateProfileString Using [Array1]
Endif
;; Install Video Stuff
if WindowsVersion < 3.1
Dialog
Video is not supported for your Windows version.
EndDialog
else
Dialog
Microsoft Video for Windows will now be installed.
EndDialog
Run [InstallFromDirectory]\MSVIDEO\setup.exe
Endif
;; Setup Group file
Dialog [YesOrNo1]
Would you like to build a [AppName] program group?
EndDialog
if [YesOrNo1] = YesCharacter
[Array1][1] := [InstallationDirectory]\[AppExe]
BuildProgramGroup "STW" stw.grp
[Array1][1] "Software Toolworks Encyclopedia" [Array1][1]
EndBuildProgramGroup
Endif
[Number8] := 1
Do ByeBye
EndProcedure
Procedure ByeBye
if [Number8] = 1
else
Popup [Title] was not successfully installed
Endif
Dialog PressAKey WhiteOnBrown
Thank You for Purchasing [Title]
EndDialog
SoLong
EndProcedure
Procedure SetupGro
SetTopLineTo Installing [Title] (Press Esc to exit)
[Number1] := 320 - 130 + 40
[Number2] := 15
[Number3] := 320 + 130 + 40
[Number4] := 65
[Number5] := 320 - 130 + 50
[Number6] := 32
[Number7] := 700000
[String1] := ShadowDirectory
;; While it is not documented anywhere else it is true that FreeSpaceOnDrive
;; considers only the first character of its first parameter (in this case
;; the drive letter of the temporary directory).
If FreeSpaceOnDrive ShadowDirectory < 25000
popup There is insufficient space on the TEMP drive for installation.
SoLong
EndIf
;; Ellipse @xy([Number1],[Number2]) @xy([Number3],[Number4])
;; TextOut @xy([Number5],[Number6]) Welcome to [AppName] installation!
SetDefaultBitmap off
SetBackgroundColor 0 0 255 0 0 0 TopToBottom
ShowWindow Maximized
EndProcedure
EndScript