home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / abook_10upd / install < prev    next >
Text File  |  1996-02-18  |  10KB  |  467 lines

  1. ; $VER: Address-Book V01.00
  2. ; Copyright ©'94/96 by Jörg Krause - All Rights Reserved
  3.  
  4. (complete 0)
  5.  
  6. (set #classdir "SYS:Classes")
  7.  
  8. ; --- English (default) strings ---
  9.  
  10. (set #introduction (cat "\n"
  11.  
  12.     "Address-Book V01.00, All Rights Reserved.        \n"
  13.     "                                                 \n"
  14.     "Address-Book     ©'94/96 Jörg Krause             \n"
  15.     "MUI              ©'93/96 Stefan Stuntz           \n"
  16.     "Textfield.gadget ©'95 Mark Thomas                \n"
  17.     "                                                 \n"
  18.     "Address-Book is NOT 'freely distributable'.      \n"
  19.     "Please have a look at the licence file before    \n"
  20.     "installing Address-Book; installing this software\n"
  21.     "means accepting that licence. Thank you.         \n"
  22. ))
  23.  
  24. (set #german "German")
  25.  
  26. (set #english "English")
  27.  
  28. (set #badkick "\n Sorry, this package requires OS v2.04 or better.\n")
  29.  
  30. (set #where "Where do you want to install Address-Book ?\nATTENTION: No additional drawer will be created.")
  31.  
  32. (set #wbstart "Should I copy the Arexx-Server into  WBStartup ?\n")
  33.  
  34. (set #cat "Select the catalog which you want to install.\n")
  35.  
  36. (set #which_icons (cat "\n"
  37.     " Select the iconset wich you want to install. \n"
  38. ))
  39.  
  40. (set #Developer "Should I copy the developer package?\n")
  41.  
  42. (set #Devhelp (cat "\n"
  43.  
  44.     " The developer package includes some examples \n"
  45.     " how to use the API interface.                \n"
  46. ))
  47.  
  48.  
  49. (set #textfield "Should textfield.gadget be copied?\n")
  50.  
  51. (set #help_textfield (cat "\n"
  52.  
  53.     " The textfield gadget is needed for the edit window. \n"
  54. ))
  55.  
  56. (set #help_which_icons (cat "\n"
  57.  
  58.     " Please select wich iconset should be         \n"
  59.     " installed.                                   \n"
  60. ))
  61.  
  62.  
  63. (set #4col "Standard Workbench Icons")
  64.  
  65. (set #mwb  "Magic-WB Style Icons")
  66.  
  67. (set #rare "Rare Diamond Icons")
  68.  
  69. (set #startuphelp (cat "\n"
  70.  
  71.     " If the Arexx-Server is copied into WBStartup,\n"
  72.     " you should access the database via Arexx     \n"
  73.     " at every time.                               \n"
  74. ))
  75.  
  76. (set #where_help (cat "\n"
  77.  
  78.     " Simply select a directory (a root directory is   \n"
  79.     " fine, too). I'm going to copy Address-Book       \n"
  80.     " within the directory you specify. You should     \n"
  81.     " select a directory which has an icon attached to \n"
  82.     " it (e.g. SYS:Utilities).                         \n"
  83.     "                                                  \n"
  84.     " NOTE: No additional drawer will be created.      \n"
  85. ))
  86.  
  87. (set #help_cat (cat "\n"))
  88.  
  89.  
  90. ; --- German (default) strings ---
  91.  
  92. (if (= @language "deutsch") (
  93.  
  94. (set #introduction (cat "\n"
  95.  
  96.     "Address-Book V01.00, Alle Rechte vorbehalten.  \n"
  97.     "                                               \n"
  98.     "Address-Book     ©'94/96 Jörg Krause           \n"
  99.     "MUI              ©'93/96 Stefan Stuntz         \n"
  100.     "Textfield.gadget ©'95 Mark Thomas              \n"
  101.     "                                               \n"
  102.     "Address-Book ist NICHT 'frei vertreibbar'.     \n"
  103.     "Bitte lesen Sie die Lizenz-Datei, bevor Sie    \n"
  104.     "Address-Book installieren; Mit der Installation\n"
  105.     "stimmen Sie den Lizenzbedingungen zu. Viel Spaß\n"
  106.     "mit dem Programm.                              \n"
  107. ))
  108.  
  109. (set #german "Deutsch")
  110.  
  111. (set #english "Englisch")
  112.  
  113. (set #badkick "\n Sorry, dieses Paket benötigt mind. OS v2.04.\n")
  114.  
  115. (set #where "In welches Verzeichnis soll Address-Book hinein kopiert werden ?\nACHTUNG: Es wird kein eigenes Verz. erzeugt.\n")
  116.  
  117. (set #wbstart "Soll der Arexx-Server in den WBStartup-Ordner kopiert werden ?\n")
  118.  
  119. (set #cat "Welche Sprache soll installiert werden ?\n")
  120.  
  121. (set #Developer "Soll das Developer Paket installiert werden?\n")
  122.  
  123. (set #which_icons "Welches Iconset soll installiert werden?\n")
  124.  
  125. (set #textfield "Soll das benoetigte textfield.gadget mitkopiert werden?\n")
  126.  
  127. (set #help_textfield (cat "\n"
  128.  
  129.     " wird benoetigt.                              \n"
  130. ))
  131.  
  132. (set #help_which_icons (cat "\n"
  133.  
  134.     " Entscheiden Sie sich, welches Iconset sie    \n"
  135.     " installieren wollen.                         \n"
  136. ))
  137.  
  138. (set #Devhelp (cat "\n"
  139.  
  140.     " Das Developer Paket beinhaltet Beispiel-     \n"
  141.     " sourcen über die Benutzung der API.          \n"
  142. ))
  143.  
  144. (set #4col "Standard Workbench Icons")
  145.  
  146. (set #mwb  "Magic-WB Style Icons")
  147.  
  148. (set #rare "Rare Diamond Icons")
  149.  
  150. (set #startuphelp (cat "\n"
  151.     
  152.     " Der Arexx-Server kann in den WBStartup Ordner\n"
  153.     " kopiert werden. Dadurch hat man mittels Arexx\n"
  154.     " jederzeit Zugriff auf die Daten.             \n"
  155. ))
  156.  
  157. (set #where_help (cat "\n"
  158.  
  159.     " Wählen Sie ein beliebiges Verzeichnis. Hauptver-\n"
  160.     " zeichnisse wie SYS: können auch benutzt werden. \n"
  161.     " In dem angegebenen Pfad wird Address-Book       \n"
  162.     " installiert werden.                             \n"
  163.     " Sie sollten ein Verzeichnis wählen, dem ein Icon\n"
  164.     " zugeordnet ist, um Address-Book auch über die   \n"
  165.     " Workbench starten zu können.                    \n"
  166.     " Achtung: Es wird kein eigenes Verzeichnis für   \n"
  167.     "          Address-Book erzeugt.                  \n"
  168. ))
  169.  
  170. (set #help_cat (cat "\n"))
  171.  
  172. ))
  173. ;sure we are running under OS2.04 or above
  174. (if (< (/ (getversion) 65536) 37)
  175.     (
  176.       (message #badkick)
  177.       (exit (quiet))
  178.     )
  179. )
  180.  
  181. (message #introduction)
  182.  
  183. (welcome)
  184.  
  185. ;Get directory to install Address-Book in.
  186. (set destdir 
  187.     (askdir 
  188.         (prompt #where)
  189.         (help   #where_help)
  190.         (default "SYS:")
  191.     )
  192. )
  193.  
  194. (complete 10)
  195.  
  196. ;Copy Address-Book to destination.
  197. (copyfiles
  198.     (source "Address-Book")
  199.     (dest destdir)
  200. )
  201.  
  202. (complete 20)
  203.  
  204. ;copy the modulues
  205. (copyfiles
  206.     (source "modules")
  207.     (dest (tackon destdir "modules"))
  208.     (all)
  209. )
  210.  
  211. ;create the prefs directory
  212. (if (= 0 (exists (tackon destdir "prefs") (noreq)))
  213.     (makedir (tackon destdir "prefs"))
  214. )
  215.  
  216.  
  217. (complete 30)
  218.  
  219. (if (= 0 (exists (tackon destdir "data/Address-Book.dat") (noreq)))
  220.     (copyfiles
  221.        (source "data/Address-Book.dat")
  222.        (dest (tackon destdir "Data"))
  223.     )
  224. )
  225.  
  226. (complete 40)
  227.  
  228. ;Copy Mui-License
  229. (copyfiles
  230.     (source "ReadMe.mui")
  231.     (dest destdir)
  232. )
  233.  
  234. (set developer
  235.     (askbool
  236.           (prompt #Developer)
  237.           (help #Devhelp)
  238.           (choices "OK" "Skip")
  239.           (default 0)
  240.     )
  241. )
  242.  
  243. (if developer
  244.     (copyfiles
  245.         (source "Developer")
  246.         (dest (tackon destdir "Developer" ))
  247.         (all)
  248.     )
  249. )
  250.  
  251.  
  252.  
  253. (complete 50)
  254.  
  255. (set copycat
  256.     (askchoice
  257.           (prompt #cat)
  258.           (help #help_cat)
  259.           (choices #german #english)
  260.           (default 0)
  261.     )
  262. )
  263.  
  264. (if (= 0 (exists (tackon destdir "Help") (noreq)))
  265.     (makedir (tackon destdir "Help"))
  266. )
  267.  
  268. ;copy the docs
  269.  
  270. (complete 60)
  271.  
  272. (if (= copycat 0)
  273.     (copyfiles
  274.         (source "Help/deutsch")
  275.         (dest (tackon destdir "Help/Deutsch"))
  276.         (all)
  277.     )
  278. )
  279.  
  280. (if (= copycat 1)
  281.     (copyfiles
  282.         (source "Help/english")
  283.         (dest (tackon destdir "Help/English"))
  284.         (all)
  285.     )
  286. )
  287.  
  288. (if (= copycat 0)
  289.     (copyfiles
  290.         (source "Catalogs/deutsch")
  291.         (dest "Locale:catalogs/deutsch")
  292.         (all)
  293.     )
  294. )
  295.  
  296. ;Copy textfield.gadget
  297. (copylib
  298.     (confirm)
  299.     (prompt #textfield)
  300.     (help   #help_textfield)
  301.     (source "Classes/Gadgets/textfield.gadget")
  302.     (dest   "Sys:Classes/Gadgets/")
  303. )
  304.  
  305. ;Copy arexx & macros
  306. (copyfiles
  307.     (source "Arexx")
  308.     (dest (tackon destdir "Arexx"))
  309.     (all)
  310. )
  311.  
  312. (complete 70)
  313.  
  314. (set answer
  315.     (askbool
  316.           (prompt #wbstart)
  317.           (help #startuphelp)
  318.           (choices "OK" "Skip")
  319.           (default 0)
  320.     )
  321. )
  322.  
  323. (if answer
  324.     (copyfiles
  325.         (source "WBStartup")
  326.         (dest "sys:WBStartup")
  327.         (all)
  328.     )
  329. )
  330.  
  331. (set icons (askchoice
  332.  
  333.     (prompt #which_icons)
  334.     (help   #help_which_icons)
  335.  
  336.     (default 0)
  337.  
  338.     (choices
  339.         #4col
  340.         #mwb
  341.         #rare
  342.     )
  343. ))
  344.  
  345. (if (= icons 0) (
  346.     (set sourcedir "Icons/4col/")
  347. ))
  348. (if (= icons 1) (
  349.     (set sourcedir "Icons/mwb/")
  350. ))
  351. (if (= icons 2) (
  352.     (set sourcedir "Icons/Rare/")
  353. ))
  354.  
  355. (copyfiles
  356.         (source (tackon sourcedir "Address-Book.info"))
  357.         (dest   destdir)
  358. )
  359.  
  360. (copyfiles
  361.     (source (tackon sourcedir "ReadMe.mui.info"))
  362.     (dest   destdir)
  363. )
  364.  
  365. (copyfiles
  366.     (source (tackon sourcedir "Data.info"))
  367.     (dest   destdir)
  368. )
  369.  
  370. (copyfiles
  371.     (source (tackon sourcedir "Help.info"))
  372.     (dest   destdir)
  373. )
  374.  
  375. (copyfiles
  376.     (source (tackon sourcedir "Arexx.info"))
  377.     (dest   destdir)
  378. )
  379.  
  380. (if (= copycat 0)
  381.     (copyfiles
  382.         (source (tackon sourcedir "Deutsch.info"))
  383.         (dest   (tackon destdir "Help/"))
  384.     )
  385. )
  386.  
  387. (if (= copycat 1)
  388.     (copyfiles
  389.         (source (tackon sourcedir "English.info"))
  390.         (dest   (tackon destdir "Help/"))
  391.     )
  392. )
  393.  
  394. (complete 80)
  395.  
  396. (if (= copycat 0)
  397.     (copyfiles
  398.         (source (tackon sourcedir "Address-Book.guide.info"))
  399.         (dest   (tackon destdir "Help/Deutsch/"))
  400.     )
  401. )
  402.  
  403. (if (= copycat 1)
  404.     (copyfiles
  405.         (source (tackon sourcedir "Address-Book.guide.info"))
  406.         (dest   (tackon destdir "Help/English/"))
  407.     )
  408. )
  409.  
  410. (if (= copycat 0)
  411.     (copyfiles
  412.         (source (tackon sourcedir "Bestellung.info"))
  413.         (dest   (tackon destdir "Help/Deutsch/"))
  414.     )
  415. )
  416.  
  417. (if (= copycat 1)
  418.     (copyfiles
  419.         (source (tackon sourcedir "Orderform.info"))
  420.         (dest   (tackon destdir "Help/English/"))
  421.     )
  422. )
  423.  
  424. (if answer
  425.         (copyfiles
  426.             (source (tackon sourcedir "ABook-Server.info"))
  427.             (dest   "SYS:WBStartup/")
  428.         )
  429. )
  430.  
  431. (if answer
  432.         (tooltype
  433.             (dest "SYS:WBStartup/ABook-Server")
  434.             (settooltype "DATAFILE" (tackon destdir "data/Address-Book.dat"))
  435.             (noposition)
  436.         )
  437. )
  438.  
  439. ;Correct @default-dest so that final information is correct.
  440. (set @default-dest destdir)
  441.  
  442. (complete 90)
  443.  
  444. ; Copy Keyfile if exist
  445. (if (= 1 (exists "ABook.key" (noreq)))
  446.     (copyfiles
  447.        (source "ABook.key")
  448.        (dest   "s:")
  449.     )
  450. )
  451.  
  452.  
  453. (complete 95)
  454.  
  455. ; Remove the old printer settings
  456. (if (= 1 (exists "ENV:MUI/Address-Book.prt" (noreq)))
  457.     (delete "ENVARC:MUI/Address-Book.prt")
  458.     (delete "ENV:MUI/Address-Book.prt")
  459. )
  460.  
  461. ;remove silly .info
  462. (delete (tackon destdir ".info"))
  463.  
  464. (complete 100)
  465.  
  466. (exit)
  467.