home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Swifte Typecase 2001
/
TYPE2001.ISO
/
mac
/
SETUP.MST
< prev
next >
Wrap
Text File
|
1995-06-30
|
4KB
|
172 lines
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST DESTPATH = 300
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST OPTIONS = 800
CONST APPHELP = 900
CONST BADPATH = 6400
CONST SHOWMAX = 3
''Bitmap ID
CONST LOGO = 1
GLOBAL DEST$ ''Default destination directory.
GLOBAL OPTCUR$ ''Option selection from option dialog.
GLOBAL SOURCE$
GLOBAL SYSDIR$ ''System directory
GLOBAL TTFPATH$ ''Location of font TTF file
GLOBAL FOTPATH$ ''Location of font FON file
GLOBAL FONTNAME$ ''Font File base name
DECLARE SUB Install
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION ActivateFont LIB "instfont.dll" (szFaceName$, szResourcePath$, szFontPath$, bPermanent%) as INTEGER
DECLARE FUNCTION ShowWindow LIB "user" (hwnd%, nCmdShow%) AS INTEGER
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
hwnd% = HwndFrame
i% = ShowWindow(hwnd, SHOWMAX)
SetBitmap CUIDLL$, LOGO
SetTitle "Typecase 2001"
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
END IF
ReadInfFile szInf$
OPTCUR$ = "1"
DEST$ = GetWindowsDir ()
SYSDIR$ = GetWindowsSysDir()
SOURCE$ = GetSymbolValue ("STF_SRCDIR")
WELCOME:
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
Install
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 sources were corrupted, please contact Swfte Technical Support","Underground CD-Rom Handbook to The SAT", MB_OK+MB_TASKMODAL+MB_ICONHAND)
END
BADPATH:
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BADPATH
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:
'** Builds the copy list and performs all installation operations.
'** Arguments:
'** none.
'** Returns:
'** none.
'*************************************************************************
SUB Install STATIC
'' Install fonts
'' Copy font files from CD-ROM
AddSectionFilesToCopyList "book", SOURCE$, SYSDIR$
CopyFilesInCopyList
'' Install first Font
''FONTNAME$ = "birds___"
''TTFPATH$ = MakePath(SYSDIR$, FONTNAME$) + ".TTF"
''FOTPATH$ = MakePath(SYSDIR$, FONTNAME$) + ".FOT"
'' install the font
''i% = ActivateFont("birds___", FOTPATH$, TTFPATH$, 1)
CreateProgmanGroup "Typecase 2001", "", cmoNone
ShowProgmanGroup "Typecase 2001", 1, cmoNone
'' CreateProgmanItem "Birds", "Birds", MakePath(SOURCE$,"birds.exe"), "", cmoOverwrite
CreateProgmanItem "Typecase 2001", "Typecase Font Browser", MakePath(SOURCE$,"fontbrow.exe"), MakePath(SYSDIR$,"type2001.ico"), cmoOverwrite
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