home *** CD-ROM | disk | FTP | other *** search
/ Time Riders in American History / TR_AMAZ.BIN / tr / strip.inf < prev    next >
INI File  |  1996-06-03  |  41KB  |  1,579 lines

  1. DefineVariables
  2. Text [ProgramName] := Time Riders
  3. Text [VersionNumber] := Version 1.0
  4. Text [ProgramExecutable] := TR.EXE
  5. Text [ShortCommandLine] := TR
  6. Text [BatchFileName] := TR.BAT
  7. Text [IconFileName] := TR.ICO
  8. Text [PifFilename] := TR.PIF
  9. Text [ProgramStart] := TR
  10. Directory [DefaultDirectory] := \TLC\TR
  11. Number [RequiredRAM]  := 563200
  12. Logical [MouseRequired] := N
  13. Number [HardDiskSpaceNeeded] := 2740000
  14. Text [RequiredDosVersion] := version 3.0
  15. Text [OtherProducts] := Student Writing Center     Operation Neptune     Ancient Empires
  16. Logical [SoundBlasterSupported] := Y
  17. Logical [AdLibSupported] := Y
  18. Logical [RolandSupported] := Y
  19. Logical [MicrosoftSoundSupported] := N
  20. Logical [Tandy1000Supported] := Y
  21. Logical [PS1Supported] := N
  22. Logical [NoSoundSupported] := N
  23. Text [SoundBlasterSwitch] := -SA
  24. Text [AdLibSwitch] := -SA
  25. Text [RolandSwitch] := -SR
  26. Text [MicrosoftSoundSwitch] := -SA
  27. Text [Tandy1000Switch] := -ST
  28. Text [PS1Switch] := -ST
  29. Text [PCSpeakerSwitch] := -SI
  30. Text [NoSoundSwitch] := -SI
  31. Logical [CGASupported]  := N
  32. Logical [MCGASupported] := Y
  33. Logical [EGASupported]  := Y
  34. Logical [TGASupported]  := Y
  35. Logical [VGASupported]  := Y
  36. Text [CGASwitch] := -V
  37. Text [MCGASwitch] := -M
  38. Text [TGASwitch] := -T
  39. Text [EGASwitch] := -E
  40. Text [VGASwitch] := -V
  41. Logical [Demo] := N                     
  42. Logical [ForceHardDisk] := N           
  43. Logical [HardDiskInstall] := Y         
  44. Number [N]                      
  45. Number [MenuItemToHighlight]
  46. Directory [ExistingCopyPath]
  47. Directory [SourceDirectory]
  48. Number [ButtonWidth]
  49. Number [ButtonHeight]
  50. Number [DlgReturn]
  51. Text [InstallerName]
  52. Logical [RamChecked] := N
  53. Logical [DosChecked] := N
  54. Logical [MouseChecked] := N
  55. Logical [SoundChecked] := N
  56. Logical [VideoChecked] := N
  57. Logical [DrivesChecked] := N
  58. TextArray [Array1] 
  59. Number [SOUNDCHKcode] := 0
  60. Text [DetectedSoundCard] := BlankString
  61. Text [SoundCard] := BlankString
  62. Text [SoundSwitch]
  63. Text [VoiceSwitch]
  64. Number [NumSoundOptions]
  65. TextArray [Array2] 
  66. Number [VIDEOCHKcode] := 0
  67. Text [DetectedVideoCard] := BlankString
  68. Text [VideoCard] := BlankString
  69. Text [VideoSwitch]
  70. Number [NumVideoOptions]
  71. TextArray [Array3] 
  72. TextArray [Array4] 
  73. Number [VideoCardIndex] := 4    
  74. Logical [ValidDrive]
  75. Text [Drive]
  76. Number [NumDrives]
  77. Logical [Test]
  78. Text [TargetDrive]
  79. Text [CurrentFile]
  80. Text [CurrentDiskName]
  81. Text [ProgramCommandLine] 
  82. Logical [ConfirmCancel] := N   
  83. Logical [Continue]
  84. Number [FreeDiskSpace]
  85. Number [AdditionalSpace]
  86. Number [FreeRam]
  87. Number [AvailableRAM]
  88. Number [AdditionalRAM]
  89. Logical [NotEnoughDiskSpace]
  90. Number [PercentComplete]
  91. Number [OldNumSolidBlocks] := 1
  92. Number [NumSolidBlocks] := 0
  93. Text [SolidBar] := BlankString
  94. Text [StatusBar] := BlankString
  95. Number [SizeOfCopiedFiles]
  96. Number [TopY]
  97. Number [BottomY]
  98. Number [LeftX]
  99. Number [RightX]
  100. Number [BarTopY]
  101. Number [BarBottomY]
  102. Number [BarLeftX]
  103. Number [BarRightX]
  104. Text [CompanyName] := The Learning Company
  105. Text [LogoFilename] := TLC.BMP
  106. Text [Indent] := "      "
  107. Number [SizeOfInstall] := 479000
  108. Number [NoSoundCard] := 1
  109. Number [SoundBlaster] := 3
  110. Number [AdLib] := 3
  111. Number [Roland] := 4
  112. Number [MicrosoftSound] := 3
  113. Number [Tandy1000] := 2
  114. Number [PS1SoundChip] := 2
  115. Text [PCSpeakerString] := no supported sound card.
  116. Text [SoundBlasterString] := a SoundBlaster-compatible sound card.
  117. Text [AdLibString] := an AdLib-compatible sound card.
  118. Text [RolandString] := a Roland sound card.
  119. Text [MicrosoftSoundString] := a Microsoft Sound System.
  120. Text [Tandy1000String] := a Tandy 1000 sound system.
  121. Text [PS1String] := a PS/1 Sound Chip.
  122. Text [NoSoundMenu] := Turn Sound Off
  123. Text [PCSpeakerMenu] := Internal Speaker
  124. Text [SoundBlasterMenu] := SoundBlaster
  125. Text [AdLibMenu] := AdLib
  126. Text [RolandMenu] := Roland
  127. Text [MicrosoftSoundMenu] := Microsoft Sound System
  128. Text [Tandy1000Menu] := Tandy 1000 sound system
  129. Text [PS1Menu] := PS/1 sound chip
  130. Number [CGA]  := 1
  131. Number [MCGA] := 3
  132. Number [EGA]  := 2
  133. Number [TGA]  := 5
  134. Number [VGA]  := 4
  135. Text [CGAString]  := a CGA display card.
  136. Text [MCGAString] := an MCGA display card.
  137. Text [EGAString]  := an EGA display card.
  138. Text [TGAString]  := a Tandy Graphics Adapter.
  139. Text [VGAString]  := a VGA display card.
  140. Text [CGAMenu]  := CGA graphics (4 colors)
  141. Text [MCGAMenu] := MCGA graphics (256 colors)
  142. Text [EGAMenu]  := EGA graphics (16 colors)
  143. Text [TGAMenu]  := Tandy 1000 graphics (16 colors)
  144. Text [VGAMenu]  := VGA graphics (256 colors)
  145. EndDefineVariables
  146. ClearScreen
  147. Do Initialize
  148. Do WelcomeScreen
  149. :LoopMainMenu
  150. Do MainMenu
  151. SoLong
  152. Procedure AddProgramToGroup
  153. BuildProgramGroup "The Learning Company" THELEARN.GRP
  154. [InstallationDirectory]\[PIFFilename] "[ProgramName]" [InstallationDirectory]\[IconFileName] 1 [InstallationDirectory]
  155. EndBuildProgramGroup
  156. EndProcedure
  157. Procedure BlankBottomLine
  158. If .NOT. Windows
  159. SetBottomLineTo "                                                                                "
  160. EndIf
  161. EndProcedure
  162. Procedure BuildCommandLine
  163. Do SetVideoSwitch
  164. Do SetSoundSwitch
  165. [ProgramCommandLine] := [ProgramExecutable] [SoundSwitch] [VideoSwitch] [VoiceSwitch] %1 %2
  166. EndProcedure
  167. Procedure BuildSoundCardList
  168. [NumSoundOptions] := 1
  169. [Array2][1] := [PCSpeakerMenu]
  170. If [SoundBlasterSupported]
  171. IncrementNumber [NumSoundOptions]
  172. [Array2][[NumSoundOptions]] := [SoundBlasterMenu]
  173. EndIf
  174. If [AdLibSupported]
  175. IncrementNumber [NumSoundOptions]
  176. [Array2][[NumSoundOptions]] := [AdLibMenu]
  177. EndIf
  178. If [RolandSupported]
  179. IncrementNumber [NumSoundOptions]
  180. [Array2][[NumSoundOptions]] := [RolandMenu]
  181. EndIf
  182. If [MicrosoftSoundSupported]
  183. IncrementNumber [NumSoundOptions]
  184. [Array2][[NumSoundOptions]] := [MicrosoftSoundMenu]
  185. EndIf
  186. If [Tandy1000Supported]
  187. IncrementNumber [NumSoundOptions]
  188. [Array2][[NumSoundOptions]] := [Tandy1000Menu]
  189. EndIf
  190. If [PS1Supported]
  191. IncrementNumber [NumSoundOptions]
  192. [Array2][[NumSoundOptions]] := [PS1Menu]
  193. EndIf
  194. If [NoSoundSupported]
  195. IncrementNumber [NumSoundOptions]
  196. [Array2][[NumSoundOptions]] := [NoSoundMenu]
  197. EndIf
  198. EndProcedure
  199. Procedure BuildVideoCardList
  200. [NumVideoOptions] := 0
  201. If [VGASupported]
  202. IncrementNumber [NumVideoOptions]
  203. [Array3][[NumVideoOptions]] := [VGAMenu]
  204. [Array4][[NumVideoOptions]] := [VGA]
  205. EndIf
  206. If [EGASupported]
  207. IncrementNumber [NumVideoOptions]
  208. [Array3][[NumVideoOptions]] := [EGAMenu]
  209. [Array4][[NumVideoOptions]] := [EGA]
  210. EndIf
  211. If Windows
  212. Else
  213. If [TGASupported]
  214. IncrementNumber [NumVideoOptions]
  215. [Array3][[NumVideoOptions]] := [TGAMenu]
  216. [Array4][[NumVideoOptions]] := [TGA]
  217. EndIf
  218. If [MCGASupported]
  219. IncrementNumber [NumVideoOptions]
  220. [Array3][[NumVideoOptions]] := [MCGAMenu]
  221. [Array4][[NumVideoOptions]] := [MCGA]
  222. EndIf
  223. If [CGASupported]
  224. IncrementNumber [NumVideoOptions]
  225. [Array3][[NumVideoOptions]] := [CGAMenu]
  226. [Array4][[NumVideoOptions]] := [CGA]
  227. EndIf
  228. EndIf 
  229. EndProcedure
  230. Procedure CancelInstall
  231. If Windows
  232. Exit
  233. EndIf
  234. Dialog [ConfirmCancel] WhiteOnRed
  235. Do you really want to cancel the installation?
  236. EndDialog
  237. If [ConfirmCancel] = Y
  238. SoLong
  239. EndIf
  240. EndProcedure
  241. Procedure ChangeSettings
  242. Do GetDriveList
  243. Do FindExistingCopy
  244. Do ConfirmSoundCard
  245. Do ConfirmVideoCard
  246. Do BuildCommandLine
  247. TextBox @xy(Center,Center) BlueOnWhite
  248. Saving new settings...
  249. EndTextBox
  250. Do ModifyBatchFile
  251. ClearScreen
  252. Dialog PressAKey WhiteOnBlue UseHeader " Settings Saved "
  253. Your new settings have been saved.
  254. EndDialog
  255. SetCompletionStatusTo Finished  
  256. ClearScreen
  257. EndProcedure
  258. Procedure CheckDOS
  259. If [DosChecked]
  260. Exit
  261. EndIf
  262. [DosChecked] := Y       
  263. [String1] := version of DOS.
  264. If Windows
  265. [String1] := "[String1]               "
  266. Else
  267. EndIf
  268. If OSVersion<2.0 .OR. [Demo]
  269. Beep
  270. [String2] := [ProgramName] requires DOS [RequiredDOSVersion] or higher.
  271. :LoopCheckDos
  272. Dialog [Continue] WhiteOnRed UseHeader " Incorrect DOS Version "
  273. Your computer does not have the correct version of DOS.
  274. [String2]
  275.  
  276. You can still install the program on your hard disk.
  277. However, it will not work until you install a supported
  278. [String1]
  279.  
  280. Do you want to continue with the installation?
  281. EndDialog
  282. If Escaped
  283. If Windows
  284. Else
  285. Do CancelInstall
  286. GoTo LoopCheckDos
  287. EndIf
  288. EndIf
  289. If [Continue]
  290. Else
  291. SoLong
  292. EndIf
  293. EndIf
  294. EndProcedure
  295. Procedure CheckHardDiskSpace
  296. [NotEnoughDiskSpace] := N
  297. [FreeDiskSpace] := FreeSpaceOnDrive InstallationDrive
  298. [AdditionalSpace] := [HardDiskSpaceNeeded]-[FreeDiskSpace]
  299. If [FreeDiskSpace]<[HardDiskSpaceNeeded] .OR. [ForceHardDisk]
  300. [ForceHardDisk] := N    
  301. [NotEnoughDiskSpace] := Y
  302. [Number1] := [AdditionalSpace]/1024
  303. Beep
  304. :LoopCheckHardDiskSpace
  305. Dialog [Continue] WhiteOnRed UseHeader " Not Enough Disk Space "
  306. You do not have enough room on this hard disk to install
  307. [ProgramName].  You need an additional [Number1] KB.
  308.  
  309. You can either install to a different hard disk
  310. OR you can quit the installer to make more
  311. room on this hard disk by deleting unused files.
  312. Remember to make copies of any files
  313. you might need in the future.
  314.  
  315. Do you want to install the program on a different hard disk?
  316. EndDialog
  317. If Escaped
  318. Do CancelInstall
  319. GoTo LoopCheckHardDiskSpace
  320. EndIf
  321. If [Continue]
  322. If [NumDrives]>1
  323. GoTo LoopGetDrive
  324. Else
  325. Dialog PressAKey WhiteOnRed UseHeader " Only One Drive "
  326. Your computer only has one hard disk.  This hard
  327. disk does not have enough room to install
  328. [ProgramName].  Please quit and make more room
  329. available on your hard disk.
  330. EndDialog
  331. GoTo LoopMainMenu
  332. EndIf
  333. Else
  334. SoLong
  335. EndIf
  336. EndIf
  337. EndProcedure
  338. Procedure CheckIfProgramExists
  339. If FileExists [InstallationDirectory]\[ProgramExecutable]
  340. :LoopCheckIfProgramExists
  341. Dialog [Continue] WhiteOnRed UseHeader "Program Already Installed"
  342. A version of [ProgramName] already exists
  343. in the directory [InstallationDirectory].
  344. If you continue the installation, this
  345. version will be replaced.
  346.  
  347. Do you want to re-install [ProgramName]?
  348. EndDialog
  349. If Escaped
  350. Do CancelInstall
  351. GoTo LoopCheckIfProgramExists
  352. EndIf
  353. If .NOT. [Continue]
  354. GoTo LoopMainMenu
  355. EndIf
  356. EndIf
  357. EndProcedure
  358. Procedure CheckMouse
  359. If [MouseChecked]
  360. Exit
  361. EndIf
  362. [MouseChecked] := Y
  363. If .NOT. [MouseRequired]
  364. Exit
  365. EndIf
  366. If .NOT. Windows        
  367. If .NOT. MouseDriverLoaded .OR. [Demo]
  368. Beep
  369. :LoopCheckMouse
  370. Dialog PressAKey WhiteOnRed UseHeader " No Mouse "
  371.  
  372. [ProgramName] requires a mouse.  Your computer does not
  373. currently have a mouse driver installed.  You can install
  374. a mouse driver by modifying either your CONFIG.SYS or
  375. AUTOEXEC.BAT files.
  376.  
  377. See your computer manual or the manual for your mouse
  378. for instructions on loading a mouse driver.
  379. EndDialog
  380. If Escaped
  381. Do CancelInstall
  382. GoTo LoopCheckMouse
  383. EndIf
  384. EndIf
  385. EndIf
  386. EndProcedure
  387. Procedure CheckRAM
  388. If [RamChecked]
  389. Exit
  390. EndIf
  391. [RamChecked] := Y
  392. If Windows
  393. Exit
  394. Else
  395. [FreeRam] := FreeRunMemory
  396. EndIf
  397. [AvailableRAM] := [FreeRam] + [SizeOfInstall]
  398. [AdditionalRAM] := [RequiredRAM] - [AvailableRAM]
  399. [RequiredRAM] := [RequiredRAM]/1024
  400. [AvailableRAM] := [AvailableRam]/1024
  401. [AdditionalRAM] := [AdditionalRAM]/1024
  402. If [AvailableRAM]<[RequiredRAM] .OR. [Demo]
  403. Beep
  404. :LoopCheckRam
  405. Dialog [Continue] WhiteOnRed UseHeader " Not Enough Memory "
  406. Your computer does not have enough RAM memory to run
  407. [ProgramName].
  408.  
  409. [ProgramName] requires [RequiredRAM] KB of RAM to run.
  410. Your computer has only [AvailableRAM] KB of RAM available.
  411. You need an additional [AdditionalRAM] KB of RAM.
  412.  
  413. To free additional memory, you may:
  414. .iRemove memory-resident programs (TSR's).
  415. .iUse a memory manager.
  416. .iLoad DOS in high memory. (See your DOS manual.)
  417.  
  418. .cDo you still want to install [ProgramName]?
  419. EndDialog
  420. If Escaped
  421. Do CancelInstall
  422. GoTo LoopCheckRAM
  423. EndIf
  424. If [Continue]
  425. Else
  426. SoLong
  427. EndIf
  428. EndIf
  429. EndProcedure
  430. Procedure CheckSameDirectory
  431. If [InstallationDirectory] = [InstallFromDrive]:[DefaultDirectory]
  432. Dialog PressAKey WhiteOnRed UseHeader "Can't copy to this directory!"
  433. You are trying to copy files from one directory
  434. into the same directory!
  435.  
  436. Please select a different installation directory.
  437. EndDialog
  438. GoTo LoopMainMenu
  439. EndIf
  440. EndProcedure
  441. Procedure CheckValidDrive
  442. [ValidDrive] := N
  443. [N] := 1
  444. [String1] := InstallationDrive:
  445. While [N]<=[NumDrives]
  446. If [String1] = [Array1][[N]]
  447. [ValidDrive] := Y
  448. Exit
  449. Else
  450. EndIf
  451. IncrementNumber [N]
  452. EndWhile
  453. EndProcedure
  454. Procedure ConfirmSoundCard
  455. Do DetectSoundCard
  456. If Windows
  457. Do ConfirmSoundCardWin
  458. Else
  459. Do ConfirmSoundCardDos
  460. EndIf
  461. EndProcedure
  462. Procedure ConfirmSoundCardDos
  463. [String1] := [ProgramName] supports the following sound options.
  464. [String2] := [InstallerName] has detected that your computer has
  465. [String3] := [SoundCard]
  466. [String4] := Please confirm this setting or choose a different
  467. [String5] := sound option from the list below.
  468. [String6] := .cUse the arrow keys to highlight the
  469. [String7] := .csound option you want. Then press Enter.
  470. Do SetSoundCardMenuItem
  471. :LoopConfirmSoundDos
  472. TextBox @xy(Center,3) WhiteOnBlue UseHeader " Sound Options "
  473. [String1]
  474. [String2]
  475. [String3]
  476. [String4]
  477. [String5]
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488. [String6]
  489. [String7]
  490. EndTextBox
  491. GetMenuChoice BlueOnWhite Highlight [MenuItemToHighlight]
  492. [Array2]
  493. EndGetMenuChoice
  494. If Escaped
  495. Do CancelInstall
  496. GoTo LoopConfirmSoundDOS
  497. Else
  498. [SoundCard] := ChoiceText
  499. EndIf
  500. ClearScreen
  501. EndProcedure
  502. Procedure ConfirmSoundCardWin
  503. SetCoordinatesTo Pixel
  504. [String1] := [ProgramName] supports the following
  505. [String2] := sound options.  Please choose a sound option
  506. [String3] := from the list below.
  507. [String4] := Use the arrow keys or mouse to highlight
  508. [String5] := the sound option you want. Then click OK.
  509. [ButtonWidth] := 50
  510. [ButtonHeight] := 20
  511. [String10] := [Array2][1]
  512. [Number1] := [NumSoundOptions]
  513. [Number2] := 6*8 + 4*10 + 15 + [ButtonHeight] + [Number1]*9+2
  514. [Number3] := 150 
  515. [Number4] := [Number1]*9+2
  516. [Number5] := [Number3]+20
  517. [Number6] := [Number2] - 15 - [ButtonHeight]
  518. [Number7] := [Number6] - 16
  519. [Number8] := [Number7] - 8
  520. [Number9] := [Number5]/2-50
  521. [Number10] := ([Number5]/2)-8-[ButtonWidth]
  522. [Number11] := ([Number5]/2)+16
  523. :LoopConfirmSoundWin
  524. DialogBox @xy(CenterWindow,CenterWindow) [Number5] [Number2]  Returns [DlgReturn] UseHeader "Sound Options" ModalFrame SysMenu BorDlg
  525. Font "Helv" 8
  526. LText @xy(10,10) [Number3] 10 [String1]
  527. LText @xy(10,18) [Number3] 10 [String2]
  528. LText @xy(10,26) [Number3] 10 [String3]
  529. LText @xy([Number9],42) 100 10 "Sound Options"
  530. ListBox @xy([Number9],50) 100 [Number4] Uses [DetectedSoundCard] LoadWith [Array2] Border
  531. LText @xy(10,[Number8]) [Number3] 10 [String4]
  532. LText @xy(10,[Number7]) [Number3] 10 [String5]
  533. BorDefPushButton @xy([Number10],[Number6]) [ButtonWidth] [ButtonHeight]  "OK" OK
  534. BorPushButton @xy([Number11],[Number6])  [ButtonWidth] [ButtonHeight] "Cancel" Cancel
  535. EndDialogBox
  536. If Escaped
  537. GoTo LoopConfirmSoundWin
  538. EndIf
  539. SetCoordinatesTo 80x25
  540. ClearScreen
  541. If [DlgReturn]=1        
  542. [SoundCard] := [DetectedSoundCard]
  543. Else
  544. GoTo LoopMainMenu
  545. EndIf
  546. EndProcedure
  547. Procedure ConfirmVideoCard
  548. If [NumVideoOptions] = 1
  549. [DetectedVideoCard] := [EGAMenu]
  550. [VideoCardIndex] := [EGA]
  551. Exit    
  552. EndIf
  553. Do DetectVideoCard
  554. [String1] := [ProgramName] supports the following graphics
  555. [String2] := adapters.  [InstallerName] has detected that your
  556. [String3] := computer has [VideoCard]
  557. [String4] := Please confirm this setting or choose a different
  558. [String5] := graphics option from the list below.
  559. If Windows
  560. Do WinConfirmVideoCard
  561. Else
  562. Do DosConfirmVideoCard
  563. EndIf
  564. EndProcedure
  565. Procedure DosConfirmVideoCard
  566. Do SetVideoCardMenuItem
  567. [String6] := .cUse the arrow keys to highlight the
  568. [String7] := .csound option you want. Then press Enter.
  569. :LoopConfirmVideoDos
  570. TextBox @xy(Center,3) WhiteOnBlue UseHeader " Graphics Options "
  571. [String1]
  572. [String2]
  573. [String3]
  574. [String4]
  575. [String5]
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587. [String6]
  588. [String7]
  589. EndTextBox
  590. GetMenuChoice BlueOnWhite Highlight  [MenuItemToHighlight] UseHeader " Graphics Options "
  591. [Array3]
  592. EndGetMenuChoice
  593. If Escaped
  594. Do CancelInstall
  595. GoTo LoopConfirmVideoDos
  596. Else
  597. InCase Choice is
  598. =1: [VideoCardIndex] := [Array4][1]
  599. =2: [VideoCardIndex] := [Array4][2]
  600. =3: [VideoCardIndex] := [Array4][3]
  601. =4: [VideoCardIndex] := [Array4][4]
  602. =5: [VideoCardIndex] := [Array4][5]
  603. EndInCase
  604. EndIf
  605. ClearScreen
  606. EndProcedure
  607. Procedure WinConfirmVideoCard
  608. SetCoordinatesTo Pixel
  609. [String6] := Use the arrow keys or mouse to highlight
  610. [String7] := the graphics option you want. Then click OK.
  611. [ButtonWidth] := 50
  612. [ButtonHeight] := 20
  613. [String10] := [Array3][1]
  614. [Number1] := [NumVideoOptions]
  615. [Number2] := 8*8 + 4*10 + 15 + [ButtonHeight] + [Number1]*9+2
  616. [Number3] := 170 
  617. [Number4] := [Number1]*9+2
  618. [Number5] := [Number3]+20
  619. [Number6] := [Number2] - 15 - [ButtonHeight]
  620. [Number7] := [Number6] - 16
  621. [Number8] := [Number7] - 8
  622. [Number9] := [Number5]/2-50
  623. [Number10] := ([Number5]/2)-8-[ButtonWidth]
  624. [Number11] := ([Number5]/2)+16
  625. :LoopConfirmVideoWin
  626. DialogBox @xy(CenterWindow,CenterWindow) [Number5] [Number2]  Returns [DlgReturn] UseHeader "Graphics Options" ModalFrame SysMenu BorDlg
  627. Font "Helv" 8
  628. LText @xy(10,10) [Number3] 10 [String1]
  629. LText @xy(10,18) [Number3] 10 [String2]
  630. LText @xy(10,26) [Number3] 10 [String3]
  631. LText @xy(10,34) [Number3] 10 [String4]
  632. LText @xy(10,42) [Number3] 10 [String5]
  633. LText @xy([Number9],60) 100 10 "Graphics Options"
  634. ListBox @xy([Number9],68) 100 [Number4] Uses [DetectedVideoCard] LoadWith [Array3] Border
  635. LText @xy(10,[Number8]) [Number3] 10 [String6]
  636. LText @xy(10,[Number7]) [Number3] 10 [String7]
  637. BorDefPushButton @xy([Number10],[Number6]) [ButtonWidth] [ButtonHeight]  "OK" OK
  638. BorPushButton @xy([Number11],[Number6])  [ButtonWidth] [ButtonHeight] "Cancel" Cancel
  639. EndDialogBox
  640. If Escaped
  641. GoTo LoopConfirmVideoWin
  642. EndIf
  643. SetCoordinatesTo 80x25
  644. ClearScreen
  645. If [DlgReturn]= 1       
  646. If [DetectedVideoCard] = [VGAMenu]
  647. [VideoCardIndex] := [VGA]
  648. EndIf
  649. If [DetectedVideoCard] = [EGAMenu]
  650. [VideoCardIndex] := [EGA]
  651. EndIf
  652. If [DetectedVideoCard] = [TGAMenu]
  653. [VideoCardIndex] := [TGA]
  654. EndIf
  655. If [DetectedVideoCard] = [MCGAMenu]
  656. [VideoCardIndex] := [MCGA]
  657. EndIf
  658. If [DetectedVideoCard] = [CGAMenu]
  659. [VideoCardIndex] := [CGA]
  660. EndIf
  661. Else
  662. GoTo LoopMainMenu
  663. EndIf   
  664. EndProcedure
  665. Procedure CopyAllFiles
  666. ClearScreen
  667. Do CheckSameDirectory
  668. Do CopyFilesTextBox
  669. [SizeOfCopiedFiles] := 0
  670. Do RegistrationReminder
  671. [PercentComplete] := 0
  672. If Windows
  673. Do StatusBarWinSetup
  674. Else
  675. Do StatusBar
  676. EndIf
  677. [SourceDirectory] := [InstallFromDrive]:\TR\
  678. If Windows
  679. SetCopyAttrTo 20
  680. CopyFiles from [InstallFromDrive]:\TR to [InstallationDirectory] Quietly
  681. SETUP.EXE
  682. TLC.BMP
  683. EndCopyFiles
  684. [SizeOfCopiedFiles] := 8630 + SizeOfFile [InstallationDirectory]\TR\SETUP.EXE
  685. Else
  686. CopyFiles from [InstallFromDrive]:\TR\ to [InstallationDirectory] Quietly
  687. INSTALL.EXE
  688. VIDEOCHK.EXE
  689. SOUNDCHK.EXE
  690. TLC.BMP
  691. EndCopyFiles
  692. [SizeOfCopiedFiles] := 8630 + 6560 + 8576 + SizeOfFile [InstallationDirectory]\TR\INSTALL.EXE
  693. EndIf
  694. Do StatusBar
  695. [SourceDirectory] := [InstallFromDrive]:[DefaultDirectory]
  696. [CurrentFile] := HOF.DAT
  697. Do CopyCurrentFile
  698. [CurrentFile] := TR.BAT
  699. Do CopyCurrentFile
  700. [CurrentFile] := TR.ICO
  701. Do CopyCurrentFile
  702. [CurrentFile] := TR.PIF
  703. Do CopyCurrentFile
  704. [CurrentFile] := USERS.DAT
  705. Do CopyCurrentFile
  706. [CurrentFile] := TR.EXE
  707. Do CopyCurrentFile
  708. Do CrossSell
  709. [CurrentFile] := X000.DAT
  710. Do CopyCurrentFile
  711. Do ModifyBatchFile
  712. [PercentComplete] := 95
  713. If Windows
  714. Do ModifyProgramGroup
  715. EndIf
  716. SetCompletionStatusTo Finished
  717. [PercentComplete] := 100
  718. Do StatusBar
  719. Delay 2000
  720. ClearScreen
  721. EndProcedure
  722. Procedure CopyCurrentFile
  723. If Windows
  724. Else
  725. SetAllowExit On
  726. EndIf
  727. QueFiles
  728. [CurrentFile]
  729. EndQueFiles
  730. GetQuedFiles Quietly
  731. If Windows
  732. Else
  733. If QueSize >0
  734. SoLong
  735. EndIf
  736. SetAllowExit Off
  737. EndIf
  738. [SizeOfCopiedFiles] := [SizeOfCopiedFiles] + SizeOfFile [InstallationDirectory]\[CurrentFile]
  739. Do StatusBar
  740. EndProcedure
  741. Procedure CopyFilesTextBox
  742. SetShadows Off
  743. [String1] := Installing [ProgramName]...
  744. If Windows
  745. [String1] := [String1] Press ESC to cancel.
  746. EndIf
  747. TextBox @xy(Center,3) BlueOnWhite
  748. [String1]
  749. EndTextBox
  750. SetShadows On
  751. EndProcedure
  752. Procedure CrossSell
  753. If Windows
  754. [OtherProducts] := " [OtherProducts]"
  755. Else
  756. [OtherProducts] := .c[OtherProducts]
  757. EndIf
  758. SetShadows Off
  759. TextBox @xy(Center,7) BlueOnWhite
  760. The Learning Company's unique system of products focuses on
  761. important curricular, thinking, and problem-solving skills
  762.  appropriate for your child's age and stage of development.
  763.  
  764. Given your child's age, the following Learning Company products
  765. are most appropriate:
  766.  
  767. [OtherProducts]
  768.  
  769. Stop by your local retail store or call 1-800-852-2255
  770. to purchase these and other Learning Company products.
  771. EndTextBox
  772. SetShadows On
  773. EndProcedure
  774. Procedure DetectSoundCard
  775. If [SoundChecked]
  776. Exit
  777. EndIf
  778. [SoundChecked] := Y
  779. [SOUNDCHKcode] := [NoSoundCard]
  780. [SoundCard] := [PCSpeakerString]
  781. If Windows
  782. [SOUNDCHKcode] := [SoundBlaster]        
  783. Else
  784. Run [InstallFromDirectory]SOUNDCHK.EXE Quietly NoPrompt
  785. [SOUNDCHKcode] := OSExitCode
  786. EndIf
  787. If [SOUNDCHKcode] = [NoSoundCard]
  788. [DetectedSoundCard] := [PCSpeakerMenu]
  789. [SoundCard] := [PCSpeakerString]
  790. EndIf
  791. If [RolandSupported]
  792. If [SOUNDCHKcode] = [Roland]
  793. [DetectedSoundCard] := [RolandMenu]
  794. [SoundCard] := [RolandString]
  795. EndIf
  796. EndIf
  797. If [PS1Supported]
  798. If [SOUNDCHKcode] = [PS1SoundChip]
  799. [DetectedSoundCard] := [PS1Menu]
  800. [SoundCard] := [PS1String]
  801. EndIf
  802. EndIf
  803. If [Tandy1000Supported]
  804. If [SOUNDCHKcode] = [Tandy1000]
  805. [DetectedSoundCard] := [Tandy1000Menu]
  806. [SoundCard] := [Tandy1000String]
  807. EndIf
  808. EndIf
  809. If [MicrosoftSoundSupported]
  810. If [SOUNDCHKcode] = [MicrosoftSound]
  811. [DetectedSoundCard] := [MicrosoftSoundMenu]
  812. [SoundCard] := [MicrosoftSoundString]
  813. EndIf
  814. EndIf
  815. If [AdLibSupported]
  816. If [SOUNDCHKcode] = [AdLib]
  817. [DetectedSoundCard] := [AdLibMenu]
  818. [SoundCard] := [AdLibString]
  819. EndIf
  820. EndIf
  821. If [SoundBlasterSupported]
  822. If [SOUNDCHKcode] = [SoundBlaster]
  823. [DetectedSoundCard] := [SoundBlasterMenu]
  824. [SoundCard] := [SoundBlasterString]
  825. EndIf
  826. EndIf
  827. EndProcedure
  828. Procedure DetectVideoCard
  829. If [VideoChecked]
  830. Exit
  831. EndIf
  832. [VideoChecked] := Y
  833. If [NumVideoOptions] = 1
  834. Exit
  835. EndIf
  836. [VIDEOCHKcode] := [VGA]         
  837. [DetectedVideoCard] := [VGAMenu]
  838. [VideoCard] := [VGAString]
  839. If Windows
  840. If VGA
  841. [VIDEOCHKcode] := [VGA]
  842. EndIf
  843. If EGA
  844. [VIDEOCHKcode] := [EGA]
  845. EndIf
  846. Else
  847. Run [InstallFromDirectory]VIDEOCHK.EXE Quietly NoPrompt
  848. [VIDEOCHKcode] := OSExitCode
  849. EndIf
  850. [VideoCardIndex] := [VIDEOCHKcode]
  851. If [CGASupported]
  852. If [VIDEOCHKcode] = [CGA]
  853. [DetectedVideoCard] := [CGAMenu]
  854. [VideoCard] := [CGAString]
  855. EndIf
  856. EndIf
  857. If [MCGASupported]
  858. If [VIDEOCHKcode] = [MCGA]
  859. [DetectedVideoCard] := [MCGAMenu]
  860. [VideoCard] := [MCGAString]
  861. EndIf
  862. EndIf
  863. If [EGASupported]
  864. If [VIDEOCHKcode] = [EGA]
  865. [DetectedVideoCard] := [EGAMenu]
  866. [VideoCard] := [EGAString]
  867. EndIf
  868. If [VGASupported]
  869. Else
  870. If [VIDEOCHKcode] = [VGA]
  871. [DetectedVideoCard] := [VGAMenu]
  872. [VideoCard] := [VGAString]
  873. EndIf
  874. EndIf
  875. EndIf
  876. If [TGASupported]
  877. If [VIDEOCHKcode] = [TGA]
  878. [DetectedVideoCard] := [TGAMenu]
  879. [VideoCard] := [TGAString]
  880. EndIf
  881. EndIf
  882. If [VGASupported]
  883. If [VIDEOCHKcode] = [VGA]
  884. [DetectedVideoCard] := [VGAMenu]
  885. [VideoCard] := [VGAString]
  886. EndIf
  887. EndIf
  888. EndProcedure
  889. Procedure FindExistingCopy
  890. [N] := 1
  891. While [N]<=[NumDrives].AND. [ExistingCopyPath]=BlankString
  892. [Dir1] := [Array1][[N]]\
  893. If Windows 
  894. [ExistingCopyPath] := FullPathTo [ProgramExecutable] Quietly 
  895. Else
  896. [ExistingCopyPath] := FullPathTo [ProgramExecutable] Quietly Origin=[Dir1]
  897. EndIf
  898. IncrementNumber [N]
  899. EndWhile
  900. [String1] := [InstallerName] could not find a copy of [ProgramName]
  901. If [ExistingCopyPath]= BlankString
  902. Beep
  903. Dialog @xy(Center, Center) WhiteOnRed UseHeader "[ProgramName] Not Found!"
  904. [String1]
  905. on your computer.  You must install [ProgramName]
  906. before changing any of the hardware settings.
  907. EndDialog
  908. If Escaped
  909. Do CancelInstall
  910. EndIf
  911. GoTo LoopMainMenu
  912. EndIf
  913. [Number1] := LengthOf [ExistingCopyPath]
  914. [Number2] := LengthOf [ProgramExecutable]
  915. [Number1] := ([Number1]-[Number2]-1)
  916. [String1] := SubstringOf [ExistingCopyPath] from 1 to [Number1]
  917. [InstallationDirectory] := [String1]
  918. [String1] := [InstallerName] has found a copy of [ProgramName]
  919. :LoopProgramFound
  920. Dialog [Continue] WhiteOnRed UseHeader "[ProgramName] Found"
  921. [String1]
  922. in the directory [InstallationDirectory].
  923.  
  924. Is this the copy you want to modify?
  925. EndDialog
  926. If Escaped
  927. Do CancelInstall
  928. GoTo LoopProgramFound
  929. EndIf
  930. If [Continue]
  931. Exit    
  932. EndIf
  933. :LoopGetDirectory
  934. [InstallationDirectory] := C:\
  935. Do BlankBottomLine
  936. Dialog [InstallationDirectory] UseHeader "Locate Program"
  937. Please enter the name of the drive and directory
  938. which contains the program you want to modify.
  939. EndDialog
  940. Do SetBottomLineToEsc
  941. If DirectoryExists [InstallationDirectory]
  942. Else
  943. Dialog [Continue] WhiteOnRed UseHeader " Directory Not Found "
  944. The directory you entered does not exist.
  945.  
  946. Do you want to choose a different directory?
  947. EndDialog
  948. If Escaped
  949. Do CancelInstall
  950. GoTo LoopGetDirectory
  951. EndIf
  952. If [Continue]
  953. GoTo LoopGetDirectory
  954. Else
  955. GoTo LoopMainMenu
  956. EndIf
  957. EndIf
  958. If Windows
  959. Else
  960. If MediaIsWriteProtected InstallationDrive
  961. :LoopWriteProtected
  962. Dialog [Continue] WhiteOnRed UseHeader " Write-Protected Disk "
  963. This disk is write-protected.  Either remove the
  964. write protection or select another drive.
  965.  
  966. Do you want to try again?
  967. EndDialog
  968. If Escaped
  969. Do CancelInstall
  970. GoTo LoopWriteProtected
  971. EndIf
  972. If [Continue]
  973. GoTo LoopGetDirectory
  974. Else
  975. GoTo LoopMainMenu
  976. EndIf
  977. EndIf
  978. EndIf
  979. If FileExists [InstallationDirectory]\[ProgramExecutable]
  980. Exit    
  981. EndIf
  982. Beep
  983. [String1] := [InstallerName] could not find a copy of [ProgramName]
  984. :LoopProgramNotFound
  985. Dialog [Continue] WhiteOnRed UseHeader "Program Not Found"
  986. [String1]
  987. in the directory [InstallationDirectory].
  988.  
  989. Do you want to choose a different directory?
  990. EndDialog
  991. If Escaped
  992. Do CancelInstall
  993. GoTo LoopProgramNotFound
  994. EndIf
  995. If [Continue]
  996. GoTo LoopGetDirectory
  997. EndIf
  998. GoTo LoopMainMenu
  999. EndProcedure
  1000. Procedure GetDriveList
  1001. If [DrivesChecked]
  1002. Exit
  1003. EndIf
  1004. [DrivesChecked] := Y
  1005. TextBox BlueOnWhite
  1006. Looking for drives...
  1007. EndTextBox
  1008. [Drive] := A
  1009. [NumDrives] := 0
  1010. [Number1] := 1
  1011. [AdditionalSpace] := [HardDiskSpaceNeeded]-[FreeDiskSpace]
  1012. While [Number1] <=26
  1013. If DriveIsPresent [Drive]
  1014. If DriveIsRemoveable [Drive]
  1015. Else
  1016. If DriveIsCDROM [Drive]
  1017. Else
  1018. If DriveIsRam [Drive]
  1019. Else
  1020. If DriveIsRemote [Drive]
  1021. Else
  1022. IncrementNumber [NumDrives]     
  1023. [Array1][[NumDrives]] := [Drive]:
  1024. EndIf   
  1025. EndIf   
  1026. EndIf   
  1027. EndIf   
  1028. EndIf   
  1029. IncrementString [Drive]         
  1030. IncrementNumber [Number1]       
  1031. EndWhile
  1032. ClearScreen
  1033. EndProcedure
  1034. Procedure GetTargetDirectory
  1035. [InstallationDirectory] := InstallationDrive:[DefaultDirectory]
  1036. :LoopGetTargetDirectory
  1037. Do BlankBottomLine
  1038. [String1] := [ProgramName] installed.
  1039. Dialog [InstallationDirectory] UseHeader " Select Installation Directory"
  1040. Enter the name of the directory where you want
  1041. [String1]
  1042. EndDialog
  1043. Do SetBottomLineToEsc
  1044. Do CheckValidDrive
  1045. If [ValidDrive]
  1046. Else
  1047. [String1] := InstallationDrive:
  1048. :LoopInvalidDrive
  1049. Dialog [Continue] WhiteOnRed UseHeader " Not a Valid Drive "
  1050. The drive you entered is not a valid drive.
  1051.  
  1052. Do you want to enter a different drive and directory?
  1053. EndDialog
  1054. If Escaped
  1055. Do CancelInstall
  1056. GoTo LoopInvalidDrive
  1057. EndIf
  1058. If [Continue]
  1059. GoTo LoopGetTargetDirectory
  1060. Else
  1061. GoTo LoopMainMenu
  1062. EndIf
  1063. EndIf
  1064. EndProcedure
  1065. Procedure GetTargetDrive
  1066. [InstallationDirectory] := C:[DefaultDirectory]  
  1067. [String1] := You can install [ProgramName]
  1068. [String2] := to any of the drives listed below.
  1069. [String5] := Available Drives
  1070. If Windows
  1071. [String3] := Use the arrow keys or mouse to highlight
  1072. [String4] := the drive you want to use, then click OK.
  1073. [String2] := [String2]
  1074. Else
  1075. [String3] := Use the arrow keys to highlight the
  1076. [String4] := drive you want to use, then press Enter.
  1077. [String3] := .c[String3]
  1078. [String4] := .c[String4]
  1079. EndIf
  1080. If Windows
  1081. SetCoordinatesTo Pixel
  1082. [ButtonWidth] := 50
  1083. [ButtonHeight] := 20
  1084. [String10] := [Array1][1]
  1085. If [NumDrives]>5
  1086. [Number1] := 5
  1087. Else
  1088. [Number1] := [NumDrives]
  1089. EndIf
  1090. [Number2] := 8*5 + 4*10 + 15 + [ButtonHeight] + [Number1]*9 +2
  1091. [Number3] := 150 
  1092. [Number4] := [Number1]*9 +2
  1093. [Number5] := [Number3]+20
  1094. [Number6] := [Number2] - 15 - [ButtonHeight]
  1095. [Number7] := [Number6] - 20
  1096. [Number8] := [Number7] - 8
  1097. [Number9] := [Number5]/2-30
  1098. [Number10] := ([Number5]/2)-8-[ButtonWidth]
  1099. [Number11] := ([Number5]/2)+16
  1100. :LoopGetDriveWin
  1101. DialogBox @xy(CenterWindow,CenterWindow) [Number5] [Number2]  Returns [DlgReturn] UseHeader "Select an Installation Drive" ModalFrame SysMenu BorDlg
  1102. Font "Helv" 8
  1103. LText @xy(10,10) [Number3] 10 [String1]
  1104. LText @xy(10,18) [Number3] 10 [String2]
  1105. LText @xy([Number9],36) 60 10 [String5]
  1106. ListBox @xy([Number9],44) 60 [Number4] Uses [String10] LoadWith [Array1] Border
  1107. LText @xy(10,[Number8]) [Number3] 10 [String3]
  1108. LText @xy(10,[Number7]) [Number3] 10 [String4]
  1109. BorDefPushButton @xy([Number10],[Number6]) [ButtonWidth] [ButtonHeight]  "OK" OK
  1110. BorPushButton @xy([Number11],[Number6])  [ButtonWidth] [ButtonHeight] "Cancel" Cancel
  1111. EndDialogBox
  1112. If Escaped
  1113. GoTo LoopGetDriveWin
  1114. EndIf
  1115. SetCoordinatesTo 80x25
  1116. If [DlgReturn]=1
  1117. [TargetDrive] := [String10]
  1118. Else
  1119. GoTo LoopMainMenu
  1120. EndIf
  1121. Else    
  1122. :LoopGetDriveDos
  1123. TextBox @xy(Center,4) WhiteOnBlue UseHeader "Select an Installation Drive"
  1124. [String1]
  1125. [String2]
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138. [String3]
  1139. [String4]
  1140. EndTextBox
  1141. SetShadows Off
  1142. GetMenuChoice BlueOnWhite UseHeader "Available Drives"
  1143. [Array1]
  1144. EndGetMenuChoice
  1145. SetShadows On
  1146. If Escaped
  1147. Do CancelInstall
  1148. GoTo LoopGetDriveDos
  1149. EndIf
  1150. [TargetDrive] := ChoiceText 
  1151. EndIf   
  1152. [InstallationDirectory] := [TargetDrive][DefaultDirectory]  
  1153. ClearScreen
  1154. EndProcedure
  1155. Procedure Initialize
  1156. SetSound ON                     
  1157. SetReadOnlyInquiry On           
  1158. SetReplacementInquiry Off       
  1159. If Windows
  1160. [InstallerName] := Setup
  1161. SetDithering On
  1162. SetBackGroundColor  0 0 255 0 0 127
  1163. SetDefaultBitmap Off    
  1164. [Number1] := MaxX-445
  1165. If FileExists [InstallFromDirectory]\[LogoFilename]
  1166. LoadBitMap [InstallFromDirectory]\[LogoFilename] @xy([Number1],0)
  1167. ShowBitMap [InstallFromDirectory]\[LogoFilename]
  1168. EndIf
  1169. SetCoordinatesTo 80x25
  1170. ShowWindow Maximize     
  1171. SetTopLineTo [ProgramName] Setup Program     Copyright ⌐ 1994 The Learning Company
  1172. Else
  1173. [InstallerName] := Install
  1174. DelayScreenDraw
  1175. SetDirectVideo On               
  1176. SetAllowExit Off                
  1177. SetOneMoment On                 
  1178. SetAllowEscape On               
  1179. SetCheckMarks Off               
  1180. SetTopLineAttrTo BlueOnWhite
  1181. SetTopLineTo "                        [ProgramName] Install Program                              "
  1182. SetBottomLineAttrTo BlueOnWhite
  1183. SetBottomLineTo "                       Copyright 1994 The Learning Company                       "
  1184. SetAttentionAttrTo WhiteOnRed
  1185. SetPopUpAttrTo WhiteOnBlue
  1186. SetShadows On
  1187. SetClearScreenOnExit On
  1188. SetBackgroundCharTo B2          
  1189. SetMainBorderTo None            
  1190. EndIf
  1191. SetPopupBorderTo Single
  1192. SetScreenAttrTo LightGrayOnBlue
  1193. SetShadowAttrTo DarkGrayOnBlack
  1194. ClearScreen             
  1195. SetCompletionStatusTo Unfinished
  1196. SetSupportInformation
  1197. .cThere is a problem installing the program.
  1198. .cPlease call Technical Support at:
  1199. .c1-800-852-2255.
  1200. EndSetSupportInformation
  1201. Do BuildSoundCardList
  1202. Do BuildVideoCardList
  1203. If [Demo]
  1204. ForceError              
  1205. EndIf
  1206. EndProcedure
  1207. Procedure Install
  1208. Do CheckDOS
  1209. Do CheckRAM
  1210. Do CheckMouse
  1211. Do GetDriveList
  1212. If [NumDrives]=0
  1213. Do NoDriveMessage
  1214. GoTo LoopMainMenu
  1215. EndIf
  1216. :LoopGetDrive
  1217. If [NumDrives]>1
  1218. Do GetTargetDrive
  1219. Else
  1220. Do SingleDriveMessage
  1221. [InstallationDirectory] := [Array1][1]\
  1222. EndIf
  1223. Do CheckHardDiskSpace
  1224. Do GetTargetDirectory
  1225. Do CheckHardDiskSpace
  1226. Do CheckIfProgramExists
  1227. Do ConfirmSoundCard
  1228. Do ConfirmVideoCard
  1229. Do BuildCommandLine
  1230. Do CopyAllFiles
  1231. Do InstallationComplete
  1232. EndProcedure
  1233. Procedure InstallationComplete
  1234. [String1] := [ProgramName] has been installed on your
  1235. [String2] := computer's hard drive in the directory
  1236. [String3] := named [InstallationDirectory].
  1237. If Windows
  1238. Dialog @xy(Center,Center) PressAKey UseHeader "Installation Complete"
  1239. [String1]
  1240. [String2]
  1241. [String3]
  1242.  
  1243. A [ProgramName] icon has also been added
  1244. to the program group named "The Learning Company".
  1245.  
  1246. The temporary directory created by Setup
  1247. has been removed from your computer.
  1248.  
  1249. To play [ProgramName], double-click
  1250. on the [ProgramName] icon.
  1251. EndDialog
  1252. Else
  1253. Dialog @xy(Center,Center) PressAKey UseHeader "Installation Complete"
  1254. [String1]
  1255. [String2]
  1256. [String3]
  1257.  
  1258. To play [ProgramName], type "[ShortCommandLine]"
  1259. at the DOS prompt and press Enter.
  1260. EndDialog
  1261. EndIf
  1262. SoLong
  1263. EndProcedure
  1264. Procedure MainMenu
  1265. [String1] := Choose this option to cancel the installation
  1266. If Windows
  1267. [String2] := and return to Windows.
  1268. Else
  1269. [String2] := and return to DOS.
  1270. EndIf
  1271. :ShowMainMenu
  1272. GetMenuChoice Highlight 1 UseHeader "Installation Options"
  1273. Install [ProgramName]
  1274. ;Choose this option to install
  1275. ;[ProgramName] on your computer.
  1276. Change Program Settings
  1277. ;Choose this option if you have already
  1278. ;installed [ProgramName] and want to
  1279. ;change some of the hardware settings.
  1280. Quit the Install Program
  1281. ;[String1]
  1282. ;[String2]
  1283. EndGetMenuChoice
  1284. If Escaped
  1285. Do CancelInstall
  1286. GoTo ShowMainMenu
  1287. EndIf
  1288. InCase Choice is
  1289. =1:     Do Install
  1290. =2:     Do ChangeSettings
  1291. =3:     SetCompletionStatusTo Finished
  1292. EndInCase
  1293. SoLong
  1294. EndProcedure
  1295. Procedure ModifyBatchFile
  1296. If FileExists [InstallationDirectory]\[BatchFileName]
  1297. Else
  1298. [String1] := [ProgramName].  Please choose Install from the
  1299. :LoopBatchFileNotFound
  1300. Dialog PressAKey WhiteOnRed UseHeader " File Not Found "
  1301. The file [BatchFileName] was not found.
  1302. This file is used to store the settings for
  1303. [String1]
  1304. Install Options menu to install a copy of this
  1305. file on your hard disk.
  1306. EndDialog
  1307. If Escaped
  1308. Do CancelInstall
  1309. GoTo LoopBatchFileNotFound
  1310. EndIf
  1311. ClearScreen
  1312. GoTo LoopMainMenu
  1313. EndIf
  1314. [String1] := "if not exist [InstallationDirectory]\[ProgramExecutable] goto :notthere"
  1315. [String2] := CD [InstallationDirectory]
  1316. [String3] := [ProgramCommandLine]
  1317. [String4] := CD \
  1318. ExamineTextFile [InstallationDirectory]\[BatchFileName]
  1319. [N] := 0
  1320. [N] := LineNumberWith (if not exist,,)
  1321. If [N]>0
  1322. ModifyTextFile [InstallationDirectory]\[BatchFileName] Quietly
  1323. DeleteLine [N]
  1324. InsertAtLine [N] [String1]
  1325. EndModifyTextFile
  1326. EndIf
  1327. [N] := 0
  1328. [N] := LineNumberWith ([ProgramExecutable],%,%)  
  1329. [N] := [N] -2           
  1330. If [N]>0
  1331. ModifyTextFile [InstallationDirectory]\[BatchFileName] Quietly NoBackup
  1332. DeleteLine [N]          
  1333. DeleteLine [N]          
  1334. DeleteLine [N]          
  1335. DeleteLine [N]          
  1336. InsertAtLine [N] [String4]
  1337. InsertAtLine [N] [String3]
  1338. InsertAtLine [N] [String2]
  1339. InsertAtLine [N] InstallationDrive:
  1340. EndModifyTextFile
  1341. EndIf
  1342. ForgetTextFile
  1343. SetReadOnlyInquiry Off
  1344. CopyFiles from [InstallationDirectory] to InstallationDrive:\ Quietly
  1345. [BatchFileName]
  1346. EndCopyFiles
  1347. SetReadOnlyInquiry On
  1348. EndProcedure
  1349. Procedure ModifyProgramGroup
  1350. [Array5] := GetProgramManagerGroupInfo The Learning Company
  1351. [Number1] := LengthOf [Array5][1]
  1352. If [Number1]<>0  
  1353. [String4] := "",""
  1354. [String5] := """
  1355. [Number2] := 2
  1356. While [Number2]<256
  1357. [String2] := [Array5][[Number2]]  
  1358. [Number1] := LengthOf [String2]
  1359. If [Number1]= 0  
  1360. [Number2] := 99999      
  1361. Else
  1362. [Number1] := PositionOf [String4] in [String2]
  1363. [Number1] := [Number1] -1
  1364. [String7] := SubstringOf [String2] from 2 to [Number1]
  1365. If [String7] = [ProgramName]
  1366. [Number1] := PositionOf [InstallationDirectory] in [String2]
  1367. If [Number1]=0
  1368. Do AddProgramToGroup
  1369. EndIf
  1370. Exit
  1371. EndIf
  1372. EndIf
  1373. IncrementNumber [Number2]
  1374. EndWhile
  1375. EndIf
  1376. Do AddProgramToGroup
  1377. EndProcedure
  1378. Procedure NoDriveMessage
  1379. Dialog WhiteOnRed PressAKey UseHeader "No Hard Drive"
  1380. Your computer does not have a hard disk with enough free
  1381. space to install [ProgramName].
  1382. EndDialog
  1383. SoLong
  1384. EndProcedure
  1385. Procedure RegistrationReminder
  1386. SetShadows Off
  1387. TextBox @xy(Center,10) BlueOnWhite
  1388. Now would be a good time to fill out your registration card!
  1389. EndTextBox
  1390. SetShadows On
  1391. EndProcedure
  1392. Procedure SetBottomLineToEsc
  1393. If .NOT. Windows
  1394. SetBottomLineTo "                              Press ESC to cancel.                                 "
  1395. EndIf
  1396. EndProcedure
  1397. Procedure SetSoundCardMenuItem
  1398. [N] := 1
  1399. [MenuItemToHighlight] := 1
  1400. While [N]<=[NumSoundOptions]
  1401. If [DetectedSoundCard]=[Array2][[N]]
  1402. [MenuItemToHighlight] := [N]
  1403. Exit
  1404. EndIf
  1405. IncrementNumber [N]
  1406. EndWhile
  1407. EndProcedure
  1408. Procedure SetSoundSwitch
  1409. If [NoSoundSupported]
  1410. If [SoundCard]= [NoSoundMenu]
  1411. [SoundSwitch] := [NoSoundSwitch]
  1412. EndIf
  1413. EndIf
  1414. If [SoundCard]= [PCSpeakerMenu]
  1415. [SoundSwitch] := [PCSpeakerSwitch]
  1416. EndIf
  1417. If [SoundBlasterSupported]
  1418. If [SoundCard]= [SoundBlasterMenu]
  1419. [SoundSwitch] := [SoundBlasterSwitch]
  1420. EndIf
  1421. EndIf
  1422. If [AdLibSupported]
  1423. If [SoundCard]= [AdLibMenu]
  1424. [SoundSwitch] := [AdLibSwitch]
  1425. EndIf
  1426. EndIf
  1427. If [RolandSupported]
  1428. If [SoundCard]= [RolandMenu]
  1429. [SoundSwitch] := [RolandSwitch]
  1430. EndIf
  1431. EndIf
  1432. If [MicrosoftSoundSupported]
  1433. If [SoundCard]= [MicrosoftSoundMenu]
  1434. [SoundSwitch] := [MicrosoftSoundSwitch]
  1435. EndIf
  1436. EndIf
  1437. If [Tandy1000Supported]
  1438. If [SoundCard]= [Tandy1000Menu]
  1439. [SoundSwitch] := [Tandy1000Switch]
  1440. EndIf
  1441. EndIf
  1442. If [PS1Supported]
  1443. If [SoundCard]= [PS1Menu]
  1444. [SoundSwitch] := [PS1Switch]
  1445. EndIf
  1446. EndIf
  1447. EndProcedure
  1448. Procedure SetVideoCardMenuItem
  1449. [N] := 1
  1450. [MenuItemToHighlight] := 1
  1451. While [N]<=[NumVideoOptions]
  1452. If [DetectedVideoCard]=[Array3][[N]]
  1453. [MenuItemToHighlight] := [N]
  1454. Exit
  1455. EndIf
  1456. IncrementNumber [N]
  1457. EndWhile
  1458. EndProcedure
  1459. Procedure SetVideoSwitch
  1460. If [VGASupported]
  1461. If [VideoCardIndex] = [VGA]
  1462. [VideoSwitch] := [VGASwitch]
  1463. EndIf
  1464. EndIf
  1465. If [TGASupported]
  1466. If [VideoCardIndex] = [TGA]
  1467. [VideoSwitch] := [TGASwitch]
  1468. EndIf
  1469. EndIf
  1470. If [MCGASupported]
  1471. If  [VideoCardIndex] = [MCGA]
  1472. [VideoSwitch] := [MCGASwitch]
  1473. EndIf
  1474. EndIf
  1475. If [EGASupported]
  1476. If [VideoCardIndex] = [EGA]
  1477. [VideoSwitch] := [EGASwitch]
  1478. EndIf
  1479. EndIf
  1480. If [CGASupported]
  1481. If  [VideoCardIndex] = [CGA]
  1482. [VideoSwitch] := [CGASwitch]
  1483. EndIf
  1484. EndIf
  1485. EndProcedure
  1486. Procedure SingleDriveMessage
  1487. [String1] := [InstallerName] has detected just one hard drive on your system.
  1488. [String2] := [ProgramName] will be installed to your [Array1][1] drive.
  1489. :LoopSingleDriveMessage
  1490. Dialog WhiteOnBlue PressAKey UseHeader "Hard Drive Selected"
  1491. [String1]
  1492. [String2]
  1493. EndDialog
  1494. If Escaped
  1495. Do CancelInstall
  1496. GoTo LoopSingleDriveMessage
  1497. EndIf
  1498. EndProcedure
  1499. Procedure StatusBar
  1500. Delay 1 
  1501. [PercentComplete] := (100*[SizeOfCopiedFiles])/[HardDiskSpaceNeeded]
  1502. If Windows
  1503. Do StatusBarWin
  1504. Else
  1505. Do StatusBarDOS
  1506. EndIf
  1507. EndProcedure
  1508. Procedure StatusBarDOS
  1509. [NumSolidBlocks] := [PercentComplete]/2
  1510. If [NumSolidBlocks] = [OldNumSolidBlocks]
  1511. Exit
  1512. EndIf
  1513. If [NumSolidBlocks] = 0
  1514. [OldNumSolidBlocks] := 0
  1515. EndIf
  1516. [N] := [OldNumSolidBlocks] +1
  1517. While [N] <= [NumSolidBlocks]
  1518. [SolidBar] := [SolidBar]█
  1519. IncrementNumber [N]
  1520. EndWhile
  1521. [StatusBar] := [SolidBar]
  1522. While [N] <=50
  1523. [StatusBar] := [StatusBar]░
  1524. IncrementNumber [N]
  1525. EndWhile
  1526. [OldNumSolidBlocks] := [NumSolidBlocks]
  1527. SetShadows Off
  1528. TextBox @xy(Center,21) RedOnWhite UseHeader "Percent Complete"
  1529.      0 % [StatusBar] 100 %
  1530. EndTextBox
  1531. SetShadows On
  1532. EndProcedure
  1533. Procedure StatusBarWin
  1534. Delay 1
  1535. SetScreenAttrTo RedOnRed
  1536. [BarRightX] := [BarLeftX]+(4*[PercentComplete])
  1537. Rectangle @xy([BarLeftX],[BarTopY]) @xy([BarRightX],[BarBottomY])
  1538. EndProcedure
  1539. Procedure StatusBarWinSetup
  1540. [TopY] := MaxY-70-70
  1541. [BottomY] := MaxY-70
  1542. [LeftX] := (MaxX/2) - 250
  1543. [RightX] := (MaxX/2) + 250
  1544. [BarTopY] := MaxY-70-40
  1545. [BarBottomY] := MaxY-70-15
  1546. [BarLeftX] := (MaxX/2) - 200
  1547. [BarRightX] := (MaxX/2) + 200
  1548. SetScreenAttrTo RedOnWhite
  1549. Rectangle @xy([LeftX],[TopY]) @xy([RightX],[BottomY])
  1550. Rectangle @xy([BarLeftX],[BarTopY]) @xy([BarRightX],[BarBottomY])
  1551. [Number1] := [LeftX] + 24
  1552. [Number2] := [BarTopY] + 5
  1553. TextOut @xy([Number1],[Number2]) 0%
  1554. [Number1] := [RightX] - 45
  1555. TextOut @xy([Number1],[Number2]) 100%
  1556. [Number1] := (MaxX/2) - 60
  1557. [Number2] := [TopY] +5
  1558. TextOut @xy([Number1],[Number2]) Percent Complete
  1559. EndProcedure
  1560. Procedure WelcomeScreen
  1561. [String1] := [ProgramName] on your computer's hard drive.
  1562. :LoopWelcome
  1563. Dialog WhiteOnBlue PressAnyKey UseHeader " Welcome! "
  1564. Welcome to The Learning Company's [InstallerName] program.
  1565. This program makes it easy for you to install
  1566. [String1]
  1567.  
  1568. Each screen in the [InstallerName] program includes
  1569. instructions to help you complete a step in
  1570. the installation process.
  1571. EndDialog
  1572. If Escaped
  1573. Do CancelInstall
  1574. GoTo LoopWelcome
  1575. EndIf
  1576. Do SetBottomLineToEsc
  1577. EndProcedure
  1578. EndScript
  1579.