home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Strange Days
/
STRANGE_DAYS.BIN
/
mac
/
STRANGE.BAK
< prev
next >
Wrap
Text File
|
1995-08-27
|
26KB
|
715 lines
rem ---------------------------------------------------------------------
rem
rem SETUP.MST - MSSETUP Installation Script
rem
rem Version 2.0
rem
rem (c) Copyright 1988-1994 Apple Computer, Inc. All Rights Reserved.
rem
rem Revised: 12 October 1994
rem Tony Knight, Apple Computer
rem ---------------------------------------------------------------------
rem Required includes to interface with MSSETUP DLL's
rem -------------------------------------------------
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
rem Dialog box id's
rem ---------------
rem Note: If MSSETUP were really smart, we could use the
rem #defines in DIALOGS.HR. Instead, we must manually
rem keep them in step
rem ----------------------------------------------------
CONST NUKEOLD = 101 '' WARNING FOR OLDER VERSIONS
CONST OLDMESS = 102 '' MODELESS DIALOGUE BOX FOR OLDER VERSIONS
CONST DESTPATH = 300 ''Gets destination path
CONST PPATH = 301 ''Dialog for program path
CONST EXITQUIT = 600 ''Exits on user request
CONST EXITQUIT2 = 601 ''Exits at begginning
CONST EXITSUCCESS = 700 ''Exits when install is done
CONST OPTIONS = 800 ''Gets AUTOEXEC.BAT options
CONST INSTTYPE = 1003 ''Gets the install type CD-ROM or Hard Drive
CONST HDTYPE = 1005 ''Gets the version type High or Standard Quality
CONST ASKSETUP = 1100 ''Readme part1
CONST ASKSETUP2 = 1101 ''Readme part2
CONST TOOBIG = 6300 ''Not enough space on target disk error
CONST BADPATH = 6400 ''Bad destination path error
CONST BADWINDOWS = 6500 ''Wrong Windows release
CONST EXITFAILURE = 6600 ''Exits on error
rem String id's
rem -----------
rem Note: If MSSETUP were really smart, we could use the
rem #defines in DIALOGS.HR. Instead, we must manually
rem keep them in step
rem ----------------------------------------------------
CONST STR_PLAYER = 1024 ''Movie Player
CONST STR_VIEWER = 1025 ''Picture Viewer
CONST STR_GROUP = 1026 ''Program Manager group
CONST STR_TITLE = 1027 ''Installer Title
CONST STR_MSG1 = 1028 ''Version error message part 1
CONST STR_MSG2 = 1029 ''Version error message part 2
CONST STR_MSG3 = 1030 ''Remove obsolete files?
CONST STR_WARNING = 1031 ''Warning
CONST STR_HELP = 1032 ''Help
CONST STR_SAMPLE = 1033 ''Sample movie
rem Miscellaneous Constants
rem -----------------------
CONST NOLOGO = 1 ''Dummy NULL bitmap (must be 1)
CONST LOGO = 2 ''Background bitmap
CONST MOVIE = 2 ''Movie placeholder bitmap
CONST NOSPACE = 1 ''No space to complete install
CONST INSTALLOK = 2 ''Install completed OK
CONST INSTALLFAILED =3 ''Install failed for some reason
CONST FILES_REMOVED = 1
CONST FILES_SKIPPED = 2
rem Global Variables
rem ----------------
GLOBAL SOURCE$ ''Source directory
GLOBAL DEST$ ''Default destination directory
GLOBAL DEST2$ '' DEST FOR WINDOWS QTW .EXE'S
GLOBAL DEST3$ '' DEST FOR DOCUMENTATION AND INTERFACES
GLOBAL DESTPRG$ ''DEST FOR PROGRAM
GLOBAL LOCATED$ ''Where EXEs are
GLOBAL HDINSTTYPE$ ''Which version to install on HD High or Standard
GLOBAL HIGHQ$ ''Install High Quality
GLOBAL STDQ$ ''Install Standard Quality
GLOBAL LOCALINST$ ''Local install
GLOBAL CLIENTINST$ ''Client install
GLOBAL SERVERINST$ ''Server install
GLOBAL SETUPPATH$ ''Setup destination path
GLOBAL SETUPTYPE$ ''local,client,server
GLOBAL EXTRACOSTS$ ''List of extra costs to add per drive
GLOBAL APPNEEDS$ ''Disk space costs per drive
GLOBAL SECTIONKEY$ ''INF file section key
GLOBAL SUCCESS% ''Installation completion code
GLOBAL CUIDLL$ ''User interface DLL
GLOBAL HELPPROC$ ''Help dialog procedure
rem Initialize global vriables
rem --------------------------
SOURCE$ = GetSymbolValue("STF_SRCDIR")
DEST$ = GetWindowsSysDir
DEST2$ = GetWindowsDir
DEST3$ = "C:\QTW"
DESTPRG$ = "C:\STRANGE"
HIGHQ$ = "1"
STD$ = "2"
HDINSTTYPE$ = HIGHQ$
LOCALINST$ = "1"
CLIENTINST$ = "2"
SERVERINST$ = "3"
SETUPPATH$ = DEST$
SETUPTYPE$ = LOCALINST$
APPNEEDS$ = "AppNeeds"
EXTRACOSTS$ = "ExtraCosts"
SECTIONKEY$ = "SectionKey"
SUCCESS% = INSTALLFAILED
FOR i% = 1 TO 26 STEP 1
AddListItem EXTRACOSTS$, "16384"
NEXT i%
rem
rem default dest to first hard drive
rem since some OEM systems don't start at C:
rem
GetLocalHardDrivesList "HardDrives"
NumDrives% = GetListLength("HardDrives")
IF (NUMDRIVES% > 0) THEN
DEST3$ = GetListItem("HardDrives",1) + ":\QTW"
END IF
rem Get name of localized user interface dialogs
rem --------------------------------------------
CUIDLL$ = "SETUP"+GetIniKeyString("WIN.INI", "intl", "sLanguage")+".DLL"
IF DoesFileExist(CUIDLL$, femExists) = 0 THEN
CUIDLL$ = "SETUPENU.DLL"
END IF
rem Subroutines and Functions
rem -------------------------
DECLARE FUNCTION Install AS INTEGER
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION GetQTWVersion LIB "setupenu.dll" (szDLL$) AS INTEGER
DECLARE FUNCTION GetResourceString LIB "setupenu.dll" (szResource$, idString%) AS INTEGER
DECLARE FUNCTION StartCustomSetup LIB "setupenu.dll" (hinst%, hwnd%) AS INTEGER
DECLARE FUNCTION StopCustomSetup LIB "setupenu.dll" (hinst%, hwnd%) AS INTEGER
DECLARE FUNCTION WritePrivateProfileString LIB "krnl386.exe" (szSect$, szEntry$, szString$, szINI$) AS INTEGER
DECLARE FUNCTION CheckForOld AS INTEGER
DECLARE FUNCTION RemoveOldQTFiles (FilePath$) AS INTEGER
DECLARE FUNCTION CheckForSpace (DrivePath$) AS INTEGER
rem Initialize custom setup logic
rem -----------------------------
SetBitmap CUIDLL$, NOLOGO
i% = GetResourceString (CUIDLL$, STR_TITLE)
SetTitle GetSymbolValue ("ResourceString")
i% = StartCustomSetup (HinstFrame(), HwndFrame ())
i% = SetBeepingMode(1)
rem Make sure that we are running on Windows 3.1 or better
rem ------------------------------------------------------
IF GetWindowsMajorVersion() < 3 THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
GOTO CLEANUP
END IF
IF (GetWindowsMajorVersion() = 3) AND (GetWindowsMinorVersion() < 10) THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
GOTO CLEANUP
END IF
rem Make sure that we are running on a 286 or better
rem ------------------------------------------------
IF GetWinFlags() AND 2 THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
GOTO CLEANUP
END IF
rem -------------------------------------------------------------------
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szTemp$ = GetSymbolValue("STF_SRCDIR")
SPLITPATH szTemp$, drv$, dir$, filename$, ext$
szInf$ = szTemp$ + "strange.INF"
END IF
ReadInfFile szInf$
rem Get the setup type: Local, Client or Server
rem -------------------------------------------
ITYPE:
SetSymbolValue "RadioDefault", SETUPTYPE$
ITYPEL1:
rem ReadMe part 1
sz$ = UIStartDlg(CUIDLL$, ASKSETUP, "FRadioDlgProc", 100, "")
SETUPTYPE$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ITYPEL1
ELSE
GOSUB ASKQUIT
GOTO ITYPE
END IF
rem ReadMe part 2
SetSymbolValue "RadioDefault", SETUPTYPE$
sz$ = UIStartDlg(CUIDLL$, ASKSETUP2, "FRadioDlgProc", 0, "")
SETUPTYPE$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ITYPEL1
ELSE
GOSUB ASKQUIT
GOTO ITYPE
END IF
rem Setup type
SetSymbolValue "RadioDefault", SETUPTYPE$
sz$ = UIStartDlg(CUIDLL$, INSTTYPE, "FRadioDlgProc", 0, "")
SETUPTYPE$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ITYPEL1
ELSE
GOSUB ASKQUIT
GOTO ITYPE
END IF
GOTO INSTALLER
rem Perform actual installation
rem ---------------------------
INSTALLER:
SUCCESS% = Install
IF SUCCESS% = NOSPACE THEN
GOSUB TOOBIG
END IF
rem When done, issue dialog
rem -----------------------
QUIT:
IF SUCCESS% = INSTALLOK THEN
sz$ = UIStartDlg(CUIDLL$, EXITSUCCESS, "FInfo0DlgProc", 0, "")
ELSE
sz$ = UIStartDlg(CUIDLL$, EXITFAILURE, "FInfo0DlgProc", 0, "")
END IF
UIPop 1
rem Clean up all processing
rem -----------------------
CLEANUP:
i% = StopCustomSetup (HinstFrame(), HwndFrame ())
END
rem ASKQUIT: The user requested quit; does (s)he really want to?
rem ------------------------------------------------------------
ASKQUIT:
sz$ = UIStartDlg(CUIDLL$, EXITQUIT2, "FInfoDlgProc", 0, "")
UIPop 1
IF sz$ = "CONTINUE" THEN
RETURN
END IF
GOTO CLEANUP
rem BADPATH: The user entered an invalid destination directory
rem ----------------------------------------------------------
BADPATH:
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BADPATH
END IF
UIPop 1
RETURN
rem TOOBIG: The source files won't fit on the requested destination disk
rem --------------------------------------------------------------------
TOOBIG:
sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO TOOBIG
END IF
UIPop 1
RETURN
rem Install: Perform actual installation
rem ------------------------------------
FUNCTION Install STATIC AS INTEGER
rem NEW
PRPATH:
SetSymbolValue "EditTextIn",DESTPRG$
SetSymbolValue "EditFocus","ALL"
sz$ = UIStartDlg(CUIDLL$, PPATH, "FEditDlgProc", 0, "")
DESTPRG$ = GetSymbolValue("EditTextOut")
UIPop 1
IF sz$ = "EXIT" THEN
sz$ = UIStartDlg(CUIDLL$, EXITQUIT2, "FInfoDlgProc", 0, "")
UIPop 1
IF sz$ = "CONTINUE" THEN
GOTO PRPATH
END IF
i% = StopCustomSetup (HinstFrame(), HwndFrame ())
END
END IF
rem NEW END
ClearCopyList
rem For Local (CD-ROM) install...
rem --------------------------------
IF (SETUPTYPE$ = LOCALINST$) THEN
LOCATED$= SOURCE$
AddSectionFilesToCopyList "Files", SOURCE$, DEST$
AddSectionFilesToCopyList "Winexe", SOURCE$, DEST2$
AddSectionFilesToCopyList "Program", SOURCE$, DESTPRG$
spaceCheck% = CheckForSpace(DEST$)
IF (spaceCheck% = NOSPACE) THEN
Install = NOSPACE
EXIT FUNCTION
END IF
spaceCheck% = CheckForSpace(DEST2$)
IF (spaceCheck% = NOSPACE) THEN
Install = NOSPACE
EXIT FUNCTION
END IF
END IF
rem For client (Exes on hard drive) install...
rem ----------------------------------------------
IF (SETUPTYPE$ = CLIENTINST$) THEN
LOCATED$= DESTPRG$
AddSectionFilesToCopyList "Files", SOURCE$, DEST$
AddSectionFilesToCopyList "Winexe", SOURCE$, DEST2$
AddSectionFilesToCopyList "Program", SOURCE$, DESTPRG$
AddSectionFilesToCopyList "HD", SOURCE$ ,DESTPRG$
spaceCheck% = CheckForSpace(DEST$)
IF (spaceCheck% = NOSPACE) THEN
Install = NOSPACE
EXIT FUNCTION
END IF
spaceCheck% = CheckForSpace(DEST2$)
IF (spaceCheck% = NOSPACE) THEN
Install = NOSPACE
EXIT FUNCTION
END IF
END IF
rem For server (All on Hard Drive) install...
rem (Not Used)
rem ----------------------------------------------
IF (SETUPTYPE$ = SERVERINST$) THEN
LOCATED$= DESTPRG$
AddSectionFilesToCopyList "Files", SOURCE$, DEST$
AddSectionFilesToCopyList "Winexe", SOURCE$, DEST2$
AddSectionFilesToCopyList "Program", SOURCE$, DESTPRG$
spaceCheck% = CheckForSpace(DEST$)
IF (spaceCheck% = NOSPACE) THEN
Install = NOSPACE
EXIT FUNCTION
END IF
spaceCheck% = CheckForSpace(DEST2$)
IF (spaceCheck% = NOSPACE) THEN
Install = NOSPACE
EXIT FUNCTION
END IF
END IF
rem Check For Older Versions of Quick Time
rem -----------------------------------------
j% = CheckForOld()
rem Copy all the files from the source to the destination
rem -----------------------------------------------------
CopyFilesInCopyList
rem Update WIN.INI and SYSTEM.INI
rem -----------------------------
IF (SETUPTYPE$ = LOCALINST$) OR (SETUPTYPE$ = CLIENTINST$) OR (SETUPTYPE$ = SERVERINST$) THEN
inia$ = MakePath(DEST2$, "WIN.INI")
inib$ = MakePath(DEST2$, "WIN.QTW")
CopyFile inia$, inib$, cmoOverwrite, 0
inia$ = MakePath(DEST2$, "SYSTEM.INI")
inib$ = MakePath(DEST2$, "SYSTEM.QTW")
CopyFile inia$, inib$, cmoOverwrite, 0
CreateIniKeyValue "WIN.INI", "Extensions", "mov", MakePath(DEST2$,"player.exe") + " ^.mov", cmoOverwrite
CreateIniKeyValue "WIN.INI", "Extensions", "pic", MakePath(DEST2$,"viewer.exe") + " ^.pic", cmoOverwrite
CreateIniKeyValue "WIN.INI", "MCI Extensions", "mov", "QTWVideo", cmoOverwrite
CreateIniKeyValue "WIN.INI", "MCI Extensions", "pic", "QTWVideo", cmoOverwrite
CreateIniKeyValue "WIN.INI", "MCI Extensions", "jpg", "QTWVideo", cmoOverwrite
i% = WritePrivateProfileString("MCI", "QTWVideo", MakePath(DEST$, "mciqtw.drv"), "SYSTEM.INI")
rem Compatibility hacks.
i% = WritePrivateProfileString("Macx", "DeviceBitmap", "OFF", "SYSTEM.INI")
CreateIniKeyValue "WIN.INI", "Mach", "devicebitmap", "off", cmoOverwrite
rem Update Registration Database
rem ----------------------------
RUN MakePath(DEST2$, "player.exe") + " install"
RUN MakePath(DEST2$, "viewer.exe") + " install"
rem Create QTW.INI
rem ----------------
ini$ = MakePath(DEST2$, "QTW.INI")
CreateIniKeyValue ini$, "QuickTime for Windows", "Implementation", "Full" , cmoOverwrite
RemoveIniKey ini$, "video", "optimize", cmoNone
'***********************************************************************************
rem Create a Program Manager group
rem ------------------------------
i% = GetResourceString (CUIDLL$, STR_GROUP)
GROUP$ = GetSymbolValue ("ResourceString")
CreateProgmanGroup GROUP$, "", cmoNone
i% = GetResourceString (CUIDLL$, STR_PLAYER)
CreateProgmanItem GROUP$, GetSymbolValue ("ResourceString"), MakePath(DEST2$,"player.exe"), "", cmoOverwrite
i% = GetResourceString (CUIDLL$, STR_VIEWER)
CreateProgmanItem GROUP$, GetSymbolValue ("ResourceString"), MakePath(DEST2$,"viewer.exe"), "", cmoOverwrite
CreateProgmanItem GROUP$, "Read Me", MakePath(DEST2$,"readme.txt"), "", cmoOverwrite
rem Add Program Group and Icons Here
CreateProgmanGroup "Strange Days", "", cmoNone
CreateProgmanItem "Strange Days", "Strange Days", MakePath(LOCATED$,"trailer.exe"), MakePath(DESTPRG$,"strange.ico"), cmoOverwrite
CreateProgmanItem "Strange Days", "Strange Days Screen Saver Installer", MakePath(LOCATED$,"strange.exe"), MakePath(DESTPRG$,"strange.ico"), cmoOverwrite
CreateProgmanItem "Strange Days", "Strange Days Read Me!", MakePath(DESTPRG$,"README.wri"), "", cmoOverwrite
CreateProgmanItem "Strange Days", "Cyber-Mag Demo", MakePath(SOURCE$,"DEMO.exe"), MakePath(DESTPRG$,"vcop.ico"), cmoOverwrite
CreateProgmanItem "Strange Days", "Cyber-Mag Read Me!", MakePath(DESTPRG$,"DIGCAFE.wri"), "", cmoOverwrite
end if
rem Indicate install completed OK
rem -----------------------------
Install = INSTALLOK
END FUNCTION
rem MakePath: Builds path from directory and file
rem ---------------------------------------------
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
MakePath = szFile$
ELSEIF szFile$ = "" THEN
MakePath = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
MakePath = szDir$ + szFile$
ELSE
MakePath = szDir$ + "\" + szFile$
END IF
END FUNCTION
rem Check for Older versions of the Quicktime For Windows components
rem ---------------------------------------------------------------
FUNCTION CheckForOld STATIC AS INTEGER
sz$ = UIStartDlg(CUIDLL$, OLDMESS, "FModelessDlgProc", 0, "")
CheckForOld1:
cursor% = ShowWaitCursor()
OldFilePath$ = FindFileUsingFileOpen("qtim.dll")
RestoreCursor cursor%
IF (OldFilePath$ <> "") THEN
j% = RemoveOldQTFiles(OldFilePath$)
IF j% = FILES_REMOVED THEN
GOTO CheckForOld1
END IF
END IF
CheckForOld2:
cursor% = ShowWaitCursor()
OldFilePath$ = FindFileUsingFileOpen("qtimcmgr.dll")
RestoreCursor cursor%
IF (OldFilePath$ <> "") THEN
j% = RemoveOldQTFiles(OldFilePath$)
IF j% = FILES_REMOVED THEN
GOTO CheckForOld2
END IF
END IF
GetLocalHardDrivesList "HardDrives"
NumDrives% = GetListLength("HardDrives")
IF (NUMDRIVES% > 0) THEN
FOR i% = 1 TO NumDrives% STEP 1
CurrentDrive$ = GetListItem("HardDrives",i%) + ":\"
CheckForOld3:
cursor% = ShowWaitCursor()
OldFilePath$ = FindFileInTree("qtim.dll",CurrentDrive$)
RestoreCursor cursor%
IF (OldFilePath$ <> "") THEN
j% = RemoveOldQTFiles(OldFilePath$)
IF j% = FILES_REMOVED THEN
GOTO CheckForOld3
END IF
END IF
CheckForOld4:
cursor% = ShowWaitCursor()
OldFilePath$ = FindFileInTree("qtimcmgr.dll",CurrentDrive$)
RestoreCursor cursor%
IF (OldFilePath$ <> "") THEN
j% = RemoveOldQTFiles(OldFilePath$)
IF j% = FILES_REMOVED THEN
GOTO CheckForOld4
END IF
END IF
NEXT i%
END IF
UIPOP 1
END FUNCTION
FUNCTION RemoveOldQTFiles (FilePath$) STATIC AS INTEGER
RemoveOldQTFiles = FILES_SKIPPED
SPLITPATH FilePath$, drv$, dir$, filename$, ext$
DeadPath$ = drv$ + dir$
rem check version resources if they exist
szVersion$ = GetVersionOfFile(FilePath$)
rem dialog choices are Remove,Skip ("Continue","Back" buttons)
SetSymbolValue "EditTextIn", "Found Version [" + szVersion$ + "] on " + DeadPath$
sz$ = UIStartDlg(CUIDLL$, NUKEOLD, "FEditDlgProc", 0, "")
UIPop 1
IF sz$ = "BACK" THEN
EXIT FUNCTION
END IF
IF sz$ <> "CONTINUE" THEN
EXIT FUNCTION
END IF
rem all versions
RemoveFile MakePath(DeadPath$, "qtim.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtimcmgr.dll"), cmoForce
rem version 1.0.0
RemoveFile MakePath(DeadPath$, "qcmc.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtjpeg.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtraw.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtsmc.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrpza.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrle.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtcvid.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrt21.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtvhdw.dll"), cmoForce
rem version 1.1.x and later
RemoveFile MakePath(DeadPath$, "mciqtw.drv"), cmoForce
RemoveFile MakePath(DeadPath$, "qcmc.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtjpeg.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtraw.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtsmc.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrpza.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrle.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtcvid.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrt21.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "navg.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtiv31.qtc"), cmoForce
rem version 1.9 and later
RemoveFile MakePath(DeadPath$, "qtvhdw.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtyvu9.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtmsvc.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtiv32.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtiyvu9.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtvhdw.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "dhio_dh.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "reelmgic.qtc"), cmoForce
RemoveOldQTFiles = FILES_REMOVED
END FUNCTION
'$IFDEF DEBUG
IF DoesFileExist(MakePath(DEST$, "bin\qtim.dll"), femExists) = 1 THEN
szError$ = MakePath(DEST$, "BIN")
i% = GetResourceString (CUIDLL$, STR_MSG1)
szError$ = szError$ + GetSymbolValue ("ResourceString")
i% = GetQTWVersion(MakePath(DEST$, "bin\qtim.dll"))
szVersion$ = GetSymbolValue ("VersionString")
szError$ = szError$ + szVersion$
i% = GetResourceString (CUIDLL$, STR_MSG2)
szError$ = szError$ + GetSymbolValue ("ResourceString")
i% = GetResourceString (CUIDLL$, STR_WARNING)
szCaption$ = GetSymbolValue ("ResourceString")
i% = DoMsgBox(szError$, szCaption$, 20)
UIPop 1
IF i% = 7 THEN
GOTO GETPATHL1
END IF
IF szVersion$ = "1.0.0" THEN
i% = GetResourceString (CUIDLL$, STR_MSG3)
szError$ = GetSymbolValue ("ResourceString")
i% = GetResourceString (CUIDLL$, STR_WARNING)
szCaption$ = GetSymbolValue ("ResourceString")
i% = DoMsgBox(szError$, szCaption$, 20)
END IF
'$ENDIF
FUNCTION CheckForSpace (DrivePath$) STATIC AS INTEGER
CheckForSpace = 0
rem Check that we have enough free space to perform the install
rem -----------------------------------------------------------
ListSym$ = APPNEEDS$
StillNeed& = GetCopyListCost(EXTRACOSTS$, ListSym$, "")
drive$ = MID$(DrivePath$, 1, 1)
ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
cost& = VAL(GetListItem(APPNEEDS$, ndrive%))
free& = GetFreeSpaceForDrive(drive$)
IF cost& >= free& THEN
CheckForSpace = NOSPACE
END IF
END FUNCTION