home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / utilities / installer / install < prev    next >
Encoding:
Text File  |  1999-09-02  |  11.1 KB  |  297 lines

  1.  
  2. /*********************************************************************************************
  3.  *
  4.  * installation script for the InstallerNG $VER: InstallerNG-Script 1.1 (28.08.99)
  5.  *
  6.  * note, that this script makes use of seveal new features of the InstallerNG
  7.  * like multilined comments and enhanced pattern-match functionality of the DATABASE
  8.  * function
  9.  *
  10.  *********************************************************************************************/
  11.  
  12. ; -----------------------------------------------------------------------------
  13. ; some default settings
  14. (set @app-name     "Installer NG"
  15.      @default-dest "C:"
  16. )
  17.  
  18. ; -----------------------------------------------------------------------------
  19. ; localized strings
  20. (if (= @language "english")
  21.  
  22.     (
  23.       (set #msg_welcome (cat "Welcome to the Installation of the InstallerNG\n\n"
  24.                              "The InstallerNG wants to be a substitution of\n"
  25.                              "the original Installer by C=\n"
  26.                              "It offers many new features, looks much better and is\n"
  27.                              "smaller than the C= Installer"
  28.                         )
  29.       )
  30.       (set #msg_askfile_prompt "Where is the default Installer located?")
  31.       (set #msg_askfile_help (cat "Please select the original Installer by C=. "
  32.                                   "This script will make a backup copy of the "
  33.                                   "Installer and then, it will replace the "
  34.                                   "original by the new InstallerNG."
  35.                              )
  36.       )
  37.       (set #msg_copylib_prompt "Now copying the InstallerNG to \"%s\"")
  38.       (set #msg_copylib_help "...")
  39.  
  40.       (set #msg_catalog_prompt "Which catalog-file do you want to install?")
  41.       (set #msg_catalog_help "...")
  42.  
  43.       (set #msg_done (cat "Done!\n"
  44.                           "The InstallerNG replaced the original Installer\n"
  45.                           "and made a copy of the old one in \"%s\".\n\n"
  46.                           "Have fun with the new Installer and its features"
  47.                      )
  48.       )
  49.  
  50.       (set #msg_rename_prompt "Now renaming the C= installer")
  51.       (set #msg_rename_help "...")
  52.  
  53.       (set #msg_copytools_prompt "Which additional tools you want to install? (see Help)")
  54.       (set #msg_copytools_help (cat "CloseScreenPatch\nA patch, which avoids screen closing, while a window "
  55.                                     "is still open on that screen and helps you to save memory. Just add "
  56.                                     "'run <>nil: c:closescreenpatch' to the end of your 's:user-startup' file"
  57.                                     "\n\nGetSum\n"
  58.                                     "Calculates the checksum of any file, like the Installer does. "
  59.                                     "Usage: type 'getsum <file>' in your shell"
  60.                                )
  61.       )
  62.  
  63.       (set #msg_tooltypes_prompt "Which Tooltypes you want to preset?")
  64.       (set #msg_tooltypes_help "...")
  65.  
  66.       (set #msg_askchoice_prompt "Which GUI do you want to use?")
  67.       (set #msg_askchoice_help "...")
  68.  
  69.       (set #message_letsgo "Installation prepared. Ready to proceed?")
  70.  
  71.       (set #working_text "Now starting to install the new InstallerNG by Jens Tröger")
  72.     )
  73. )
  74.  
  75. (if (= @language "deutsch")
  76.  
  77.     (
  78.       (set #msg_welcome (cat "Willkommen zur Installation des InstallerNG\n\n"
  79.                              "Der InstallerNG soll ein Ersatz für den\n"
  80.                              "originalen Installer von C= sein\n"
  81.                              "Er bietet viele neue Eigenschaften, sieht viel besser aus\n"
  82.                              "und ist kleiner als der C= Installer"
  83.                         )
  84.       )
  85.  
  86.       (set #msg_askfile_prompt "Wo befindet sich der Installer?")
  87.       (set #msg_askfile_help (cat "Bitte wählen Sie den originalen Installer von C=. "
  88.                                   "Dieses Skript macht eine Kopie des originalen "
  89.                                   "Installers und wird danach den originalen durch "
  90.                                   "den neuen InstallerNG ersetzen."
  91.                              )
  92.       )
  93.  
  94.       (set #msg_copylib_prompt "Kopiere jetzt den InstallerNG nach \"%s\"")
  95.       (set #msg_copylib_help "...")
  96.  
  97.       (set #msg_catalog_prompt "Zu welcher Sprache möchten Sie einen Katalog installieren?")
  98.       (set #msg_catalog_help (cat "Wählen Sie hier aus, welche Katalog Datei Sie installieren möchten. "
  99.                                   "Sinnigerweise sollten Sie 'deutsch' wählen."
  100.                              )
  101.       )
  102.  
  103.       (set #msg_done (cat "Fertig!\n"
  104.                           "Der InstallerNG hat Ihren originalen Installer\n"
  105.                           "ersetzt und eine Kopie des alten als \"%s\" erzeugt.\n\n"
  106.                           "Viel Spaß mit dem neuen Installer und seinen Möglichkeiten"
  107.                      )
  108.       )
  109.  
  110.       (set #msg_rename_prompt "Benenne nun den C= Installer um")
  111.       (set #msg_rename_help "...")
  112.  
  113.       (set #msg_copytools_prompt "Welche zusätzlichen Programme wollen Sie installieren?")
  114.       (set #msg_copytools_help (cat "CloseScreenPatch\nEin Patch, welcher verhindert, daß ein Screen geschlossen "
  115.                                     "wird, auf dem noch Fenster geöffnet sind und somit 'Speicherleichen' "
  116.                                     "vorbeugt. Einfach 'run <>nil: c:closescreenpatch' in 's:user-startup' einfügen"
  117.                                     "\n\nGetSum\n"
  118.                                     "Berechnet die Checksumme einer Datei, wie sie auch der Installer berechnet. "
  119.                                     "Nutzung: 'getsum <file>' in der Shell eingeben"
  120.                                )
  121.       )
  122.  
  123.       (set #msg_tooltypes_prompt "Welche Tooltypes möchten Sie voreinstellen? (siehe Hilfe)")
  124.       (set #msg_tooltypes_help "...")
  125.  
  126.       (set #msg_askchoice_prompt "Welche Oberfläche möchten Sie verwenden?")
  127.       (set #msg_askchoice_help "...")
  128.  
  129.       (set #message_letsgo "Installation vorbereitet. Soll nun weitergemacht werden?")
  130.  
  131.       (set #working_text "Beginne nun mit der Installation des InstallersNG von Jens Tröger")
  132.     )
  133. )
  134.  
  135. /*********************************************************************************************/
  136.  
  137. (effect "center_center" "horizontal" $000000 $33FF33)
  138.  
  139. /*********************************************************************************************/
  140.  
  141. (user expert)
  142. (message #msg_welcome)
  143. (welcome)
  144.  
  145. ; -----------------------------------------------------------------------------
  146. ; the default settings
  147.  
  148. (set #default_installer "c:installer"
  149.      #default_catalog 0
  150.      #default_tools 0
  151.      #default_tooltypes 0
  152.      #default_gui 0
  153. )
  154.  
  155. ; -----------------------------------------------------------------------------
  156. ; first of all let the user make all the required settings
  157. ; for the installation
  158.  
  159. (swing
  160.  
  161.   (set @default-dest (pathonly (set #default_installer (askfile (prompt #msg_askfile_prompt)
  162.                                                                 (default #default_installer)
  163.                                                                 (help #msg_askfile_help)
  164.                                                        )
  165.                                )
  166.                      )
  167.   )
  168.  
  169.   (set #default_catalog (askoptions (prompt #msg_catalog_prompt)
  170.                                     (help #msg_catalog_help)
  171.                                     (default #default_catalog)
  172.                                     (choices "Deutsch")
  173.                         )
  174.   )
  175.  
  176.   (set #default_tools (askoptions (prompt #msg_copytools_prompt)
  177.                                   (help #msg_copytools_help)
  178.                                   (default #default_tools)
  179.                                   (choices "CloseScreenPatch" "GetSum")
  180.                       )
  181.   )
  182.  
  183.   (set #default_tooltypes (askoptions (prompt #msg_tooltypes_prompt)
  184.                                       (help #msg_tooltypes_help)
  185.                                       (default #default_tooltypes)
  186.                                       (choices "LAZYCOMPILE" "DEBUGMODE"
  187.                                                "CREATEUNSINSTALL" "COPYFILESCOMMENT"
  188.                                                "ALWAYSCONFIRM" "NOSYSDELETE"
  189.                                       )
  190.                           )
  191.   )
  192.  
  193.   (set #default_gui (askchoice (prompt #msg_askchoice_prompt)
  194.                                (help #msg_askchoice_help)
  195.                                (default #default_gui)
  196.                                (choices "BOOPSI by Savage (builtin)"
  197.                                         "MUI by Savage"
  198.                                )
  199.                     )
  200.   )
  201.  
  202.   (message #message_letsgo)
  203. )
  204.  
  205. ; -----------------------------------------------------------------------------
  206. ; now the installation process itself
  207.  
  208. (complete 0)
  209.  
  210. (set #installer_backup (cat #default_installer ".backup"))
  211.  
  212. (if (not (exists #installer_backup (noreq)))
  213.     (
  214.       (rename #default_installer #installer_backup (confirm average)
  215.                                                    (prompt #msg_rename_prompt)
  216.                                                    (help #msg_rename_help)
  217.       )
  218.     )
  219.  
  220. (complete 15)
  221.  
  222. (copylib (prompt (#msg_copylib_prompt #default_installer))
  223.          (help #msg_copylib_help)
  224.          (confirm average)
  225.          (source (if (database "cpu" "(68000|68010)")
  226.                      ("c/installerng.000")
  227.                      ("c/installerng.020")
  228.                  )
  229.          )
  230.          (dest (pathonly #default_installer))
  231.          (newname (fileonly #default_installer))
  232.          (infos)
  233. )
  234.  
  235. (complete 30)
  236.  
  237. (if (bitand #default_tools 1)
  238.     (copyfiles (source "tools/GetSum")
  239.                (dest "C:")
  240.     )
  241. )
  242. (if (bitand #default_tools 2)
  243.     (copyfiles (source "tools/CloseScreenPatch")
  244.                (dest "C:")
  245.     )
  246. )
  247.  
  248. (complete 45)
  249.  
  250. (if (exists (tackon #default_installer ".info"))
  251.  
  252.     (tooltype (dest #default_installer)
  253.               (setstack 50000)
  254.               (if (bitand #default_tooltypes  1) (settooltype "LAZYCOMPILE" "")
  255.                                                  (settooltype "(LAZYCOMPILE)" ""))
  256.               (if (bitand #default_tooltypes  2) (settooltype "DEBUGMODE" "")
  257.                                                  (settooltype "(DEBUGMODE)" ""))
  258.               (if (bitand #default_tooltypes  4) (settooltype "CREATEUNINSTALL" "")
  259.                                                  (settooltype "(CREATEUNINSTALL)" ""))
  260.               (if (bitand #default_tooltypes  8) (settooltype "COPYFILECOMMENT" "")
  261.                                                  (settooltype "(COPYFILECOMMENT)" ""))
  262.               (if (bitand #default_tooltypes 16) (settooltype "ALWAYSCONFIRM" "")
  263.                                                  (settooltype "(ALWAYSCONFIRM)" ""))
  264.               (if (bitand #default_tooltypes 32) (settooltype "NOSYSDELETE" "")
  265.                                                  (settooltype "(NOSYSDELETE)" ""))
  266.     )
  267.  
  268.     (nop)
  269. )
  270.  
  271. (complete 60)
  272.  
  273. (if (bitand #default_catalog 1)
  274.     (copylib (source "catalogs/deutsch/installerng.catalog")
  275.              (dest "locale:catalogs/deutsch")
  276.     )
  277. )
  278.  
  279. (complete 75)
  280.  
  281. (select #default_gui
  282.  
  283.         (nop)
  284.  
  285.         (copylib (source "libs/mui/installergui.library")
  286.                  (dest "libs:")
  287.         )
  288. )
  289.  
  290. (complete 100)
  291.  
  292. (exit (#msg_done #installer_backup))
  293.  
  294.  
  295.  
  296.