home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / CDTools / Players / DeliTracker / Bonus / Deli14BitGenie.lha / Deli14Bit / Deli14Bit-Install next >
Text File  |  2000-03-13  |  9KB  |  310 lines

  1. ;--------------------------------------------------------------------------
  2. ; $VER: Deli14BitGenie Install V1.2 (13-Mar-00).
  3. ;
  4. ; Copyright ©1999-2000 Chris Hodges. All rights reserved.
  5. ;--------------------------------------------------------------------------
  6.  
  7. (delopts "force" "askuser" "nofail")
  8.  
  9. ;--------------------------------------------------------------------------
  10. ; Flexible installer script! So get our installation environment.
  11. ;--------------------------------------------------------------------------
  12.  
  13. (set #home @execute-dir)
  14.  
  15. ;--------------------------------------------------------------------------
  16. ; English Installer Strings
  17. ;--------------------------------------------------------------------------
  18.  
  19. (if (= @language "english")
  20.     (
  21.         (set #lang 1)
  22.  
  23.         (set #ioerror "An error occured during the installation, please report it to me.\n\nThanks.")
  24.  
  25.         (set #installitem1 "Deli14BitGenie Main file")
  26.         (set #installitem2 "Deli14BitGenie Guide")
  27.         (set #installitem3 "")
  28.         (set #installitem4 "Bonus Modules")
  29.         (set #installitem5 "Extra Fonts")
  30.  
  31.         (set #intro
  32.             (cat
  33.                 ("Welcome to the installation program for the\nDeli14BitGenie V%d.%d\n"
  34.                 (getversion ("DeliGenies/14Bit-Noteplayer")))
  35.                 "by Chris Hodges <hodges@in.tum.de>"
  36.                 "\n\nNote that this program is POSTCARD WARE!"
  37.                 "\n\nPlease select which parts do you want to install:"
  38.             )
  39.         )
  40.  
  41.         (set #intro_help
  42.             (cat
  43.                 "Except for the main file, nothing is mandatory. You are adviced to install "
  44.                 "the Guide and the new Players, however."
  45.             )
  46.         )
  47.  
  48.         (set #installwhere
  49.             (cat
  50.                 "I could not find DeliTracker myself, please select your DeliTracker drawer "
  51.                 "on your drive."
  52.             )
  53.         )
  54.  
  55.         (set #installwhere_help
  56.             (cat
  57.                 "The Deli14Bit Genie requires a DeliTracker installation. If you haven't "
  58.                 "installed DeliTracker yet, abort the installation and please do this first. "
  59.                 "DeliTracker can be found on AmiNet in the directory mus/play.\n\n"
  60.                 "This script will normally select the consequent drawers automatically. "
  61.                 "In expert mode, however, you can choose them yourself."
  62.             )
  63.         )
  64.  
  65.         (set #askdrawer_help
  66.             (cat
  67.                 "Please select the appropriate drawer. Normally this script finds the "
  68.                 "correct paths itself, but if you have a wierd installation of DeliTracker "
  69.                 "or have enabled expert mode, you may select every target directory yourself."
  70.             )
  71.         )
  72.  
  73.         (set #installgenie "Please select the drawer for the Genie main file (normally 'DeliGenies').")
  74.  
  75.         (set #installplayers "Please select the drawer for the bonus Players (normally 'DeliPlayers').")
  76.  
  77.         (set #installdocs "Where do you want the manual to be installed?")
  78.  
  79.         (set #installmods "Where do you want the bonus modules to be copied to?")
  80.  
  81.         (set #copygenie "Copying main genie file...")
  82.  
  83.         (set #copyplayers "Select the bonus Players you want to install:")
  84.  
  85.         (set #copyplayers_help
  86.             (cat
  87.                 "As a bonus, I've included a selection of uptodate DeliPlayers for DeliTracker. "
  88.                 "Using these you can be sure to get out the most of Deli14Bit. Have a look at the "
  89.                 "DeliPlayers.readme or in the docs for details."
  90.             )
  91.         )
  92.  
  93.         (set #copydocs "Copying manual...")
  94.         (set #copymods "Copying modules... ('.14b' files are prefs files)")
  95.         (set #copyfonts
  96.             (cat
  97.                 "Select drawer to copy the Protracker font to or skip this part.\n"
  98.                 "These fonts are pretty nice to use with the Deli14Bit Genie, but "
  99.                 "are not mandatory whatsoever."
  100.             )
  101.         )
  102.  
  103.     )
  104. )
  105.  
  106. ;--------------------------------------------------------------------------
  107. ; German Installer Strings
  108. ;--------------------------------------------------------------------------
  109.  
  110. (if (= @language "deutsch")
  111.     (
  112.         (set #lang 2)
  113.     )
  114. )
  115.  
  116. ;--------------------------------------------------------------------------
  117. ; Error cleanup code.
  118. ;--------------------------------------------------------------------------
  119.  
  120. (onerror
  121.     (
  122.         (if (> @ioerr 0)
  123.             (message (cat #ioerror "\n\n ERROR CODE: " @ioerr))
  124.         )
  125.     )
  126. )
  127.  
  128.  
  129. ;--------------------------------------------------------------------------
  130. ; Initial questions
  131. ;--------------------------------------------------------------------------
  132.  
  133. (set #mask
  134.     (askoptions
  135.         (prompt #intro)
  136.         (help #intro_help)
  137.         (choices #installitem1 #installitem2 #installitem3 #installitem4 #installitem5)
  138.         (default 27)
  139.     )
  140. )
  141.  
  142. ;--------------------------------------------------------------------------
  143. ; Prepare some paths
  144. ;--------------------------------------------------------------------------
  145.  
  146. (set #deliconfig (getenv "DELICONFIG"))
  147. (if #deliconfig
  148.     (
  149.         (set #delibase (pathonly #deliconfig))
  150.     ) (
  151.         (set #delibase
  152.             (askdir
  153.                 (default @default-dest)
  154.                 (prompt #installwhere)
  155.                 (help #installwhere_help)
  156.             )
  157.         )
  158.     )
  159. )
  160.  
  161. (if (bitand #mask 1)
  162.     (
  163.         (set #deligenies (tackon #delibase "DeliGenies"))
  164.         (set #ex (not (exists #deligenies)))
  165.         (if (or #ex (= @user-level 2))
  166.             (
  167.                 (set #deligenies
  168.                     (askdir
  169.                         (default (if #ex #delibase #deligenies))
  170.                         (prompt #installgenie)
  171.                         (help #askdrawer_help)
  172.                     )
  173.                 )
  174.             )
  175.         )
  176.     )
  177. )
  178.  
  179. (if (bitand #mask 2)
  180.     (
  181.         (set #delidocs (tackon #delibase "Docs"))
  182.         (set #ex (not (exists #delidocs)))
  183.         (if (or #ex (= @user-level 2))
  184.             (
  185.                 (set #delidocs
  186.                     (askdir
  187.                         (default (if #ex #delibase #delidocs))
  188.                         (prompt #installdocs)
  189.                         (help #askdrawer_help)
  190.                     )
  191.                 )
  192.             )
  193.         )
  194.     )
  195. )
  196.  
  197. (if (bitand #mask 4)
  198.     (
  199.         (set #deliplayers (tackon #delibase "DeliPlayers"))
  200.         (set #ex (not (exists #deliplayers)))
  201.         (if (or #ex (= @user-level 2))
  202.             (
  203.                 (set #deliplayers
  204.                     (askdir
  205.                         (default (if #ex #delibase #deliplayers))
  206.                         (prompt #installplayers)
  207.                         (help #askdrawer_help)
  208.                     )
  209.                 )
  210.             )
  211.         )
  212.     )
  213. )
  214.  
  215. (if (bitand #mask 8)
  216.     (
  217.         (set #delimods "ST-00:Modules")
  218.         (set #ex (not (exists #delimods (noreq))))
  219.         (if (or #ex (= @user-level 2))
  220.             (
  221.                 (set #delimods
  222.                     (askdir
  223.                         (default (if #ex #delibase #delimods))
  224.                         (prompt #installmods)
  225.                         (help #askdrawer_help)
  226.                     )
  227.                 )
  228.             )
  229.         )
  230.     )
  231. )
  232. ;--------------------------------------------------------------------------
  233. ; Copy the files.
  234. ;--------------------------------------------------------------------------
  235.  
  236. (if (bitand #mask 1)
  237.     (
  238.         (copyfiles
  239.             (prompt #copygenie)
  240.             (help #copyfiles-help)
  241.             (source "DeliGenies")
  242.             (dest #deligenies)
  243.             (all)
  244.             (confirm)
  245.         )
  246.     )
  247. )
  248.  
  249. (if (bitand #mask 2)
  250.     (
  251.         (copyfiles
  252.             (prompt #copydocs)
  253.             (help @copyfiles-help)
  254.             (source "Deli14BitGenie.guide")
  255.             (dest #delidocs)
  256.             (confirm)
  257.             (infos)
  258.         )
  259.     )
  260. )
  261.  
  262. (if (bitand #mask 4)
  263.     (
  264.         (copyfiles
  265.             (prompt #copyplayers)
  266.             (help #copyplayers_help)
  267.             (source "DeliPlayers")
  268.             (dest #deliplayers)
  269.             (all)
  270.             (confirm)
  271.         )
  272.     )
  273. )
  274.  
  275. (if (bitand #mask 8)
  276.     (
  277.         (copyfiles
  278.             (prompt #copymods)
  279.             (help @copyfiles-help)
  280.             (source "Modules")
  281.             (dest #delimods)
  282.             (all)
  283.             (confirm "average")
  284.         )
  285.     )
  286. )
  287.  
  288. (if (bitand #mask 16)
  289.     (
  290.         (copyfiles
  291.             (prompt #copyfonts)
  292.             (help @copyfiles-help)
  293.             (source "Fonts")
  294.             (dest "FONTS:")
  295.             (fonts)
  296.             (all)
  297.             (confirm "average")
  298.         )
  299.     )
  300. )
  301.  
  302.  
  303. ;--------------------------------------------------------------------------
  304. ; Installation successful!
  305. ;--------------------------------------------------------------------------
  306.  
  307. (set @default-dest #delibase)
  308. (exit)
  309.  
  310.