home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / comm / elcid / install_elcid < prev   
Encoding:
Text File  |  1998-02-24  |  36.8 KB  |  1,148 lines

  1. ;###################################################################################################
  2. ;###################################################################################################
  3. ;###
  4. ;###    Multi purpose installer script
  5. ;###    ==============================
  6. ;###
  7. ;###    $VER: elCID_Install 0.7 (24.02.98)
  8. ;###
  9. ;###    ©1998 by Carsten 'michelangelo' Scholling
  10. ;###
  11. ;###
  12. ;###
  13. ;###    No changed outside of strings- and main-part!
  14. ;###
  15. ;###
  16. ;###################################################################################################
  17. ;###################################################################################################
  18.  
  19.  
  20. ;###################################################################################################
  21. ;###    Debugging stuff
  22. ;###################################################################################################
  23.  
  24.  
  25. ;###################################################################################################
  26. ;###    Error handling stuff
  27. ;###################################################################################################
  28. (onerror (P_Cleanup))
  29.  
  30.  
  31. ;###################################################################################################
  32. ;###    Configuration defaults
  33. ;###################################################################################################
  34. (set #prgname        "elCID")        ;### Simply the program name.
  35. (set #dirname        "elCID")        ;### Directory name to be created at first install.
  36. (set #dest            "elCID:")        ;### Default installation path. Primary needed for update check.
  37. (set #backupext        "_Backup")        ;### Directory backup extension.
  38. (set #checkfile        "elCIDWatch")    ;### File to check version of old and new installation.
  39. (set #minosver        37)                ;### Minimum OS version
  40. (set #mincpu        0)                ;### Minimum CPU.
  41. (set #minmuiver        14)                ;### Minimum MUI version
  42. (set #setassign        1)                ;### Set elCID: assign
  43.  
  44. ;###################################################################################################
  45. ;###    Strings
  46. ;###################################################################################################
  47.  
  48. ;### German strings
  49. (if (= @language "deutsch")
  50. (
  51.     (set #wronginstaller    (cat    "Achtung! Es ist eine alte Version des Programmes 'Installer' auf "
  52.                                     "Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer "
  53.                                     "42.9.\n\nBitte überprüfen Sie Ihre Konfiguration!"))
  54.  
  55.     (set #msgwelcome1        (cat    "\nWillkommen zur \n\n" #prgname))
  56.     (set #msgwelcome2                " Installation.\n\n")
  57.  
  58.     (set #msgcopyright        (cat    "Copyright ©1997-1998 by\n"
  59.                                     "Carsten 'michelangelo' Scholling\n\n"
  60.                                     "<cscholling@t-online.de>\n"
  61.                                     "elcid@galaxy5.com\n"
  62.                                     "http://home.t-online.de/home/cscholling/\n"))
  63.  
  64.     (set #msgstartup1        (cat    "\n" #prgname " ist eine multifunktionelle Software\n"
  65.                                     "zur Überwachung der gesamten Kommunikation in und um\n"
  66.                                     "den Computer.\n"
  67.                                     "Bitte beachten Sie, daß während der Installation nichts\n"
  68.                                     "zerstört oder gelöscht wird, ohne daß Sie danach gefragt\n"
  69.                                     "werden. Alle Dateien werden ins gleiche Zielverzeichnis\n"
  70.                                     "kopiert, es sei denn, Sie ändern diese Voreinstellungen.\n"))
  71.  
  72.     (set #msgstartup2        (cat    "\nBevor Sie die Installation fortsetzen, beenden Sie bitte\n"
  73.                                     "alle ISDN- und andere Online-Verbindungen, beenden Sie Ihre\n"
  74.                                     "Kommunikationssoftware und fahren Sie dann fort.\n"))
  75.  
  76.     (set #msgstartup3        (cat    "\nBitte beachten Sie: Diese Software arbeitet optimal mit den\n"
  77.                                     "VMC Treibern (vmcisdnX.device, ...) zusammen. Bitte lesen Sie\n"
  78.                                     "in der Dokumentation unbedingt die Abschnitte `About VMC',\n"
  79.                                     "`About BSC' und 'About ITH' bevor Sie Fragen dazu an mich stellen.\n"))
  80.  
  81.     (set #msgnomui            (cat    "\n" #prgname " benötigt zum Arbeiten das \"Magic User Interface\""
  82.                                     "(MUI) in der Version 3.3 oder höher. Das Copyright für MUI liegt\n"
  83.                                     "bei Stefan Stuntz.\n\n"
  84.                                     "Ich habe kein installiertes MUI System auf Ihrem Rechner gefunden\n"
  85.                                     "Bitte installieren Sie MUI bevor Sie " #prgname " starten.\n"
  86.                                     "Am besten installieren Sie MUI direkt im Anschluß an " #prgname ".\n"
  87.                                     "Sie finden MUI im Verzeichnis Aminet/util/libs/muiXXusr.lha."))
  88.  
  89.     (set #msgmuiversion        (cat    "\nSie haben eine veraltete MUI Version auf ihrem System\n"
  90.                                     "installiert. " #prgname " benötigt zur einwandfreien Funktion\n"
  91.                                     "mindestens Version 3.3. Bitte installieren Sie das MUI Update\n"
  92.                                     "BEVOR Sie " #prgname " starten.\n\n"
  93.                                     "Die derzeit bei Ihnen installierte Version ist "))
  94.  
  95.     (set #msgoldinst        (cat    "Ich habe eine alte " #prgname " Version auf Ihrem System gefunden.\n"
  96.                                     "Bitte wählen Sie, wie die Installation fortgesetzt werden soll.\n"))
  97.  
  98.     (set #msgoldinstupdate            "Update der alten Version")
  99.     (set #msgoldinstnew                "Neuinstallation")
  100.  
  101.     (set #msgwhichdest        (cat    "Wo soll " #prgname " installiert werden?\nEin Verzeichnis mit dem "
  102.                                     "Namen " #dirname " wird dort erstellt."))
  103.  
  104.     (set #msgdirexists1                "Ich habe warscheinlich eine alte Installation in\n\"")
  105.     (set #msgdirexists2                "\"\ngefunden. Wie soll ich fortfahren?")
  106.  
  107.     (set #msgdirexistsselect        "Neues Ziel wählen")
  108.     (set #msgdirexistsoverwrite        "Alte Installation überschreiben")
  109.     (set #msgdirexistsdelete        "Alte Installation löschen")
  110.     (set #msgdirexistsbackup        "Sicherheitskopie anlegen: ")
  111.  
  112.     (set #msgdelete                    "Folgende(s) Datei/Verzeichnis wird nun gelöscht:\n")
  113.  
  114.     (set #msgrename1                "Benenne\n")
  115.     (set #msgrename2                " um in ")
  116.  
  117.     (set #msgmakedir                "Folgendes Verzeichnis wird nun erstellt:\n")
  118.  
  119.     (set #msgwherelib                "Wo sollen die Bibliotheken installiert werden?")
  120.     (set #msgwherelibprog            "PROGDIR:Libs")
  121.     (set #msgwhereliblibs            "Libs:")
  122.  
  123.     (set #msgwherecat                "Wo sollen die Katalogdateien installiert werden?")
  124.     (set #msgwherecatprog            "PROGDIR:catalogs")
  125.     (set #msgwherecatlocale            "Locale:catalogs")
  126.  
  127.     (set #msgwheredoc                "An welche Stelle soll die Dokumentation kopiert werden?")
  128.     (set #msgwheredocprog            "PROGDIR:Docs")
  129.     (set #msgwheredochelp            "Locale:Docs")
  130.  
  131.     (set #msgwherehelp                "An welche Stelle soll die Online-Hilfe kopiert werden?")
  132.     (set #msgwherehelpprog            "PROGDIR:Help")
  133.     (set #msgwherehelphelp            "Locale:Help")
  134.  
  135.     (set #msgconfirm        (cat    "Die folgenden Daten werden zur Installation herangezogen:\n"))
  136.     (set #msgconfirmcpu                "\nProzessor: ")
  137.     (set #msgconfirmfpu                "\nFPU: ")
  138.     (set #msgconfirmos                "\nBetriebssystem: ")
  139.     (set #msgconfirmmui                "\nMUI Version: ")
  140.     (set #msgconfirmdest            "\nInstallationsverzeichnis: ")
  141.     (set #msgconfirmlibdest            "\nLibrary Zielverzeichnis: ")
  142.     (set #msgconfirmcatdest            "\nCatalogs Zielverzeichnis: ")
  143.     (set #msgconfirmdocdest            "\nDokumentationsverzeichnis: ")
  144.     (set #msgconfirmhelpdest        "\nOnline-Hilfe Verzeichnis: ")
  145.     (set #msgconfirmback            "\nSicherungsverzeichnis: ")
  146.     (set #msgconfirmask                "\n\nSoll ich mit diesen Einstellungen fortfahren?\n")
  147.  
  148.     (set #msgprepareinstall            "\nDie Installation wird nun vorbereitet.\nBitte wählen Sie \"Ja\" zum fortfahren.")
  149.  
  150.     (set #msgcollectfiles1            "\nErstelle Dateiliste..")
  151.     (set #msgcollectfiles2            "\nErstelle Dateiliste....")
  152.     (set #msgcollectfiles3            "\nErstelle Dateiliste......")
  153.     (set #msgcollectfiles4            "\nErstelle Dateiliste........")
  154.     (set #msgcollectfiles5            "\nErstelle Dateiliste..........")
  155.  
  156.     (set #msgaskcopyfile            "\nBitte wählen Sie die zu kopierenden Dateien.")
  157.     (set #msgaskcopylib                "\nBitte wählen Sie die zu kopierenden Bibliotheken.")
  158.     (set #msgaskcopycat                "\nBitte wählen Sie die zu kopierenden Katalogdateien.")
  159.     (set #msgaskcopydoc                "\nBitte wählen Sie die zu kopierende Dokumentation.")
  160.     (set #msgaskcopyhelp            "\nBitte wählen Sie die zu kopierende Online-Hilfe.")
  161.  
  162.     (set #msgmodifystartup1            "\nIch werde nun die Zeile\n")
  163.     (set #msgmodifystartup2            "\nin die Datei \"User-Startup\" einfügen.\n")
  164.  
  165.     (set #msgend            (cat    "\n" #prgname " Installation beendet!\n\n"))
  166. )
  167.  
  168. ;### English strings
  169. (
  170.     (set #wronginstaller    (cat    "You have an old version of the program 'Installer' on your Amiga!\n\n"
  171.                                     "The installation procedure needs at least Installer 42.9.\n\n"
  172.                                     "Please check your configuration and update1!\n"))
  173.  
  174.     (set #msgwelcome1        (cat    "\nWelcome to\n\n" #prgname))
  175.     (set #msgwelcome2                " installation.\n\n")
  176.  
  177.     (set #msgcopyright        (cat    "Copyright ©1997-1998 by\n"
  178.                                     "Carsten 'michelangelo' Scholling\n\n"
  179.                                     "<cscholling@t-online.de>\n"
  180.                                     "elcid@galaxy5.com\n"
  181.                                     "http://home.t-online.de/home/cscholling/\n"))
  182.  
  183.     (set #msgstartup1        (cat    "\n" #prgname " is a multifunctional piece of software\n"
  184.                                     "for watching every communication in and around your\n"
  185.                                     "computer.\n"
  186.                                     "Nothing will be destroyed during installation without\n"
  187.                                     "asking you. All files are stored in the same\n"
  188.                                     "place exept you change these defaults.\n"
  189.                                     "However, you have to take care.\n"))
  190.  
  191.     (set #msgstartup2        (cat    "\nBefore you go on, please stop all\n"
  192.                                     "ISDN- and other connections, quit all\n"
  193.                                     "communication software, then continue.\n"))
  194.  
  195.     (set #msgstartup3        (cat    "\nNotice: This software works fine with VMC software\n"
  196.                                     "(vmcisdnX.device and so on). Please read the included\n"
  197.                                     "information `About VMC', 'About BSC' and 'About ITH'\n"
  198.                                     "before bothering me with questions why not direct\n"
  199.                                     "supporting other ISDN device driver...\n"))
  200.  
  201.     (set #msgnomui            (cat    "\n" #prgname " needs Magic User Interface (MUI)\nversion 3.3 or "
  202.                                     "higher.\nMUI is copyright by Stefan Stuntz.\n\n"
  203.                                     "I have not found MUI in your system.\nPlease install it before "
  204.                                     "running " #prgname ".\nBest is, right after this installation.\n\n"
  205.                                     "You can find MUI on Aminet/util/libs/muiXXusr.lha."))
  206.  
  207.     (set #msgmuiversion        (cat    "\nYou have installed an outdated version of MUI.\n\n" #prgname " needs "
  208.                                     "at least version 3.3 or higher.\nPlease make sure to install the "
  209.                                     "right version\nbefore starting " #prgname ".\n\nYour currently installed "
  210.                                     "version is "))
  211.  
  212.     (set #msgoldinst        (cat    "I have found an old installation of " #prgname
  213.                                     "\nPlease tell me how to go on."))
  214.  
  215.     (set #msgoldinstupdate            "Update old installation")
  216.     (set #msgoldinstnew                "Install new")
  217.  
  218.     (set #msgwhichdest        (cat    "Where do you wish to install " #prgname "?\nA directory called `"
  219.                                     #dirname"' will be created there."))
  220.  
  221.     (set #msgdirexists1                "I have probably found an old installation in\n\"")
  222.     (set #msgdirexists2                "\"\nWhat should i do?")
  223.  
  224.     (set #msgdirexistsselect        "Select new destination")
  225.     (set #msgdirexistsoverwrite        "Overwrite old files in this directory")
  226.     (set #msgdirexistsdelete        "Delete directory contents (including subdirectories)")
  227.     (set #msgdirexistsbackup        "Backup this directory to ")
  228.  
  229.     (set #msgdelete                    "The following file/directory will be deleted:\n")
  230.  
  231.     (set #msgrename1                "Is it OK to rename\n")
  232.     (set #msgrename2                " to ")
  233.  
  234.     (set #msgmakedir                "The following directory will be created:\n")
  235.  
  236.     (set #msgwherelib                "Where do you want the support library to be installed?")
  237.     (set #msgwherelibprog            "PROGDIR:Libs")
  238.     (set #msgwhereliblibs            "Libs:")
  239.  
  240.     (set #msgwherecat                "Where do you want the catalog files to be installed?")
  241.     (set #msgwherecatprog            "PROGDIR:catalogs")
  242.     (set #msgwherecatlocale            "Locale:catalogs")
  243.  
  244.     (set #msgwheredoc                "Where do you want the documentation to be installed?")
  245.     (set #msgwheredocprog            "PROGDIR:Docs")
  246.     (set #msgwheredochelp            "Locale:Docs")
  247.  
  248.     (set #msgwherehelp                "Where do you want the online help to be installed?")
  249.     (set #msgwherehelpprog            "PROGDIR:Help")
  250.     (set #msgwherehelphelp            "Locale:Help")
  251.  
  252.     (set #msgconfirm        (cat    "The following data will be used to install " #prgname ":\n"))
  253.     (set #msgconfirmcpu                "\nCentral Processing Unit: ")
  254.     (set #msgconfirmfpu                "\nFloating Point Unit: ")
  255.     (set #msgconfirmos                "\nOperating System: ")
  256.     (set #msgconfirmmui                "\nMUI version: ")
  257.     (set #msgconfirmdest            "\nInstallation directory: ")
  258.     (set #msgconfirmlibdest            "\nLibrary directory: ")
  259.     (set #msgconfirmcatdest            "\nCatalog files directory: ")
  260.     (set #msgconfirmdocdest            "\nDocumentation directory: ")
  261.     (set #msgconfirmhelpdest        "\nOnline-Help directory: ")
  262.     (set #msgconfirmback            "\nBackup directory: ")
  263.     (set #msgconfirmask                "\n\nIs it O.K. to use this information to go on?\n")
  264.  
  265.     (set #msgprepareinstall            "\nNow preparing and setting up installation.\nThis may take a moment.")
  266.  
  267.     (set #msgcollectfiles1            "\nCollecting installation filelist..")
  268.     (set #msgcollectfiles2            "\nCollecting installation filelist....")
  269.     (set #msgcollectfiles3            "\nCollecting installation filelist......")
  270.     (set #msgcollectfiles4            "\nCollecting installation filelist........")
  271.     (set #msgcollectfiles5            "\nCollecting installation filelist..........")
  272.  
  273.     (set #msgaskcopyfile            "\nPlease select which files you want to copy.")
  274.     (set #msgaskcopylib                "\nPlease select which libraries you want to copy.")
  275.     (set #msgaskcopycat                "\nPlease select which catalog files you want to copy.")
  276.     (set #msgaskcopydoc                "\nPlease select which documentation you want to copy.")
  277.     (set #msgaskcopyhelp            "\nPlease select which online-help you want to copy.")
  278.  
  279.     (set #msgmodifystartup1    (cat    "\nNow, the file \"User-Startup\" will be updated with the "
  280.                                     "following line:\n"))
  281.     (set #msgmodifystartup2            "\n")
  282.  
  283.     (set #msgend            (cat    "\n" #prgname " installation complete!\n\n"))
  284. ))
  285.  
  286.  
  287.  
  288. ;###################################################################################################
  289. ;###################################################################################################
  290. ;###
  291. ;###    Standard functions
  292. ;###
  293. ;###################################################################################################
  294. ;###################################################################################################
  295.  
  296. ;###################################################################################################
  297. ;###    Procedure CheckOS
  298. ;###################################################################################################
  299. (procedure P_CheckOS
  300.     (set os    (/ (getversion "libs:version.library") 65536))
  301.  
  302.     (if (= os 37)    (set osname "2.0"))
  303.     (if (= os 38)    (set osname "2.1"))
  304.     (if (= os 39)    (set osname "3.0"))
  305.     (if (= os 40)    (set osname "3.1"))
  306.     (if (= os 41)    (set osname "3.5"))
  307.     (if (> os 41)    (set osname "3.5+ (not known)"))
  308.  
  309.     (if (>= os minosver)
  310.         (set ret 1)
  311.         (set ret 0)
  312.     )
  313. )
  314.  
  315.  
  316. ;###################################################################################################
  317. ;###    Procedure CheckCPU
  318. ;###################################################################################################
  319. (procedure P_CheckCPU
  320.     (set cpuname    (database "cpu"))
  321.     (set fpuname    (database "fpu"))
  322.  
  323.     (if (= cpuname "68000")    (set cpu 0))
  324.     (if (= cpuname "68010")    (set cpu 1))
  325.     (if (= cpuname "68020")    (set cpu 2))
  326.     (if (= cpuname "68030")    (set cpu 3))
  327.     (if (= cpuname "68040")    (set cpu 4))
  328.     (if (> (exists ("sys:libs/68060.library")) 0) (
  329.         (set cpuname "68060")
  330.         (set cpu 6)
  331.     ))
  332.  
  333.     (if (= fpuname "NOFPU")    (set fpu 0))
  334.     (if (= fpuname "68881")    (set fpu 1))
  335.     (if (= fpuname "68882")    (set fpu 2))
  336.     (if (= fpuname "FPU40")    (set fpu 4))
  337.     (if (> (exists ("sys:libs/68060.library")) 0) (
  338.         (set fpuname "FPU60")
  339.     ))
  340.  
  341.     (if (>= cpu mincpu)
  342.         (set ret 1)
  343.         (set ret 0)
  344.     )
  345. )
  346.  
  347.  
  348. ;###################################################################################################
  349. ;###    Procedure GetVersion
  350. ;###################################################################################################
  351. (procedure P_GetVersion p_file
  352.     (set ver            (/ (getversion p_file) 65536))
  353. )
  354.  
  355.  
  356. ;###################################################################################################
  357. ;###    Procedure GetRevision
  358. ;###################################################################################################
  359. (procedure P_GetRevision p_file
  360.     (set vers            (getversion p_file))
  361.     (set ver            (/ vers 65536))
  362.  
  363.     (set rev            (- vers (* ver 65536)))
  364. )
  365.  
  366.  
  367. ;###################################################################################################
  368. ;###    Procedure GetFullVersion
  369. ;###################################################################################################
  370. (procedure P_GetFullVersion p_file
  371.     (set vers            (getversion p_file))
  372.     (set ver            (/ vers 65536))
  373.     (set rev            (- vers (* ver 65536)))
  374.     (set version        (cat ver "." rev))
  375.  
  376.     (set version version)
  377. )
  378.  
  379.  
  380. ;###################################################################################################
  381. ;###    Procedure CatPath
  382. ;###################################################################################################
  383. (procedure P_CatPath p_p1 p_p2
  384.  
  385.     (set len (- (strlen p_p1) 1))
  386.  
  387.     (if (> len 0)
  388.         (if (= (substr p_p1 len 1) ":")
  389.             (set p (cat p_p1 p_p2))
  390.             (set p (cat p_p1 "/" p_p2))
  391.         )
  392.         (set p p_p2)
  393.     )
  394. )
  395.  
  396.  
  397. ;###################################################################################################
  398. ;###    Procedure StripFile
  399. ;###################################################################################################
  400. (procedure P_StripFile p_p
  401.  
  402.     (set len (- (strlen p_p) 1))
  403.  
  404.     (while (> len 0) (
  405.         (if (= (substr p_p len 1) "/")
  406.             (
  407.                 (set newlen len)
  408.                 (set len 0)
  409.             )
  410.             (
  411.                 (if (= (substr p_p len 1) ":")
  412.                     (
  413.                         (set newlen len)
  414.                         (set len 0)
  415.                     )
  416.                 )
  417.             )
  418.         )
  419.         (set len (- len 1))
  420.     ))
  421.  
  422.     (set newlen (+ newlen 1))
  423.     (set retp (substr p_p 0 newlen))
  424. )
  425.  
  426.  
  427. ;###################################################################################################
  428. ;###    Procedure CheckExists
  429. ;###################################################################################################
  430. (procedure P_CheckExists p_file
  431.     (set ret (exists p_file (noreq)))
  432. )
  433.  
  434.  
  435. ;###################################################################################################
  436. ;###    Procedure Rename
  437. ;###################################################################################################
  438. (procedure P_Rename p_file p_new
  439.     (if (= 2 @user-level)
  440.         (rename p_file p_new
  441.             (confirm)
  442.             (prompt (cat #msgrename1 p_file #msgrename2 p_new))
  443.             (help (cat #msgrename1 p_file #msgrename2 p_new))
  444.         )
  445.  
  446.         (rename p_file p_new)
  447.     )
  448. )
  449.  
  450.  
  451. ;###################################################################################################
  452. ;###    Procedure MakeDir
  453. ;###################################################################################################
  454. (procedure P_MakeDir p_dir p_confirm p_icon
  455.     (if (> p_confirm 0)
  456.         (if (> p_icon 0)
  457.             (makedir p_dir
  458.                 (confirm)
  459.                 (prompt (cat #msgmakedir p_dir))
  460.                 (help (cat #msgmakedir p_dir))
  461.                 (infos)
  462.             )
  463.             (makedir p_dir
  464.                 (confirm)
  465.                 (prompt (cat #msgmakedir p_dir))
  466.                 (help (cat #msgmakedir p_dir))
  467.             )
  468.         )
  469.  
  470.         (if (> p_icon 0)
  471.             (makedir p_dir (infos))
  472.             (makedir p_dir)
  473.         )
  474.     )
  475. )
  476.  
  477.  
  478. ;###################################################################################################
  479. ;###    Procedure Delete
  480. ;###################################################################################################
  481. (procedure P_Delete p_file p_confirm
  482.     (if (> p_confirm 0)
  483.         (delete p_file
  484.             (confirm)
  485.             (all)
  486.             (prompt (cat #msgdelete p_file))
  487.             (help (cat #msgdelete p_file))
  488.             (optional "force" "askuser")
  489.         )
  490.         (delete p_file
  491.             (all)
  492.             (optional "force")
  493.         )
  494.     )
  495. )
  496.  
  497.  
  498. ;###################################################################################################
  499. ;###    Procedure SelectDir
  500. ;###################################################################################################
  501. (procedure P_SelectDir p_text p_help p_dest
  502.  
  503.     ;### Ask the user for any directory.
  504.     (set p_dest
  505.         (askdir
  506.             (prompt        p_text)
  507.             (help        (cat p_help "\n\n" @askdir-help))
  508.             (default    p_dest)
  509.         )
  510.     )
  511.  
  512.     (set p_dest p_dest)
  513. )
  514.  
  515.  
  516. ;###################################################################################################
  517. ;###    Procedure PreInstall
  518. ;###################################################################################################
  519. (procedure P_PreInstall
  520.     (set libdest "")
  521.     (set catdest "")
  522.     (set docdest "")
  523.     (set helpdest "")
  524.     (set filecount 1)
  525. )
  526.  
  527.  
  528. ;###################################################################################################
  529. ;###    Procedure CheckOldInst
  530. ;###################################################################################################
  531. (procedure P_CheckOldInst
  532.     ;### Old installation?
  533.     (if (P_CheckExists #dest)
  534.     (
  535.         ;### Let the user select what to do (update, install new).
  536.         (set    choice
  537.             (askchoice
  538.                 (prompt        #msgoldinst)
  539.                 (help        (cat #msgoldinst "\n\n" askchoice-help))
  540.                 (choices    #msgoldinstupdate #msgoldinstnew)
  541.                 (default    0)
  542.             )
  543.         )
  544.  
  545.         (if (= 0 choice)
  546.         (
  547.             (set @default-dest #dest)
  548.             (set libdest  (P_CatPath #dest "Libs"))
  549.             (set catdest  (P_CatPath #dest "catalogs"))
  550.             (set docdest  (P_CatPath #dest "Docs"))
  551.             (set helpdest (P_CatPath #dest "Help"))
  552.             (set update 1)
  553.         ))
  554.         (if (= 1 choice) (
  555.             (set #dest (P_CatPath @default-dest #dirname))
  556.             (set libdest  (P_CatPath #dest "Libs"))
  557.             (set catdest  (P_CatPath #dest "catalogs"))
  558.             (set docdest  (P_CatPath #dest "Docs"))
  559.             (set helpdest (P_CatPath #dest "Help"))
  560.             (set update 0)
  561.         ))
  562.     )
  563.     (
  564.         (set #dest @default-dest)
  565.         (set libdest  (P_CatPath #dest "Libs"))
  566.         (set catdest  (P_CatPath #dest "catalogs"))
  567.         (set docdest  (P_CatPath #dest "Docs"))
  568.         (set helpdest (P_CatPath #dest "Help"))
  569.         (set update 0)
  570.     ))
  571. )
  572.  
  573.  
  574. ;###################################################################################################
  575. ;###    Procedure Welcome
  576. ;###################################################################################################
  577. (procedure P_About p_update
  578.     (message (cat #msgwelcome1 " " (P_GetFullVersion #checkfile) #msgwelcome2 #msgcopyright))
  579.  
  580.     (if (= 0 update) (
  581.         (message #msgstartup1)
  582.         (message #msgstartup2)
  583.         (message #msgstartup3)
  584.     ))
  585. )
  586.  
  587.  
  588. ;###################################################################################################
  589. ;###    Procedure CheckMUI
  590. ;###################################################################################################
  591. (procedure P_CheckMUI p_minver
  592.     (set muifound 0)
  593.  
  594.     (if (P_CheckExists "mui:")
  595.         (set muifound 1)
  596.         (if (P_CheckExists "libs:muimaster.library")
  597.             (set muifound 2)
  598.         )
  599.     )
  600.  
  601.     (if (= 0 muifound)
  602.         (message #msgnomui)
  603.         (
  604.             (if    (= 1 muifound)    (set ver (P_GetVersion "mui:mui")))
  605.             (if    (= 2 muifound)    (set ver (P_GetVersion "libs:muimaster.library")))
  606.  
  607.             (if (= ver 7)    (set muiver "2.0"))
  608.             (if (= ver 8)    (set muiver "2.1"))
  609.             (if (= ver 9)    (set muiver "2.2"))
  610.             (if (= ver 10)    (set muiver "2.3"))
  611.             (if (= ver 11)    (set muiver "3.0"))
  612.             (if (= ver 12)    (set muiver "3.1"))
  613.             (if (= ver 13)    (set muiver "3.2"))
  614.             (if (= ver 14)    (set muiver "3.3"))
  615.             (if (= ver 15)    (set muiver "3.4"))
  616.             (if (= ver 16)    (set muiver "3.5"))
  617.             (if (= ver 17)    (set muiver "3.6"))
  618.             (if (= ver 18)    (set muiver "3.7"))
  619.             (if (= ver 19)    (set muiver "3.8"))
  620.             (if (> ver 19)    (set muiver "3.9+ (not known)"))
  621.  
  622.             (if (<= ver p_minver)
  623.                 (message (cat #msgmuiversion muiver))
  624.             )
  625.         )
  626.     )
  627.  
  628.     (set ver ver)
  629. )
  630.  
  631.  
  632. ;###################################################################################################
  633. ;###    Procedure CheckInstPath
  634. ;###################################################################################################
  635. (procedure P_CheckInstPath p_path p_newdirname
  636.     (set choice 4)
  637.     (set path (P_CatPath p_path p_newdirname))
  638.     (set backdir "")
  639.     (set mdeb (cat #msgdirexistsbackup (cat p_newdirname #backupext)))
  640.  
  641.     (if (= 0 update) (
  642.  
  643.         ;### New directory allready there?
  644.         (if (= 2 (P_CheckExists path))
  645.         (
  646.             ;### Let the user select what to do with this dir.
  647.             (set    choice
  648.                 (askchoice
  649.                     (prompt        (cat #msgdirexists1 (expandpath path) #msgdirexists2))
  650.                     (help        (cat #msgdirexists1 (expandpath path) #msgdirexists2 "\n\n" askchoice-help))
  651.                     (choices    #msgdirexistsselect #msgdirexistsoverwrite #msgdirexistsdelete mdeb)
  652.                     (default    1)
  653.                 )
  654.             )
  655.  
  656.             (set #dest path)
  657.             (set libdest  (P_CatPath path "Libs"))
  658.             (set catdest  (P_CatPath path "catalogs"))
  659.             (set docdest  (P_CatPath path "Docs"))
  660.             (set helpdest (P_CatPath path "Help"))
  661.             (set backdir "")
  662.  
  663.             (if (= 1 choice) (
  664.                 (set whatwithold 1)
  665.             ))
  666.  
  667.             (if (= 2 choice) (
  668.                 (set whatwithold 2)
  669.             ))
  670.  
  671.             (if (= 3 choice) (
  672.                 (set backdir (cat path #backupext))
  673.                 (set whatwithold 3)
  674.             ))
  675.         ))
  676.  
  677.         (if (= 0 choice)
  678.             (set ret 0)
  679.             (set #dest path)
  680.         )
  681.     ))
  682. )
  683.  
  684.  
  685. ;###################################################################################################
  686. ;###    Procedure SetupInstall
  687. ;###################################################################################################
  688. (procedure P_SetupInstall
  689.  
  690.     (if (= 0 update)
  691.     (
  692.         ;### Select installation path
  693.         (while (= 0 (P_CheckInstPath    (P_SelectDir #msgwhichdest #msgwhichdest #dest) #dirname)))
  694.  
  695.         ;### Let the user select where to put the libraries.
  696.         (set    choice
  697.             (askchoice
  698.                 (prompt        #msgwherelib)
  699.                 (help        (cat #msgwherelib "\n\n" askchoice-help))
  700.                 (choices    #msgwherelibprog #msgwhereliblibs)
  701.                 (default    0)
  702.             )
  703.         )
  704.  
  705.         (if (= 0 choice) (set libdest (P_CatPath #dest "Libs")))
  706.         (if (= 1 choice) (set libdest "Libs:"))
  707.  
  708.         ;### Let the user select where to put the catalogs.
  709.         (set    choice
  710.             (askchoice
  711.                 (prompt        #msgwherecat)
  712.                 (help        (cat #msgwherecat "\n\n" askchoice-help))
  713.                 (choices    #msgwherecatprog #msgwherecatlocale)
  714.                 (default    0)
  715.             )
  716.         )
  717.  
  718.         (if (= 0 choice) (set catdest (P_CatPath #dest "catalogs")))
  719.         (if (= 1 choice) (set catdest "Locale:catalogs"))
  720.  
  721.         ;### Let the user select where to put the docs.
  722.         (set    choice
  723.             (askchoice
  724.                 (prompt        #msgwheredoc)
  725.                 (help        (cat #msgwheredoc "\n\n" askchoice-help))
  726.                 (choices    #msgwheredocprog #msgwheredochelp)
  727.                 (default    0)
  728.             )
  729.         )
  730.  
  731.         (if (= 0 choice) (set docdest (P_CatPath #dest "Docs")))
  732.         (if (= 1 choice) (set docdest "Locale:Docs"))
  733.  
  734.         ;### Let the user select where to put the online help.
  735.         (set    choice
  736.             (askchoice
  737.                 (prompt        #msgwherehelp)
  738.                 (help        (cat #msgwherehelp "\n\n" askchoice-help))
  739.                 (choices    #msgwherehelpprog #msgwherehelphelp)
  740.                 (default    0)
  741.             )
  742.         )
  743.  
  744.         (if (= 0 choice) (set helpdest (P_CatPath #dest "Help")))
  745.         (if (= 1 choice) (set helpdest "Locale:Help"))
  746.  
  747.     )
  748.  
  749.     ;### Only update old installation
  750.     (
  751.         (P_CheckInstPath #dest "")
  752.         (if (P_CheckExists libdest)
  753.             (if (P_CheckExists (P_CatPath libdest "elcid.library"))
  754.                 (set libdest libdest)
  755.                 (
  756.                     (if (P_CheckExists "libs:elcid.library")
  757.                         (set libdest "Libs:")
  758.                     )
  759.                 )
  760.             )
  761.         )
  762.  
  763.         (if (P_CheckExists catdest)
  764.             (if (P_CheckExists (P_CatPath #dest "catalogs"))
  765.                 (set catdest (P_CatPath #dest "catalogs"))
  766.                 (set catdest "Locale:catalogs")
  767.             )
  768.         )
  769.  
  770.         (if (P_CheckExists docdest)
  771.             (if (P_CheckExists (P_CatPath #dest "Docs"))
  772.                 (set docdest (P_CatPath #dest "Docs"))
  773.                 (set docdest "Locale:Docs")
  774.             )
  775.         )
  776.  
  777.         (if (P_CheckExists helpdest)
  778.             (if (P_CheckExists (P_CatPath #dest "Help"))
  779.                 (set helpdest (P_CatPath #dest "Help"))
  780.                 (set helpdest "Locale:Help")
  781.             )
  782.         )
  783.     ))
  784. )
  785.  
  786. ;###################################################################################################
  787. ;###    Procedure AskConfirmation
  788. ;###################################################################################################
  789. (procedure P_AskConfirmation
  790.  
  791.     (set msgconfirm1        (cat    #msgconfirm
  792.                                     #msgconfirmcpu    cpuname
  793.                                     #msgconfirmfpu    fpuname
  794.                                     #msgconfirmos    osname))
  795.  
  796.     (if (muiver)
  797.         (set msgconfirm2    (cat    #msgconfirmmui muiver))
  798.     )
  799.  
  800.     (set msgconfirm3        (cat    #msgconfirmdest        #dest
  801.                                     #msgconfirmlibdest    libdest
  802.                                     #msgconfirmcatdest    catdest
  803.                                     #msgconfirmdocdest    docdest
  804.                                     #msgconfirmhelpdest    helpdest))
  805.  
  806.     (if (backdir)
  807.         (set msgconfirm4    (cat    #msgconfirmback (expandpath backdir)))
  808.     )
  809.  
  810.     (set msgconfirm            (cat    msgconfirm1 msgconfirm2 msgconfirm3 msgconfirm4 #msgconfirmask))
  811.  
  812.     ;### All right?
  813.     (set    choice
  814.         (askbool
  815.             (prompt        msgconfirm)
  816.             (help        msgconfirm)
  817.             (default    1)
  818.         )
  819.     )
  820.  
  821.     (set choice choice)
  822. )
  823.  
  824.  
  825. ;###################################################################################################
  826. ;###    Procedure PrepareInstall
  827. ;###################################################################################################
  828. (procedure P_PrepareInstall
  829.  
  830.     (askbool
  831.         (prompt        #msgprepareinstall)
  832.         (help        (cat #msgprepareinstall @askbool-help))
  833.         (default    1)
  834.     )
  835.  
  836.     (if (= 1 whatwithold) (
  837.         (set dummy "dummy")
  838.     ))
  839.  
  840.     (if (= 2 whatwithold) (
  841.         (P_Delete (P_CatPath #dest "#?") 1)
  842.     ))
  843.  
  844.     (if (= 3 whatwithold) (
  845.         (P_Rename    #dest backdir)
  846.         (P_MakeDir    #dest 1 1)
  847.     ))
  848. )
  849.  
  850.  
  851. ;###################################################################################################
  852. ;###    Procedure CreateFileList
  853. ;###################################################################################################
  854. (procedure P_CreateFileList p_path p_pat p_dir
  855.  
  856.     (if (= 2 (P_CheckExists p_path)) (
  857.  
  858.         (set path (P_CatPath p_path p_pat))
  859.  
  860.         (if (= 0 (P_CheckExists "ENV:eçtem¶tic1")) (
  861.             (run "setenv eçtem¶tic1 0")
  862.         ))
  863.  
  864.         (set oldexecutedir @execute-dir)
  865.  
  866.         (run (cat "echo >env:eçtem¶tfe \"setenv eçtem¶tic2 0\""))
  867.  
  868.         (if (= 0 p_dir)
  869.             (
  870.                 (set runstring (cat "list >>env:eçtem¶tfe " path " lformat \"echo >env:eçtem¶tf*$eçtem¶tic1.*$eçtem¶tic2 *\"%p%n*\" noline*necho >env:eçtem¶ts*$eçtem¶tic1.*$eçtem¶tic2 *\"%c*\" noline*neval *$eçtem¶tic2 + 1 to env:eçtem¶tic2\" files"))
  871.             )
  872.             (
  873.                 (set @execute-dir (expandpath p_path))
  874.                 (set runstring (cat "list >>env:eçtem¶tfe " p_pat " lformat \"echo >env:eçtem¶tf*$eçtem¶tic1.*$eçtem¶tic2 *\"%p%n*\" noline*necho >env:eçtem¶ts*$eçtem¶tic1.*$eçtem¶tic2 *\"%c*\" noline*necho >env:eçtem¶td*$eçtem¶tic1.*$eçtem¶tic2 *\"" p_path "*\" noline*neval *$eçtem¶tic2 + 1 to env:eçtem¶tic2\" files all"))
  875.             )
  876.         )
  877.  
  878.         (run runstring)
  879.         (run (cat "echo >>env:eçtem¶tfe \"if exists env:eçtem¶tf*$eçtem¶tic1.0*neval *$eçtem¶tic1 + 1 to env:eçtem¶tic1*nendif\""))
  880.  
  881.         (execute "env:eçtem¶tfe")
  882.  
  883.         (set @execute-dir oldexecutedir)
  884.  
  885.         (set filecount (+ filecount (getenv "ENV:eçtem¶tic2")))
  886.     ))
  887. )
  888.  
  889.  
  890. ;###################################################################################################
  891. ;###    Procedure CopyFiles
  892. ;###################################################################################################
  893. (procedure P_CopyFiles p_dir p_file
  894.  
  895.     (set src (P_CatPath p_dir p_file))
  896.  
  897.     (if (patmatch "#?libs#?" p_dir)
  898.         (
  899.             (set dst (P_StripFile (P_CatPath libdest p_file)))
  900.             (if (= 0 (P_CheckExists dst))    (P_MakeDir    dst 1 0))
  901.             (copylib
  902.                 (source src)
  903.                 (dest dst)
  904.             )
  905.         )
  906.  
  907.         (if (patmatch "#?catalogs#?" p_dir)
  908.             (
  909.                 (set dst (P_StripFile (P_CatPath catdest p_file)))
  910.                 (if (= 0 (P_CheckExists dst))    (P_MakeDir    dst 1 1))
  911.                 (copyfiles
  912.                     (source src)
  913.                     (dest dst)
  914.                     (files)
  915.                 )
  916.             )
  917.  
  918.             (if (patmatch "#?docs#?" p_dir)
  919.                 (
  920.                     (set dst (P_StripFile (P_CatPath docdest p_file)))
  921.                     (if (= 0 (P_CheckExists dst))    (P_MakeDir    dst 1 1))
  922.                     (copyfiles
  923.                         (source src)
  924.                         (dest dst)
  925.                         (files)
  926.                     )
  927.                 )
  928.  
  929.                 (if (patmatch "#?help#?" p_dir)
  930.                     (
  931.                         (set dst (P_StripFile (P_CatPath helpdest p_file)))
  932.                         (if (= 0 (P_CheckExists dst))    (P_MakeDir    dst 1 1))
  933.                             (copyfiles
  934.                             (source src)
  935.                             (dest dst)
  936.                             (files)
  937.                         )
  938.                     )
  939.                     (
  940.                         (set dst (P_CatPath #dest p_dir))
  941.                         (if (= 0 (P_CheckExists dst))    (P_MakeDir    dst 1 0))
  942.                         (copyfiles
  943.                             (source src)
  944.                             (dest dst)
  945.                             (files)
  946.                         )
  947.                     )
  948.                 )
  949.             )
  950.         )
  951.     )
  952.  
  953.     (set filecount (+ filecount fc))
  954.     (complete filecount)
  955. )
  956.  
  957.  
  958. ;###################################################################################################
  959. ;###    Ask for copying files
  960. ;###################################################################################################
  961. (procedure p_AskCopyFiles p_d0 p_f0 p_s0 p_d1 p_f1 p_s1 p_d2 p_f2 p_s2 p_d3 p_f3 p_s3 p_d4 p_f4 p_s4 p_d5 p_f5 p_s5 p_d6 p_f6 p_s6 p_d7 p_f7 p_s7 p_defopt
  962.  
  963.     (set ask #msgaskcopyfile)
  964.     (if (patmatch "#?libs#?" p_d0)        (set ask #msgaskcopylib))
  965.     (if (patmatch "#?catalogs#?" p_d0)    (set ask #msgaskcopycat))
  966.     (if (patmatch "#?docs#?" p_d0)        (set ask #msgaskcopydoc))
  967.     (if (patmatch "#?help#?" p_d0)        (set ask #msgaskcopyhelp))
  968.  
  969.     (if (p_f0)    (set a0 (cat (fileonly p_f0) " (" (+ (/ (getsize (P_CatPath p_d0 p_f0)) 1024) 1) "k)  - " p_s0)) (set a0 ""))
  970.     (if (p_f1)    (set a1    (cat (fileonly p_f1) " (" (+ (/ (getsize (P_CatPath p_d1 p_f1)) 1024) 1) "k)  - " p_s1)) (set a1 ""))
  971.     (if (p_f2)    (set a2    (cat (fileonly p_f2) " (" (+ (/ (getsize (P_CatPath p_d2 p_f2)) 1024) 1) "k)  - " p_s2)) (set a2 ""))
  972.     (if (p_f3)    (set a3    (cat (fileonly p_f3) " (" (+ (/ (getsize (P_CatPath p_d3 p_f3)) 1024) 1) "k)  - " p_s3)) (set a3 ""))
  973.     (if (p_f4)    (set a4    (cat (fileonly p_f4) " (" (+ (/ (getsize (P_CatPath p_d4 p_f4)) 1024) 1) "k)  - " p_s4)) (set a4 ""))
  974.     (if (p_f5)    (set a5    (cat (fileonly p_f5) " (" (+ (/ (getsize (P_CatPath p_d5 p_f5)) 1024) 1) "k)  - " p_s5)) (set a5 ""))
  975.     (if (p_f6)    (set a6    (cat (fileonly p_f6) " (" (+ (/ (getsize (P_CatPath p_d6 p_f6)) 1024) 1) "k)  - " p_s6)) (set a6 ""))
  976.     (if (p_f7)    (set a7    (cat (fileonly p_f7) " (" (+ (/ (getsize (P_CatPath p_d7 p_f7)) 1024) 1) "k)  - " p_s7)) (set a7 ""))
  977.  
  978.     ;### All right?
  979.     (set    choice (
  980.         (askoptions (
  981.             (prompt        ask)
  982.             (help        ask @askoptions-help)
  983.             (choices    a0 a1 a2 a3 a4 a5 a6 a7)
  984.             (default    p_defopt)
  985.         ))
  986.     ))
  987.  
  988.     (if (p_f0) ((if (IN choice 0)    (P_CopyFiles p_d0 p_f0))))
  989.     (if (p_f1) ((if (IN choice 1)    (P_CopyFiles p_d1 p_f1))))
  990.     (if (p_f2) ((if (IN choice 2)    (P_CopyFiles p_d2 p_f2))))
  991.     (if (p_f3) ((if (IN choice 3)    (P_CopyFiles p_d3 p_f3))))
  992.     (if (p_f4) ((if (IN choice 4)    (P_CopyFiles p_d4 p_f4))))
  993.     (if (p_f5) ((if (IN choice 5)    (P_CopyFiles p_d5 p_f5))))
  994.     (if (p_f6) ((if (IN choice 6)    (P_CopyFiles p_d6 p_f6))))
  995.     (if (p_f7) ((if (IN choice 7)    (P_CopyFiles p_d7 p_f7))))
  996. )
  997.  
  998.  
  999.  
  1000. ;###################################################################################################
  1001. ;###    Procedure DoInstall
  1002. ;###################################################################################################
  1003. (procedure P_DoInstall
  1004.  
  1005.     (set c1        0)
  1006.     (set c2        0)
  1007.     (set check    0)
  1008.  
  1009.     (while (> (P_CheckExists (cat "ENV:eçtem¶tf" c1 ".0")) 0) (
  1010.  
  1011.         (set f0 "" f1 "" f2 "" f3 "" f4 "" f5 "" f6 "" f7 "" defopt 0)
  1012.         (set d0 "" d1 "" d2 "" d3 "" d4 "" d5 "" d6 "" d7 "")
  1013.         (set s0 "" s1 "" s2 "" s3 "" s4 "" s5 "" s6 "" s7 "")
  1014.  
  1015.         (while (> (P_CheckExists (cat "ENV:eçtem¶tf" c1 "." c2)) 0) (
  1016.             (set file (getenv (cat "ENV:eçtem¶tf" c1 "." c2)))
  1017.             (set dir (getenv (cat "ENV:eçtem¶td" c1 "." c2)))
  1018.             (set comment (getenv (cat "ENV:eçtem¶ts" c1 "." c2)))
  1019.  
  1020.             (if (file) (
  1021.                 (symbolset (cat "f" check) file)
  1022.                 (symbolset (cat "d" check) dir)
  1023.                 (symbolset (cat "s" check) comment)
  1024.                 (set defopt (BITOR defopt (shiftleft 1 check)))
  1025.                 (set c2 (+ 1 c2))
  1026.                 (set check (+ 1 check))
  1027.             ))
  1028.  
  1029.             (if (= 8 check) (
  1030.                 (set check 0)
  1031.                 (p_AskCopyFiles d0 f0 s0 d1 f1 s1 d2 f2 s2 d3 f3 s3 d4 f4 s4 d5 f5 s5 d6 f6 s6 d7 f7 s7 defopt)
  1032.                 (set f0 "" f1 "" f2 "" f3 "" f4 "" f5 "" f6 "" f7 "" defopt 0)
  1033.                 (set d0 "" d1 "" d2 "" d3 "" d4 "" d5 "" d6 "" d7 "")
  1034.                 (set s0 "" s1 "" s2 "" s3 "" s4 "" s5 "" s6 "" s7 "")
  1035.             ))
  1036.         ))
  1037.  
  1038.         (if (f0)    (p_AskCopyFiles d0 f0 s0 d1 f1 s1 d2 f2 s2 d3 f3 s3 d4 f4 s4 d5 f5 s5 d6 f6 s6 d7 f7 s7 defopt))
  1039.         (set c1        (+ 1 c1))
  1040.         (set c2        0)
  1041.         (set check    0)
  1042.     ))
  1043.  
  1044.     (if (= 1 #setassign) (
  1045.         (if (= 0 update) (
  1046.             (startup (@app-name)
  1047.                 (prompt        (cat #msgmodifystartup1 "Assign >nil: " #prgname ": " #dest #msgmodifystartup2))
  1048.                 (help        (cat #msgmodifystartup1 "Assign >nil: " #prgname ": " #dest #msgmodifystartup2 @startup-help))
  1049.                 (confirm)
  1050.                 (command    (cat "Assign >nil: " #prgname ": " (expandpath #dest)))
  1051.             )
  1052.  
  1053.             (makeassign #dirname #dest)
  1054.         ))
  1055.     ))
  1056. )
  1057.  
  1058.  
  1059.  
  1060. ;###################################################################################################
  1061. ;###    Procedure Cleanup
  1062. ;###################################################################################################
  1063. (procedure P_Cleanup
  1064.     (if (> (P_CheckExists #dest) 0) (
  1065.         (run (cat "list >env:eçtem¶te " #dest " pat .info all lformat \"delete %p%n\""))
  1066.         (execute "env:eçtem¶te")
  1067.         (delete "ENV:eçtem¶t#?")
  1068.     ))
  1069. )
  1070.  
  1071.  
  1072. ;###################################################################################################
  1073. ;###    Entry point
  1074. ;###################################################################################################
  1075. ;### We can't handle this script without Installer 42.9 or better!
  1076. (if (< @installer-version 2752521) (
  1077.     (message #wronginstaller)
  1078.     (exit (quiet))
  1079. ))
  1080.  
  1081. (complete 0)
  1082. (P_PreInstall)
  1083.  
  1084. (welcome)
  1085.  
  1086. (P_About (P_CheckOldInst))
  1087.  
  1088. (complete 2)
  1089. (P_CheckOS)
  1090.  
  1091. (complete 4)
  1092. (P_CheckCPU)
  1093.  
  1094. (complete 6)
  1095. (P_CheckMUI #minmuiver)
  1096.  
  1097. (complete 8)
  1098. (P_SetupInstall)
  1099.  
  1100. ;### Ask for confirmation
  1101. (complete 10)
  1102. (if (P_AskConfirmation) (
  1103.     (P_PrepareInstall)
  1104.  
  1105.     ;### Create filelist for all elCID* files and icons
  1106.     (complete 15)
  1107.     (working #msgcollectfiles1)
  1108.     (P_CreateFileList "" "elCID#?" 0)
  1109.  
  1110.     ;### Create filelist for all NOT elCID* files and icons
  1111.     (complete 20)
  1112.     (working #msgcollectfiles2)
  1113.     (P_CreateFileList "" "~(elCID#?|Install_elCID#?)" 0)
  1114.  
  1115.     ;### Create libs directory filelist.
  1116.     (complete 25)
  1117.     (working #msgcollectfiles2)
  1118.     (P_CreateFileList "libs" "#?" 1)
  1119.  
  1120.     ;### Create catalogs directory filelist.
  1121.     (complete 30)
  1122.     (working #msgcollectfiles3)
  1123.     (P_CreateFileList "catalogs" "#?" 1)
  1124.  
  1125.     ;### Create docs directory filelist.
  1126.     (working #msgcollectfiles3)
  1127.     (P_CreateFileList "docs" "#?" 1)
  1128.  
  1129.     ;### Create help directory filelist.
  1130.     (working #msgcollectfiles4)
  1131.     (P_CreateFileList "help" "#?" 1)
  1132.  
  1133.     ;### Create images directory filelist.
  1134.     (working #msgcollectfiles5)
  1135.     (P_CreateFileList "images" "#?" 1)
  1136.  
  1137.     (complete 35)
  1138.     (set fc (/ 60 filecount))
  1139.     (set filecount 35)
  1140.     (P_DoInstall)
  1141. ))
  1142.  
  1143. (complete 100)
  1144. (P_Cleanup)
  1145. (exit #msgend)
  1146.  
  1147.  
  1148.