home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / -screenplay- / shareware / boulderdäsh / install / boulderdäsh.install next >
Text File  |  1997-07-22  |  19KB  |  529 lines

  1. ; $VER: BoulderDäsh.install 4.00 (22.06.97)
  2. ; Install script for BoulderDäsh (Workbench 2.0 or higher)
  3. ;
  4. (COMPLETE 0)
  5. ;(USER 2)
  6. ;(DEBUG)
  7. (SET #ApplicationName "BoulderDäsh")
  8. (SET #ApplicationDir "sys:")
  9. (SET #ApplicationDir1 "work:")
  10. (SET #ApplicationDir2 "t:")
  11. (SET #ApplicationDir3 "game:")
  12. (SET #ApplicationDir4 "work:games")
  13. (SET #ArchiveDir "/")
  14. (SET #Language -1)
  15. (SET #Documents -1)
  16. (SET #ApplicationKeyfile (CAT #ApplicationName ".key"))
  17.  
  18. ;=============================================================================
  19. ; German strings
  20.  
  21. (IF (= @language "deutsch")
  22. (
  23. (SET default_lang 2)
  24.  
  25. (SET #bad-kick "Sie benötigen Workbench 2.0 oder größer")
  26. (SET #bad-installer
  27. (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  28.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  29.      "Bitte überprüfen Sie Ihre Konfiguration!\n"
  30.      "Wenn Sie fortfahren, wird eine Vollinstallation vorgenommen, das heißt\n"
  31.      "es werden alle Kataloge,Anleitungen und die OS2.0+ Version installiert.\n"
  32.      "%s ist auch dann voll einsatzfähig!"
  33. ))
  34.  
  35. (SET #App-InstallMsg
  36. (CAT "\n\%s Installationsskript.\n"
  37.         "Dieses Skript installiert %s auf Ihrem Amiga.\n\n"
  38.         "Lesen Sie das Anleitungs-File für weitere Informationen\n"
  39.         " über den Vertrieb von %s.\n\n"
  40.         "%s © 1987-97 Guido Mersmann\n"
  41.         "All Rechte reserviert."
  42. ))
  43.  
  44. (SET #App-Where
  45. (CAT "Wo möchten Sie %s installieren ?\n"
  46.         "(Ein Verzeichnis wird angelegt)"
  47. ))
  48.  
  49. (SET #App-Update
  50. (CAT "\nEin %s-Verzeichnis existiert im ausgewählen"
  51.         " Verzeichnis. Wenn Sie fortfahren,"
  52.         " bestätigen Sie, daß Sie die alte %s-Installation"
  53.         " mit der neuesten Version updaten wollen.\n"
  54.         "Verschiedene %s-Dateien (z.B Prefs) werden falls nötig überschrieben!"
  55. ))
  56.  
  57. (SET #App-Main "Welche Version von %s möchten Sie installieren?")
  58. (SET #App-Main-help
  59. (CAT "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
  60.      " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
  61.      " benutzt, wenn sich %s im Hintergrund befindet. Dazu MUß"
  62.      " die Locale.library eingebunden sein. Für die OS3.0+ gilt das selbe"
  63.      " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
  64.      " weiteren Speicher sparen."
  65. ))
  66.  
  67. (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  68.  
  69. (SET #App-Language-help
  70. (CAT "\nDer Amiga kann in vielen verschiedenen Sprachen"
  71.          " arbeiten. Um Plattenkapazität zu sparen können Sie"
  72.          " nur die Sprachen anwählen, die sie benötigen"
  73.          " Haken Sie also einfach die Sprachen ab, die Sie"
  74.          " Ihrem System zugänglich machen wollen."
  75.           @askoptions-help
  76. ))
  77.  
  78. (SET #App-Docs "Welche Anleitungs- und Informationsdateien wollen Sie installieren ?")
  79.  
  80. (SET #startup-prompt    "Es müssen zu S:User-Startup einige Eintragungen für %s hinzugefügt werden:\n\n%s")
  81.  
  82. (SET #App-Exit "\n%s installiert !!")
  83.  
  84.  
  85. ))
  86.  
  87. ;=============================================================================
  88. ; English strings
  89.  
  90. (IF (<> @language "deutsch")
  91. (
  92. (SET default_lang 4)
  93.  
  94. (SET #bad-kick "You must have at least Workbench 2.0+")
  95. (SET #bad-installer
  96. (CAT "You have an old version of the program 'Installer' "
  97.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  98.      "Please check your configuration!\n\n"
  99.      "If you proceed the whole archive will be installed.\n"
  100.      "%s will work without any restrictions!"
  101. ))
  102.  
  103. (SET #App-InstallMsg
  104. (CAT "\n\%s installation script.\n"
  105.         "This script installs %s on your Amiga.\n\n"
  106.         "Read the DOK-file for more information\n"
  107.         " on the distribution of %s.\n\n"
  108.         "%s © 1995-96 Guido Mersmann\n"
  109.         "All rights reserved."
  110. ))
  111.  
  112. (SET #App-Where
  113. (CAT "Where would you like to install %s ?\n"
  114.         "(A drawer will be created)"
  115. ))
  116.  
  117. (SET #App-Update
  118. (CAT "\nA %s drawer does already exist in the selected "
  119.         " directory. By selecting \"Proceed\", you"
  120.         " indicate that you want to update the %s"
  121.         " installation with the most recent version.\n"
  122.         "Several %s specific files will be overwritten!"
  123. ))
  124.  
  125. (SET #App-Main "Which %s version should be installed ?")
  126. (SET #App-Main-help
  127. (CAT "The OS2.0+ version should only be used on Systems with OS2."
  128.      " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
  129.      " Special OS3.0+ functions are used to save more memory."
  130. ))
  131.  
  132. (SET #App-Language "Which languages should be installed ?")
  133. (SET #App-Language-help
  134. (CAT "\nThe Amiga can be operated in many different"
  135.           " languages."
  136.           "To reduce the amount of space consumed by the"
  137.           " language files, you can select to have only the"
  138.           " files of specific languages copied.\n\n"
  139.           "Simply check the boxes of the languages you wish"
  140.           " to have available on your system.\n\n"
  141.           @askoptions-help
  142. ))
  143.  
  144. (SET #App-Docs "Which Amiga-guide files should be installed ?")
  145.  
  146. (SET #startup-prompt    "Some lines need to be added to S:User-Startup for %s\n\n%s")
  147.  
  148.  
  149. (SET #App-Exit "\n%s installed !!")
  150.  
  151.  
  152. ))
  153. ;----------------------------------------------------------------------------
  154. ;----------------------------------------------------------------------------
  155. ;       P_Requirements
  156. ;----------------------------------------------------------------------------
  157. ;----------------------------------------------------------------------------
  158. (PROCEDURE P_Requirements
  159. ; Workbench 37 or better required
  160. (IF (< (/ (getversion) 65536) 37)
  161. (
  162.   (abort #bad-kick)
  163. )
  164. )
  165. ; Installer 42.9 or better required
  166. (if (< @installer-version 2752521)
  167.   (
  168. (user 2)
  169.     (message (#bad-installer #ApplicationName))
  170.     (welcome)
  171.  
  172. ;---- Simple Copy all ask
  173. (SET #ApplicationDir
  174.         (TACKON
  175.                 (ASKDIR
  176.                         (PROMPT (#App-Where #ApplicationName))
  177.                         (HELP @askdir-help)
  178.                         (default #ApplicationDir)
  179.                 )
  180.                 #ApplicationName
  181.         )
  182. )
  183. (MAKEDIR #ApplicationDir (INFOS))
  184.                    (COPYFILES
  185.         (SOURCE "/")
  186.         (DEST #ApplicationDir)
  187.         (HELP @copyfiles-help)
  188.         (OPTIONAL <force>)
  189.         (ALL)
  190.         (INFOS)
  191.                    )
  192. (STARTUP #ApplicationName
  193.      (SET #dummy (cat "Path add Path " #ApplicationDir))
  194.       (HELP @startup-help)
  195.       (PROMPT (#startup-prompt #ApplicationName #dummy))
  196.       ;(COMMAND #dummy)
  197. )
  198.     (exit (quiet))
  199.   )
  200. )
  201. ) ;PROCEDURE
  202. ;----------------------------------------------------------------------------
  203. ;----------------------------------------------------------------------------
  204. ;       Ask for Catalogs
  205. ;----------------------------------------------------------------------------
  206. ;----------------------------------------------------------------------------
  207. (PROCEDURE P_AskCatalogs #Language
  208.  
  209. (SET #Dummy     (ASKOPTIONS
  210.                 (PROMPT #App-Language)
  211.                 (HELP #App-Language-help)
  212.                 (CHOICES
  213.                         "English"
  214.                         "Deutsch")
  215.                 (DEFAULT #Language)
  216.         )
  217. )
  218. ) ;PROCEDURE
  219. ;----------------------------------------------------------------------------
  220. ;----------------------------------------------------------------------------
  221. ;       Copy Selected Catalogs
  222. ;----------------------------------------------------------------------------
  223. ;----------------------------------------------------------------------------
  224. (PROCEDURE P_CopyCatalogs #Language
  225. (SET n 0)
  226. (SET #DestinationRoot (TACKON #ApplicationDir "Catalogs"))
  227. (SET #SourceRoot (TACKON #ArchiveDir "Catalogs"))
  228. (MAKEDIR #DestinationRoot)
  229.  
  230. (while (< n 2)
  231.         (SET #Dummy (SELECT n "english" "deutsch"))
  232.         (
  233.                 (IF (IN #Language n)
  234.                 (
  235.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  236.                         (COPYFILES
  237.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  238.                                 (DEST (TACKON #DestinationRoot #Dummy))
  239.                                 (HELP @copyfiles-help)
  240.                                 (ALL)
  241.                         )
  242.                 )
  243.                 )
  244.         )
  245. (SET n (+ n 1))
  246. )
  247. ) ;PROCEDURE
  248. ;----------------------------------------------------------------------------
  249. ;----------------------------------------------------------------------------
  250. ;       Ask for docs
  251. ;----------------------------------------------------------------------------
  252. ;----------------------------------------------------------------------------
  253. (PROCEDURE P_AskDocs #Documents
  254. (SET #Dummy             (ASKOPTIONS
  255.                         (PROMPT #App-Docs)
  256.                         (HELP @askoptions-help)
  257.                         (CHOICES
  258.                                 "english"
  259.                                 "deutsch"
  260.                         )
  261.                         (DEFAULT #Documents)
  262.                   )
  263. )
  264. ) ;PROCEDURE
  265. ;----------------------------------------------------------------------------
  266. ;----------------------------------------------------------------------------
  267. ;       Copy docs
  268. ;----------------------------------------------------------------------------
  269. ;----------------------------------------------------------------------------
  270. (PROCEDURE P_CopyDocs #Documents
  271. (SET n 0)
  272. (SET #DestinationRoot (TACKON #ApplicationDir "Docs"))
  273. (SET #SourceRoot (TACKON #ArchiveDir "Docs"))
  274. (MAKEDIR #DestinationRoot)
  275.  
  276. (while (< n 2)
  277.         (SET #Dummy (SELECT n
  278.                 "english"
  279.                 "deutsch"
  280.         )
  281.         )
  282.         (
  283.                 (IF (IN #Documents n)
  284.                 (
  285.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  286.                         (COPYFILES
  287.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  288.                                 (DEST (TACKON #DestinationRoot #Dummy))
  289.                                 (HELP @copyfiles-help)
  290.                                 (INFOS)
  291.                                 (ALL)
  292.                         )
  293.                 )
  294.                 )
  295.         )
  296. (SET n (+ n 1))
  297. )
  298. ) ;PROCEDURE
  299. ;----------------------------------------------------------------------------
  300. ;----------------------------------------------------------------------------
  301. ;       Copy_Dir (Dir)
  302. ;----------------------------------------------------------------------------
  303. ;----------------------------------------------------------------------------
  304. (PROCEDURE P_CopyDir #Dummy
  305.  
  306. (SET #DestinationRoot (TACKON #ApplicationDir #Dummy))
  307. (SET #SourceRoot (TACKON #ArchiveDir #Dummy))
  308. (MAKEDIR #DestinationRoot)
  309.  
  310.                    (COPYFILES
  311.         (SOURCE #SourceRoot)
  312.         (DEST #DestinationRoot)
  313.         (HELP @copyfiles-help)
  314.         (OPTIONAL <force>)
  315.         (ALL)
  316.         (INFOS)
  317.                    )
  318. ) ;PROCEDURE
  319. ;----------------------------------------------------------------------------
  320. ;----------------------------------------------------------------------------
  321. ;       Copy_File (Name)
  322. ;----------------------------------------------------------------------------
  323. ;----------------------------------------------------------------------------
  324. (PROCEDURE P_CopyFile #Dummy
  325.                    (COPYFILES
  326.         (SOURCE (TACKON #ArchiveDir #Dummy))
  327.         (DEST #ApplicationDir)
  328.         (HELP @copyfiles-help)
  329.         (OPTIONAL <force>)
  330.         (ALL)
  331.         (INFOS)
  332.                    )
  333. ) ;PROCEDURE
  334. ;----------------------------------------------------------------------------
  335. ;----------------------------------------------------------------------------
  336. ;       GetApplicationDir
  337. ;----------------------------------------------------------------------------
  338. ;----------------------------------------------------------------------------
  339. (PROCEDURE P_GetApplicationDir
  340. (SET #Dummy #ApplicationDir)
  341. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  342. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  343. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  344. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  345.  
  346. (SET #ApplicationDir
  347.         (TACKON
  348.                 (ASKDIR
  349.                         (PROMPT (#App-Where #ApplicationName))
  350.                         (HELP @askdir-help)
  351.                         (default #Dummy)
  352.                 )
  353.                 #ApplicationName
  354.         )
  355. )
  356. (SET @default-dest #ApplicationDir)
  357. ) ;PROCEDURE
  358. ;----------------------------------------------------------------------------
  359. ;----------------------------------------------------------------------------
  360. ;       P_Update
  361. ;----------------------------------------------------------------------------
  362. ;----------------------------------------------------------------------------
  363. (PROCEDURE P_Update
  364. (if (= (exists #ApplicationDir) 2)
  365.         (message (#App-Update #ApplicationName #ApplicationName #ApplicationName))
  366. )
  367. ) ;PROCEDURE
  368. ;----------------------------------------------------------------------------
  369. ;----------------------------------------------------------------------------
  370. ;       P_AskBinary
  371. ;----------------------------------------------------------------------------
  372. ;----------------------------------------------------------------------------
  373. (PROCEDURE P_AskBinary
  374. (set #Dummy (/ (getversion) 65536))
  375.  
  376. (if (= #Dummy 37) (set #Binary 0))
  377. (if (= #Dummy 38) (set #Binary 1))
  378. (if (> #Dummy 38) (set #Binary 2))
  379.  
  380. (set #Binary (askchoice
  381.         (prompt (#App-Main #ApplicationName))
  382.         (help (#App-Main-help #ApplicationName))
  383.         (choices
  384.         "OS2.0+"
  385.                         "OS2.1+"
  386.                         "OS3.0+"
  387.                         )
  388.         (default #Binary)
  389.             )
  390. )
  391. ) ;PROCEDURE
  392. ;----------------------------------------------------------------------------
  393. ;----------------------------------------------------------------------------
  394. ;       P_CopyBinary
  395. ;----------------------------------------------------------------------------
  396. ;----------------------------------------------------------------------------
  397. (PROCEDURE P_CopyBinary #Dummy
  398.  
  399. (set #BinaryName (SELECT #Binary #Dummy (CAT "Bin/" #Dummy "_OS21") (CAT "Bin/" #Dummy "_OS30")))
  400. (copyfiles
  401.         (source (TACKON #ArchiveDir #BinaryName) (infos))
  402.         (dest #ApplicationDir)
  403.         (newname #Dummy)
  404.         (help @copyfiles-help)
  405.         (optional <force>)
  406. )
  407. ) ;PROCEDURE
  408. ;----------------------------------------------------------------------------
  409. ;----------------------------------------------------------------------------
  410. ;       P_KeyFile
  411. ;----------------------------------------------------------------------------
  412. ;----------------------------------------------------------------------------
  413. (PROCEDURE P_KeyFile
  414.  
  415. (SET #Dummy (TACKON (TACKON #ArchiveDir "Keyfile") #ApplicationKeyfile))
  416.  
  417. (if (<> (exists #Dummy (noreq)) 0) ((P_CopyDir "KeyFile"))
  418. )
  419. ) ;PROCEDURE
  420. ;----------------------------------------------------------------------------
  421. ;----------------------------------------------------------------------------
  422. ;       P_CopyArchiveIcon
  423. ;----------------------------------------------------------------------------
  424. ;----------------------------------------------------------------------------
  425. (PROCEDURE P_CopyArchiveIcon
  426.                    (COPYFILES
  427.         (SOURCE (CAT (CAT (TACKON #ArchiveDir "/") #ApplicationName) ".info"))
  428.         (DEST (TACKON #ApplicationDir "/"))
  429.         (HELP @copyfiles-help)
  430.                    )
  431. ) ;PROCEDURE
  432. ;----------------------------------------------------------------------------
  433. ;----------------------------------------------------------------------------
  434. ;       P_Rename
  435. ;----------------------------------------------------------------------------
  436. ;----------------------------------------------------------------------------
  437. (PROCEDURE P_Rename #Dummy #Dummy2
  438. (if (= (exists (TACKON #ApplicationDir #Dummy)) 2)
  439.         (rename (TACKON #ApplicationDir #Dummy) (TACKON #ApplicationDir #Dummy2))
  440. )
  441. ) ;PROCEDURE
  442. ;----------------------------------------------------------------------------
  443. ;----------------------------------------------------------------------------
  444. ;       P_RealRename
  445. ;----------------------------------------------------------------------------
  446. ;----------------------------------------------------------------------------
  447. (PROCEDURE P_RealRename #Dummy #Dummy2
  448.    (Set #Dummy (TACKON #ApplicationDir #Dummy))
  449.    (Set #Dummy2 (TACKON #ApplicationDir #Dummy2))
  450.    (set #Dummy (CAT "rename " #Dummy " " #Dummy2))
  451.         (run #Dummy)
  452. ) ;PROCEDURE
  453. ;----------------------------------------------------------------------------
  454. ;----------------------------------------------------------------------------
  455. ;       MAIN
  456. ;----------------------------------------------------------------------------
  457. ;----------------------------------------------------------------------------
  458. (P_Requirements)
  459. (message (#App-installmsg #ApplicationName #ApplicationName #ApplicationName #ApplicationName))
  460. (welcome)
  461.  
  462.  (SET #ApplicationDir (P_GetApplicationDir))
  463.  
  464. (COMPLETE 1)
  465.  (P_Update)
  466.  (SET #Binary (P_AskBinary))
  467. (COMPLETE 2)
  468.  (SET #Language (P_AskCatalogs #Language))
  469. (COMPLETE 3)
  470.  (SET #Documents (P_AskDocs #Documents))
  471. (COMPLETE 4)
  472.  
  473. ;***** Delete old Data and Prefs
  474. (DELETE (TACKON #ApplicationDir "ColorSets") (ALL))
  475.  
  476. (MAKEDIR #ApplicationDir (INFOS))
  477. (MAKEDIR (TACKON #ApplicationDir "Prefs") (INFOS))
  478. (MAKEDIR (TACKON #ApplicationDir "GraphicSets/User") (INFOS))
  479. (MAKEDIR (TACKON #ApplicationDir "SampleSets/User") (INFOS))
  480. (MAKEDIR (TACKON #ApplicationDir "CharacterSets/User") (INFOS))
  481. (MAKEDIR (TACKON #ApplicationDir "MusicSets/User") (INFOS))
  482. (MAKEDIR (TACKON #ApplicationDir "Games/User") (INFOS))
  483. (MAKEDIR (TACKON #ApplicationDir "Caves/User") (INFOS))
  484.  
  485. (COMPLETE 10)
  486.  (P_CopyDir "Games")
  487. (COMPLETE 20)
  488.  (P_CopyDir "Caves")
  489. (COMPLETE 35)
  490.  (P_CopyDir "Title")
  491. (COMPLETE 45)
  492.  (P_CopyDir "Scores")
  493. (COMPLETE 55)
  494.  (P_CopyDir "SampleSets")
  495. (COMPLETE 65)
  496.  (P_CopyDir "MusicSets")
  497. (COMPLETE 75)
  498.  (P_CopyDir "GraphicSets")
  499. (COMPLETE 85)
  500.  (P_CopyDir "CharacterSets")
  501. (COMPLETE 97)
  502.  (P_CopyBinary #ApplicationName)
  503.  (P_CopyFile (CAT #ApplicationName ".info"))
  504.  (P_CopyCatalogs #Language)
  505.  (P_CopyDocs #Documents)
  506.  
  507.  (P_CopyArchiveIcon)
  508.   (P_CopyFile "Docs.info")
  509.   (P_CopyFile "GraphicSets.info")
  510.   (P_CopyFile "CharacterSets.info")
  511.   (P_CopyFile "SampleSets.info")
  512.   (P_CopyFile "MusicSets.info")
  513.   (P_CopyFile "WARNING!!!")
  514.   (P_CopyFile "WARNUNG!!!")
  515.  (P_Keyfile)
  516. ;--- CleanUp
  517. (DELETE (TACKON #ApplicationDir "Title.info"))
  518. (DELETE (TACKON #ApplicationDir "Prefs.info"))
  519. (DELETE (TACKON #ApplicationDir "Games.info"))
  520. (DELETE (TACKON #ApplicationDir "Caves.info"))
  521. (DELETE (TACKON #ApplicationDir "Scores.info"))
  522. (DELETE (TACKON #ApplicationDir "KeyFile.info"))
  523. (DELETE (TACKON #ApplicationDir "ColorSets.info"))
  524. (DELETE (TACKON #ApplicationDir "Install.info"))
  525. (DELETE (TACKON #ApplicationDir "Catalogs.info"))
  526. (run "avail Flush")
  527. (COMPLETE 100)
  528. ;(exit #App-exit)
  529.