home *** CD-ROM | disk | FTP | other *** search
- '' Klik & Play Gamepack Setup
-
- '$INCLUDE 'setupapi.inc'
-
- CONST EUROPRESS = 1
- CONST WELCOME = 100
- CONST ASKQUIT = 200
-
- DECLARE SUB Install
-
- INIT:
- UIDLL$ = "mscuistf.dll"
-
- SetBitmap UIDLL$, EUROPRESS
- SetTitle "Klik & Play Gamepack Setup"
-
- '' Find and load GAMEPACK.INF
- szInf$ = GetSymbolValue("STF_SRCINFPATH")
- if szInf$ = "" then
- szInf$ = GetSymbolValue("STF_CWDDIR") + "GAMEPACK.INF"
- endif
-
- ReadInfFile szInf$
-
- WELCOME:
- sz$ = UIStartDlg(UIDLL$, WELCOME, "FInfoDlgProc", 0, "")
-
- if sz$ = "INSTALL" then
- Install
- else
- gosub ASKQUIT
- goto WELCOME
- endif
-
- QUIT:
- UIPopAll
- END
-
- ASKQUIT:
- sz$ = UIStartDlg(UIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
- if sz$ = "EXIT" then
- UIPopAll
- ERROR STFQUIT
- elseif sz$ = "REACTIVATE" then
- goto ASKQUIT
- else
- UIPop 1
- endif
- return
-
- SUB Install STATIC
- '' Copy CTL3DV2.DLL to Windows\System or Windows directory
-
- SrcDir$ = GetSymbolValue("STF_SRCDIR")
-
- Win$ = GetWindowsDir()
- Sys$ = GetWindowsSysDir()
-
- '' Check Windows\System is writable
- if IsDirWritable(Sys$) = 0 then
- Sys$ = Win$
- endif
-
- '' Copy files
- ClearCopyList
- AddSectionFilesToCopyList "WindowsSystem", SrcDir$ + "ctl3dv2", Sys$
- CopyFilesInCopyList
-
- '' Create program group and items
-
- CreateProgmanGroup "Klik & Play Gamepack", "knpgame.grp", cmoNone
- ShowProgmanGroup "Klik & Play Gamepack", 1, cmoNone
- CreateProgmanItem "Klik & Play Gamepack", "Gamepack Menu", SrcDir$ + "MENU.EXE", "", cmoOverwrite
- CreateProgmanItem "Klik & Play Gamepack", "Interactive Demo Setup", SrcDir$ + "KNP\SETUP.EXE", "", cmoOverwrite
- CreateProgmanItem "Klik & Play Gamepack", "Read Me", SrcDir$ + "README.WRI", "", cmoOverwrite
-
- '' Create basic KNP.INI
-
- CreateIniKeyValue Win$ + "KNP.INI", "Setup", "grmode", "1", cmoNone
- END SUB
-