home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Bernard Of Hollywood's: Pin-Ups
/
Bernard_of_Hollywoods_Pin-Ups.iso
/
pc
/
german
/
setup
/
setup.mst
< prev
next >
Wrap
Text File
|
1996-03-14
|
7KB
|
258 lines
'**************************************************************************
'* MSSetup Toolkit - Corel Bernard of Hollywood's Pin-Ups German Setup *
'**************************************************************************
'$DEFINE DEBUG ''Define for script development/debugging
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
CONST WS_VISIBLE=&H10000000
CONST WS_BORDER =&H00800000
CONST WS_CLIPCHILDREN =&H02000000
CONST GWL_STYLE =-16
CONST SW_SHOWMAXIMIZED=3
DECLARE FUNCTION ShowWindow LIB "user.exe" (hWnd%,iShow%) AS INTEGER
DECLARE FUNCTION SetWindowLong LIB "user.exe" (hWnd%,offset%,style&) AS LONG
hWnd%=HwndFrame()
sti&=SetWindowLong(hWnd%,GWL_STYLE,WS_VISIBLE+WS_BORDER+WS_CLIPCHILDREN)
stj%=ShowWindow(hWnd%,SW_SHOWMAXIMIZED)
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST DESTPATH = 300
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST REGISTER = 800
CONST APPHELP = 900
CONST CUSTINST = 6200
CONST TOOBIG = 6300
CONST BADPATH = 6400
CONST DESTGRP = 6600
''Bitmap ID
CONST LOGO = 1
GLOBAL DEST$ ''Default destination directory.
GLOBAL WINDRIVE$ ''Windows drive letter.
GLOBAL DESTGROUP$ ''Destination group for icon.
''CustInst list symbol names
GLOBAL QTWNEEDS$ ''Option list costs per drive
GLOBAL EXTRACOSTS$ ''List of extra costs to add per drive
GLOBAL BIGLIST$ ''List of option files cost calc results (boolean)
''Dialog list symbol names
GLOBAL CHECKSTATES$
GLOBAL STATUSTEXT$
GLOBAL DRIVETEXT$
GLOBAL SrcDir$
SrcDir$ = GetSymbolValue("STF_SRCDIR")
DECLARE SUB RecalcPath
DECLARE SUB SetDriveStatus
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION VflatdPresent LIB "iniupd.dll" AS INTEGER
INIT:
CUIDLL$ = "mscuistf.dll" ''custom user interface dll
HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
SetBitmap CUIDLL$, LOGO
SetTitle "Bernard of Hollywood's Pin-Ups von Corel"
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
END IF
ReadInfFile szInf$
WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
WINDIR$ = GetWindowsDir()
DEST$ = ucase$(GetWindowsSysDir)
DRIVETEXT$ = "DriveStatusText"
FOR i% = 1 TO 7 STEP 1
AddListItem DRIVETEXT$, ""
NEXT i%
ReplaceListItem DRIVETEXT$, 7, DEST$
RecalcPath
SetDriveStatus
'$IFDEF DEBUG
i% = SetSizeCheckMode(scmOnIgnore) '' could use scmOff; def = scmOnFatal
'$ENDIF ''DEBUG
WELCOME:
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
INSTALL:
ClearCopyList
AddSectionFilesToCopyList "QTWFiles", GetSymbolValue("STF_SRCDIR"), Dest$
AddSectionFilesToCopyList "ScreenSaver", GetSymbolValue("STF_SRCDIR"), WinDir$
AddSectionFilesToCopyList "ScreenSaverSystem", GetSymbolValue("STF_SRCDIR"), Dest$
CopyFilesInCopyList
InstDrive$=MID$(DEST$,1,2)
CreateIniKeyValue "WIN.INI", "Extensions", "mov", MakePath(DEST$,"player.exe") + " ^.mov", cmoOverwrite
CreateIniKeyValue "WIN.INI", "Extensions", "pic", MakePath(DEST$,"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
CreateIniKeyValue WinDir$ + "SYSTEM.INI", "MCI", "QTWVideo", "mciqtw.drv", cmoOverwrite
GETGROUP:
DESTGROUP$ = "Corel CD Home"
SetSymbolValue "EditTextIn", DESTGROUP$
SetSymbolValue "EditFocus", "END"
GETGROUPL1:
sz$ = UIStartDlg(CUIDLL$, DESTGRP, "FEditDlgProc", 0, "")
DESTGROUP$ = GetSymbolValue("EditTextOut")
IF sz$ = "CONTINUE" THEN
'' Mike...This is a really stupid test to ensure the user has entered something
IF DESTGROUP = "" OR DESTGROUP = " " OR DESTGROUP = " " OR DESTGROUP = " " THEN
GOTO GETGROUPL1
END IF
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GETGROUPL1
ELSE
GOSUB ASKQUIT
GOTO GETGROUP
END IF
CreateProgmanGroup DESTGROUP$, "", cmoNone
ShowProgmanGroup DESTGROUP$, 1, cmoNone
CreateProgmanItem DESTGROUP$, "Bernard of Hollywood's Pin-Ups Deutsch", GetSymbolValue("STF_SRCDIR") + "pinups.exe","", cmoOverwrite
CreateProgmanItem DESTGROUP$, "Bernard of Hollywood's Pin-Ups Deutsch Liesmich", GetSymbolValue("STF_SRCDIR") + "readme.txt","", cmoOverwrite
CreateIniKeyValue WinDir$ + "cdhome.ini", "Bernard of Hollywood's Pin-Ups", "Dir", GetSymbolValue("STF_SRCDIR") , cmoOverwrite
NOTIFY:
sz$ = UIStartDlg(CUIDLL$, REGISTER, "FInfo0DlgProc", 0, "")
UIPop 1
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
dlg% = EXITSUCCESS
ELSEIF ERR = STFQUIT THEN
dlg% = EXITQUIT
ELSE
dlg% = EXITFAILURE
END IF
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO QUITL1
END IF
UIPop 1
END
ERRQUIT:
i% = DoMsgBox("Setup-Quellen sind beschΣdigt, wenden Sie sich an die Technische Unterstⁿtzung von Corel", "Setup-Meldung", MB_OK+MB_TASKMODAL+MB_ICONHAND)
END
TOOBIG:
sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
RecalcPath
SetDriveStatus
GOTO TOOBIG
END IF
UIPop 1
RETURN
ASKQUIT:
sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
IF sz$ = "EXIT" THEN
UIPopAll
ERROR STFQUIT
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKQUIT
ELSE
UIPop 1
END IF
RETURN
'**
'** Purpose:
'** Recalculates disk space and sets option status info according
'** to the current destination path.
'** Arguments:
'** none.
'** Returns:
'** none.
'*************************************************************************
SUB RecalcPath STATIC
CursorSave% = ShowWaitCursor()
RestoreCursor CursorSave%
END SUB
'**
'** Purpose:
'** Sets drive status info according to latest disk space calcs.
'** Arguments:
'** none.
'** Returns:
'** none.
'*************************************************************************
SUB SetDriveStatus STATIC
drive$ = MID$(DEST$, 1, 1)
ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
free& = GetFreeSpaceForDrive(drive$)
END SUB
'**
'** Purpose:
'** Appends a file name to the end of a directory path,
'** inserting a backslash character as needed.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
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