home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Database / AMIGABAS.LHA / AmigaBase / Install-AB / English < prev   
Encoding:
Text File  |  1995-11-07  |  6.3 KB  |  279 lines

  1. ; This is the Installer-script for AmigaBase.
  2.  
  3. (set OS_version (/ (getversion) 65536))
  4. (set IsKick20 (>= OS_Version 36))
  5.  
  6. (transcript "Installing AmigaBase V2.2.")
  7. (complete 0)
  8.  
  9. (set HD_Installation
  10.    (=
  11.       (askchoice
  12.          (prompt "Choose installation:")
  13.          (help "The harddisk installation installs all files"
  14.                "in a seperate directory, while the floppy"
  15.                "installation creates a working disk.")
  16.          (choices "Harddisk installation" "Floppy installation")
  17.          (default 0)
  18.       )
  19.       0
  20.    )
  21. )
  22.  
  23. (if HD_Installation
  24.    (set AB_dest_parent
  25.       (askdir
  26.          (prompt "Select disk/directory where AmigaBase should be installed. "
  27.                  "The installation program automatically creates the directory "
  28.                  "\"AmigaBase\" in this directory.")
  29.          (help @askdir-help)
  30.          (default @default-dest)
  31.       )
  32.    )
  33.    (
  34.       (set AB_dest_parent "RAM:")
  35.       (message
  36.          "The installation script assumes that you have already "
  37.          "created a copy of your Workbench disk which has at "
  38.          "least 100 kBytes free, rebooted your computer from "
  39.          "that disk and formatted a new disk with name \"AmigaBase\".\n\n"
  40.          "If not then please abort the installation now, "
  41.          "do the steps above and restart the installation.\n\n"
  42.          "The floppy installation will first copy all needed files "
  43.          "to RAM:AmigaBase and then copy them to the disk."
  44.       )
  45.    )
  46. )
  47.  
  48. (set AB_dest (tackon AB_dest_parent "AmigaBase"))
  49.  
  50. (if HD_Installation
  51.    (
  52.       (set @default-dest AB_dest)
  53.  
  54.          (if (exists AB_dest)
  55.             (message
  56.                "You have already installed AmigaBase in this directory. "
  57.                "If you continue the old installation will be overwritten!"
  58.             )
  59.          )
  60.       )
  61. )
  62.  
  63. (complete 5)
  64.  
  65. ; Make dest directory and create icon
  66. (makedir AB_dest)
  67. (copyfiles
  68.    (source "/AB_dir.icon")
  69.    (dest AB_dest_parent)
  70.    (newname "AmigaBase.info")
  71. )
  72.  
  73. (complete 10)
  74.  
  75. ;copy AmigaBase
  76. (set packed (exists "/AmigaBase.lha"))
  77. (if packed
  78.    (set lha (expandpath "lha"))
  79. )
  80.  
  81. (copyfiles
  82.    (prompt "Copying AmigaBase.")
  83.    (help @copyfiles-help)
  84.    (source (if packed "/AmigaBase.lha" "/AmigaBase"))
  85.    (dest AB_dest)
  86.    (infos)
  87.    (confirm)
  88. )
  89.  
  90. (if packed
  91.    (
  92.       (working "Extracting AmigaBase...")
  93.       (run ("cd \"%s\"\n\"%s\" x AmigaBase.lha\n delete AmigaBase.lha" AB_dest lha))
  94.    )
  95. )
  96.  
  97. (complete 15)
  98.  
  99. ;copy some text files
  100. (copyfiles
  101.    (prompt "Copying the text files.")
  102.       (help @copyfiles-help)
  103.       (source "/")
  104.       (dest AB_dest)
  105.       (pattern "(ReadMe#?|LiesMich|BUGS|HISTORY|TODO|Update#?|Reg_Form#?)")
  106.       (infos)
  107.       (confirm)
  108. )
  109.  
  110. (complete 20)
  111.  
  112. ;copy reqtools.library
  113. (copylib
  114.    (prompt "Installing 'reqtools.library'.")
  115.    (help @copylib-help)
  116.    (source
  117.       (if IsKick20
  118.          "/libs20/reqtools.library"
  119.          "/libs13/reqtools.library"
  120.       )
  121.    )
  122.    (dest "libs:")
  123.    (confirm)
  124. )
  125.  
  126. (complete 30)
  127.  
  128. ;copy gadget.library
  129. (copylib
  130.    (prompt "Installing 'gadget.library'.")
  131.    (help @copylib-help)
  132.    (source "/libs13/gadget.library")
  133.    (dest "libs:")
  134.    (confirm)
  135. )
  136.  
  137. (complete 40)
  138.  
  139. (if HD_Installation
  140.    (
  141.       ;make AmigaBase assign in startup-sequence
  142.  
  143.       (startup "AmigaBase"
  144.          (prompt
  145.             "An assign instruction need to be added to the \"S:user-startup\" "
  146.             "so that AmigaBase can be started by double clicking an "
  147.             "AmigaBase project."
  148.          )
  149.          (help @startup-help)
  150.          (command (cat "assign AmigaBase: " AB_dest "\n"))
  151.       )
  152.       (if (exists AB_dest)
  153.          (makeassign "AmigaBase" AB_dest)
  154.       )
  155.    )
  156. )
  157.  
  158. (complete 50)
  159.  
  160. ;copy catalog files
  161. (if IsKick20
  162.    (copyfiles
  163.       (prompt "Which additional languages should AmigaBase support?")
  164.       (help "The builtin language of AmigaBase is 'english'. ")
  165.       (source "/Catalogs")
  166.       (dest "LOCALE:Catalogs")
  167.       (pattern "#?")
  168.       (confirm)
  169.    )
  170. )
  171.  
  172. (complete 60)
  173.  
  174. ;create "Data" directory
  175. (makedir (tackon AB_dest "Data"))
  176. (copyfiles
  177.    (source "/Data.info")
  178.    (dest AB_dest)
  179.    (newname "Data.info")
  180. )
  181.  
  182. (complete 70)
  183.  
  184. ;copy optional examples
  185. (set choice
  186.    (askoptions
  187.       (prompt "Copying optional examples.")
  188.       (help @askoptions-help)
  189.       (choices "Deutsch" "English")
  190.    )
  191. )
  192.  
  193. (if choice
  194.    (
  195.       (set Data_dest (tackon AB_dest "Data"))
  196.  
  197.       (copyfiles
  198.          (prompt "Copying Mandel picture.")
  199.          (help @copyfiles-help)
  200.          (source "/Data")
  201.          (dest Data_dest)
  202.          (choices "Graphics")
  203.          (infos)
  204.       )
  205.  
  206.       (set packed (exists "/Data/Deutsch.lha"))
  207.       (if packed
  208.          (set lha (expandpath "lha"))
  209.       )
  210.  
  211.       (if (BITAND choice 1)
  212.          (
  213.             (copyfiles
  214.                (prompt "Copying German example projects.")
  215.                (help @copyfiles-help)
  216.                (source "/Data")
  217.                (dest Data_dest)
  218.                (choices (if packed "Deutsch.lha" "Deutsch"))
  219.                (infos)
  220.             )
  221.             (if packed
  222.                (
  223.                   (working "Extracting archive...")
  224.                   (run ("cd \"%s\"\n\"%s\" x Deutsch.lha\n delete Deutsch.lha" Data_dest lha))
  225.                )
  226.             )
  227.          )
  228.       )
  229.       (if (BITAND choice 2)
  230.          (
  231.             (copyfiles
  232.                (prompt "Copying English example projects.")
  233.                (help @copyfiles-help)
  234.                (source "/Data")
  235.                (dest Data_dest)
  236.                (choices (if packed "English.lha" "English"))
  237.                (infos)
  238.             )
  239.             (if packed
  240.                (
  241.                   (working "Extracting archive...")
  242.                   (run ("cd \"%s\"\n\"%s\" x English.lha\n delete English.lha" Data_dest lha))
  243.                )
  244.             )
  245.          )
  246.       )
  247.    )
  248. )
  249.  
  250. (complete 80)
  251.  
  252. (if (NOT HD_Installation)
  253.    (
  254.       (askdisk
  255.          (prompt
  256.             "All necessary files have been copied to RAM:AmigaBase. "
  257.             "Please insert now the disk \"AmigaBase\"."
  258.          )
  259.          (help @askdisk-help)
  260.          (dest "AmigaBase")
  261.       )
  262.       (copyfiles
  263.          (source AB_dest)
  264.          (dest "AmigaBase:")
  265.          (all)
  266.       )
  267.       (run "delete ram:AmigaBase ram:AmigaBase.info ALL QUIET FORCE")
  268.  
  269.       (set @default-dest "AmigaBase:")
  270.    )
  271. )
  272.  
  273. (complete 100)
  274.  
  275. (exit "Note that you may need to reboot your computer "
  276.       "if older versions of reqtools.library or gadget.library "
  277.        "are still in memory.")
  278.  
  279.