home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games 1996 January / amigagames-cdrom-1996-01.iso / archive / userbox / publicdomain / timeguide_155.lha / TIME_GUIDE / Install / Install_Guide next >
Text File  |  1995-11-04  |  6KB  |  271 lines

  1. ; $VER: Install_Guide 1.55 (04.11.95)
  2. ; Script to install Time.guide
  3.  
  4. (complete 0)
  5.  
  6. (set old_level @user-level)
  7. (set @default-dest "sys:")
  8.  
  9. ;=============================================================================
  10. ; Deutsch strings
  11. ;(if (= @languge "Deutsch")
  12. ;(
  13.    (set #bad-kick
  14.    (cat "Sie benötigen AMIGA OS 2.0+ zum Installieren der "
  15.         "Time.guide!"))
  16.  
  17.     (set #ask-dir    "Wohin soll die Time.guide installiert werden?")
  18.  
  19.     (set #ask-funktion "Was soll installiert werden?\n\n")
  20.     (set #ask1 "AmigaGuide")
  21.     (set #ask2 "Startfiles")
  22.     (set #ask3 "Amiga-Magazin-Liste")
  23.     (set #ask4 "Amiga-Plus-Liste")
  24.     (set #ask5 "SaarAG-Liste")
  25.     (set #ask6 "Time-Liste")
  26.     (set #ask7 "Indizes")
  27.     (set #ask8 "Hilfsprogramme")
  28.     (set #ask9 "Sourcecodes")
  29.     (set #ask-funktion-help
  30.     (cat "\nSie müssen auswählen, was installiert werden soll.\n\n"
  31.         "Mit \"" #ask1 "\" wird dieses auf Ihre Startdisk installiert\n"
  32.         "\"" #ask2 "\" installiert Startfiles zur Time.guide (werden unbedingt benötigt)\n"
  33.         "\"" #ask3 "\" installiert Inhalte der Amiga-Magazin-Disks\n"
  34.         "\"" #ask4 "\" installiert Inhalte der Amiga-Plus-Disks\n"
  35.         "\"" #ask5 "\" installiert Inhalte der SaarAG-Disks\n"
  36.         "\"" #ask6 "\" installiert Inhalte der Time-Disks\n"
  37.         "\"" #ask7 "\" installiert den Index zu allen Serien\n"
  38.         "\"" #ask8 "\" installiert Bestellprogramme\n"
  39.         "\"" #ask9 "\" zu den Hilfsprogrammen\n"
  40.     ))
  41.     (set #ask-funktion-2 "Welche Sprache(n) wollen Sie installieren?\n\n")
  42.  
  43.     (set #Install "Installiere ")
  44.     (set #Proc-Quest "Welche Version der Bestellsoftware soll installiert werden?\n\n")
  45.     (set #Unpack "Entpacke ")
  46.     (set #default_lang 1)
  47. ;))
  48. ;=============================================================================
  49. ; make sure we are running under V37+
  50.  
  51. (if (< (/ (getversion) 65536) 37)
  52.   (
  53.    abort #bad-kick
  54.   )
  55. )
  56.  
  57. ;=============================================================================
  58. ; Verzeichnis auswählen:
  59.  
  60. (user 2)
  61. (set target_dir (askdir (prompt #ask-dir @askdir)
  62.          (help @askdir-help)
  63.             (default @default-dest)
  64.             (disk)
  65.       )
  66. )
  67. (user old_level)
  68. (set @default-dest target_dir)
  69.  
  70. ;=============================================================================
  71. ; Routine zum kopieren/entpacken der Time.guide
  72. (user 2)
  73. (set timesel
  74.     (askoptions (prompt #ask-funktion)
  75.     (help #ask-funktion-help)
  76.     (choices #ask1
  77.                 #ask2
  78.                 #ask3
  79.                 #ask4
  80.                 #ask5
  81.                 #ask6
  82.                 #ask7
  83.                 #ask8
  84.                 #ask9
  85.     )
  86.     (default 2)
  87. ))
  88. (user old_level)
  89.  
  90. (set m 0)
  91. (set n 0)
  92. (while (set Timehier
  93.     (select n #ask1
  94.                 #ask2
  95.                 #ask3
  96.                 #ask4
  97.                 #ask5
  98.                 #ask6
  99.                 #ask7
  100.                 #ask8
  101.                 #ask9
  102.                 ""
  103.     ))
  104. (
  105.     (if (IN Timesel n)
  106.     (
  107.         (set #Name    (select n    "AmigaGuide"
  108.                                         "Startfiles"
  109.                                         "AmiMag"
  110.                                         "AmiPlus"
  111.                                         "Saar"
  112.                                         "Time"
  113.                                         "Indizes"
  114.                                         "Zusatz"
  115.                                         "Source"
  116.                         )
  117.         )
  118.         (set #Complete (* (+ n 1) 11))
  119.         (WORKING (CAT #Unpack Timehier))
  120.         (RUN    (cat "lzx x -r /" #Name ".lzx ram:"))
  121.  
  122.         (if (= n 0)
  123.         (
  124.             (copylib    (prompt "AmigaGuide.library" @copylib)
  125.                         (help   @copylib-help)
  126.                         (source "ram:AmigaGuide/amigaguide.library")
  127.                         (dest "Libs:")
  128.                         (confirm 2)
  129.             )
  130.             (copylib    (prompt "AmigaGuide" @copylib)
  131.                         (help   @copylib-help)
  132.                         (source "ram:AmigaGuide/amigaguide")
  133.                         (dest "c:")
  134.                         (confirm 2)
  135.             )
  136.         ))
  137.         (if (AND (> n 0) (< n 7))
  138.         (
  139.             (copyfiles    (prompt (cat #Install Timehier) @copyfiles)
  140.                             (help   @copyfiles-help)
  141.                             (source (cat "ram:" #Name "/"))
  142.                             (dest target_dir)
  143.                             (all)
  144.             )
  145.         ))
  146.         (if (= n 7)
  147.         (
  148.             (set CPUStr (database "cpu"))
  149.             (if (< CPUStr "68020")
  150.                 (set NewProc 0)
  151.                 (set NewProc 1)
  152.             )
  153.             (if (> @user-level 1)
  154.                 (set NewProc
  155.                     (askchoice    (prompt #Proc-Quest)
  156.                                     (help @askchoice)
  157.                                     (choices "MC68000/10"
  158.                                                 "MC68020/30/40/60"
  159.                                     )
  160.                                     (default NewProc)
  161.                     )
  162.                 )
  163.             )
  164.             (if (< NewProc 1)
  165.                 (
  166.                     (delete (CAT "ram:" #Name "/T_Bestellen.020+"))
  167.                 )
  168.                 (
  169.                     (delete (CAT "ram:" #Name "/T_Bestellen")) 
  170.                     (rename (CAT "ram:" #Name "/T_Bestellen.020+")
  171.                               (CAT "ram:" #Name "/T_Bestellen")
  172.                     )
  173.                 )
  174.             )
  175.             (delete (CAT "ram:" #Name "/T_Bestellen.020+.info")) 
  176.             (if (exists (TACKON target_dir "T_Bestellen.info"))
  177.                 (delete (CAT "ram:" #Name "/T_Bestellen.info")) 
  178.             )
  179.             (if (exists (TACKON target_dir "T_Best.dat"))
  180.                 (delete (CAT "ram:" #Name "/T_Best.dat")) 
  181.             )
  182.             (if (exists "LOCALE:")
  183.             (
  184.                 (user 2)
  185.                 (set lang
  186.                     (askoptions (prompt #ask-funktion-2)
  187.                                     (help @askoptions-help)
  188.                                     (choices
  189. ;                                                "dansk"
  190.                                                 "deutsch"
  191.                                                 "english"
  192. ;                                                "español"
  193. ;                                                "français"
  194. ;                                                "italiano"
  195. ;                                                "nederlands"
  196. ;                                                "norsk"
  197. ;                                                "portoguês"
  198. ;                                                "svenska"
  199.                                     )
  200.                                     (default #default_lang)
  201.                     )
  202.                 )
  203.                 (user old_level)
  204.  
  205.  
  206.                 (set m 0)
  207.                 (while (set language
  208.                     (select m
  209. ;                                "dansk"
  210.                                 "deutsch"
  211.                                 "english"
  212. ;                                "español"
  213. ;                                "français"
  214. ;                                "italiano"
  215. ;                                "nederlands"
  216. ;                                "norsk"
  217. ;                                "portoguês"
  218. ;                                "svenska"
  219.                                 ""
  220.                 ))
  221.                 (
  222.                     (set LocSource (cat "ram:" #Name "/Locale/Catalogs/" language))
  223.                     (if (exists LocSource)
  224.                     (
  225.                         (if (IN lang m)
  226.                         (
  227.                             (makedir (cat "LOCALE:Catalogs/" language))
  228.                             (run (cat "copy >NIL:" LocSource "/#? Locale:Catalogs/" language " all"))
  229. ; VORSICHT: Guru-Gefahr, deshalb Kommentar! (Wieso? Weis ich nicht!)
  230. ;                            (copyfiles    (prompt (CAT #Install language) @copyfiles)
  231. ;                                            (help   @copyfiles-help)
  232. ;                                            (source (cat LocSource "/"))
  233. ;                                            (dest (CAT "LOCALE:Catalogs/" language))
  234. ;                                            (all)
  235. ;                            )
  236.                         ))
  237.                         (run (cat "delete " LocSource "/#? all"))
  238.                         (run (cat "delete " LocSource))
  239.                     ))
  240.                     (set m (+ m 1))
  241.                 ))
  242.             ))
  243.             (run (cat "delete ram:" #Name "/Locale/#? all"))
  244.             (run (cat "delete ram:" #Name "/Locale"))
  245.             (copyfiles    (prompt (CAT #Install Timehier) @copyfiles)
  246.                             (help   @copyfiles-help)
  247.                             (source (cat "ram:" #Name "/"))
  248.                             (dest target_dir)
  249.                             (all)
  250.             )
  251.             (complete #Complete)
  252.         ))
  253.         (if (= n 8)
  254.         (
  255.             (makedir (TACKON target_dir #Name))
  256.             (copyfiles    (prompt (cat #Install Timehier) @copyfiles)
  257.                             (help   @copyfiles-help)
  258.                             (source "ram:Source/")
  259.                             (dest (TACKON target_dir "Source/"))
  260.                             (all)
  261.             )
  262.         ))
  263.     ))
  264.     (run (cat "delete ram:" #Name "/#? all"))
  265.     (run (cat "delete ram:" #Name))
  266.     (complete #Complete)
  267.     (set n (+ n 1))
  268. ))
  269.  
  270. (complete 100)
  271.