home *** CD-ROM | disk | FTP | other *** search
/ The Best of the Best / _.img / 01260 / tiedemo.inf < prev   
INI File  |  1993-12-05  |  28KB  |  1,041 lines

  1. ;; INSTALIT SCRIPT TEMPLATE FILE STANDARD.STF
  2. ;;  Compatible with:  INSTALIT/D/B version 3.0 and higher
  3. ;;  Incompatible with:  INSTALIT/P (uses DefineVariables), INSTALIT/W
  4. ;;  Shipped as script version 1.0
  5.  
  6. ;;  Designed for general use with products a singloffering two optional
  7. ;;  modules and possibly requiring basic changes to AUTOEXEC.BAT
  8. ;;  and/or CONFIG.SYS.  Reads a Script Data File in order to adapt
  9. ;;  to the job at hand.
  10.  
  11. DefineVariables
  12.  
  13. Logical [InstalledFlag] := NoCharacter
  14. Logical [SoundFlag] := NoCharacter
  15. Logical [DigitalFX] := NoCharacter
  16. Text [GraphicsCard]
  17. Text [CPUType]
  18. Text [MainMemory]
  19. Text [EMSVersion]
  20. Text [EMSMemory]
  21. Number [MainMemorynum]
  22. Number [EMSMemoryUsable]
  23. Text [CurrentSpeedSetting]
  24. Text [RecSpeedSetting]
  25. Text [CurrentSoundCard]
  26. Text [RecSoundCard]
  27. Number [CurrentSoundCardNum]
  28. Number [RecSoundCardNum]
  29. Number [RecMainMemory]
  30. Number [ReqMainMemory]
  31. Number [EMSMainMemRec]
  32. Number [EMSMainMemReq]
  33. Number [EMSDigitalRec]
  34. Number [EMSDigitalReq]
  35. Number [NoEMSMainMemRec]
  36. Number [NoEMSMainMemReq]
  37. Text [DriverName]
  38.  
  39. EndDefineVariables
  40.  
  41.  
  42. [EMSMainMemRec] := 530
  43. [EMSMainMemReq] := 500
  44.  
  45. [EMSDigitalRec] := 550
  46. [EMSDigitalReq] := 550
  47.  
  48. [NoEMSMainMemRec] := 588
  49. [NoEMSMainMemReq] := 558
  50.  
  51. [DriverName] := adl_w220.ims
  52.  
  53. ;;;;;;
  54. ;;
  55. ;; Begin Script
  56. ;;
  57. ;;;;;;
  58.  
  59. [InstallationDirectory] := CurrentDirectory
  60.  
  61. If TotalSpaceOnDrive [InstallFromDrive] > 4000000
  62.   [InstalledFlag] := YesCharacter
  63. else
  64.   [InstalledFlag] := NoCharacter
  65.   ChangeDirectoryTo [InstallFromDrive]:\
  66. Endif
  67.  
  68. Do SetupInstalit
  69.  
  70. ClearScreen
  71.  
  72. Do CheckSystem
  73.  
  74. :mainmenu
  75.  
  76. ClearScreen
  77.  
  78. Do ShowSystemSummary
  79.  
  80. GetMenuChoice @xy(Center,12) UseHeader "MAIN MENU"
  81.   Install TIE Fighter Demo from Floppy Disks
  82.     ;Copies the TIE Fighter demo from the floppy disks onto your
  83.     ;Hard Disk drive.
  84.   Set Sound Board Configuration
  85.     ;Allows you to select the sound board you would like to
  86.     ;use with the TIE Fighter demo program.
  87.   Set Machine Speed
  88.     ;Allows you to select the speed rating that the TIE fighter demo
  89.     ;assumes for your computer.
  90.   Read the READ.ME file
  91.     ;Allows you to read the file READ.ME which contains important
  92.     ;information about installing and playing the TIE Fighter demo.
  93.   Read the FLIGHT.HLP file
  94.     ;Allows you to read the file FLIGHT.HLP which contains instructions
  95.     ;on how to play the TIE Fighter demo.
  96.   Exit
  97.     ;Exits this program and returns to the DOS prompt.
  98. EndGetMenuChoice
  99.  
  100. InCase choice is
  101.   =1:  Do InstallXwing
  102.   =2:  Do SetSoundBoard
  103.   =3:  Do SetMachineSpeed
  104.   =4:  Do ShowReadMe
  105.   =5:  Do ShowKeys
  106.   =6:  Do ExitInstallation
  107. EndInCase
  108.  
  109. GoTo mainmenu
  110.  
  111.  
  112.  
  113. Procedure InstallXwing
  114.  
  115.   QueAllFiles
  116.  
  117.   DetermineInstallationDrive QueSize RequireFixed
  118.  
  119.   [InstallationDirectory] := InstallationDrive:\TIEDEMO
  120.  
  121.   DetermineInstallationDirectory QueSize
  122.  
  123.   OpenCopyWindow
  124.  
  125.   CopyFiles
  126.     READ.ME
  127.     FLIGHT.HLP
  128.     INSTALL.EXE
  129.     DETECT.EXE
  130.   EndCopyFiles
  131.  
  132.   CloseCopyWindow
  133.  
  134.   GetQuedFiles ShowJustOne
  135.   
  136.   If QueSize <> 0  ;; Some files were selected but not installed if <> 0
  137.     UnqueAllFiles  ;; Remove uninstalled files from que
  138.     Dialog PressAKey WhiteOnRed UseHeader "Installation Failed"
  139.       Install failed to copy all of the files necessary to
  140.       run the TIE Fighter demo.  The TIE Fighter demo will not run.
  141.     EndDialog
  142.     ForceError
  143.     SoLong
  144.   else
  145.     [InstalledFlag] := YesCharacter
  146.   Endif
  147.  
  148. EndProcedure
  149.  
  150.  
  151.  
  152. Procedure SetSoundBoard
  153.  
  154. ;;  Dialog [YesOrNo1] WhiteOnRed UseHeader "Sound Card Warning"
  155. ;;    WARNING! Manual selection of a sound card may lead to 
  156. ;;    unpredictable results.  Also, low memory conditions may
  157. ;;    cause the selection made here to be ignored.  For further
  158. ;;    information please read the file READ.ME.
  159. ;;
  160. ;;    Are you sure you want to manually select a sound card?
  161. ;;  EndDialog
  162.  
  163.   [YesOrNo1] := YesCharacter
  164.  
  165.   ClearScreen
  166.   If [YesOrNo1] = YesCharacter
  167.  
  168.     [DriverName] := adl_w220.ims
  169.     [DigitalFX] := YesCharacter
  170.  
  171.     GetMenuChoice UseHeader "SOUND CARD MENU"
  172.       AdLib and compatibles
  173.         ;Selects AdLib synthesized music and sound effects.
  174.         ;No digitized speech or sound.
  175.       Roland
  176.         ;Selects Roland synthesized music and sound effects.
  177.         ;No digitized speech or sound.
  178.       General MIDI (GMIDI)
  179.         ;Selects General MIDI synthesized music and sound effects.
  180.         ;No digitized speech or sound.
  181.       SoundBlaster
  182.         ;Selects AdLib synthesized music and sound effects,
  183.         ;with digitized speech.
  184.       SoundBlaster Pro and compatibles
  185.         ;Selects AdLib synthesized music and sound effects,
  186.         ;with digitized sound effects and speech.
  187.       Roland with SoundBlaster
  188.         ;Selects Roland synthesized music and sound effects,
  189.         ;with digitized sound effects and speech played
  190.         ;through the SoundBlaster card.
  191.       General MIDI with SoundBlaster
  192.         ;Selects General MIDI synthesized music and sound effects,
  193.         ;with digitized sound effects and speech played
  194.         ;through the SoundBlaster card.
  195.       Select I/O Port Address for SoundBlaster
  196.         ;Allows you to select an I/O port other than the default of
  197.         ;220 for your SoundBlaster or compatible.
  198.       No Sound
  199.         ;No music or sound effects.
  200.       Exit
  201.         ;Return to the Main Installation Menu.
  202.     EndGetMenuChoice
  203.     
  204.     InCase choice is
  205.       =1:  [CurrentSoundCard] := AdLib
  206.            [CurrentSoundCardNum] := 1
  207.            [SoundFlag] := YesCharacter
  208.       =2:  [CurrentSoundCard] := Roland
  209.            [CurrentSoundCardNum] := 2
  210.            [SoundFlag] := YesCharacter
  211.       =3:  [CurrentSoundCard] := GMIDI
  212.            [CurrentSoundCardNum] := 3
  213.            [SoundFlag] := YesCharacter
  214.       =4:  [CurrentSoundCard] := SoundBlaster
  215.            [CurrentSoundCardNum] := 4
  216.            [SoundFlag] := YesCharacter
  217.            [DigitalFX] := NoCharacter
  218.       =5:  [CurrentSoundCard] := SoundBlaster
  219.            [CurrentSoundCardNum] := 4
  220.            [SoundFlag] := YesCharacter
  221.       =6:  [CurrentSoundCard] := Roland with SoundBlaster
  222.            [CurrentSoundCardNum] := 5
  223.            [SoundFlag] := YesCharacter
  224.       =7:  [CurrentSoundCard] := GMIDI with SoundBlaster
  225.            [CurrentSoundCardNum] := 6
  226.            [SoundFlag] := YesCharacter
  227.       =8:  Do SelectPort
  228.       =9:  [CurrentSoundCard] := No Sound
  229.            [CurrentSoundCardNum] := 0
  230.            [SoundFlag] := YesCharacter
  231.  
  232.     EndInCase
  233.  
  234.     If [EMSMemoryUsable] <= 64
  235.       [RecMainMemory] := [NoEMSMainMemRec]
  236.       [ReqMainMemory] := [NoEMSMainMemReq]
  237.       If [MainMemorynum] < [NoEMSMainMemRec]
  238.         Do LowMemory
  239.       Endif
  240.     else
  241.       [RecMainMemory] := [EMSMainMemRec]
  242.       [ReqMainMemory] := [EMSMainMemReq]
  243.       If [MainMemorynum] < [EMSMainMemRec]
  244.         Do LowMemory
  245.       Endif
  246.       If [EMSMemoryUsable] >= 256
  247.         If [CurrentSoundCardNum] > 3
  248.           [RecMainMemory] := [EMSDigitalRec]
  249.           [ReqMainMemory] := [EMSDigitalReq]
  250.         Endif
  251.       Endif
  252.     Endif
  253.  
  254.     If [CurrentSoundCardNum] > 3
  255.       If [EMSMemoryUsable] < 256
  256.         Do NoBlasterEMS
  257.       else
  258.         If [MainMemorynum] < [EMSDigitalRec]
  259.           Do NoBlasterMain
  260.         Endif
  261.       Endif
  262.     Endif
  263.  
  264.   Endif
  265.  
  266. EndProcedure
  267.  
  268.  
  269.  
  270. Procedure SelectPort
  271.  
  272.   GetMenuChoice UseHeader "SELECT I/O PORT ADDRESS"
  273.     Default: 220
  274.       ;This is the default I/O port address.
  275.     I/O Port 210
  276.       ;Select this option if your sound card uses I/O Port 210.
  277.     I/O Port 230
  278.       ;Select this option if your sound card uses I/O Port 230.
  279.     I/O Port 240
  280.       ;Select this option if your sound card uses I/O Port 240.
  281.     I/O Port 250
  282.       ;Select this option if your sound card uses I/O Port 250.
  283.     I/O Port 260
  284.       ;Select this option if your sound card uses I/O Port 260.
  285.   EndGetMenuChoice
  286.  
  287.   InCase choice is
  288.     =1:  [DriverName] := adl_w220.ims
  289.     =2:  [DriverName] := adl_w210.ims
  290.     =3:  [DriverName] := adl_w230.ims
  291.     =4:  [DriverName] := adl_w240.ims
  292.     =5:  [DriverName] := adl_w250.ims
  293.     =6:  [DriverName] := adl_w260.ims
  294.   EndInCase
  295.  
  296.   If [InstalledFlag] = YesCharacter
  297.     ChangeDirectoryTo [InstallationDirectory]
  298.     CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  299.       [DriverName] as adlib_w.ims
  300.     EndCopyFiles
  301.   EndIf
  302.  
  303. EndProcedure
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310. Procedure SetMachineSpeed
  311.  
  312.   Dialog [YesOrNo1] WhiteOnRed UseHeader "Machine Speed Warning"
  313.     WARNING! Manual selection of Machine Speed may lead to 
  314.     unpredictable results.  Please read the file READ.ME for
  315.     more information on the correct setting for your computer.
  316.  
  317.     Are you sure you want to change your Machine Speed setting?
  318.   EndDialog
  319.  
  320.   ClearScreen
  321.   If [YesOrNo1] = YesCharacter
  322.     GetMenuChoice UseHeader "MACHINE SPEED MENU"
  323.       SLOW
  324.         ;If you have an 80386SX CPU you should use this setting.
  325.         ;Setting to MEDIUM or FAST is NOT RECOMMENDED.
  326.       MEDIUM
  327.         ;If you have an 80386 CPU this is the recommended setting.
  328.         ;Some fast 80386's (33 Mhz or higher) may do well on the
  329.         ;FAST setting.
  330.       FAST
  331.         ;If you have an 80486 CPU this is the recommended setting.
  332.       Exit
  333.         ;Return to the Main Installation Menu.
  334.     EndGetMenuChoice
  335.     
  336.     InCase choice is
  337.       =1:  [CurrentSpeedSetting] := SLOW
  338.       =2:  [CurrentSpeedSetting] := MEDIUM
  339.            if [RecSpeedSetting] = SLOW
  340.              Do SlowCPUWarning
  341.            Endif
  342.       =3:  [CurrentSpeedSetting] := FAST
  343.            if [RecSpeedSetting] = SLOW
  344.              Do SlowCPUWarning
  345.            Endif
  346.            if [RecSpeedSetting] = MEDIUM
  347.              Do SlowCPUWarning
  348.            Endif
  349.     EndInCase
  350.   Endif
  351.  
  352. EndProcedure
  353.  
  354.  
  355. Procedure SlowCPUWarning
  356.  
  357.   Dialog [YesOrNo1] WhiteOnRed UseHeader "Slow CPU Warning"
  358.     WARNING!  This speed setting is not recommended for your
  359.     computer.  The TIE Fighter demo may not be playable at
  360.     this setting, and unpredictable events may occur.
  361.  
  362.     Are you sure you want to choose this setting?
  363.   EndDialog
  364.   if [YesOrNo1] = YesCharacter
  365.   else
  366.     [CurrentSpeedSetting] := SLOW
  367.   Endif
  368.  
  369. EndProcedure
  370.  
  371.  
  372.  
  373.  
  374. Procedure ShowSystemSummary  ;; System summary - change with care.
  375.  
  376. ;;  SetShadows Off
  377.  
  378.   [String1] := [CurrentSoundCard]
  379.   [String2] := BlankString
  380.  
  381.   If [CurrentSoundCardNum] = 4
  382.     If [DigitalFX] = YesCharacter
  383.       [String1] := SoundBlaster Pro
  384.     Endif
  385.   Endif
  386.  
  387.   If [CurrentSoundCardNum] > 3
  388.     [String2] := (256K EMS required)
  389.   Endif
  390.  
  391.   SetPopupBorderTo None
  392.  
  393.   TextBox @xy(Center,3) WhiteOnGreen UseHeader "HARDWARE CONFIGURATION"
  394.     Operating System Version:  DOSVersion (3.1 or higher required)
  395.     Machine Speed Setting:     [CurrentSpeedSetting] ([RecSpeedSetting] recommended)
  396.     Graphics Card:             [GraphicsCard] (VGA or MCGA required)
  397.     Sound Card Setting:        [String1] [String2]
  398.     Main Memory Present:       [MainMemory] ([RecMainMemory]K recommended, [ReqMainMemory]K required)
  399.     EMS Memory Version:        [EMSVersion] (3.2 or higher required)
  400.     EMS Memory Available:      [EMSMemory] ([EMSMemoryUsable]K will be used)
  401.   EndTextBox
  402.  
  403.   SetPopupBorderTo Single
  404.  
  405. ;;  SetShadows On
  406.  
  407. EndProcedure
  408.  
  409.  
  410.  
  411. Procedure SenseHardware
  412.  
  413.   [RecSpeedSetting] := FAST
  414.   If 808X
  415.     [RecSpeedSetting] := SLOW
  416.   Endif
  417.   If 80286
  418.     [RecSpeedSetting] := SLOW
  419.   Endif
  420.   If 80386
  421.     [RecSpeedSetting] := MEDIUM
  422.   Endif
  423.  
  424.   [RecSoundCardNum] := 0
  425.   [RecSoundCard] := No Sound
  426.  
  427.   Run detect quietly
  428.  
  429.   If DOSErrorCode <> 0
  430.     Dialog PressAKey WhiteOnRed UseHeader "Hardware Detection Error"
  431.       Install has encountered an error while attempting to detect
  432.       the type of sound card in your system.
  433.  
  434.       Do you want to continue with installation anyway?
  435.     EndDialog
  436.   else
  437.     [Number1] := DOSExitCode
  438.     If [Number1] >= 32
  439.       [RecSpeedSetting] := FAST
  440.       [Number1] := DOSExitCode - 32
  441.     else
  442.       If [Number1] >= 16
  443.         [RecSpeedSetting] := MEDIUM
  444.         [Number1] := DOSExitCode - 16
  445.       else
  446.         [RecSpeedSetting] := SLOW
  447.       Endif
  448.     Endif
  449.  
  450.     [RecSoundCardNum] := [Number1]
  451.     If [Number1] = 0
  452.       [RecSoundCard] := No Sound
  453.     Endif
  454.     If [Number1] = 1
  455.       [RecSoundCard] := AdLib
  456.     Endif
  457.     If [Number1] = 2
  458.       [RecSoundCard] := Roland
  459.     Endif
  460.     If [Number1] = 3
  461.       [RecSoundCard] := GMIDI
  462.     Endif
  463.   Endif
  464.  
  465.   If FileExists LANDRU.CFG
  466.     ;; get settings from landru.cfg
  467.  
  468.     ExamineTextFile LANDRU.CFG
  469.  
  470.     [String1] := Line 1
  471.  
  472.     If [String1] = nosound
  473.       [RecSoundCardNum] := 0
  474.       [RecSoundCard] := No Sound
  475.       [SoundFlag] := YesCharacter
  476.     Endif
  477.     If [String1] = adlib
  478.       [RecSoundCardNum] := 1
  479.       [RecSoundCard] := AdLib
  480.       [SoundFlag] := YesCharacter
  481.     Endif
  482.     If [String1] = roland
  483.       [RecSoundCardNum] := 2
  484.       [RecSoundCard] := Roland
  485.       [SoundFlag] := YesCharacter
  486.     Endif
  487.     If [String1] = gmidi
  488.       [RecSoundCardNum] := 3
  489.       [RecSoundCard] := GMIDI
  490.       [SoundFlag] := YesCharacter
  491.     Endif
  492.     If [String1] = adlib_w
  493.       [RecSoundCardNum] := 4
  494.       [RecSoundCard] := SoundBlaster
  495.       [SoundFlag] := YesCharacter
  496.     Endif
  497.     If [String1] = roland_w
  498.       [RecSoundCardNum] := 5
  499.       [RecSoundCard] := Roland with SoundBlaster
  500.       [SoundFlag] := YesCharacter
  501.     Endif
  502.     If [String1] = gmidi_w
  503.       [RecSoundCardNum] := 6
  504.       [RecSoundCard] := GMIDI with SoundBlaster
  505.       [SoundFlag] := YesCharacter
  506.     Endif
  507.     [CurrentSpeedSetting] := Line 2
  508.  
  509.     ForgetTextFile
  510.   else
  511.     [CurrentSpeedSetting] := [RecSpeedSetting]
  512.   Endif
  513.  
  514.   if [RecSoundCardNum] <> 0
  515.     [String1] := EnvironmentStringFor BLASTER
  516.     If [String1] = BlankString
  517.     else
  518.       If [RecSoundCardNum] = 1
  519.         [RecSoundCard] := SoundBlaster
  520.         [RecSoundCardNum] := 4
  521.       Endif
  522.       If [RecSoundCardNum] = 2
  523.         [RecSoundCard] := Roland with SoundBlaster
  524.         [RecSoundCardNum] := 5
  525.       Endif
  526.       If [RecSoundCardNum] = 3
  527.         [RecSoundCard] := GMIDI with SoundBlaster
  528.         [RecSoundCardNum] := 6
  529.       Endif
  530.       [DigitalFX] := NoCharacter
  531.       [String1] := EnvironmentStringFor SOUND
  532.       If [String1] = C:\SBPRO
  533.         [DigitalFX] := YesCharacter
  534.       Endif
  535.       If [String1] = D:\SBPRO
  536.         [DigitalFX] := YesCharacter
  537.       Endif
  538.       If [String1] = E:\SBPRO
  539.         [DigitalFX] := YesCharacter
  540.       Endif
  541.       If [String1] = F:\SBPRO
  542.         [DigitalFX] := YesCharacter
  543.       Endif
  544.       If [String1] = G:\SBPRO
  545.         [DigitalFX] := YesCharacter
  546.       Endif
  547.     Endif
  548.   Endif
  549.  
  550.  
  551.   If CGA
  552.     [GraphicsCard] := CGA
  553.   Endif
  554.   If MDA
  555.     [GraphicsCard] := MDA
  556.   Endif
  557.   If EGA
  558.     [GraphicsCard] := EGA
  559.   Endif
  560.   If MCGA
  561.     [GraphicsCard] := MCGA
  562.   EndIf
  563.   If VGA
  564.     [GraphicsCard] := VGA
  565.   EndIf
  566.   If HGC
  567.     [GraphicsCard] := HGC
  568.   EndIf
  569.   If HGCPlus
  570.     [GraphicsCard] := HGC Plus
  571.   EndIf
  572.   [GraphicsCard] := VGA
  573.  
  574.   [Number1] := FreeRunMemory
  575.   [Number2] := [Number1] + 410000
  576.   [Number3] := [Number2] / 1024
  577.   [MainMemory] := [Number3]K
  578.   [MainMemorynum] := [Number3]
  579.  
  580.   If EMSVersion = 0
  581.     [EMSVersion] := None
  582.     [EMSMemory] := None
  583.   else
  584.     [EMSVersion] := EMSVersion
  585.     [Number1] := ExpandedMemoryPagesActive
  586.     [Number2] := [Number1] * 16
  587.     [EMSMemory] := [Number2]K
  588.     If EMSVersion >= 3.2
  589.       If [Number2] > 896
  590.         [EMSMemoryUsable] := 896
  591.       else
  592.         [EMSMemoryUsable] := [Number2]
  593.       Endif
  594.     else
  595.       [EMSMemoryUsable] := 0
  596.     Endif
  597.   Endif
  598.  
  599.   If [EMSMemoryUsable] <= 64
  600.     [RecMainMemory] := [NoEMSMainMemRec]
  601.     [ReqMainMemory] := [NoEMSMainMemReq]
  602.   else
  603.     [RecMainMemory] := [EMSMainMemRec]
  604.     [ReqMainMemory] := [EMSMainMemReq]
  605.     If [EMSMemoryUsable] >= 256
  606.       If [RecSoundCardNum] > 3
  607.         [RecMainMemory] := [EMSDigitalRec]
  608.         [ReqMainMemory] := [EMSDigitalReq]
  609.       Endif
  610.     Endif
  611.   Endif
  612.  
  613. EndProcedure
  614.  
  615.  
  616. Procedure CheckSystem
  617.  
  618.   Do SenseHardware
  619.  
  620.   If DOSVersion < 3.1
  621.     Dialog [YesOrNo1] WhiteOnRed UseHeader "DOS Version Error"
  622.       Install has detected that you are using a version
  623.       of DOS older than version 3.1.  The TIE Fighter demo
  624.       is not compatible with your version of DOS.
  625.  
  626.       Do you want to continue with installation anyway?
  627.     EndDialog
  628.     If [YesOrNo1] <> YesCharacter
  629.       Do ExitInstallation
  630.     Endif
  631.   Endif
  632.  
  633.   [CurrentSoundCard] := [RecSoundCard]
  634.   [CurrentSoundCardNum] := [RecSoundCardNum]
  635.  
  636.   If EMSVersion = 0
  637.     If ExtendedMemoryPresent >= 64
  638.       Do UseEMSNotice
  639.     Endif
  640.   else
  641.     If EMSVersion < 3.2
  642.       Dialog PressAKey WhiteOnRed UseHeader "EMS Version Error"
  643.         Install has detected that you are using a version
  644.         of EMS which is older than version 3.2.  The TIE 
  645.         Fighter demo cannot use your EMS memory.  Please
  646.         read the file READ.ME for more information.
  647.       EndDialog
  648.     else
  649.       If [EMSMemoryUsable] < 896
  650.         If ExtendedMemoryAvailable > 128
  651.           Do UseEMSNotice
  652.         else
  653.           If XMSMemoryAvailable > 128
  654.             Do UseEMSNotice
  655.           Endif
  656.         Endif
  657.       Endif
  658.     Endif
  659.   Endif
  660.  
  661.   If [EMSMemoryUsable] <= 64
  662.     If [MainMemorynum] < [NoEMSMainMemReq]
  663.       Do NotEnoughMemory
  664.     else
  665.       If [MainMemorynum] < [NoEMSMainMemRec]
  666.         Do LowMemory
  667.         [CurrentSoundCardNum] := 0
  668.         [RecSoundCardNum] := 0
  669.         [CurrentSoundCard] := No Sound
  670.         [RecSoundCard] := No Sound
  671.       Endif
  672.     Endif
  673.   else
  674.     If [MainMemorynum] < [EMSMainMemReq]
  675.       Do NotEnoughMemory
  676.     else
  677.       If [MainMemorynum] < [EMSMainMemRec]
  678.         Do LowMemory
  679.         [CurrentSoundCardNum] := 0
  680.         [RecSoundCardNum] := 0
  681.         [CurrentSoundCard] := No Sound
  682.         [RecSoundCard] := No Sound
  683.       Endif
  684.     Endif
  685.     If [CurrentSoundCardNum] > 3
  686.       If [EMSMemoryUsable] < 256
  687.         Do NoBlasterEMS
  688.         Do TurnOffBlaster
  689.       else
  690.         If [MainMemorynum] < [EMSDigitalRec]
  691.           Do NoBlasterMain
  692.           Do TurnOffBlaster
  693.         Endif
  694.       Endif
  695.     Endif
  696.   Endif
  697.  
  698. EndProcedure
  699.  
  700.  
  701.  
  702.  
  703. Procedure UseEMSNotice
  704.  
  705.   Dialog PressAKey WhiteOnRed UseHeader "EMS Memory Advice"
  706.     Install has detected that you have Extended Memory
  707.     available that could be configured as EMS memory.
  708.     Since the TIE Fighter demo can only use EMS, we
  709.     recommend that you configure your system to use EMS.
  710.     Please read the file READ.ME for more information.
  711.   EndDialog
  712.  
  713. EndProcedure
  714.  
  715.  
  716.  
  717. Procedure LowMemory
  718.  
  719.   If [CurrentSoundCardNum] <> 0
  720.     Dialog PressAKey WhiteOnRed UseHeader "Low Memory"
  721.       Install has detected that you have too little
  722.       memory to run the TIE Fighter demo with sound.
  723.       The program will automatically turn all sound
  724.       and music off, unless more memory is made available.
  725.     EndDialog
  726.   Endif
  727.  
  728. EndProcedure
  729.  
  730.  
  731.  
  732. Procedure NotEnoughMemory
  733.  
  734.   Dialog [YesOrNo1] WhiteOnRed UseHeader "Not Enough Memory"
  735.     Install has detected that you do not have enough
  736.     memory available to run the TIE Fighter demo.
  737.     Please read the file READ.ME for information on
  738.     how to make more memory available.
  739.     The demo will not run without more memory available.
  740.  
  741.     Do you want to continue with installation anyway?
  742.   EndDialog
  743.   If [YesOrNo1] <> YesCharacter
  744.     Do ExitInstallation
  745.   Endif
  746.  
  747. EndProcedure
  748.  
  749.  
  750.  
  751.  
  752. Procedure NoBlasterEMS
  753.  
  754.   Dialog PressAKey WhiteOnRed UseHeader "Not Enough EMS for SoundBlaster"
  755.     Install has detected that you have too little EMS memory to
  756.     run the TIE Fighter demo with digitized sound.  The program
  757.     will automatically turn all digitized sound and speech off,
  758.     unless more EMS memory is made available.
  759.   EndDialog
  760.  
  761. EndProcedure
  762.  
  763.  
  764.  
  765.  
  766. Procedure NoBlasterMain
  767.  
  768.   Dialog PressAKey WhiteOnRed UseHeader "Not Enough Main Memory for SoundBlaster"
  769.     Install has detected that you have too little Main memory to
  770.     run the TIE Fighter demo with digitized sound.  The program
  771.     will automatically turn all digitized sound and speech off,
  772.     unless more Main memory is made available.
  773.   EndDialog
  774.  
  775. EndProcedure
  776.  
  777.  
  778.  
  779.  
  780.  
  781. Procedure TurnOffBlaster
  782.  
  783.   if [CurrentSoundCardNum] = 4
  784.     [CurrentSoundCardNum] := 1
  785.     [RecSoundCardNum] := 1
  786.     [CurrentSoundCard] := AdLib
  787.     [RecSoundCard] := AdLib
  788.   Endif
  789.   if [CurrentSoundCardNum] = 5
  790.     [CurrentSoundCardNum] := 2
  791.     [RecSoundCardNum] := 2
  792.     [CurrentSoundCard] := Roland
  793.     [RecSoundCard] := Roland
  794.   Endif
  795.   if [CurrentSoundCardNum] = 6
  796.     [CurrentSoundCardNum] := 3
  797.     [RecSoundCardNum] := 3
  798.     [CurrentSoundCard] := GMIDI
  799.     [RecSoundCard] := GMIDI
  800.   Endif
  801.  
  802. EndProcedure
  803.  
  804.  
  805.  
  806. Procedure ExitInstallation
  807.  
  808.   ClearScreen
  809.  
  810.   [YesOrNo1] := YesCharacter
  811.  
  812.   If [CurrentSoundCardNum] = 0
  813.     If [SoundFlag] = NoCharacter
  814.       Dialog [YesOrNo1] WhiteOnRed UseHeader "Sound Card Selection Warning"
  815.         Install has not been able to detect a Sound Card in your
  816.         computer system.  If you have a Sound Card, you should
  817.         select it by choosing 'Set Sound Card' from the MAIN MENU.
  818.         If you have a Sound Card, and you do not select it, you
  819.         will not hear any music or sound effects.  Please see
  820.         the file READ.ME for more information.
  821.  
  822.         Are you sure you want to exit without setting a sound card?
  823.       EndDialog
  824.     Endif
  825.   Endif
  826.  
  827.   if [YesOrNo1] = YesCharacter
  828.     Dialog [YesOrNo1] ;; Ask whether to browse readme file, if any
  829.       The file READ.ME contains important information.
  830.  
  831.       Do you wish to read it now?
  832.     EndDialog
  833.     If [YesOrNo1] = YesCharacter
  834.       Do ShowReadMe
  835.     EndIf
  836.  
  837.     Dialog [YesOrNo1] ;; Ask whether to browse readme file, if any
  838.       The file FLIGHT.HLP contains instructions on how to play
  839.       the TIE Fighter demo.
  840.  
  841.       Do you wish to read it now?
  842.     EndDialog
  843.     If [YesOrNo1] = YesCharacter
  844.       Do ShowKeys
  845.     EndIf
  846.  
  847.     If [InstalledFlag] = YesCharacter
  848.  
  849.       ChangeDirectoryTo [InstallationDirectory]
  850.  
  851.       If [CurrentSoundCardNum] = 0
  852.         [String1] := nosound
  853.       Endif
  854.       If [CurrentSoundCardNum] = 1
  855.         [String1] := adlib
  856.       Endif
  857.       If [CurrentSoundCardNum] = 2
  858.         [String1] := roland
  859.       Endif
  860.       If [CurrentSoundCardNum] = 3
  861.         [String1] := gmidi
  862.       Endif
  863.       If [CurrentSoundCardNum] = 4
  864.         [String1] := adlib_w
  865.         CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  866.           [DriverName] as adlib_w.ims
  867.         EndCopyFiles
  868.       Endif
  869.       If [CurrentSoundCardNum] = 5
  870.         [String1] := roland_w
  871.       Endif
  872.       If [CurrentSoundCardNum] = 6
  873.         [String1] := gmidi_w
  874.       Endif
  875.  
  876.  
  877. ;;      If [CurrentSpeedSetting] = SLOW
  878. ;;        [String2] := slow
  879. ;;      Endif
  880. ;;      If [CurrentSpeedSetting] = MEDIUM
  881. ;;        [String2] := medium
  882. ;;      Endif
  883. ;;      If [CurrentSpeedSetting] = FAST
  884. ;;        [String2] := fast
  885. ;;      Endif
  886.  
  887.       CreateFile [InstallationDirectory]\LANDRU.CFG
  888.  
  889.       AppendFile [InstallationDirectory]\LANDRU.CFG
  890.         [String1]
  891.         [CurrentSpeedSetting]
  892.         ems
  893.         diff
  894.       EndAppendFile
  895.  
  896.       If FileExists OPTIONS.CFG
  897.       else
  898.         If [CurrentSpeedSetting] = SLOW
  899.           If [DigitalFX] = YesCharacter
  900.             CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  901.               SLOWYES.CFG as OPTIONS.CFG
  902.             EndCopyFiles
  903.           else
  904.             CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  905.               SLOWNO.CFG as OPTIONS.CFG
  906.             EndCopyFiles
  907.           Endif
  908.         Endif
  909.         If [CurrentSpeedSetting] = MEDIUM
  910.           If [DigitalFX] = YesCharacter
  911.             CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  912.               MEDYES.CFG as OPTIONS.CFG
  913.             EndCopyFiles
  914.           else
  915.             CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  916.               MEDNO.CFG as OPTIONS.CFG
  917.             EndCopyFiles
  918.           Endif
  919.         Endif
  920.         If [CurrentSpeedSetting] = FAST
  921.           If [DigitalFX] = YesCharacter
  922.             CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  923.               FASTYES.CFG as OPTIONS.CFG
  924.             EndCopyFiles
  925.           else
  926.             CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
  927.               FASTNO.CFG as OPTIONS.CFG
  928.             EndCopyFiles
  929.           Endif
  930.         Endif
  931.       Endif
  932.  
  933.       SetExitMessageTo     "Installation complete!  Enter TIEDEMO to play the demo."
  934.     else
  935.       SetExitMessageTo     "The TIE Fighter demo has not been installed.  For help, call (415) 721-3333."
  936.     Endif
  937.  
  938.     SoLong
  939.   Endif
  940.  
  941. EndProcedure
  942.  
  943.  
  944. Procedure ShowReadMe
  945.  
  946.   if [InstalledFlag] = YesCharacter
  947.     If FileExists [InstallationDirectory]\READ.ME
  948.       SetShadows Off
  949.       ClearScreen
  950.       BrowseFile [InstallationDirectory]\READ.ME WhiteOnBlue
  951.       SetShadows On
  952.     else 
  953.       If FileExists READ.ME
  954.         SetShadows Off
  955.         ClearScreen
  956.         BrowseFile READ.ME WhiteOnBlue
  957.         SetShadows On
  958.       else
  959.         Popup Failed to find file READ.ME. Insert Disk 1 and try again.
  960.       Endif
  961.     Endif
  962.   else
  963.     If FileExists READ.ME
  964.       SetShadows Off
  965.       ClearScreen
  966.       BrowseFile READ.ME WhiteOnBlue
  967.       SetShadows On
  968.     else
  969.       If FileExists [InstallFromDrive]:\READ.ME
  970.         SetShadows Off
  971.         ClearScreen
  972.         BrowseFile [InstallFromDrive]:\READ.ME WhiteOnBlue
  973.         SetShadows On
  974.       EndIf
  975.     EndIf
  976.   EndIf
  977.  
  978. EndProcedure
  979.  
  980.  
  981. Procedure ShowKeys
  982.  
  983.   if [InstalledFlag] = YesCharacter
  984.     If FileExists [InstallationDirectory]\FLIGHT.HLP
  985.       SetShadows Off
  986.       ClearScreen
  987.       BrowseFile [InstallationDirectory]\FLIGHT.HLP WhiteOnBlue
  988.       SetShadows On
  989.     else 
  990.       If FileExists FLIGHT.HLP
  991.         SetShadows Off
  992.         ClearScreen
  993.         BrowseFile FLIGHT.HLP WhiteOnBlue
  994.         SetShadows On
  995.       else
  996.         Popup Failed to find file FLIGHT.HLP. Insert Disk 1 and try again.
  997.       Endif
  998.     Endif
  999.   else
  1000.     If FileExists FLIGHT.HLP
  1001.       SetShadows Off
  1002.       ClearScreen
  1003.       BrowseFile FLIGHT.HLP WhiteOnBlue
  1004.       SetShadows On
  1005.     else
  1006.       If FileExists [InstallFromDrive]:\FLIGHT.HLP
  1007.         SetShadows Off
  1008.         ClearScreen
  1009.         BrowseFile [InstallFromDrive]:\FLIGHT.HLP WhiteOnBlue
  1010.         SetShadows On
  1011.       EndIf
  1012.     EndIf
  1013.   EndIf
  1014.  
  1015. EndProcedure
  1016.  
  1017.  
  1018.  
  1019. Procedure SetupInstalit
  1020.   SetScreenAttrTo     LightGrayOnBlack
  1021.   SetBackgroundCharTo   B1
  1022.   SetShadows         On
  1023.   SetMainBorderTo     None
  1024.   SetPopupBorderTo     Single
  1025.   SetShadowAttrTo     DarkGrayOnBlack
  1026.   SetPopupAttrTo     WhiteOnBlue
  1027.   SetTopLineAttrTo     WhiteOnDarkGray
  1028.   SetBottomLineAttrTo     WhiteOnDarkGray
  1029.   SetBottomLineTo    "                                Press <Ctrl-X> to Exit                             "
  1030.   SetTopLineTo         "                  TIE Fighter Demonstration Installation Program                   "
  1031.   SetCheckmarks        Off
  1032.   SetAllowExit         On
  1033.   SetSupportInformation
  1034.     If you need assistance, please call LucasArts Product
  1035.     Support at (415) 721-3333, Monday through Friday,
  1036.     9:00 A.M. to 5:00 P.M. Pacific Standard Time.
  1037.   EndSetSupportInformation
  1038. EndProcedure
  1039.  
  1040. 
  1041.