home *** CD-ROM | disk | FTP | other *** search
/ MIDI Music Collection / MUSIC.iso / wired.310 / disk1 / specific.in_ / specific.bin
Encoding:
Text File  |  1993-05-31  |  17.9 KB  |  472 lines

  1. ''
  2. '' WFS Pro 2.10-specific install functions (AITech version)
  3. '' Copyright (c) 1993 Aristosoft, Inc.
  4. ''
  5.  
  6. '' Set up product-specific titles, etc.
  7. SUB SetProductTitles STATIC
  8.     SetTitle "Wired for Sound Pro Special Edition"
  9.     WFSAPP$ = "WFS Pro"
  10. END SUB
  11.  
  12.  
  13. FUNCTION InfFile() STATIC AS STRING
  14.     InfFile = "WFSPRO.INF"
  15. END FUNCTION
  16.  
  17.  
  18. FUNCTION MakeInstDir(D$) STATIC AS STRING
  19.  
  20.     '' If we're lucky, this will tell us where we're located
  21.     S$ = GetIniKeyString(WININI$, "Aristosoft", "WFS")
  22.  
  23.     '' If that didn't work, then try this for 2.02
  24.     IF S$ = "" THEN
  25.     S$ = GetIniKeyString(WININI$, "Sound API", "MaleVoice")
  26.     S$ = mid$(S$, 1, len(S$) - len("\VOICE3.VOI"))
  27.     END IF
  28.  
  29.     '' If that didn't work, then we'll punt with the default
  30.     IF S$ = "" THEN
  31.     S$ = D$ + ":\WFSOUND"
  32.     END IF
  33.  
  34.     '' WFSOUND.INF must be in any installed WFS product
  35.     IF EXISTS(MakePath(S$, "WFSOUND.INF")) THEN
  36.     r% = DoMsgBox("An installed copy of Wired for Sound was found in " + S$+ ".", "Wired for Sound", MB_OK)
  37.     END IF
  38.  
  39.     MakeInstDir = S$
  40. END FUNCTION
  41.  
  42.  
  43. SUB AddInfSectionNames(BASE$, TAPPS$, SOUNDS$, VOICES$, BASEINST$, TAPPSINST$, SOUNDSINST$, VOICESINST$) STATIC
  44.  
  45.     '' These are the base files we can install
  46.     AddListItem BASE$, "Base Files"
  47.     SetSymbolValue BASEINST$, GetSymbolValue(BASE$)
  48.  
  49.     '' These are the Talking Apps we can install
  50.     AddListItem TAPPS$, "Talking Minesweeper"
  51.     AddListItem TAPPS$, "Talking Solitaire"
  52.     AddListItem TAPPS$, "Cursor Changer"
  53.     AddListItem TAPPS$, "Icon Changer"
  54.     AddListItem TAPPS$, "Post This!"
  55.     AddListItem TAPPS$, "Talking Calendar"
  56.     AddListItem TAPPS$, "Talking Clock"
  57.     AddListItem TAPPS$, "Talking Graveyard"
  58.     AddListItem TAPPS$, "Talking Monitor"
  59.     AddListItem TAPPS$, "Job Saver"
  60.     AddListItem TAPPS$, "Intruder Alert"
  61.     AddListItem TAPPS$, "Talking Calculator"
  62.     AddListItem TAPPS$, "WFS Sound Editor"
  63.     AddListItem TAPPS$, "Groupie"
  64.     AddListItem TAPPS$, "Sound Manager"
  65.  
  66.     '' By default, we install all Talking Apps
  67.     SetSymbolValue TAPPSINST$, GetSymbolValue(TAPPS$)
  68.  
  69.     '' These are the sounds we can install
  70.     AddListItem SOUNDS$, "Icon Sounds"
  71.     AddListItem SOUNDS$, "Phrase Sounds"
  72.     AddListItem SOUNDS$, "Human Sounds"
  73.     AddListItem SOUNDS$, "Funny Sounds"
  74.     AddListItem SOUNDS$, "Button Sounds"
  75.     AddListItem SOUNDS$, "Classical MIDI"
  76.     AddListItem SOUNDS$, "Jazz MIDI"
  77.     AddListItem SOUNDS$, "Misc. MIDI"
  78.     AddListItem SOUNDS$, "New Age MIDI"
  79.     AddListItem SOUNDS$, "Pleasant MIDI"
  80.     AddListItem SOUNDS$, "R & B MIDI"
  81.     AddListItem SOUNDS$, "Job Saver Sounds"
  82.  
  83.     '' By default, we install all the above
  84.     SetSymbolValue SOUNDSINST$, GetSymbolValue(SOUNDS$)
  85.  
  86.     '' Only include this file if we can find the Star Trek DLL
  87.     st$ = GetIniKeyString(MakePath(WINDIR$, "AD_PREFS.INI"), "After Dark", "Path")
  88.     IF EXISTS(MakePath(st$, "st_res\st_snd.dll")) THEN
  89.     AddListItem SOUNDSINST$, "Star Trek Stubs"
  90.     END IF
  91.  
  92.     '' ...but it's always an option
  93.     AddListItem SOUNDS$, "Star Trek Stubs"
  94.  
  95.     '' We can install all these voices
  96.     AddListItem VOICES$, "Make-Your-Own Voice"
  97.     AddListItem VOICES$, "Female Voice"
  98.  
  99.     '' By default, we install all the above
  100.     SetSymbolValue VOICESINST$, GetSymbolValue(VOICES$)
  101. END SUB
  102.  
  103.  
  104. SUB RecalcPath STATIC
  105.     CursorSave% = ShowWaitCursor()
  106.     RecalcOptFiles BASEFILES
  107.     RecalcOptFiles SOUNDFILES
  108.     RecalcOptFiles TAPPFILES
  109.     RecalcOptFiles VOICEFILES
  110.     RestoreCursor CursorSave%
  111. END SUB
  112.  
  113.  
  114. SUB AddOptFiles STATIC
  115.     AddOptFilesToCopyList BASEFILES
  116.     AddOptFilesToCopyList TAPPFILES
  117.     AddOptFilesToCopyList SOUNDFILES
  118.     AddOptFilesToCopyList VOICEFILES
  119. END SUB
  120.  
  121.  
  122. SUB AddOptFilesToCopyList (ftype%) STATIC
  123.  
  124.     IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
  125.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  126.     IF ftype% = BASEFILES THEN
  127.         ''Base files
  128.         l% = GetListLength(BASEINST$)
  129.         FOR i% = 1 TO l% STEP 1
  130.         AddSectionFilesToCopyList GetListItem(BASEINST$, i%), SrcDir$, DEST$
  131.         NEXT i%
  132.  
  133.         IF INSTDSOUND% OR EXISTS(MakePath(SYSDIR$, "DSOUND.DLL")) THEN
  134.         AddSpecialFileToCopyList "DSOUND Files", "DSOUND", SrcDir$, MakePath(SYSDIR$, "DSOUND.DLL")
  135.         AddSpecialFileToCopyList "DSOUND Files", "DSCPL", SrcDir$, MakePath(SYSDIR$, "DSCPL.CPL")
  136.         END IF
  137.  
  138.         '' Install 3d control manager
  139.         AddSpecialFileToCopyList "System Files", "Ctl3d", SrcDir$, MakePath(SYSDIR$, "CTL3D.DLL")
  140.  
  141.     ELSEIF ftype% = TAPPFILES THEN
  142.         l% = GetListLength(TAPPSINST$)
  143.         FOR i% = 1 TO l% STEP 1
  144.         AddSectionFilesToCopyList GetListItem(TAPPSINST$, i%), SrcDir$, DEST$
  145.         NEXT i%
  146.  
  147.         IF StringInList("Talking Calculator", TAPPSINST$) THEN
  148.         AddSpecialFileToCopyList "System Files", "LCD Font (VGA)", SrcDir$, MakePath(SYSDIR$, "LCD.FON")
  149.         AddSpecialFileToCopyList "System Files", "LCD Font (8514a)", SrcDir$, MakePath(SYSDIR$, "LCDBIG.FON")
  150.         END IF
  151.     ELSEIF ftype% = SOUNDFILES THEN
  152.         l% = GetListLength(SOUNDSINST$)
  153.         FOR i% = 1 TO l% STEP 1
  154.         AddSectionFilesToCopyList GetListItem(SOUNDSINST$, i%), SrcDir$, DEST$
  155.         NEXT i%
  156.     ELSEIF ftype% = VOICEFILES THEN
  157.         l% = GetListLength(VOICESINST$)
  158.         FOR i% = 1 TO l% STEP 1
  159.         AddSectionFilesToCopyList GetListItem(VOICESINST$, i%), SrcDir$, DEST$
  160.         NEXT i%
  161.     END IF
  162.     SrcDir$ = ""
  163.     END IF
  164.  
  165. END SUB
  166.  
  167.  
  168. SUB SetDriveStatus STATIC
  169.     FITS% = 0
  170.     drive$ = MID$(DEST$, 1, 1)
  171.     ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
  172.  
  173.     cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
  174.     cost& = cost& + VAL(GetListItem(SOUNDNEEDS$, ndrive%))
  175.     cost& = cost& + VAL(GetListItem(TAPPNEEDS$, ndrive%))
  176.     cost& = cost& + VAL(GetListItem(VOICENEEDS$, ndrive%))
  177.  
  178.     free& = GetFreeSpaceForDrive(drive$)
  179.     IF cost& > free& THEN
  180.     FITS% = 1
  181.     END IF
  182.     ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
  183.     ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
  184.     ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
  185.  
  186.     IF drive$ = WINDRIVE$ THEN
  187.     ReplaceListItem DRIVETEXT$, 4, ""
  188.     ReplaceListItem DRIVETEXT$, 5, ""
  189.     ReplaceListItem DRIVETEXT$, 6, ""
  190.     ELSE
  191.     ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
  192.  
  193.     cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
  194.     cost& = cost& + VAL(GetListItem(SOUNDNEEDS$, ndrive%))
  195.     cost& = cost& + VAL(GetListItem(TAPPNEEDS$, ndrive%))
  196.     cost& = cost& + VAL(GetListItem(VOICENEEDS$, ndrive%))
  197.  
  198.     IF cost& = 0 THEN
  199.         ReplaceListItem DRIVETEXT$, 4, ""
  200.         ReplaceListItem DRIVETEXT$, 5, ""
  201.         ReplaceListItem DRIVETEXT$, 6, ""
  202.     ELSE
  203.         free& = GetFreeSpaceForDrive(WINDRIVE$)
  204.         IF cost& > free& THEN
  205.         FITS% = 1
  206.         END IF
  207.         ReplaceListItem DRIVETEXT$, 4, WINDRIVE$ + ":"
  208.         ReplaceListItem DRIVETEXT$, 5, STR$(cost& / 1024) + " K"
  209.         ReplaceListItem DRIVETEXT$, 6, STR$(free& / 1024) + " K"
  210.     END IF
  211.     END IF
  212. END SUB
  213.  
  214.  
  215. '' Add billboard dialogs for this app
  216. SUB AddBillboards STATIC
  217.     AddToBillboardList CUIDLL$, BBD1, "FModelessDlgProc", 100
  218.     AddToBillboardList CUIDLL$, BBD2, "FModelessDlgProc", 100
  219.     AddToBillboardList CUIDLL$, BBD3, "FModelessDlgProc", 100
  220.     AddToBillboardList CUIDLL$, BBD4, "FModelessDlgProc", 100
  221.     AddToBillboardList CUIDLL$, BBD5, "FModelessDlgProc", 100
  222.     AddToBillboardList CUIDLL$, BBD6, "FModelessDlgProc", 100
  223. END SUB
  224.  
  225.  
  226. CONST IDC_OWNER = 104
  227. CONST IDC_WORKPLACE = 106
  228. CONST RT_RCDATA = 10
  229.  
  230. SUB ConfigureApps STATIC
  231.  
  232.     '' This is so Fixer can find where we're installed
  233.     CreateIniKeyValue WININI$, "Aristosoft", "WFS", DEST$, cmoOverwrite
  234.  
  235.     '' This is the name of the group we'll install into
  236.     GROUP$ = "Wired for Sound Pro"
  237.  
  238.     '' Create a group for us...
  239.     CreateProgmanGroup GROUP$, "", cmoNone
  240.  
  241.     '' Configure base applications
  242.     IF GetListItem(CHECKSTATES$, BASEFILES) = "ON" THEN
  243.  
  244.     '' Setup WFS Pro
  245.     CreateProgmanItem GROUP$, WFSAPP$, MakePath(DEST$, "wfsound.exe"), "", cmoOverwrite
  246.     CreateProgmanItem GROUP$, "Configuration Editor", MakePath(DEST$, "wfsfix.exe"), "", cmoOverwrite
  247.  
  248.     IF INSTDSOUND% THEN
  249.         CreateProgmanItem GROUP$, "DSOUND Info", "notepad.exe " + MakePath(DEST$, "dsound.txt"), "", cmoOverwrite
  250.     END IF
  251.  
  252.     CreateProgmanItem GROUP$, "Manual Addendum", "write.exe " + MakePath(DEST$, "addendum.wri"), "", cmoOverwrite
  253.  
  254.     ''Setup up default association file
  255.     CreateIniKeyValue MakePath(DEST$, "WFSOUND.INF"), "WFSound", "ActiveProfile", MakePath(DEST$, "DEFAULT.WFS"), cmoNone
  256.  
  257.     ''Turn on icon events only if we support the shell
  258.     s$ = GetIniKeyString(SYSINI$, "boot", "shell")
  259.     i$ = "0"
  260.     IF lcase$(s$) = "progman.exe" THEN
  261.         i$ = "1"
  262.     ELSE
  263.         IF len(s$) >= 7 THEN
  264.         IF lcase$(mid$(s$, len(s$) - 7)) = "ndw.exe" THEN
  265.             i$ = "1"
  266.         ENDIF
  267.         END IF
  268.         IF len(s$) >= 8 THEN
  269.         IF lcase$(mid$(s$, len(s$) - 8)) = "wndt.exe" THEN
  270.             i$ = "1"
  271.         ENDIF
  272.         END IF
  273.     END IF
  274.     CreateIniKeyValue MakePath(DEST$, "DEFAULT.WFS"), "Status", "Icon", i$, cmoNone
  275.     s$ = ""
  276.     i$ = ""
  277.  
  278.     '' Disable Win 3.1 system startup and exit sounds
  279.     s$ = GetIniKeyString(WININI$, "Sounds", "SystemStart")
  280.     CreateIniKeyValue WININI$, "Sounds", "OldSystemStart", s$, cmoOverwrite
  281.     CreateIniKeyValue WININI$, "Sounds", "SystemStart", "<none>,System Start", cmoOverwrite
  282.  
  283.     s$ = GetIniKeyString(INI$, "Sounds", "SystemExit")
  284.     CreateIniKeyValue WININI$, "Sounds", "OldSystemExit", s$, cmoOverwrite
  285.     CreateIniKeyValue WININI$, "Sounds", "SystemExit", "<none>,System Exit", cmoOverwrite
  286.  
  287.     ''Stamp the WFSABOUT resources
  288.     IF len(OWNER$) > 0 THEN
  289.         StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_OWNER, OWNER$ + chr$(0), len(OWNER$) + 1
  290.     ELSE
  291.         StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_OWNER, " " + chr$(0), 2
  292.     END IF
  293.     IF len(WORKPLACE$) > 0 THEN
  294.         StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_WORKPLACE, WORKPLACE$ + chr$(0), len(WORKPLACE$) + 1
  295.     ELSE
  296.         StampResource "Base Files", "WFS About", DEST$, RT_RCDATA, IDC_WORKPLACE, " " + chr$(0), 2
  297.     END IF
  298.  
  299.     END IF
  300.  
  301.     '' Configure Talking Applications
  302.     IF GetListItem(CHECKSTATES$, TAPPFILES) = "ON" THEN
  303.  
  304.     IF StringInList("Post This!", TAPPSINST$) THEN
  305.         CreateProgmanItem GROUP$, "Post This!", MakePath(DEST$, "postit.exe"), "", cmoOverwrite
  306.     END IF
  307.  
  308.     IF StringInList("Icon Changer", TAPPSINST$) THEN
  309.         CreateProgmanItem GROUP$, "Icon Changer", MakePath(DEST$, "iconplus.exe"), "", cmoOverwrite
  310.     END IF
  311.  
  312.     IF StringInList("Cursor Changer", TAPPSINST$) THEN
  313.         CreateProgmanItem GROUP$, "Cursor Changer", MakePath(DEST$, "cursor.exe") + " /foo /bar", "", cmoOverwrite
  314.     END IF
  315.  
  316.     IF StringInList("Talking Solitaire", TAPPSINST$) THEN
  317.         CreateProgmanItem GROUP$, "Talking Solitaire", MakePath(DEST$, "tsol.exe"), "", cmoOverwrite
  318.     END IF
  319.  
  320.     IF StringInList("Talking Minesweeper", TAPPSINST$) THEN
  321.         CreateProgmanItem GROUP$, "Talking Minesweeper", MakePath(DEST$, "tmine.exe"), "", cmoOverwrite
  322.     END IF
  323.  
  324.     IF StringInList("Talking Clock", TAPPSINST$) THEN
  325.         CreateProgmanItem GROUP$, "Talking Clock", MakePath(DEST$, "tclock.exe"), "", cmoOverwrite
  326.     END IF
  327.  
  328.     IF StringInList("Talking Calendar", TAPPSINST$) THEN
  329.         CreateProgmanItem GROUP$, "Talking Calendar", MakePath(DEST$, "tcal.exe"), "", cmoOverwrite
  330.     END IF
  331.  
  332.     IF StringInList("Sound Manager", TAPPSINST$) THEN
  333.         CreateProgmanItem GROUP$, "Sound Manager", MakePath(DEST$, "sndmnger.exe"), "", cmoOverwrite
  334.     END IF
  335.  
  336.     IF StringInList("Talking Clock", TAPPSINST$) OR StringInList("Talking Calendar", TAPPSINST$) THEN
  337.         INI$ = MakePath(DEST$, "SCHEDAPI.INI")
  338.         CreateIniKeyValue INI$, "Settings", "HolidayFile", MakePath(DEST$, "TCAL.HOL"), cmoNone
  339.         CreateIniKeyValue INI$, "Settings", "DefaultApptBook", MakePath(DEST$, "DEFAULT.APP"), cmoNone
  340.     END IF
  341.  
  342.     IF StringInList("Talking Calculator", TAPPSINST$) THEN
  343.         CreateProgmanItem GROUP$, "Talking Calculator", MakePath(DEST$, "tcalc.exe"), "", cmoOverwrite
  344.         CreateIniKeyValue WININI$, "FONTS", "LCD (VGA Res)", "lcd.fon", cmoNone
  345.         CreateIniKeyValue WININI$, "FONTS", "LCD (8514a Res)", "lcdbig.fon", cmoNone
  346.     END IF
  347.  
  348.     IF StringInList("WFS Sound Editor", TAPPSINST$) THEN
  349.         CreateProgmanItem GROUP$, "WFS Editor", MakePath(DEST$, "wfsedit.exe"), "", cmoOverwrite
  350.     END IF
  351.  
  352.     IF StringInList("Talking Monitor", TAPPSINST$) THEN
  353.         INI$ = MakePath(DEST$, "TMON.INI")
  354.         CreateIniKeyValue INI$, "Talking Monitor", "LowResources", MakePath(DEST$, "PHRASES\WARNING.wav"), cmoNone
  355.         CreateIniKeyValue INI$, "Talking Monitor", "LowMemory", MakePath(DEST$, "PHRASES\WARNING.wav"), cmoNone
  356.         CreateIniKeyValue INI$, "Talking Monitor", "LowDiskSpace", MakePath(DEST$, "PHRASES\DISKLOW.wav"), cmoNone
  357.         CreateProgmanItem GROUP$, "Talking Monitor", MakePath(DEST$, "tmon.exe"), "", cmoOverwrite
  358.     END IF
  359.  
  360.     IF StringInList("Talking Graveyard", TAPPSINST$) THEN
  361.         INI$ = MakePath(DEST$, "TGRAVE.INI")
  362.         CreateIniKeyValue INI$, "Settings", "BurySoundFile", MakePath(DEST$, "FUNNYSND\CHL_AARG.wav"), cmoNone
  363.         CreateIniKeyValue INI$, "Settings", "KillSoundFile", MakePath(DEST$, "HUMANSND\ELAUGH.wav"), cmoNone
  364.         CreateProgmanItem GROUP$, "Talking Graveyard", MakePath(DEST$, "tgrave.exe"), "", cmoOverwrite
  365.     END IF
  366.  
  367.     IF StringInList("Job Saver", TAPPSINST$) AND GetListItem(CHECKSTATES$, SOUNDFILES) = "ON" AND StringInList("Job Saver Sounds", SOUNDSINST$) THEN
  368.         INI$ = MakePath(DEST$, "JOBSAVER.INI")
  369.         CreateIniKeyValue INI$, "Settings", "SoundFile0", MakePath(DEST$, "jobsaver\chairsqk.wav"), cmoNone
  370.         CreateIniKeyValue INI$, "Settings", "Rate0", "10", cmoNone
  371.         CreateIniKeyValue INI$, "Settings", "SoundFile1", MakePath(DEST$, "jobsaver\throat.wav"), cmoNone
  372.         CreateIniKeyValue INI$, "Settings", "Rate1", "5", cmoNone
  373.         CreateIniKeyValue INI$, "Settings", "SoundFile2", MakePath(DEST$, "jobsaver\key1.wav"), cmoNone
  374.         CreateIniKeyValue INI$, "Settings", "Rate2", "50", cmoNone
  375.         CreateIniKeyValue INI$, "Settings", "SoundFile3", MakePath(DEST$, "jobsaver\beep.wav"), cmoNone
  376.         CreateIniKeyValue INI$, "Settings", "Rate3", "30", cmoNone
  377.         CreateIniKeyValue INI$, "Settings", "SoundFile4", MakePath(DEST$, "jobsaver\key2.wav"), cmoNone
  378.         CreateIniKeyValue INI$, "Settings", "Rate4", "30", cmoNone
  379.         CreateIniKeyValue INI$, "Settings", "SoundFile5", MakePath(DEST$, "jobsaver\key0.wav"), cmoNone
  380.         CreateIniKeyValue INI$, "Settings", "Rate5", "50", cmoNone
  381.         CreateIniKeyValue INI$, "Settings", "SoundFile6", MakePath(DEST$, "jobsaver\cough.wav"), cmoNone
  382.         CreateIniKeyValue INI$, "Settings", "Rate6", "10", cmoNone
  383.         CreateProgmanItem GROUP$, "Job Saver", MakePath(DEST$, "jobsaver.exe"), "", cmoOverwrite
  384.     END IF
  385.  
  386.     IF StringInList("Intruder Alert", TAPPSINST$) THEN
  387.         CreateProgmanItem GROUP$, "Intruder Alert", MakePath(DEST$, "alert.exe"), "", cmoOverwrite
  388.         INI$ = MakePath(DEST$, "ALERT.INI")
  389.         CreateIniKeyValue INI$, "Settings", "AlarmSound", MakePath(DEST$, "FUNNYSND\ALARM.wav"), cmoNone
  390.         CreateIniKeyValue WININI$, "Exclude Buttons", "Intruder Alert", "1", cmoOverwrite
  391.     END IF
  392.  
  393.     IF StringInList("Groupie", TAPPSINST$) THEN
  394.         CreateProgmanItem GROUP$, "Groupie", MakePath(DEST$, "groupie.exe"), "", cmoOverwrite
  395.         CreateProgmanItem GROUP$, "Groupie Documentation", "write.exe " + MakePath(DEST$, "groupie.wri"), "", cmoOverwrite
  396.     END IF
  397.  
  398.     END IF
  399.  
  400.     '' Perform sound file installation
  401.     IF GetListItem(CHECKSTATES$, SOUNDFILES) = "ON" THEN
  402.     IF StringInList("Star Trek Stubs", SOUNDSINST$) THEN
  403.         ''Set the StarTrek .ESF pointer variable correctly...
  404.         path$ = GetIniKeyString(MakePath(WINDIR$, "AD_PREFS.INI"), "After Dark", "Path")
  405.         IF path$ <> "" THEN
  406.         path$ = MakePath(path$, "st_res\st_snd.dll")
  407.         CreateIniKeyValue WININI$, "Sound API", "StarTrek", path$, cmoOverwrite
  408.         END IF
  409.     END IF
  410.     END IF
  411.  
  412.     '' Perform voice file installation
  413.     IF GetListItem(CHECKSTATES$, VOICEFILES) = "ON" THEN
  414.     CreateIniKeyValue WININI$, "Sound API", "MaleVoice", MakePath(DEST$, "voice3.voi"), cmoOverwrite
  415.     CreateIniKeyValue WININI$, "Sound API", "FemaleVoice", MakePath(DEST$, "voice2.voi"), cmoOverwrite
  416.     END IF
  417.  
  418.     '' Install DSOUND.DLL as the wave driver if there isn't one already, somewhere...
  419.     IF INSTDSOUND% AND EXISTS(MakePath(SYSDIR$, "DSOUND.DLL")) THEN
  420.     CreateIniKeyValue SYSINI$, "drivers", "wave", "DSOUND.DLL", cmoOverwrite
  421.     END IF
  422. END SUB
  423.  
  424.  
  425.  
  426. '' Remove all files and directories...
  427.  
  428. SUB DoUninstall STATIC
  429.     IF IDYES = DoMsgBox("Are you sure you want to remove Wired for Sound Pro from your system?", "Wired for Sound Pro", MB_YESNO) THEN
  430.     DEST$ = GetIniKeyString(WININI$, "Aristosoft", "WFS")
  431.     IF DEST$ <> "" THEN
  432.         old% = ShowWaitCursor()
  433.  
  434.         RemDirectory MakePath(DEST$, "BUTTONS")
  435.         RemDirectory MakePath(DEST$, "MISCMID")
  436.         RemDirectory MakePath(DEST$, "PHRASES")
  437.         RemDirectory MakePath(DEST$, "FUNNYSND")
  438.         RemDirectory MakePath(DEST$, "ICONSND")
  439.         RemDirectory MakePath(DEST$, "HUMANSND")
  440.         RemDirectory MakePath(DEST$, "CLSCLMID")
  441.         RemDirectory MakePath(DEST$, "JAZZMID")
  442.         RemDirectory MakePath(DEST$, "NWAGEMID")
  443.         RemDirectory MakePath(DEST$, "PLSNTMID")
  444.         RemDirectory MakePath(DEST$, "R&BMID")
  445.         RemDirectory MakePath(DEST$, "STARTREK")
  446.         RemDirectory MakePath(DEST$, "JOBSAVER")
  447.         RemDirectory DEST$
  448.  
  449.         RemoveIniSection WININI$, "Sound API", cmoNone
  450.  
  451.         SendProgmanCommand "[DeleteGroup(""Wired for Sound Pro"")]"
  452.  
  453.         '' Reset default startup and exit sounds
  454.         s$ = GetIniKeyString(WININI$, "Sounds", "OldSystemStart")
  455.         RemoveIniKey WININI$, "Sounds", "OldSystemStart", cmoNone
  456.         CreateIniKeyValue WININI$, "Sounds", "SystemStart", s$, cmoOverwrite
  457.  
  458.         s$ = GetIniKeyString(WININI$, "Sounds", "OldSystemExit")
  459.         RemoveIniKey WININI$, "Sounds", "OldSystemExit", cmoNone
  460.         CreateIniKeyValue WININI$, "Sounds", "SystemExit", s$, cmoOverwrite
  461.  
  462.         RestoreCursor old%
  463.  
  464.         i% = DoMsgBox("Wired for Sound Pro has been removed.  You can run Setup later to re-install it.", "Wired for Sound Pro", MB_OK)
  465.  
  466.         END
  467.     ELSE
  468.         i% = DoMsgBox("Wired for Sound pro is not installed or cannot be found!", "Wired for Sound Pro", MB_OK)
  469.     END IF
  470.     END IF
  471. END SUB
  472.