home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer 2.1
/
1996-02_Disc_2.1.iso
/
darkseed
/
mydlg.mst
< prev
next >
Wrap
Text File
|
1995-09-12
|
3KB
|
100 lines
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
GLOBAL DarkSeedDir$
GLOBAL WindowsDir$
GLOBAL WindowsSysDir$
GLOBAL GamerName$
GLOBAL ProdRegNum$
GLOBAL intval%
GLOBAL IniFile$
DECLARE SUB Install
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
SetBitMap CUIDLL$, 111
SetTitle "Dark Seed II Demo Setup"
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "mydlg.inf"
END IF
ReadInfFile szInf$
DarkSeedDir$ = "C:\DSIIDEMO\"
WindowsDir=GetWindowsDir()
WindowsSysDir=GetWindowsSysDir()
GETPATH:
SetSymbolValue "DS2Dir",DarkSeedDir$
SetSymbolValue "GamerName","Dark Seed II Player"
SetSymbolValue "ProdRegNum","0123456789"
SetSymbolValue "EditFocus", "END"
OPTCUR$="1"
GETPATHL1:
sz$ = UIStartDlg(CUIDLL$, 1000, "FEditDlgProc", -1,"")
DarkSeedDir$ = GetSymbolValue("DS2Dir")
IF sz$ = "OKAY" THEN
if ( MID$(DarkSeedDir$,LEN(DarkSeedDir$),1) <> "\" ) then
intval%=DoMsgBox("Directory path should end with a back slash ('\').","Setup Error", MB_OK)
UIPop 1
GOTO GETPATHL1
endif
IF IsDirWritable(DarkSeedDir$) = 0 THEN
intval% = DoMsgBox("Can not create/write to Dark Seed II demo directory.", "Setup Error", MB_OK)
UIPop 1
GOTO GETPATHL1
END IF
UIPop 1
elseif sz$ = "EXIT" then
end
ELSEif sz$ = "REACTIVATE" THEN
GOTO GETPATHL1
END IF
Install
end
SUB Install STATIC
SrcDir$ = GetSymbolValue("STF_SRCDIR")
CreateDir DarkSeedDir$, cmoNone
AddSectionFilesToCopyList "DS2", SrcDir$+"darkseed\", DarkSeedDir$
CopyFilesInCopyList
AddSectionFilesToCopyList "WinG", SrcDir$+"wing\", WindowsSysDir$
CopyFilesInCopyList
IniFile$ = DarkSeedDir$ + "darkseed.ini"
CreateIniKeyValue IniFile$, "DIRECTORY", "CD", SrcDir$+"darkseed\", cmoOverwrite
CreateProgmanGroup "DSII-DEMO",DarkSeedDir$+"dsiidemo.grp",cmoNone
CreateProgmanItem "DSII-DEMO","Darkseed II-DEMO",DarkSeedDir$ + "ds2_demo.exe","",cmoOverwrite
ShowProgmanGroup "DSII-DEMO",1,cmoNone
intval=DoMsgBox("Setup Completed. Everything seems to be OK.","Dark Seed II Demo Setup",MB_OK)
end
END SUB
QUIT:
end
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