home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today - The Disc! 2
/
CD-ROM_Today_-_The_Disc_2_June-July_1994.iso
/
wfsound
/
specific.in_
/
specific.bin
Wrap
Text File
|
1993-11-08
|
9KB
|
276 lines
''
'' Wired for Sound Pro Limited-edition-specific install functions
'' Copyright (c) 1993 Aristosoft, Inc.
''
'' Set up product-specific titles, etc.
SUB SetProductTitles STATIC
SetTitle "Wired for Sound Pro Limited Edition"
WFSAPP$ = "WFS"
END SUB
FUNCTION InfFile() STATIC AS STRING
InfFile = "WFSPSAMP.INF"
END FUNCTION
FUNCTION MakeInstDir(D$) STATIC AS STRING
'' If we're lucky, this will tell us where we're located
S$ = GetIniKeyString("win.ini", "Aristosoft", "WFS")
'' If that didn't work, then we'll punt with the default
IF S$ = "" THEN
S$ = D$ + ":\WFSOUND"
END IF
'' WFSOUND.INF must be in any installed WFS product
IF EXISTS(MakePath(S$, "WFSOUND.INF")) THEN
r% = DoMsgBox("An installed copy of Wired for Sound was found in " + S$+ ".", "WFS Pro Limited Edition", MB_OK)
END IF
MakeInstDir = S$
END FUNCTION
SUB AddInfSectionNames(BASE$, TAPPS$, SOUNDS$, VOICES$, BASEINST$, TAPPSINST$, SOUNDSINST$, VOICESINST$) STATIC
'' These are the base files we can install
AddListItem BASE$, "Base Files"
SetSymbolValue BASEINST$, GetSymbolValue(BASE$)
'' By default, we install all the above
SetSymbolValue SOUNDSINST$, GetSymbolValue(SOUNDS$)
END SUB
SUB RecalcPath STATIC
CursorSave% = ShowWaitCursor()
RecalcOptFiles BASEFILES
RecalcOptFiles SOUNDFILES
RestoreCursor CursorSave%
END SUB
SUB AddOptFiles STATIC
AddOptFilesToCopyList BASEFILES
AddOptFilesToCopyList SOUNDFILES
END SUB
SUB AddOptFilesToCopyList (ftype%) STATIC
IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
SrcDir$ = GetSymbolValue("STF_SRCDIR")
IF ftype% = BASEFILES THEN
''Base files
l% = GetListLength(BASEINST$)
FOR i% = 1 TO l% STEP 1
AddSectionFilesToCopyList GetListItem(BASEINST$, i%), SrcDir$, DEST$
NEXT i%
IF INSTDSOUND% OR EXISTS(MakePath(SYSDIR$, "DSOUND.DLL")) THEN
dsDest$ = GetWindowsSysDir()
AddSpecialFileToCopyList "DSOUND Files", "DSOUND", SrcDir$, MakePath(dsDest$, "DSOUND.DLL")
END IF
'' Install 3d control manager
AddSpecialFileToCopyList "System Files", "CTL3D", SrcDir$, MakePath(SYSDIR$, "CTL3D.DLL")
'' Install msvideo and iccvid
AddSpecialFileToCopyList "System Files", "MSVIDEO", SrcDir$, MakePath(SYSDIR$, "MSVIDEO.DLL")
AddSpecialFileToCopyList "System Files", "ICCVID", SrcDir$, MakePath(SYSDIR$, "ICCVID.DRV")
AddSpecialFileToCopyList "System Files", "DIB", SrcDir$, MakePath(SYSDIR$, "DIB.DRV")
END IF
SrcDir$ = ""
END IF
END SUB
SUB SetDriveStatus STATIC
FITS% = 0
drive$ = MID$(DEST$, 1, 1)
ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
free& = GetFreeSpaceForDrive(drive$)
IF cost& > free& THEN
FITS% = 1
END IF
ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
IF drive$ = WINDRIVE$ THEN
ReplaceListItem DRIVETEXT$, 4, ""
ReplaceListItem DRIVETEXT$, 5, ""
ReplaceListItem DRIVETEXT$, 6, ""
ELSE
ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
IF cost& = 0 THEN
ReplaceListItem DRIVETEXT$, 4, ""
ReplaceListItem DRIVETEXT$, 5, ""
ReplaceListItem DRIVETEXT$, 6, ""
ELSE
free& = GetFreeSpaceForDrive(WINDRIVE$)
IF cost& > free& THEN
FITS% = 1
END IF
ReplaceListItem DRIVETEXT$, 4, WINDRIVE$ + ":"
ReplaceListItem DRIVETEXT$, 5, STR$(cost& / 1024) + " K"
ReplaceListItem DRIVETEXT$, 6, STR$(free& / 1024) + " K"
END IF
END IF
END SUB
'' Add billboard dialogs for this app
SUB AddBillboards STATIC
AddToBillboardList CUIDLL$, BBD1, "FModelessDlgProc", 100
AddToBillboardList CUIDLL$, BBD2, "FModelessDlgProc", 100
AddToBillboardList CUIDLL$, BBD3, "FModelessDlgProc", 100
END SUB
CONST IDC_OWNER = 104
CONST IDC_WORKPLACE = 106
CONST RT_RCDATA = 10
SUB ConfigureApps STATIC
'' This is so Fixer can find where we're installed
CreateIniKeyValue "win.ini", "Aristosoft", "WFS", DEST$, cmoOverwrite
'' This is the name of the group we'll install into
GROUP$ = "WFS Pro Ltd."
'' Configure base applications
IF GetListItem(CHECKSTATES$, BASEFILES) = "ON" THEN
'' Create a group for us...
CreateProgmanGroup GROUP$, "", cmoNone
'' Setup WFS Pro
CreateProgmanItem GROUP$, WFSAPP$, MakePath(DEST$, "wfsound.exe"), "", cmoOverwrite
''Setup up default association file
CreateIniKeyValue MakePath(DEST$, "WFSOUND.INF"), "WFSound", "ActiveProfile", MakePath(DEST$, "DEFAULT.WFS"), cmoNone
''Turn on icon events only if we support the shell
s$ = LCASE$(GetIniKeyString(SYSINI$, "boot", "shell"))
IF INSTR(s$, "progman.exe") THEN
i$ = "1"
ELSEIF INSTR(s$, "ndw.exe") THEN
i$ = "1"
ELSEIF INSTR(s$, "wndt.exe") THEN
i$ = "1"
ELSE
i$ = "0"
END IF
CreateIniKeyValue MakePath(DEST$, "DEFAULT.WFS"), "Status", "Icon", i$, cmoNone
s$ = ""
i$ = ""
'' Disable Win 3.1 system startup and exit sounds
INI$ = "win.ini"
s$ = GetIniKeyString(INI$, "Sounds", "SystemStart")
CreateIniKeyValue INI$, "Sounds", "OldSystemStart", s$, cmoOverwrite
CreateIniKeyValue INI$, "Sounds", "SystemStart", "<none>,System Start", cmoOverwrite
s$ = GetIniKeyString(INI$, "Sounds", "SystemExit")
CreateIniKeyValue INI$, "Sounds", "OldSystemExit", s$, cmoOverwrite
CreateIniKeyValue INI$, "Sounds", "SystemExit", "<none>,System Exit", cmoOverwrite
'' Remove vox.drv
IF LCASE$(GetIniKeyString(SYSINI$, "drivers", "wavemapper")) = "vox.drv" THEN
s$ = GetIniKeyString(SYSINI$, "drivers", "vox.wavemapper")
CreateIniKeyValue SYSINI$, "drivers", "wavemapper", s$, cmoOverwrite
END IF
''Stamp the WFSABOUT resources
IF len(OWNER$) > 0 THEN
StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_OWNER, OWNER$ + chr$(0), len(OWNER$) + 1
ELSE
StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_OWNER, " " + chr$(0), 2
END IF
IF len(WORKPLACE$) > 0 THEN
StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_WORKPLACE, WORKPLACE$ + chr$(0), len(WORKPLACE$) + 1
ELSE
StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_WORKPLACE, " " + chr$(0), 2
END IF
'' Install ICCVID Codec
CreateIniKeyValue SYSINI$, "Drivers", "VIDC.CVID", "iccvid.drv", cmoNone
END IF
'' Configure Talking Applications
CreateProgmanItem GROUP$, "Wallpaper Changer", MakePath(DEST$, "wally.exe"), "", cmoOverwrite
INI$ = MakePath(DEST$, "WALLY.INI")
CreateIniKeyValue INI$, "Settings", "WallFile", MakePath(DEST$, "default.wal"), cmoNone
CreateProgmanItem GROUP$, "Icon Changer", MakePath(DEST$, "iconplus.exe"), "", cmoOverwrite
CreateProgmanItem GROUP$, "Cursor Changer", MakePath(DEST$, "cursor.exe") + " /foo /bar", "", cmoOverwrite
CreateProgmanItem GROUP$, "Talking Clock", MakePath(DEST$, "tclock.exe"), "", cmoOverwrite
INI$ = MakePath(DEST$, "VOICE.INI")
CreateIniKeyValue INI$, "Voice Library", "TCLOCK.EXE", "+malel.voi", cmoNone
INI$ = MakePath(DEST$, "FACE.INI")
CreateIniKeyValue INI$, "Face", "TCLOCK.EXE", "+WFSFACE.FAC", cmoNone
INI$ = MakePath(DEST$, "SCHEDAPI.INI")
CreateIniKeyValue INI$, "Settings", "HolidayFile", MakePath(DEST$, "TCAL.HOL"), cmoNone
CreateIniKeyValue INI$, "Settings", "DefaultApptBook", MakePath(DEST$, "DEFAULT.APP"), cmoNone
'' Install DSOUND.DLL as the wave driver if there isn't one already, somewhere...
IF INSTDSOUND% AND EXISTS(MakePath(GetWindowsSysDir(), "DSOUND.DLL")) THEN
CreateIniKeyValue SYSINI$, "drivers", "wave", "DSOUND.DLL", cmoOverwrite
END IF
END SUB
'' Remove all files and directories...
SUB DoUninstall STATIC
IF IDYES = DoMsgBox("Are you sure you want to remove WFS Pro Limited Edition from your system?", "WFS Pro Limited Edition", MB_YESNO) THEN
DEST$ = GetIniKeyString("win.ini", "Aristosoft", "WFS")
IF DEST$ <> "" THEN
old% = ShowWaitCursor()
RemDirectory DEST$
SendProgmanCommand "[DeleteGroup(""WFS Pro Ltd."")]"
RemoveIniSection "win.ini", "Sound API", cmoNone
'' Reset default startup and exit sounds
INI$ = "win.ini"
s$ = GetIniKeyString(INI$, "Sounds", "OldSystemStart")
RemoveIniKey INI$, "Sounds", "OldSystemStart", cmoNone
CreateIniKeyValue INI$, "Sounds", "SystemStart", s$, cmoOverwrite
s$ = GetIniKeyString(INI$, "Sounds", "OldSystemExit")
RemoveIniKey INI$, "Sounds", "OldSystemExit", cmoNone
CreateIniKeyValue INI$, "Sounds", "SystemExit", s$, cmoOverwrite
RestoreCursor old%
i% = DoMsgBox("WFS Pro Limited Edition has been removed. You can run Setup later to re-install it.", "WFS Pro Limited Edition", MB_OK)
END
ELSE
i% = DoMsgBox("WFS Pro Limited Edition is not installed or cannot be found!", "WFS Pro Limited Edition", MB_OK)
END IF
END IF
END SUB