home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 10 / Fresh_Fish_10_2352.bin / new / util / misc / lcontrol / install < prev    next >
Text File  |  1995-06-17  |  11KB  |  448 lines

  1. ; Installationsskript für LControl 1.50
  2. ; $VER: LControl Install 1.50 (09.06.95)
  3. ; (c) 1995 Michael Watzl
  4.  
  5. (set version 1)
  6. (set revision 50)
  7.  
  8. ; *********** Zuerst Strings sprachenabhängig initialisieren **
  9. (if (= @language "deutsch")
  10. ; //+   detusch
  11.     (
  12.         (set @abort-button "Installation abrrechen!")
  13.         (set @error-msg    "Fataler Fehler!")
  14.  
  15.         (set #welcome (cat
  16.             "Wilkommen zur Installation von " @app-name "\n\n"
  17.             "© 1993-1995 Jürgen Frank und Michael Watzl\n"
  18.             "All rights reserved."))
  19.         (set #versionerror (cat
  20.             "Tut mir leid!\n\n"
  21.             @app-name
  22.             " benötigt mindestens Amiga-OS 2.04!\n"))
  23.         (set #uncompress
  24.             "Entpacke ")
  25.         (set #cantuncompress
  26.             "Fehler beim Entpacken von ")
  27.         (set #install
  28.             "Installiere ")
  29.         (set #hardware
  30.             "Baupläne")
  31.         (set #whichdrawer (cat
  32.             "Wo soll " @app-name " installiert werden?"))
  33.         (set #whichdrawer_help (cat
  34.             "Ein Verzeichnis namens '" @app-name "' wird erzeugt."))
  35.         (set #asklibs
  36.             "Welche Libraries sollen installiert werden?")
  37.         (set #asklibs_help (cat
  38.             "LANC.library\n"
  39.             "Zum Steuern von LANC-Kameras über die Parallelporthardware (LControl).\n\n"
  40.             "SLANC.library\n"
  41.             "Zum Steuern von LANC-Kameras über die Serialporthardware (SControl).\n\n"
  42.             "EDIT.library\n"
  43.             "Zum Steuern von 5-Pin-Edit über die Parallelporthardware (PControl)."
  44.             "(Die Hardware von LControl und PControl sind nicht kompatibel!\n\n"
  45.             "DEBUG.library\n"
  46.             "Täuscht eine Kamera nur vor." ))
  47.         (set #main
  48.             "Hauptprogramm")
  49.         (set #main_help (cat
  50.             "Das Hauptprogramm heißt zwar LControl, doch mit der "
  51.             "entsprechenden library wird es zu PControl, SControl..."))
  52.         (set #icon
  53.             "Piktogramm" )
  54.         (set #project_help (cat
  55.             "Die Piktogramme versorgen das Hauptprogramm (LControl) mit den passenden Parametern."))
  56.         (set #docs
  57.             "Anleitung")
  58.         (set #docs_help
  59.             "Amiga-guide-Datei, DVI-File und LIZENZ-Informationen")
  60.         (set #docs_pattern
  61.             "(LControlD.guide|LControlD.DVI|LIZENZ)")
  62.         (set #guide
  63.             "LControlD.guide")
  64.         (set #dvi
  65.             "LControlD.dvi")
  66.         (set #bye (cat
  67.             "Viel Spaß mit " @app-name
  68.             " wünschen\n"
  69.             "Jürgen Frank und Michael Watzl"))
  70.  
  71.  
  72.  
  73.  
  74.     )
  75. ; //-
  76. ; //+   englisch
  77.     (
  78.         (set #welcome (cat
  79.             "Welcome to the Installation of " @app-name "\n\n"
  80.             "© 1993-1995 Jürgen Frank and Michael Watzl\n"
  81.             "All rights reserved."))
  82.         (set #versionerror (cat
  83.             "Sorry!! " @app-name " requires Amiga-OS 2.04 of better!\n"))
  84.         (set #uncompress
  85.             "Uncompress ")
  86.         (set #cantuncompress
  87.             "Error while uncompressing ")
  88.         (set #install
  89.             "Installing ")
  90.         (set #hardware
  91.             "schematics")
  92.         (set #whichdrawer (cat
  93.             "Where should " @app-name " be installed?"))
  94.         (set #whichdrawer_help (cat
  95.             "A new drawer named '" @app-name "' will be created."))
  96.         (set #asklibs
  97.             "Which libraries should be installed?")
  98.         (set #asklibs_help (cat
  99.             "LANC.library\n"
  100.             "controls LANC-players via the parallelport harware (LControl).\n\n"
  101.             "SLANC.library\n"
  102.             "controls LANC-players via the serialport hardware (SControl).\n\n"
  103.             "EDIT.library\n"
  104.             "controls 5-Pin-Edit-players via the parallelport hardware (PControl)."
  105.             "(The PControl-hardware and the LControl-hardware are not compatible!)\n\n"
  106.             "DEBUG.library\n"
  107.             "Fakes a camera" ))
  108.         (set #main
  109.             "main program")
  110.         (set #main_help (cat
  111.             "The main programm is named LControl. However together with "
  112.             "the correct library it becomes PControl, SControl..."))
  113.         (set #icon
  114.             "icon" )
  115.         (set #project_help (cat
  116.             "The icons start the main programm (LControl) with the correct parameters"))
  117.         (set #docs
  118.             "Documentation")
  119.         (set #docs_help
  120.             "Amigaguide file, DVI-file and some licence information.")
  121.         (set #docs_pattern
  122.             "(LControlE.guide|LControlE.DVI|LICENCE)")
  123.         (set #guide
  124.             "LControlE.guide")
  125.         (set #dvi
  126.             "LControlE.dvi")
  127.         (set #bye (cat
  128.             "Jürgen Frank and Michael Watzl\n"
  129.             "wish you a lot of fun with\n"
  130.             @app-name))
  131.     )
  132. ; //-
  133. )
  134.  
  135. (message #welcome)
  136. (complete 0)
  137.  
  138. ; ***********************************************
  139. ; Amiga-OS Versionscheck
  140. ; ***********************************************
  141. (if (< (/ (getversion) 65536) 37)
  142.     (abort #version_error)
  143. )
  144.  
  145. ; ***********************************************
  146. ; Zielverzeichnis erzeugen
  147. ; ***********************************************
  148. (set ziel
  149.     (askdir
  150.         (prompt #whichdrawer )
  151.         (default "Work:")
  152.         (help   #whichdrawer_help )
  153.     )
  154. )
  155. (set @default-dest ziel )
  156. (set ziel (tackon ziel @app-name ))
  157. (makedir ziel (infos))
  158.  
  159.  
  160. ; ***********************************************
  161. ; Libs & Hardware entpacken (wenn vorhanden)
  162. ; => was wird eigentlich installiert?
  163. ; ***********************************************
  164. ; nach dem entpacken der hw wird eine vorauswahl
  165. ; initialisiert (bitweise):
  166. ;   1. LANC
  167. ;   2. SLANC
  168. ;   3. EDIT
  169. ;   4. DEBUG
  170.  
  171. (set options %1000) ; default: DEBUG
  172.  
  173. ; libs entpacken
  174. (working (cat "\n\n" #uncompress "libraries"))
  175. (set rc (run "libs.run t:"))
  176. (if (<> rc 0)
  177.     (abort (cat #cantuncompress "libraries"))
  178. )
  179.  
  180. (set L  0)
  181. (set S  0)
  182. (set E  0)
  183. (set D  0)
  184.  
  185. (if (exists "hardware.run")
  186.     (
  187.         ; hardware entpacken
  188.         (working (cat "\n\n" #uncompress #hardware))
  189.         (set rc (run "hardware.run t:"))
  190.         (if (<> rc 0)
  191.             (abort (cat #cantuncompress #hardware))
  192.         )
  193.         (if (exists "T:hardware/LANC.iff")
  194.             (set options (bitor options %0001)) ; options |= LANC
  195.         )
  196.         (if (exists "T:hardware/SLANC.iff")
  197.             (set options (bitor options %0010)) ; options |= SLANC
  198.         )
  199.         (if (exists "T:hardware/EDIT.iff")
  200.             (set options (bitor options %0100)) ; options |= EDIT
  201.         )
  202.     )
  203. )
  204.  
  205. (set x (askoptions
  206.     (prompt #asklibs)
  207.     (help   #asklibs_help)
  208.     (choices    "LANC.library" "SLANC.library" "EDIT.library" "DEBUG.library")
  209.     (default options)
  210. ))
  211. (if (<> 0 (bitand x %1000))   ; DEBUG
  212.     ( (set D 1)
  213.     (copylib
  214.         (source "t:libs/DEBUG.library")
  215.         (dest   "libs:")
  216.     ))
  217.  
  218. )
  219. (if (<> 0 (bitand x %0100))   ; EDIT
  220.     ((set E 1)
  221.     (copylib
  222.         (source "T:libs/EDIT.library")
  223.         (dest   "libs:")
  224.     ))
  225. )
  226. (if (<> 0 (bitand x %0010))   ; SLANC
  227.     ((set S 1)
  228.     (copylib
  229.         (source "T:libs/SLANC.library")
  230.         (dest   "libs:")
  231.     ))
  232. )
  233. (if (<> 0 (bitand x %0001))   ; LANC
  234.     ((set L 1)
  235.     (copylib
  236.         (source "T:libs/LANC.library")
  237.         (dest   "libs:")
  238.     ))
  239. )
  240.  
  241. ;cleanup libs
  242. (run "delete t:libs#? all quiet")
  243.  
  244. ; *****************************************************
  245. ; Hauptprogramm und Projects entpacken und installieren
  246. ; *****************************************************
  247.  
  248. ; libs entpacken
  249. (working (cat "\n\n" #uncompress #main ))
  250. (set rc (run "LControl.run t:"))
  251. (if (<> rc 0)
  252.     (abort (cat #cantuncompress #main))
  253. )
  254.  
  255. (copyfiles
  256.     (prompt #main)
  257.     (help #main_help)
  258.     (source "T:")
  259.     (choices "LControl")
  260.     (dest ziel)
  261.     (confirm "expert")
  262. )
  263.  
  264. (complete 10)
  265.  
  266. (if( (= L 1))
  267.     ((copyfiles
  268.         (prompt (cat "LControl-" #icon))
  269.         (help #project_help)
  270.         (source "T:")
  271.         (choices "LANC.info")
  272.         (dest ziel)
  273.         (confirm "expert")
  274.         (nogauge)
  275.     )
  276.     (tooltype
  277.         (dest (tackon ziel "LANC"))
  278.         (noposition)
  279.     ))
  280. )
  281. (if( (= S 1))
  282.     ((copyfiles
  283.         (prompt (cat "SControl-" #icon))
  284.         (help #project_help)
  285.         (source "T:")
  286.         (choices "SLANC.info")
  287.         (dest ziel)
  288.