home *** CD-ROM | disk | FTP | other *** search
-
- '$INCLUDE 'setupapi.inc'
- '$INCLUDE 'msdetect.inc'
-
- ''Dialog ID's
- CONST _GETPATH = 101
- CONST _BADPATH = 102
- CONST _BILLBOARD = 105
- CONST _COMPLETE = 107
- ''Bitmap ID
- CONST LOGO = 104
-
- GLOBAL DEST$ ''Default destination directory.
- GLOBAL MAKEGROUP$
-
- DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
-
-
- INIT:
- CUIDLL$ = "mscuistf.dll"
- BADPROC$ = "BGF2_BadPathDlgProc"
- BILLBOARDPROC$ = "BGF2_BillBoardDlgProc"
- MAKEGROUP$ = "FALSE"
-
- SetTitle "WinGames.Inc - Board Games For II"
-
- szInf$ = GetSymbolValue("STF_SRCINFPATH")
- IF szInf$ = "" THEN
- szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
- ENDIF
- ReadInfFile szInf$
-
- DEST$ = "C:\WINGAMES.INC\BGF2"
-
- WELCOME:
- SetSymbolValue "EditTextIn", DEST$
- sz$ = UIStartDlg( CUIDLL$, _GETPATH, "BGF2_GetPathDlgProc", _BADPATH, BADPROC$)
- DEST$ = GetSymbolValue("EditTextOut")
- IF sz$ = "OK" THEN
- IF IsDirWritable(DEST$) = 0 THEN
- GOSUB BADPATH
- GOTO WELCOME
- ELSE
- UIPop 1
- GOTO INSTALL
- END IF
- ELSE
- UIPop 1
- GOTO QUIT
- ENDIF
-
- INSTALL:
-
- szBuf$ = UIStartDlg( CUIDLL$, _BILLBOARD, "BGF2_BillBoardDlgProc", _BADPATH, BADPROC$)
- ClearCopyList
- SrcDir$ = GetSymbolValue("STF_SRCDIR")
- AddSectionFilesToCopyList "APP_FILES", SrcDir$, DEST$
- CreateDir DEST$, cmoNone
- OldCursor% = ShowWaitCursor()
- SetCopyGaugePosition 500, 500
- CopyFilesInCopyList
- RestoreCursor OldCursor%
- UIPop 1
- szBye$ = UIStartDlg( CUIDLL$, _COMPLETE, "BGF2_CompleteDlgProc", _BADPATH, BADPROC$)
- CreateProgmanGroup "WinGames.Inc", "", cmoNone
- ShowProgmanGroup "WinGames.Inc", 1, cmoNone
- CreateProgmanItem "WinGames.Inc", "Board Games For II", MakePath(DEST$,"bgf2.exe"), MakePath(DEST$,"bgf2.exe")+",0,10,10,"+DEST$, cmoOverwrite
- CreateProgmanItem "WinGames.Inc", "Instructions", "WinHelp.Exe "+MakePath(DEST$,"bgf2.hlp"), MakePath(DEST$,"bgf2.exe")+",1,50,50,"+DEST$, cmoOverwrite
-
- QUIT:
- END
-
-
- BADPATH:
- sz$ = UIStartDlg(CUIDLL$, _BADPATH, "BGF2_BadPathDlgProc", 0, "")
- IF sz$ = "REACTIVATE" THEN
- GOTO BADPATH
- END IF
- UIPop 1
- RETURN
-
- 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$
- ENDIF
- END FUNCTION
-
-