home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jak to Dziala
/
Jak.iso
/
dksetup
/
dkgen.inc
< prev
next >
Wrap
Text File
|
1996-04-30
|
31KB
|
836 lines
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
' DKGEN.INC
'
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
' See DKSETUP.MST for change history
'
'27/02/96 Added the function InstallQTW.
'25/01/96 Change the EndCommonInstall and HandleRestart SUB's to Functions to
' utilise return values. So the user does NOT get the 'You must restart
' windows' warning AND THEN the 'Successful install' dialog box.
'25/01/96 Change path checking to look for Max of 8 chars first.
'08/08/95 Test for Norton Anti Virus
'03/08/95 const for uninstall and min register added
'07/07/95 Correct so unregisters use of ctl3d
'01/06/95 No choice about adding icons to progman
'?/05/95 If bundle with sampler need to test for cirrus driver - put into mst file
'12/03/95 Alternative function added, readme icon has shortened name
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
'$INCLUDE 'dklang.inc'
CONST SOURCE_BINARIES_SUBDIR = "DKCODE"
CONST SOURCE_SETUP_SUBDIR = "DKSETUP"
CONST SETUP_INF_FILENAME = "SETUP.INF"
CONST CUIDLL_FILENAME = "mscuistf.dll"
CONST SETUP_INI_BINARIES_SECTION_NAME = "BIN"
CONST SETUP_INI_SH_BINARIES_SECTION_NAME = "BIN Shared"
CONST SETUP_INI_WING_BINARIES_NAME = "WinG Runtime"
CONST SETUP_INI_WING32_BINARIES_NAME = "WinG32"
CONST SETUP_INI_ACM_SECTION_NAME = "ACM Drivers"
CONST SETUP_INI_FONTS_SECTION_NAME = "Fonts"
'unin, min register
CONST UNINSTALL_EXE_FILE = "UNINSTAL.exe"
CONST DKREG_INI_DIR = "\MMAPP"
CONST DKREG_INI_PATH = "\MMAPP\MMAPP.ini"
CONST WIN_INI_ENTRY = "path"
CONST PRODUCT_INI_DIR_SECTION_NAME = "Directory"
CONST PRODUCT_INI_DIR_ENTRY_NAME = "Data"
CONST MINIMUM_DISK_SPACE = 2048 ' For Minimum install
' Procs
CONST PROC_HELP = "FHelpDlgProc"
DECLARE FUNCTION ExitWindowsExec LIB "USER.EXE" (szEXE$, szParams$) AS INTEGER
DECLARE FUNCTION Ctl3dRegister LIB "CTL3D.DLL" (hInst%) AS INTEGER
DECLARE FUNCTION Ctl3dUnregister LIB "CTL3D.DLL" (hInst%) AS INTEGER
DECLARE FUNCTION Ctl3dAutoSubClass LIB "CTL3D.DLL" (hInst%) AS INTEGER
DECLARE FUNCTION OnWin3x LIB "setuphlp.DLL" AS INTEGER
DECLARE FUNCTION VflatdPresent LIB "setuphlp.DLL" AS INTEGER
DECLARE FUNCTION GetRealSystemDir LIB "setuphlp.DLL" (szDir$,cbBuf%) AS INTEGER
DECLARE FUNCTION RestartWindows LIB "setuphlp.DLL" AS INTEGER
DECLARE FUNCTION IsWin32FileNewer LIB "setuphlp.DLL" (szOrig$,szNew$) AS INTEGER
DECLARE SUB RenameFilePlease LIB "setuphlp.DLL" (szOrig$,szNew$)
DECLARE FUNCTION FIsVGA LIB "mscuistf.dll" AS INTEGER
DECLARE FUNCTION FIs256Colour LIB "mscuistf.dll" AS INTEGER
DECLARE FUNCTION Welcome() AS INTEGER
DECLARE FUNCTION TestSystem() AS INTEGER
DECLARE FUNCTION GetDiskSpaceNeeded(drive%) AS LONG
DECLARE SUB Initialise(prodName$, defInstallPath$, msgCaption$)
DECLARE SUB DeInitialise()
DECLARE SUB AskQuit()
DECLARE SUB BadPath()
DECLARE SUB NetworkDrive()
DECLARE SUB UpdateIndeoAVIDrivers()
DECLARE SUB UpdateWinGDrivers()
'DECLARE SUB UpdateProgramManager(prodName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%)
'DECLARE SUB UpdateProgramManagerAlt(prodName$, readmeName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%)
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION GetRealWindowsSysDir AS STRING
DECLARE SUB UpdateWinG32 (szOrig$)
DECLARE SUB InitCommonInstall()
DECLARE FUNCTION LicenseAgreement() AS INTEGER
DECLARE FUNCTION Win32sRequiredDLG() AS INTEGER
DECLARE FUNCTION UpdateADPCMDrivers() AS INTEGER
DECLARE FUNCTION EndCommonInstall( AppReadmeFile$, InRoot%, szEditorExe$ ) AS INTEGER
DECLARE FUNCTION HandleRestart() AS INTEGER
DECLARE FUNCTION InstallQTW() As INTEGER
' Error messages
CONST ERR_OK = 100
CONST ERR_EXITFAIL = 101
CONST ERR_WINVERFAIL = 102
CONST ERR_NODISKSPACE = 103
' Navigation messages
CONST NAV_FORWARD = 0
CONST NAV_BACK = 1
CONST NAV_EXIT = 2
CONST NAV_RUN = 3
' Bitmap ID
CONST LOGO = 1
'QUIT ASKQUIT
'ABORT EXITFAILURE
'BADEXIT EXITQUIT
'SUCCES EXITSUCCESS
'WELHELP APPHELP
'DONEVIDEO DONENEWSYSSOFT
'DONENOVIDEO DONENOSYSSOFT
'ADDSYSTEMSOFTWARE NEWSYSTEMSOFTWARE
'WRONGADPCM NEWADPCM
'NOSYSSOFTWARE WARNNOSYSSOFT
' Dialog ID's
CONST IDD_WELCOME = 100
CONST IDD_CUSTOMHELP = 106
CONST IDD_SPEED = 111
CONST IDD_ASKQUIT = 200
CONST IDD_DESTPATH = 300
CONST IDD_EXITFAILURE = 400
CONST IDD_EXITQUIT = 600
CONST IDD_EXITSUCCESS = 700
CONST IDD_APPHELP = 900
CONST IDD_DONENEWSYSSOFT = 1100
CONST IDD_DONENOSYSSOFT = 1800
CONST IDD_NEWSYSTEMSOFTWARE = 2300
CONST IDD_NEWADPCM = 2600
CONST IDD_WARNNOSYSSOFT = 3100
CONST IDD_MAILMAN = 1500
CONST IDD_CUSTOM = 6200
CONST IDD_BADPATH = 6400
CONST IDD_NEED31 = 6401
CONST IDD_NOMOUSE = 6402
CONST IDD_BADVGA = 6403
CONST IDD_NOT256 = 6404
CONST IDD_POORMACHINE = 6405
CONST IDD_AWFULMACHINE = 6406
CONST IDD_PATHHELP = 6407
CONST IDD_WHIZZHELP = 6408
CONST IDD_URKADPCM = 6409
CONST IDD_ADPCMHELP = 6410
CONST IDD_NODISKSPACE = 6411
CONST IDD_NETWORKDRIVE = 6412
CONST IDD_LICENSE = 6420
CONST IDD_INSTALLQTW = 6421
'// Win 32s bits
'//
CONST IDD_EXITFAILNOTENH = 6430
CONST IDD_EXITFAILNOTINTEL = 6431
CONST IDD_EXITFAILNOTWIN31 = 6432
CONST IDD_EXITFAILRUNAPP = 6433
CONST IDD_FREECELLINST = 6434
CONST IDD_NEEDSWIN32S = 6435
CONST ID_APP_FILE_NAME1 = 6446
CONST ID_APP_FILE_NAME = 6447
GLOBAL szWinPath As String
GLOBAL szWinSysPath As String
GLOBAL szWinDrive As String
GLOBAL szSrcSetupPath As String
GLOBAL szSrcBinPath As String
GLOBAL szDestPath As String
GLOBAL szOldDestPath As String
GLOBAL szPengePath As String
GLOBAL szINFPath As String
GLOBAL szAppINIPath As String
GLOBAL szMsgCaption As String
GLOBAL szButton As String
GLOBAL szMinimalInstall As String
GLOBAL szAddPMItem As String
GLOBAL szExpressCustomChoice As String
GLOBAL szMMappPath As String
GLOBAL szInstExePath As String
GLOBAL szInstExeDate As String
GLOBAL szCdExePath As String
GLOBAL szCdExeDate As String
GLOBAL szCopyright As String
GLOBAL szFullSampPath As String
GLOBAL szSampINIPath As String
GLOBAL szSampData As String
GLOBAL szSampVersion As String
GLOBAL szMsacmPriority1 As String
GLOBAL szMsacmPriority2 As String
GLOBAL szMsacmPriority3 As String
GLOBAL bInstalledWin32s As Integer
GLOBAL fPreviousMode As Integer
GLOBAL fWillNotFit As Integer
GLOBAL fSystemUpdated As Integer
GLOBAL hDlg As Integer
GLOBAL dButton As Integer
GLOBAL dWinDrive As Integer
GLOBAL dDestDrive As Integer
GLOBAL dCursor As Integer
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub InitCommonInstall() STATIC
AddToBillboardList CUIDLL_FILENAME, IDD_MAILMAN, "MailmanDlgProc", 2500
SetCopyGaugePosition -1, 150
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function EndCommonInstall( AppReadmeFile$, InRoot%, szEditorExe$ ) STATIC AS INTEGER
if RestartListEmpty = 0 or fSystemUpdated = 1 or bInstalledWin32s = 1 then
hDlg = IDD_DONENEWSYSSOFT
else
hDlg = IDD_DONENOSYSSOFT
end if
QuitLoop:
szButton = UIStartDlg(CUIDLL_FILENAME, hDlg, "FInfoDlgProc", 0, "")
select case szButton
case "REACTIVATE"
goto QuitLoop
case "CONTINUE" 'Read me
if inRoot% = 1 then
szReadMe$ = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), appReadmeFile$)
else
szReadMe$ = MakePath(szSrcBinPath, appReadmeFile$)
end if
if szEditorExe$ = "write.exe " then
run szEditorExe$ + szReadMe$, nowait
else
run szEditorExe$ + szReadMe$
end if
goto QuitLoop
case "BACK" 'Restart Windows
if HandleRestart = 0 then
dButton = DoMsgBox( STR_SYSMESSAGE, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
EndCommonInstall = NAV_EXIT
else
EndCommonInstall = NAV_FORWARD
end if
case "EXIT" , "CANCEL" 'Return to Windows
if hDlg = IDD_DONENEWSYSSOFT then
dButton = DoMsgBox( STR_SYSMESSAGE, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
EndCommonInstall = NAV_EXIT
else
EndCommonInstall = NAV_FORWARD
end if
end select
UIPop 1
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Initialise(prodName$, defInstallPath$, msgCaption$) STATIC
ret% = Ctl3dRegister(HinstFrame())
ret% = Ctl3dAutoSubClass(HinstFrame())
szMsgCaption$ = msgCaption$
cursor% = ShowWaitCursor()
ClearCopyList
szWinSysPath = ucase$(GetWindowsSysDir ())
szWinPath = ucase$(GetWindowsDir ())
dWinDrive = asc(mid$((szWinPath), 1,1)) - asc("A")+1
szWinDrive = mid$(szWinPath, 1,1)
szSrcSetupPath = ucase$(GetSymbolValue ("STF_SRCDIR"))
szSrcBinPath = mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1) + SOURCE_BINARIES_SUBDIR
szDestPath = szWinDrive + ":" + defInstallPath$
'+++
'$IFDEF WITH_FULL_SAMPLER
szFullSampPath = szWinDrive + ":" + "\DKMM\" + SAMPLER_PATH
'$ENDIF
'---
SetTitle szMsgCaption$
SetBitmap CUIDLL_FILENAME, 1
szCopyright = STR_COPYRIGHT + " Setup " + STR_VERSION
SetAbout prodName$, szCopyright
fPreviousMode = SetBeepingMode (1)
fPreviousMode = SetDecompMode (1)
fPreviousMode = SetSilentMode (0)
szINFPath = ucase$(GetSymbolValue("STF_SRCINFPATH"))
if szINFPath = "" then
szINFPath = ucase$(GetSymbolValue("STF_CWDDIR")) + SETUP_INF_FILENAME
end if
ReadInfFile szINFPath
szExpressCustomChoice = "EXPRESS"
szMinimalInstall = "OFF"
' szAddPMItem = "ON"
fSystemUpdated = 0
bInstalledWin32s = 0
RestoreCursor(cursor%)
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub DeInitialise() STATIC
ret% = Ctl3dUnregister(HinstFrame())
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub AskQuit() STATIC
begin:
szButton = UIStartDlg(CUIDLL_FILENAME, IDD_ASKQUIT, "FQuitDlgProc", 0, "")
select case szButton
case "REACTIVATE"
goto begin
case "EXIT" , "CANCEL"
error STFQUIT
case "CONTINUE"
UIPop 1
end select
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub BadPath() STATIC
begin:
szButton = UIStartDlg(CUIDLL_FILENAME, IDD_BADPATH, "FInfo0DlgProc", 0, "")
select case szButton
case "REACTIVATE"
goto begin
end select
UIPop 1
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub NetworkDrive() STATIC
begin:
szButton = UIStartDlg(CUIDLL_FILENAME, IDD_NETWORKDRIVE, "FInfo0DlgProc", 0, "")
select case szButton
case "REACTIVATE"
goto begin
end select
UIPop 1
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function LicenseAgreement() STATIC As Integer
begin:
szButton = UIStartDlg( CUIDLL_FILENAME, IDD_LICENSE, "FInfoDlgProc", 0, "" )
select case szButton
case "CONTINUE"
UIPop 1
LicenseAgreement = NAV_FORWARD
case "EXIT" , "CANCEL"
LicenseAgreement = NAV_EXIT
end select
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function Welcome() STATIC As Integer
begin:
szButton = UIStartDlg(CUIDLL_FILENAME, IDD_WELCOME, "FInfoDlgProc", IDD_APPHELP, PROC_HELP)
select case szButton
case "REACTIVATE"
goto begin
case "CONTINUE"
UIPop 1
Welcome = NAV_FORWARD
case "EXIT" , "CANCEL"
AskQuit
goto begin
end select
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function TestSystem() STATIC As Integer
TestNortonAntiVirus:
szWinString$ = GetIniKeyString( "win.ini", "windows", "load")
ret% = instr( szWinString,"NAV\navtsrw.exe" )
if ret% <> 0 then
dButton = DoMsgBox(STR_NAV, szMsgCaption$, MB_OK)
endif
TestWinVer:
if GetWindowsMajorVersion() < 3 or (GetWindowsMajorVersion() = 3 and GetWindowsMinorVersion() < 10) then
TestWinVerDlgLoop:
szButton = UIStartDlg (CUIDLL_FILENAME, IDD_NEED31, "FInfoDlgProc", IDD_AWFULMACHINE, PROC_HELP)
select case szButton
case "EXIT" , "CANCEL"
goto TestWinVerDlgLoop
end select
end if
TestVGA:
if GetScreenWidth () < 640 or GetScreenHeight () < 480 then
TestVGADlgLoop:
szButton = UIStartDlg (CUIDLL_FILENAME, IDD_BADVGA, "FInfoDlgProc", IDD_AWFULMACHINE, PROC_HELP)
select case szButton
case "REACTIVATE"
goto TestVGADlgLoop
case "BACK"
UIPop 1
TestSystem = NAV_BACK
goto back
case "CONTINUE"
TestSystem = NAV_FORWARD
UIPop 1
goto TestMouse
case "EXIT" , "CANCEL"
AskQuit
goto TestVGADlgLoop
end select
end if
TestMouse:
if HasMouseInstalled() = false then
TestMouseDlgLoop:
szButton = UIStartDlg (CUIDLL_FILENAME, IDD_NOMOUSE, "FInfoDlgProc", IDD_AWFULMACHINE, PROC_HELP)
select case szButton
case "REACTIVATE"
goto TestMouseDlgLoop
case "BACK"
UIPop 1
TestSystem = NAV_BACK
case "CONTINUE"
TestSystem = NAV_FORWARD
UIPop 1
goto TestColour
case "EXIT" , "CANCEL"
AskQuit
goto TestMouseDlgLoop
end select
end if
TestColour:
if FIs256Colour() = false then
TestColourDlgLoop:
szButton = UIStartDlg (CUIDLL_FILENAME, IDD_NOT256, "FInfoDlgProc", IDD_POORMACHINE, PROC_HELP)
select case szButton
case "REACTIVATE"
goto TestColourDlgLoop
case "BACK"
UIPop 1
TestSystem = NAV_BACK
goto back
case "CONTINUE"
UIPop 1
TestSystem = NAV_FORWARD
case "EXIT" , "CANCEL"
AskQuit
goto TestColourDlgLoop
end select
end if
back:
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'**
'** 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
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function HandleRestart() STATIC AS INTEGER
' Check there are system files to install AND check if Windows v3.1 or greater
if RestartListEmpty = 0 and GetWindowsMajorVersion >= 3 and GetWindowsMajorVersion >= 1 then
dButton = DoMsgBox(STR_EXIT, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
tryagain:
if ExitExecRestart = 1 then
' Exit failed
dButton = DoMsgBox(STR_EXITFAIL, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONSTOP)
goto tryagain
end if
end if
HandleRestart = 1
if RestartListEmpty = 1 then ' Empty, but we have to reboot
dummy% = ExitWindowsExec(MakePath(szDestPath, "_msrstrt.exe"), "")
if dummy% = 0 then
HandleRestart = 0
end if
end if
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Sub UpdateProgramManager(prodName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%) STATIC
'Dim szReadmeTitle As String
'Dim szInf As String
'
' if onCDROM% = 1 then 'sampler
' CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
' ShowProgmanGroup STR_COMPANYNAME, 1, cmoNone
' szReadmeTitle = prodName$ + " " + readmeStr$
'
' szInf = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), appExeFile$)
' CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, MakePath(szDestPath, "sampler.ico"), cmoOverwrite
'' CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), readmeFile$), "", cmoOverwrite
' else
' if szAddPMItem = "ON" then
' CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
' ShowProgmanGroup STR_COMPANYNAME, 1, cmoNone
' szReadmeTitle = prodName$ + " " + readmeStr$
' if szMinimalInstall = "ON" then
' szInf = MakePath(szSrcBinPath, appExeFile$) + " " + MakePath(szSrcBinPath, appPengeFile$)
' CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
' CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szSrcBinPath, readmeFile$), "", cmoOverwrite
' else
' szInf = MakePath(szDestPath, appExeFile$) + " " + MakePath(szDestPath, appPengeFile$)
' CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
' CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szDestPath, readmeFile$), "", cmoOverwrite
' end if
' end if
' end if
'
'End Sub
''''''''''''''''''''''''''''''''''''''''''''
'' Alternative function for french stowaway
'' Readme icon has shortened name
'Sub UpdateProgramManagerAlt(prodName$, readmeName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%) STATIC
'Dim szReadmeTitle As String
'Dim szInf As String
'
' if onCDROM% = 1 then 'sampler
' CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
' ShowProgmanGroup STR_COMPANYNAME, 1, cmoNone
' szReadmeTitle = readmeName$ + " " + readmeStr$
'
' szInf = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), appExeFile$)
' CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, MakePath(szDestPath, "sampler.ico"), cmoOverwrite
'' CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), readmeFile$), "", cmoOverwrite
' else
' if szAddPMItem = "ON" then
' CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
' ShowProgmanGroup STR_COMPANYNAME, 1, cmoNone
' szReadmeTitle = readmeName$ + " " + readmeStr$
' if szMinimalInstall = "ON" then
' szInf = MakePath(szSrcBinPath, appExeFile$) + " " + MakePath(szSrcBinPath, appPengeFile$)
' CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
' CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szSrcBinPath, readmeFile$), "", cmoOverwrite
' else
' szInf = MakePath(szDestPath, appExeFile$) + " " + MakePath(szDestPath, appPengeFile$)
' CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
' CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szDestPath, readmeFile$), "", cmoOverwrite
' end if
' end if
' end if
'
'End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function GetDiskSpaceNeeded( drive% ) STATIC As Long
Dim dDummy As Long
cursor% = ShowWaitCursor()
SetSymbolValue "ExtraSpace", ""
SetSymbolValue "Needed", ""
SetSymbolValue "Cost", ""
'Drives A - Z
for i% = 1 to 26
AddListItem "ExtraSpace", ""
next i%
ReplaceListItem "ExtraSpace", dWinDrive, str$(MINIMUM_DISK_SPACE) '2K for the INI file
dDummy = GetCopyListCost("ExtraSpace","Needed","Cost")
GetDiskSpaceNeeded = val(GetListItem ("Needed", drive))
RemoveSymbol "Needed"
RemoveSymbol "Cost"
RemoveSymbol "ExtraSpace"
RestoreCursor(cursor%)
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub UpdateIndeoAVIDrivers() STATIC
Dim szWMDriver As String
Dim szACMDriver As String
szWMDriver = GetIniKeyString(MakePath(szWinPath,"system.ini"), "drivers", "WaveMapper")
if not(szWMDriver = "msacm.drv") then
fSystemUpdated = 1
end if
if VflatdPresent() = 0 then
CreateSysIniKeyValue szWinPath + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
fSystemUpdated = 1
end if
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.IV32", "ir32.dll", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.IV31", "ir32.dll", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.RT21", "ir21.dll", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.YVU9", "iyvu9.dll", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.MSVC", "msvidc.drv", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.MRLE", "MSRLE.drv", cmoOverwrite
CreateIniKeyValue szWinPath + "WIN.INI", "mci extensions", "avi", "AVIVideo", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "mci", "AVIVideo", "mciavi.drv", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "WaveMapper", "msacm.drv", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "MSACM.msadpcm", "msadpcm.acm", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "Drivers", "MSACM.imaadpcm", "imaadpcm.acm", cmoOverwrite
CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "ir21.dll", "Intel Indeo(TM) Video R2.1", cmoOverwrite
CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "msacm.drv", "Microsoft Sound Mapper V2.00", cmoOverwrite
CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "msadpcm.acm", "Microsoft ADPCM Codec V2.00", cmoOverwrite
CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "imaadpcm.acm", "Microsoft IMA ADPCM Codec V2.00", cmoOverwrite
szMsacmPriority1 = GetIniKeyString(szWinPath + "MSACM.INI","PRIORITY","PRIORITY1")
szMsacmPriority2 = GetIniKeyString(szWinPath + "MSACM.INI","PRIORITY","PRIORITY2")
szMsacmPriority3 = GetIniKeyString(szWinPath + "MSACM.INI","PRIORITY","PRIORITY3")
if mid$( szMsacmPriority1, 1, 1 ) = "0" then
szMsacmPriority1 = "1" + mid$( szMsacmPriority1, 2, len(szMsacmPriority1)-1 )
CreateIniKeyValue szWinPath + "msacm.ini", "PRIORITY", "PRIORITY1", szMsacmPriority1, cmoOverwrite
fSystemUpdated = 1
endif
if mid$( szMsacmPriority2, 1, 1 ) = "0" then
szMsacmPriority2 = "1" + mid$( szMsacmPriority2, 2, len(szMsacmPriority2)-1 )
CreateIniKeyValue szWinPath + "msacm.ini", "PRIORITY", "PRIORITY2", szMsacmPriority2, cmoOverwrite
fSystemUpdated = 1
endif
if mid$( szMsacmPriority3, 1, 1 ) = "0" then
szMsacmPriority3 = "1" + mid$( szMsacmPriority3, 2, len(szMsacmPriority3)-1 )
CreateIniKeyValue szWinPath + "msacm.ini", "PRIORITY", "PRIORITY3", szMsacmPriority3, cmoOverwrite
fSystemUpdated = 1
endif
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub UpdateWinGDrivers() STATIC
Dim szDest As String
Dim szDest1 As String
Dim szDest2 As String
' only use DVA on Windows 3.x
if OnWin3x() = 1 then
AddSectionFilesToCopyList "dva", szSrcBinPath, szWinSysPath
if VflatdPresent() = 0 then
' Taken the path out of the device=dva.386 entry
CreateSysIniKeyValue szWinPath + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
fSystemUpdated = 1
end if
end if
szDest = GetRealWindowsSysDir
szDest1 = MakePath(szDest,"wing32.dll")
szDest2 = MakePath(szDest,"wing32.xxx")
RenameFilePlease szDest1, szDest2
UpdateWinG32 GetRealWindowsSysDir()
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''
FUNCTION GetRealWindowsSysDir STATIC AS STRING
szBuf$ = string$(260, 32)
cbBuf% = GetRealSystemDir(szBuf$, 260)
IF cbBuf% = 0 THEN
ERROR STFERR
ELSE
IF cbBuf% > 259 THEN
res% = DoMsgBox("Buffer Overflow", "MS-Setup Error", MB_ICONHAND+MB_OK)
ERROR STFERR
END IF
szBuf$ = RTRIM$(szBuf$)
IF MID$(szBuf$, 1, 1) = "\" THEN
szBuf$ = MID$(CURDIR$, 1, 2) + szBuf$
ELSEIF MID$(szBuf$, 2, 1) <> ":" THEN
szBuf$ = MID$(CURDIR$, 1, 3) + szBuf$
END IF
IF MID$(szBuf$, LEN(szBuf$), 1) <> "\" THEN
szBuf$ = szBuf$ + "\"
END IF
GetRealWindowsSysDir = szBuf$
END IF
szBuf$ = ""
END FUNCTION
'''''''''''''''''''''''''''''''''''''''''''''''''
SUB UpdateWinG32 (szOrig$) STATIC
'
' Here we check the version ourselves of wing32.dll, since
' we can't get version checking for Win32 apps from Win16
'
FileNew$ = MakePath(szOrig$, "wing32.dll")
FileOrig$ = MakePath(szOrig$, "wing32.xxx")
IF IsWin32FileNewer( FileOrig$, FileNew$ ) THEN
RemoveFile FileOrig$, cmoForce
ELSE
RemoveFile FileNew$, cmoForce ' get rid of new file
RenameFilePlease FileOrig$,FileNew$ ' put back old file
END IF
END SUB
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function UpdateADPCMDrivers() STATIC As Integer
Dim szWMDriver As String
Dim szACMDriver As String
Dim fUpdate As Integer
' Check WaveMapper driver
szWMDriver = GetIniKeyString(MakePath(szWinPath,"system.ini"), "drivers", "WaveMapper")
szACMDriver = GetIniKeyString (MakePath(szWinPath, "system.ini"), "MSACM", "Install")
if not(szWMDriver = "msacm.drv") then
' Isn't installed so...
' If NO ADPCM drivers are installed so...
if (szWMDriver = "") then
' Display a dialog saying "there are no ADPCM drivers on your system..."
fUpdate = 1
else
' There is a different adpcm driver in there so warn about compatibility
loop1:
szButton = UIStartDlg(CUIDLL_FILENAME, IDD_URKADPCM, "FInfoDlgProc", IDD_ADPCMHELP, PROC_HELP)
select case szButton
case "REACTIVATE"
goto loop1
case "EXIT" , "CANCEL"
AskQuit
goto loop1
case "CONTINUE" ' YES
UpdateADPCMDrivers = NAV_FORWARD
UIPop 1
fUpdate = 1
' case "CANCEL" ' NO
' UIPop 1
' fUpdate = 0
case "BACK"
UIPop 1
UpdateADPCMDrivers = NAV_BACK
goto back
end select
end if
if fUpdate = 1 then
CreateIniKeyValue szWinPath + "system.ini", "drivers", "WaveMapper", "msacm.drv", cmoOverwrite
CreateIniKeyValue szWinPath + "system.ini", "MSACM", "Install", "msadpcm.acm", cmoOverwrite
CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "msacm.drv","MS Audio Compression Manager", cmoOverwrite
CreateIniKeyValue szWinPath + "control.ini", "Userinstallable.drivers", "WaveMapper", "msacm.drv", cmoOverwrite
CreateIniKeyValue szWinPath + "control.ini", "related.desc", "WaveMapper", "", cmoOverwrite
fSystemUpdated = 1
else
noSysSoftware:
' No install warning
szButton = UIStartDlg(CUIDLL_FILENAME, IDD_WARNNOSYSSOFT, "FInfoDlgProc", 0, "")
select case szButton
case "REACTIVATE"
goto noSysSoftware
case "EXIT" , "CANCEL"
AskQuit
goto noSysSoftware
case "CONTINUE"
UIPop 1
case "BACK"
UIPop 1
goto loop1
end select
end if
end if
back:
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function InstallQTW() STATIC As Integer
begin:
szButton = UIStartDlg( CUIDLL_FILENAME, IDD_INSTALLQTW, "FInfoDlgProc", 0, "" )
select case szButton
case "REACTIVATE"
goto begin
case "CONTINUE" ' Yes Install QTW
IF (GetWindowsMajorVersion * 100) + GetWindowsMinorVersion > 350 THEN
' Install the 32 bit version on Windows 95
Run ( MakePath( szSrcBinPath, "qt32b42.exe" ) )
Else
' Else Install the 16 bit version
Run ( MakePath( szSrcBinPath, "qt16b42.exe" ) )
END IF
UIPop 1
InstallQTW = NAV_FORWARD
case "BACK" ' No Don't Install QTW
UIPop 1
InstallQTW = NAV_BACK
case "EXIT" , "CANCEL"
AskQuit
goto begin
end select
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''