home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / tools / workbench / powerwb08 / powerwb / install < prev    next >
Encoding:
Text File  |  1997-12-20  |  10.9 KB  |  400 lines

  1. (set #LangFound 0)
  2.  
  3. (if (= "deutsch" @language)
  4.  (
  5.   (set #MSG_WELCOME "Willkommen zum Installations Skript für PowerWB.\n\nHINWEIS: Sie müssen PowerWB nicht installieren, um es zu testen. Bevor Sie es installieren sollten Sie ein paar Tests machen, um zu sehen, ob es fehlerfrei funktioniert (V0.8!)")
  6.   (set #MSG_ASK "Wählen Sie aus, was alles installiert werden soll!")
  7.   (set #MSG_A_EXE "PowerWB Programm (executable)")
  8.   (set #MSG_A_PREFS "Einstellungsprogramm (benötigt MUI!)")
  9.   (set #MSG_A_DOC "Anleitung (AmigaGuide)")
  10.   
  11.   (set #MSG_ASKEXE "Wohin soll das PowerWB Programm (executable) kopiert werden?")
  12.   (set #MSG_ASKPREFS "Wohin soll das Einstellungsprogramm kopiert werden?")
  13.   (set #MSG_ASKDOC "Wohin soll die Anleitung im Amigaguide-Format kopiert werden?")
  14.   (set #MSG_ASKCONFIG "Welches Verzeichnis soll PowerWB für seine Config-Datei verwenden?\n(Wenn Sie sich für \"ENV: und ENVARC:\" entscheiden, dann wird es möglich sein die Konfiguration PowerWBs zu ändern, während das Programm läuft - sonst nicht!)")
  15.   (set #MSG_ASKCONFIG_ENV "ENV: und ENVARC:")
  16.   (set #MSG_ASKCONFIG_S "S:")
  17.   (set #MSG_ASKCONFIG_OTHER "Ein anderes Verzeichnis auswählen ...")
  18.   (set #MSG_ASKCONFIG_SELECT "Wählen Sie ein Verzeichnis für die Config-Datei!")
  19.  
  20.   (set #MSG_COPY_EXE "Kopiere Programm")
  21.   (set #MSG_COPY_PREFS "Kopiere Einstellungsprogramm")
  22.   (set #MSG_COPY_DOC "Kopiere Anleitung")
  23.   (set #MSG_COPY_CONFIG "Kopiere Config-Datei")
  24.   (set #MSG_COPY_CATALOG "Kopiere deutschen Katalog für PowerWBPrefs")
  25.   (set #MSG_TOOLTYPE "Setze Tooltypes")
  26.  
  27.   (set #MSG_USERSTART "Füge folgende Zeile an die s:user-startup an:\n\n%s")
  28.   (set #MSG_CHANGING_US "Ändere user-startup")
  29.   (set #MSG_ICONPOS "Korriegiere Icon Position %s")
  30.   (set #MSG_DONE "Installation fertig!\n\nHINWEIS: Das \"Images\" Verzeichnis wurde nicht auf Ihre Festplatte kopiert! Machen Sie das eventuell manuell, oder aber werfen Sie zumindest einen Blick auf die im Verzeichnis vorhandenen Bilder!\n\n")
  31.   (set #MSG_DONE2 "Viel Spaß mit PowerWB und nicht vergessen, daß das Programm Shareware ist!")
  32.   (set #MSG_NOHELP "Keine Hilfe verfügbar. Sorry!")
  33.  
  34.   (set #MSG_INFO_EXE "vom Programm")
  35.   (set #MSG_INFO_PREFS "vom Einstellungsprogramm")
  36.   (set #MSG_INFO_DOC "von der Dokumentation")
  37.  
  38.   (set #LangFound 1)
  39.  )
  40. )
  41.  
  42. (if (= "italiano" @language)
  43.  (
  44.   (set #MSG_WELCOME "Benvenuto nello script di installazione per PowerWB.\n\nIMPORTANTE: Non è necessario installare PowerWB per testarlo. Consiglio di fare prima dei tests, per vedere se tutto funziona senza problemi (V0.8!)")
  45.   (set #MSG_ASK "Installare cosa?")
  46.   (set #MSG_A_EXE "Il programma (l'eseguibile)")
  47.   (set #MSG_A_PREFS "Il programma per le preferenze (ha bisogno di MUI!)")
  48.   (set #MSG_A_DOC "La documentazione (AmigaGuide)")
  49.   
  50.   (set #MSG_ASKEXE "In che directory devo copiare il programma?")
  51.   (set #MSG_ASKPREFS "In che directory devo copiare il programma per le preferenze?")
  52.   (set #MSG_ASKDOC "In che directory devo copiare la documentazione in formato AmigaGuide?")
  53.   (set #MSG_ASKCONFIG "Che directory deve essere usato per il config file di PowerWB?\n(Se decide di usare \"ENV: e ENVARC:\" sarà possibile cambiare la configurazione di PowerWB mentre il programma gira, in ogni altro caso questo non sarà possibile!)")
  54.   (set #MSG_ASKCONFIG_ENV "ENV: e ENVARC:")
  55.   (set #MSG_ASKCONFIG_S "S:")
  56.   (set #MSG_ASKCONFIG_OTHER "Un'altro directory ...")
  57.   (set #MSG_ASKCONFIG_SELECT "Scegliere che directory usare per il config file")
  58.  
  59.   (set #MSG_COPY_EXE "Copio programma")
  60.   (set #MSG_COPY_PREFS "Copio programma per le preferenze")
  61.   (set #MSG_COPY_DOC "Copio documentazione")
  62.   (set #MSG_COPY_CONFIG "Copio config file")
  63.   (set #MSG_COPY_CATALOG "Copio catalogo italiano per PowerWBPrefs")
  64.   (set #MSG_TOOLTYPE "Setto i tooltypes")
  65.  
  66.   (set #MSG_USERSTART "Aggiungo la seguente linea alla s:user-startup:\n\n%s")
  67.   (set #MSG_CHANGING_US "Cambio la user-startup")
  68.   (set #MSG_ICONPOS "Cambio la posizione dell'icona %s")
  69.   (set #MSG_DONE "L'installazione è finita!\n\nIMPORTANTE: Il directory \"Images\" non è stato copiato sul suo HD. Lo può fare manualmente se vuole, altrimenti ne dia almeno un'occhiata!\n\n")
  70.   (set #MSG_DONE2 "Buon divertimento con PowerWB! E non dimenticare che si tratta di Shareware ...")
  71.   (set #MSG_NOHELP "Nessun'aiuto disponibile. Sorry!")
  72.  
  73.   (set #MSG_INFO_EXE "del programma")
  74.   (set #MSG_INFO_PREFS "del programma per le preferenze")
  75.   (set #MSG_INFO_DOC "della documentazione")
  76.  
  77.   (set #LangFound 1)
  78.  )
  79. )
  80.  
  81.  
  82. (if (= 0 #LangFound)
  83.  (
  84.   (set #MSG_WELCOME "Welcome to the installation script for PowerWB.\n\nNOTE: you don't need to install PowerWB in order to use it. Before installing it you should better do some tests to see if it's working correctly (remember: this is only V0.8!)")
  85.   (set #MSG_ASK "Install what?")
  86.   (set #MSG_A_EXE "PowerWB program (executable)")
  87.   (set #MSG_A_PREFS "Preferences program (needs MUI!)")
  88.   (set #MSG_A_DOC "Documentation (Amigaguide)")
  89.   
  90.   (set #MSG_ASKEXE "Where do you want to copy the PowerWB executable?")
  91.   (set #MSG_ASKPREFS "Where do you want to copy the preferences program?")
  92.   (set #MSG_ASKDOC "Where do you want to copy the documentation (Amigaguide)?")
  93.   (set #MSG_ASKCONFIG "Which directory shall PowerWB use for his config file?\n(If you select \"ENV: and ENVARC:\" it will be possible to change the PowerWB configuration while the program is running, in any other case this will not be possible!)")
  94.   (set #MSG_ASKCONFIG_ENV "ENV: and ENVARC:")
  95.   (set #MSG_ASKCONFIG_S "S:")
  96.   (set #MSG_ASKCONFIG_OTHER "Choose another directory ...")
  97.   (set #MSG_ASKCONFIG_SELECT "Choose a directory for the config file!")
  98.   
  99.   (set #MSG_COPY_EXE "Copying program")
  100.   (set #MSG_COPY_PREFS "Copying preferences program")
  101.   (set #MSG_COPY_HELP "Copying documentation")
  102.   (set #MSG_COPY_CONFIG "Copying config file")
  103.   (set #MSG_COPY_CATALOG "")
  104.   (set #MSG_TOOLTYPE "Setting tooltypes")
  105.   
  106.   (set #MSG_USERSTART "Adding the following line to your s:user-startup:\n\n%s")
  107.   (set #MSG_CHANGING_US "Changing user-startup")
  108.   (set #MSG_ICONPOS "Correcting (UnSnapshot) icon position of %s")
  109.   (set #MSG_DONE "Installation complete!\n\nNOTE: The \"Images\" directory has not been copied onto your HD, so do that by hand if you want or at least have a look at the pictures in this directory!\n\n")
  110.   (set #MSG_DONE2 "Have a lot of fun with PowerWB and don't forget that it is Shareware!")
  111.   (set #MSG_NOHELP "No help available. Sorry!")
  112.  
  113.   (set #MSG_INFO_EXE "program")
  114.   (set #MSG_INFO_PREFS "preferences program")
  115.   (set #MSG_INFO_DOC "documentation")
  116.  
  117.  )
  118. )
  119.  
  120. ;***********
  121. ;*         *
  122. ;* M A I N *
  123. ;*         *
  124. ;***********
  125.  
  126.  
  127. (welcome #MSG_WELCOME)
  128.  
  129. (set #OSVERSION (/ (getversion) 65536))
  130.  
  131. (set #installwhat
  132.     (askoptions
  133.         (prompt #MSG_ASK)
  134.         (help #MSG_NOHELP)
  135.         (choices #MSG_A_EXE #MSG_A_PREFS #MSG_A_DOC)
  136.         (default 7)
  137.     )
  138. )
  139.  
  140. ; ** Select Exe Dir
  141.  
  142. (if (BITAND 1 #installwhat)
  143.     (
  144.         (set #exedest
  145.             (expandpath
  146.                 (askdir
  147.                     (prompt #MSG_ASKEXE)
  148.                     (default (expandpath "sys:tools/commodities"))
  149.                     (help #MSG_NOHELP)
  150.                 )
  151.             )
  152.         )
  153.     )
  154. )
  155.  
  156. ; ** Select PrefsProg Dir
  157.  
  158. (if (BITAND 2 #installwhat)
  159.     (
  160.         (set #prefsdest
  161.             (expandpath
  162.                 (askdir
  163.                     (prompt #MSG_ASKPREFS)
  164.                     (default (expandpath "sys:Prefs"))
  165.                     (help #MSG_NOHELP)
  166.                 )
  167.             )
  168.         )
  169.     )
  170. )
  171.  
  172.  
  173. ; ** Select Doc Dir
  174.  
  175. (if (BITAND 4 #installwhat)
  176.     (
  177.         (set #docdest
  178.             (expandpath
  179.                 (askdir
  180.                     (prompt #MSG_ASKDOC)
  181.                     (default (expandpath "HELP:"))
  182.                     (help #MSG_NOHELP)
  183.                 )
  184.             )
  185.         )
  186.     )
  187. )
  188.  
  189. ; ** Select Config path
  190.  
  191. (if (BITAND 1 #installwhat)
  192.     (
  193.         (set #DoENV 0)
  194.  
  195.         (set #res
  196.             (askchoice
  197.                 (prompt #MSG_ASKCONFIG)
  198.                 (choices #MSG_ASKCONFIG_ENV #MSG_ASKCONFIG_S #MSG_ASKCONFIG_OTHER)
  199.                 (help #MSG_NOHELP)
  200.                 (default 0)
  201.             )
  202.         )
  203.  
  204.         (if (= #res 0)
  205.             (
  206.                 (set #DoENV 1)
  207.                 (set #configdest "ENV:")
  208.             )
  209.             (
  210.                 (if (= #res 1)
  211.                     (
  212.                         (set #configdest (expandpath "S:"))
  213.                     )
  214.                     (
  215.                         (set #configdest
  216.                             (expandpath
  217.                                 (askdir
  218.                                     (prompt #MSG_ASKCONFIG_SELECT)
  219.                                     (help #MSG_NOHELP)
  220.                                     (default (expandpath "S:"))
  221.                                 )
  222.                             )
  223.                         )
  224.                     )
  225.                 )
  226.             )
  227.         )
  228.     )
  229. )
  230.  
  231. ;** Copy Exe
  232.  
  233. (if (BITAND 1 #installwhat)
  234.     (
  235.         (copyfiles
  236.             (prompt #MSG_COPY_EXE)
  237.             (source "")
  238.             (choices "PowerWB" "PowerWB.info")
  239.             (dest #exedest)
  240.             (confirm)
  241.             (help #MSG_NOHELP)
  242.         )
  243.  
  244.         (if (= 1 (exists (tackon #exedest "PowerWB.info")))
  245.             (
  246.                 (run ("c/noiconpos \"%s\"" (tackon #exedest "PowerWB"))
  247.                     (prompt (#MSG_ICONPOS #MSG_INFO_EXE))
  248.                     (help #MSG_NOHELP)
  249.                 )
  250.  
  251.                 (tooltype
  252.                     (prompt #MSG_TOOLTYPE)
  253.                     (help #MSG_NOHELP)
  254.                     (dest (tackon #exedest "PowerWB"))
  255.                     (settooltype "CONFIGFILE" (tackon #configdest "PowerWB.config"))
  256.                 )
  257.             )
  258.         )
  259.     )
  260. )
  261.  
  262. ;** Copy Prefs
  263.  
  264. (if (BITAND 2 #installwhat)
  265.     (
  266.         (copyfiles
  267.             (prompt #MSG_COPY_PREFS)
  268.             (source "")
  269.             (choices "PowerWBPrefs" "PowerWBPrefs.info")
  270.             (dest #prefsdest)
  271.             (confirm)
  272.             (help #MSG_NOHELP)
  273.         )
  274.  
  275.         (if (= 1 (exists (tackon #prefsdest "PowerWBPrefs.info")))
  276.             (
  277.                 (run ("c/noiconpos \"%s\"" (tackon #prefsdest "PowerWBPrefs"))
  278.                     (prompt (#MSG_ICONPOS #MSG_INFO_PREFS))
  279.                     (help #MSG_NOHELP)
  280.                 )
  281.  
  282.                 (if (BITAND 1 #installwhat)
  283.                     (
  284.                         (tooltype
  285.                             (prompt #MSG_TOOLTYPE)
  286.                             (help #MSG_NOHELP)
  287.                             (dest (tackon #prefsdest "PowerWBPrefs"))
  288.                             (settooltype "CONFIGFILE" (tackon #configdest "PowerWB.config"))
  289.                         )
  290.                     )
  291.                 )
  292.                 
  293.                 ; Docs ?
  294.  
  295.                 (if (BITAND 4 #installwhat)
  296.                     (
  297.                         (tooltype
  298.                             (prompt #MSG_TOOLTYPE)
  299.                             (help #MSG_NOHELP)
  300.                             (dest (tackon #prefsdest "PowerWBPrefs"))
  301.                             (settooltype "HELPFILE" (tackon #docdest "PowerWB.guide"))
  302.                         )
  303.                     )
  304.                 )
  305.  
  306.                 ;catalog
  307.  
  308.                 (if (> #OSVERSION 37)
  309.                     (
  310.                         (if (= 2 (exists ("catalogs/%s" @language)))
  311.                             (copyfiles
  312.                                 (prompt #MSG_COPY_CATALOG)
  313.                                 (help #MSG_NOHELP)
  314.                                 (source (tackon ("catalogs/%s" @language) "PowerWBPrefs.catalog"))
  315.                                 (dest (expandpath ("LOCALE:catalogs/%s" @language)))
  316.                                 (confirm)
  317.                             )
  318.                         )
  319.                     )
  320.                 )
  321.  
  322.             )
  323.         )
  324.     )
  325. )
  326.  
  327. ;** Copy Doc
  328.  
  329. (if (BITAND 4 #installwhat)
  330.     (
  331.         (copyfiles
  332.             (prompt #MSG_COPY_DOC)
  333.             (source "")
  334.             (choices "PowerWB.guide" "PowerWB.guide.info")
  335.             (dest #docdest)
  336.             (confirm)
  337.             (help #MSG_NOHELP)
  338.         )
  339.  
  340.         (if (= 1 (exists (tackon #docdest "PowerWB.guide.info")))
  341.             (
  342.                 (run ("c/noiconpos \"%s\"" (tackon #docdest "PowerWB.guide"))
  343.                     (prompt (#MSG_ICONPOS #MSG_INFO_DOC))
  344.                     (help #MSG_NOHELP)
  345.                 )
  346.  
  347.             )
  348.         )
  349.     )
  350. )
  351.  
  352. ;** Config-Datei
  353.  
  354. (if (BITAND 1 #installwhat)
  355.     (
  356.         (copyfiles
  357.             (prompt #MSG_COPY_CONFIG)
  358.             (source "PowerWB.config")
  359.             (dest #configdest)
  360.             (confirm)
  361.             (help #MSG_NOHELP)
  362.         )
  363.  
  364.         (if (= 1 #DoENV)
  365.             (
  366.                 (copyfiles
  367.                     (prompt #MSG_COPY_CONFIG)
  368.                     (source "PowerWB.config")
  369.                     (dest "ENVARC:")
  370.                     (confirm)
  371.                     (help #MSG_NOHELP)
  372.                 )
  373.             )
  374.         )
  375.     )
  376. )
  377.  
  378. ;** User Startup
  379.  
  380. (if (BITAND 1 #installwhat)
  381.     (
  382.         (set #startline ("run <>NIL: \"%s\" CONFIGFILE=\"%s\"" (tackon #exedest "PowerWB") (tackon #configdest "PowerWB.config")))
  383.  
  384.         (message
  385.             (#MSG_USERSTART #startline)
  386.             (help #MSG_NOHELP)
  387.         )
  388.  
  389.         (startup "PowerWB"
  390.             (prompt #MSG_CHANGING_US)
  391.             (help #MSG_NOHELP)
  392.             (confirm)
  393.             (command #startline)
  394.         )
  395.     )
  396. )
  397.  
  398. (exit #MSG_DONE #MSG_DONE2 (quiet))
  399.  
  400.