home *** CD-ROM | disk | FTP | other *** search
/ CD Mania - The Perfect Multimedia Fun Pak! / cdmania.iso / specific.inc < prev    next >
Text File  |  1997-07-09  |  20KB  |  531 lines

  1. ''
  2. '' CD Mania 95 specific install functions
  3. '' Copyright (c) 1990-1997 PCSoftInc  
  4. ''
  5.  
  6. DECLARE FUNCTION VflatdPresent LIB "iniupd.DLL" AS INTEGER
  7.  
  8. '' Set up product-specific titles, etc.
  9. SUB SetProductTitles STATIC
  10.     SetTitle "CD Mania"
  11.     WFSAPP$ = "CD Mania Event Hook"
  12. END SUB
  13.  
  14.  
  15. FUNCTION InfFile() STATIC AS STRING
  16.     InfFile = "WFS.INF"
  17. END FUNCTION
  18.  
  19.  
  20. FUNCTION MakeInstDir(D$) STATIC AS STRING
  21.  
  22.     '' If we're lucky, this will tell us where we're located
  23.     S$ = GetIniKeyString(WININI$, "PCSoftinc ", "WFS")
  24.  
  25.     '' If that didn't work, then try this for 2.02
  26.     IF S$ = "" THEN
  27.     S$ = GetIniKeyString(WININI$, "Sound API", "MaleVoice")
  28.     S$ = mid$(S$, 1, len(S$) - len("\VOICE3.VOI"))
  29.     END IF
  30.  
  31.     '' If that didn't work, then we'll punt with the default
  32.     IF S$ = "" THEN
  33.     S$ = D$ + ":\CDMANIA"
  34.     END IF
  35.  
  36.     '' WFSOUND.INF must be in any installed WFS product
  37.     IF EXISTS(MakePath(S$, "WFSOUND.INF")) THEN
  38.     r% = DoMsgBox("An installed copy of Wired for Sound or CD Mania was found in " + S$+ ".  Setup recommends installing this program in the same location.", "CD Mania", MB_OK)
  39.     END IF
  40.  
  41.     MakeInstDir = S$
  42. END FUNCTION
  43.  
  44.  
  45. SUB AddInfSectionNames(BASE$, TAPPS$, SOUNDS$, VOICES$, BASEINST$, TAPPSINST$, SOUNDSINST$, VOICESINST$) STATIC
  46.  
  47.     '' These are the base files we can install
  48.     AddListItem BASE$, "Base Files"
  49.     IF GetWindowsVersionCorrectly >= MakeVer(3,95) THEN
  50.         AddListItem BASE$, "Base Files 32"
  51.     ENDIF
  52.     SetSymbolValue BASEINST$, GetSymbolValue(BASE$)
  53.  
  54.     '' These are the Talking Apps we can install
  55.     AddListItem TAPPS$, "CD Browser"
  56.     AddListItem TAPPS$, "Cursor Changer"
  57.     AddListItem TAPPS$, "MediaScape Changer"
  58.     AddListItem TAPPS$, "Multimedia Jukebox"
  59.     AddListItem TAPPS$, "Multimedia Screen Saver"
  60.     AddListItem TAPPS$, "Talking Clock"
  61.     AddListItem TAPPS$, "Talking Minesweeper"
  62.     AddListItem TAPPS$, "Talking Solitaire"
  63.     AddListItem TAPPS$, "Wallpaper Changer"
  64.  
  65.     '' By default, we install all Talking Apps
  66.     SetSymbolValue TAPPSINST$, GetSymbolValue(TAPPS$)
  67.  
  68.     '' These are obsolete for Windows 95
  69.     AddListItem TAPPS$, "Icon Changer"
  70.     IF GetWindowsVersionCorrectly < MakeVer(3,95) THEN
  71.         AddListItem TAPPSINST$, "Icon Changer"
  72.     ENDIF
  73.  
  74.     '' These are the sounds we can install
  75.     AddListItem SOUNDS$, "Button Sounds"
  76.     AddListItem SOUNDS$, "Funny Sounds"
  77.     AddListItem SOUNDS$, "Human Sounds"
  78.     AddListItem SOUNDS$, "Icon Sounds"
  79.     AddListItem SOUNDS$, "Phrase Sounds"
  80.  
  81.     '' By default, we install all the above
  82.     SetSymbolValue SOUNDSINST$, GetSymbolValue(SOUNDS$)
  83.  
  84.     '' Only include this file if we can find the Star Trek DLL
  85.     st$ = GetIniKeyString(MakePath(WINDIR$, "AD_PREFS.INI"), "After Dark", "Path")
  86.     IF EXISTS(MakePath(st$, "st_res\st_snd.dll")) THEN
  87.     AddListItem SOUNDSINST$, "Star Trek Stubs"
  88.     END IF
  89.  
  90.     '' ...but it's always an option
  91.     AddListItem SOUNDS$, "Star Trek Stubs"
  92.  
  93.     '' The user probably doesn't want all these on the HD by default
  94.     AddListItem SOUNDS$, "Video Samples"
  95.     AddListItem SOUNDS$, "Patterns"
  96.     AddListItem SOUNDS$, "Animal Sounds"
  97.     AddListItem SOUNDS$, "Cartoon Sounds"
  98.     AddListItem SOUNDS$, "Destructive Sounds"
  99.     AddListItem SOUNDS$, "Drums and Cymbals"
  100.     AddListItem SOUNDS$, "Equipment Sounds"
  101.     AddListItem SOUNDS$, "Job Saver Sounds"
  102.     AddListItem SOUNDS$, "Musical Sounds"
  103.     AddListItem SOUNDS$, "People Sounds"
  104.     AddListItem SOUNDS$, "Popping Sounds"
  105.     AddListItem SOUNDS$, "Illness Sounds"
  106.     AddListItem SOUNDS$, "Impact Sounds"
  107.     AddListItem SOUNDS$, "Ringing Sounds"
  108.     AddListItem SOUNDS$, "Ripping and Tearing"
  109.     AddListItem SOUNDS$, "Nuts & Bolts"
  110.     AddListItem SOUNDS$, "Sports Sounds"
  111.     AddListItem SOUNDS$, "Word Sounds"
  112.     AddListItem SOUNDS$, "Misc. Sounds"
  113.     AddListItem SOUNDS$, "Classical MIDI"
  114.     AddListItem SOUNDS$, "Jazz MIDI"
  115.     AddListItem SOUNDS$, "Misc. MIDI"
  116.     AddListItem SOUNDS$, "New Age MIDI"
  117.     AddListItem SOUNDS$, "Pleasant MIDI"
  118.     AddListItem SOUNDS$, "R & B MIDI"
  119.     AddListItem SOUNDS$, "Bach MIDI"
  120.     AddListItem SOUNDS$, "Beethoven MIDI"
  121.     AddListItem SOUNDS$, "Handel MIDI"
  122.     AddListItem SOUNDS$, "Long Classical MIDI"
  123.     AddListItem SOUNDS$, "Mozart MIDI"
  124.     AddListItem SOUNDS$, "Tchaikovsky MIDI"
  125.     AddListItem SOUNDS$, "Vivaldi MIDI"
  126.  
  127.     '' We can install all these voices and faces
  128.     AddListItem VOICES$, "Make-Your-Own Voice"
  129.  
  130.     AddListItem VOICES$, "Talking H. Simmons Face (compressed)"
  131.     AddListItem VOICES$, "Talking H. Simmons Voice (compressed)"
  132.  
  133.     '' By default, we install all the above
  134.     SetSymbolValue VOICESINST$, GetSymbolValue(VOICES$)
  135.  
  136.     AddListItem VOICES$, "Female Voice (compressed)"
  137.     AddListItem VOICES$, "Sultry Female Face"
  138.     AddListItem VOICES$, "Sultry Female Face (compressed)"
  139.     AddListItem VOICES$, "Sultry Female Voice (compressed)"
  140.  
  141.     AddListItem VOICES$, "Talking H. Simmons Face"
  142.  
  143. END SUB
  144.  
  145.  
  146. SUB RecalcPath STATIC
  147.     CursorSave% = ShowWaitCursor()
  148.     RecalcOptFiles BASEFILES
  149.     RecalcOptFiles SOUNDFILES
  150.     RecalcOptFiles TAPPFILES
  151.     RecalcOptFiles VOICEFILES
  152.     RestoreCursor CursorSave%
  153. END SUB
  154.  
  155.  
  156. SUB AddOptFiles STATIC
  157.     AddOptFilesToCopyList BASEFILES
  158.     AddOptFilesToCopyList TAPPFILES
  159.     AddOptFilesToCopyList SOUNDFILES
  160.     AddOptFilesToCopyList VOICEFILES
  161. END SUB
  162.  
  163.  
  164. SUB AddOptFilesToCopyList (ftype%) STATIC
  165.  
  166.     IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
  167.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  168.     IF ftype% = BASEFILES THEN
  169.         ''Base files
  170.         l% = GetListLength(BASEINST$)
  171.         FOR i% = 1 TO l% STEP 1
  172.         AddSectionFilesToCopyList GetListItem(BASEINST$, i%), MakePath(SrcDir$, "WFS"), DEST$
  173.         NEXT i%
  174.  
  175.         '' Install default voices and faces
  176.         AddSectionFilesToCopyList "Null Face", SrcDir$, DEST$
  177.             AddSectionFilesToCopyList "Read Me", SrcDir$, DEST$
  178.  
  179.         '' Install Video for Windows runtime
  180.         AddSectionFilesToCopyList "VfW Runtime", MakePath(SrcDir$, "WFS\VFW"), SYSDIR$
  181.         AddSectionFilesToCopyList "OLE2", MakePath(SrcDir$, "WFS\VFW"), SYSDIR$
  182.         AddSectionFilesToCopyList "ACM Drivers", MakePath(SrcDir$, "WFS\VFW"), SYSDIR$
  183.         AddSectionFilesToCopyList "MPlayer", MakePath(SrcDir$, "WFS\VFW"), WINDIR$
  184.         AddSectionFilesToCopyList "AVICodecs", MakePath(SrcDir$, "WFS\VFW"), SYSDIR$
  185.         AddSectionFilesToCopyList "Indeo-ini", MakePath(SrcDir$, "WFS\VFW"), WINDIR$
  186.  
  187.         IF INSTDSOUND% OR EXISTS(MakePath(SYSDIR$, "DSOUND.DLL")) THEN
  188.         AddSpecialFileToCopyList "DSOUND Files", "DSOUND", SrcDir$, MakePath(SYSDIR$, "DSOUND.DLL")
  189.         AddSpecialFileToCopyList "DSOUND Files", "DSCPL", SrcDir$, MakePath(SYSDIR$, "DSCPL.CPL")
  190.         END IF
  191.  
  192.     ELSEIF ftype% = TAPPFILES THEN
  193.         l% = GetListLength(TAPPSINST$)
  194.         FOR i% = 1 TO l% STEP 1
  195.         s$ = GetListItem(TAPPSINST$, i%)
  196.  
  197.         SELECT CASE s$
  198.                     CASE "Cursor Changer"
  199.                         IF GetWindowsVersionCorrectly() < MakeVer(3,95) THEN
  200.                             AddSectionFilesToCopyList "Cursor Changer", MakePath(SrcDir$, "WFS"), DEST$
  201.                         ELSE
  202.                             AddSectionFilesToCopyList "Cursor Changer 32", MakePath(SrcDir$, "WFS"), DEST$
  203.                         ENDIF
  204.                         AddSectionFilesToCopyList "Cursor Changer Help", MakePath(SrcDir$, "WFS"), DEST$
  205.                     CASE ELSE
  206.             AddSectionFilesToCopyList s$, MakePath(SrcDir$, "WFS"), DEST$
  207.         END SELECT
  208.         NEXT i%
  209.  
  210.         IF StringInList("Jukebox", TAPPSINST$) THEN
  211.         AddSpecialFileToCopyList "System Files", "MMSSSCR", MakePath(SrcDir$, "WFS"), MakePath(WINDIR$, "MMSSSCR.SCR")
  212.         END IF
  213.  
  214.         ELSEIF ftype% = SOUNDFILES THEN
  215.         l% = GetListLength(SOUNDSINST$)
  216.         FOR i% = 1 TO l% STEP 1
  217.         AddSectionFilesToCopyList GetListItem(SOUNDSINST$, i%), SrcDir$, DEST$
  218.         NEXT i%
  219.  
  220.     ELSEIF ftype% = VOICEFILES THEN
  221.         l% = GetListLength(VOICESINST$)
  222.         FOR i% = 1 TO l% STEP 1
  223.         AddSectionFilesToCopyList GetListItem(VOICESINST$, i%), SrcDir$, DEST$
  224.         NEXT i%
  225.     END IF
  226.     SrcDi