home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / varia / installer43_3 / samplescripts / surfer-install < prev    next >
Text File  |  1977-12-31  |  25KB  |  732 lines

  1. ;------------------------------------------------------------------------
  2. ;
  3. ; This Surfer-Install is used only for Surfer 1.2!
  4. ;
  5. ; $VER: Surfer-Install 2.4 (27.3.96)
  6. ;
  7. ; (C)1996 ESCOM AG
  8. ; created by Heinz Wrobel, this work is dedicated to Joan Thuesen
  9. ; small changes by Olaf `Olsen' Barthel
  10. ;
  11. ;------------------------------------------------------------------------
  12.  
  13. ; Never ever leave junk lying around!
  14. ;
  15. (onerror (CLEANUP))
  16.  
  17. ;------------------------------------------------------------------------
  18. (if (= @language "deutsch")
  19. (
  20. (set #wrongversion
  21. (cat "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  22.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  23.      "Bitte überprüfen Sie Ihre Konfiguration!"
  24. ))
  25.  
  26. (set #welcome
  27. (cat "Willkommen zur Installation des Internet-Surfer-Paketes von Amiga Technologies!"
  28. ))
  29.  
  30. (set #surferdestdir-prompt "Bitte geben Sie die Schublade an, in der die Schublade 'Internet' für das Surfer-Paket angelegt werden soll.\n")
  31. (set #surferdestdir-help "Üblicherweise wird das Surfer-Paket nach 'Work:' installiert.")
  32.  
  33. (set #destdir-prompt "Bitte geben Sie die Schublade an, in der %s installiert werden sollen.\n")
  34. (set #destdir-help "Wenn Sie Ihre Installation modifiziert haben, kann es sein, daß der Installer und das Surfer-Paket manche Schubladen nicht sicher finden kann!\n\nBleiben Sie bei den Vorgabewerten, wenn Sie sich nicht sicher sind!")
  35.  
  36. (set #surfdir-info    "die Surfer-Applikationen")
  37. (set #muidir-info     "die AT-MUI-Schublade und zugehörige Dateien")
  38. (set #devsdir-info    "zusätzliche Gerätetreiber")
  39. (set #envdir-info     "zusätzliche Einstellungen")
  40. (set #classesdir-info "ClassAct-Dateien und zusätzliche Datatypes")
  41. (set #libsdir-info    "zusätzliche Systembibliotheken")
  42. (set #localedir-info  "landessprachliche Kataloge")
  43. (set #fontsdir-info   "zusätzliche Zeichensätze")
  44.  
  45. (set #installing "Installiere %s ...")
  46.  
  47. (set #no-diskspace     "Um das Surfer-Paket in '%s' zu installieren, benötigen Sie mindestens %ld Bytes freien Plattenspeicher!")
  48.  
  49. (set #startup-prompt    "Es müssen zu S:User-Startup einige Eintragungen für %s hinzugefügt werden:\n\n%s")
  50. (set #startup-help      "Für die korrekte Funktion des Surfer-Paketes sind diese Eintragungen nötig.")
  51.  
  52. (set #ask-config "Das Surfer-Paket ist jetzt vollständig installiert. Wollen Sie es gleich konfigurieren? Bitte starten Sie Ihren Amiga nach der Konfiguration einmal neu!")
  53. (set #ask-config-help "Ohne eine Konfiguration nach der Installation oder nach einem Update könnten Sie später Probleme haben!")
  54.  
  55. (set #bonus-disk "Auf der letzten Diskette des Surfer-Pakets finden Sie als Bonus das FAX-Programm MultiFax-Light. Sie können es von dort bei Bedarf separat installieren.")
  56.  
  57. (set #ask-disk1         "Bitte legen Sie die Diskette 'SurferDisk1' ein!")
  58. (set #ask-disk2         "Bitte legen Sie die Diskette 'SurferDisk2' ein!")
  59. (set #ask-disk3         "Bitte legen Sie die Diskette 'SurferDisk3' ein!")
  60.  
  61. (set #muiinst-prompt    "Wollen Sie die existierende aktuelle MUI-Version mit dem möglicherweise älteren MUI-AT V14.107 überschreiben?")
  62. (set #muiinst-help      "Sie scheinen schon eine aktuelle MUI-Version zu verwenden. Überschreiben Sie sie nur, wenn Sie ganz sicher sind.")
  63.  
  64. (set #inetinst-prompt   "INet-225 scheint schon installiert zu sein. Wollen Sie trotzdem die mitgelieferte Version 7.100 installieren?")
  65. (set #inetinst-help     "Sie scheinen schon INet-225 zu verwenden. Wenn Ihre Version funktionsfähig ist, dann benötigen Sie INet V7.100 aus dem Surfer-Paket nicht.")
  66.  
  67. (set #prefsave-prompt   "Wollen Sie die schon existierenden Voreinstellungen für\n\n'%s'\n\nbeibehalten?")
  68. (set #prefsave-help     "Wenn Sie die existierenden Voreinstellungen nicht übernehmen, dann werden diese mit Vorgabewerten überschrieben!")
  69.  
  70. )
  71.  
  72. ;-------- English --------
  73. (
  74. (set #wrongversion
  75. (cat "You have an old version of the program 'Installer' "
  76.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  77.      "Please check your configuration!"
  78. ))
  79.  
  80. (set #welcome
  81. (cat "Welcome to the the Installation of the Amiga Technologies Internet Surfer Package!"
  82. ))
  83.  
  84. (set #surferdestdir-prompt "Please select the drawer where the drawer 'Internet' for the Surfer package should be created.\n")
  85. (set #surferdestdir-help "Typically, 'Work:' is selected as destination.")
  86.  
  87. (set #destdir-prompt "Please select the drawer where %s should be installed.\n")
  88. (set #destdir-help "If you have modified your installation, the Installer and the Surfer package may not be able to find certain drawers. If you are not sure, keep with the default values.")
  89.  
  90. (set #surfdir-info    "the Surfer applications")
  91. (set #muidir-info     "the AT-MUI drawer")
  92. (set #devsdir-info    "additional device drivers")
  93. (set #envdir-info     "additional preferences")
  94. (set #classesdir-info "ClassAct files and some Datatypes")
  95. (set #libsdir-info    "additional libraries")
  96. (set #localedir-info  "locale catalogs")
  97. (set #fontsdir-info   "additional fonts")
  98.  
  99. (set #installing "Installing %s...")
  100.  
  101. (set #no-diskspace     "To install the Surfer package into '%s', you need at least %ld bytes of free harddrive space!")
  102.  
  103. (set #startup-prompt    "Some lines need to be added to S:User-Startup for %s:\n\n%s")
  104. (set #startup-help      "The Surfer package won't work correctly without these lines!")
  105.  
  106. (set #ask-config "The Surfer package has now been installed. Do you want to set up the configuration for it? Please reboot your Amiga once after the Surfer configuration!")
  107. (set #ask-config-help "Without setting up the configuration after an installation or an update, you might run into problems later!")
  108.  
  109. (set #bonus-disk "On the last disk of the Surfer package, you'll find the FAX-Software MultiFax-Light as a little extra. If you want to try it, please install it separately.")
  110.  
  111. (set #ask-disk1         "Please insert disk 'SurferDisk1'!")
  112. (set #ask-disk2         "Please insert disk 'SurferDisk2'!")
  113. (set #ask-disk3         "Please insert disk 'SurferDisk3'!")
  114.  
  115. (set #muiinst-prompt    "Do you want to overwrite your current up to date MUI version with the possibly older MUI-AT V14.107?")
  116. (set #muiinst-help      "You seem to have a MUI version installed alread that is up to date. Don't overwrite it if you aren't completely sure about it.")
  117.  
  118. (set #inetinst-prompt   "INet-225 seems to be already installed. Do you want to install the Surfer INet 7.100 anyway?")
  119. (set #inetinst-help     "It seems that you already have INet-225 installed on your system. If this installation works well, you don't need the INet V7.100 in this package.")
  120.  
  121. (set #prefsave-prompt   "Do you want to keep the existing preferences for\n\n'%s'?")
  122. (set #prefsave-help     "If you don't keep existing preferences, they will be overwritten with default values!")
  123.  
  124. )
  125. ) ; if
  126.  
  127.  
  128.  
  129. ;------------------------------------------------------------------------
  130. ; Cleanup any temporary mess we created
  131. (procedure CLEANUP
  132.     ; Nothing to cleanup
  133.     (delete (tackon @default-dest ".tempinstall") (all) (optional "force"))
  134. ) ; CLEANUP
  135.  
  136. ;------------------------------------------------------------------------
  137. ; Obtain an installation path
  138. (procedure GETPATH #gp_envname #gp_default #gp_remdir #gp_msg #gp_help
  139.  
  140.     (set #gp_res "")
  141.     (while (= "" #gp_res)
  142.         (set #gp_res #gp_default)
  143.         (if (not (exists #gp_res (noreq)))
  144.           (
  145.             ; Surfer 1.1 Hack! We will have a work, but not right now.
  146.             (if (= #gp_res "Work:")
  147.               (
  148.                 (set #gp_res "")
  149.                 (set #gp_default @default-dest)
  150.               )
  151.             ) ; if
  152.  
  153.             (if (<> "" #gp_envname)
  154.               (
  155.                 (set #gp_res (getenv (cat "Surfer/Path_" #gp_envname)))
  156.  
  157.                 (if (AND (<> "" #gp_res) #gp_remdir)
  158.                   (
  159.                     ; Remove the "Internet" suffix
  160.                     (set #gp_res (pathonly #gp_res))
  161.                   )
  162.                 ) ; if
  163.               )
  164.               (
  165.                 (set #gp_res "")
  166.               )
  167.             ) ; if
  168.           )
  169.         ) ; if
  170.  
  171.         (if (OR (= "" #gp_res) (= @user-level 2))
  172.           (
  173.             ; We had a problem. So we need to ask the user!
  174.             (set #gp_res
  175.                 (expandpath
  176.                     (askdir
  177.                         (prompt #gp_msg)
  178.                         (help #gp_help)
  179.                         (default #gp_default)
  180.                     )
  181.                 )
  182.             )
  183.           )
  184.         ) ; if
  185.  
  186.         ; If the directory does not exist, retry!
  187.         (if (<> "" #gp_res)
  188.           (
  189.             (if (not (exists #gp_res (noreq)))
  190.                 (set #gp_res "")
  191.             ) ; if
  192.           )
  193.         ) ; if
  194.     ) ; while
  195.  
  196.     ; return the result!
  197.     (set #gp_res #gp_res)
  198.  
  199. ) ; GETPATH
  200.  
  201. ;------------------------------------------------------------------------
  202. (procedure RUNLHEX #rl_archive #rl_dest #rl_msg
  203.     (working (#installing #rl_msg))
  204.     (run (cat "C:lhex \"-qfw" #rl_dest "\" x \"" #rl_archive "\""))
  205. ) ; RUNLHEX
  206.  
  207. ;------------------------------------------------------------------------
  208. ; Unpack an archive like RUNLHEX, but to a temporary subdirectory
  209. (procedure RUNLHEX2TEMP #rl2t_archive #rl2t_dest #rl2t_msg
  210.  
  211.     (set #rl2t_destpath #rl2t_dest)
  212.  
  213.     (set #rl2t_temppath (tackon @default-dest ".tempinstall"))
  214.     (delete #rl2t_temppath (all) (optional "force"))
  215.     (makedir #rl2t_temppath)
  216.  
  217.     (RUNLHEX #rl2t_archive #rl2t_temppath #rl2t_msg)
  218.  
  219. ) ; RUNLHEX2TEMP
  220.  
  221. ;------------------------------------------------------------------------
  222. (procedure UPD_TEMP2DEST #rl2t_usecopylib #rl2t_file
  223.  
  224.     ; This may be called multiple times after RUNLHEX2TEMP
  225.     ; it will update a file from the temporary area to the
  226.     ; actual destination using copylib if requested to do so.
  227.  
  228.     (set #rl2t_src (tackon #rl2t_temppath #rl2t_file))
  229.     (set #rl2t_dst (tackon #rl2t_destpath #rl2t_file))
  230.  
  231.     (working (#installing #rl2t_file))
  232.  
  233.     ; A directory as source needs special handling!
  234.     (if (= (exists #rl2t_src) 2)
  235.       (
  236.         ; A directory as source means copying the whole thing as is
  237.         ; Use copyfiles for copying
  238.         (copyfiles
  239.             (source #rl2t_src)
  240.             (dest #rl2t_dst)
  241.             (optional "force" "askuser")
  242.             (all))
  243.       )
  244.       (
  245.         ; Not a directory, copy the file to the correct destination
  246.         (set #rl2t_dstdir (pathonly #rl2t_dst))
  247.         (makedir #rl2t_dstdir)
  248.  
  249.         (if #rl2t_usecopylib
  250.           (
  251.             ; Use copylib for copying
  252.             (copylib
  253.                 (source #rl2t_src)
  254.                 (dest #rl2t_dstdir)
  255.                 (optional "force" "askuser")
  256.             )
  257.           )
  258.           (
  259.             ; Use copyfiles for copying
  260.             (copyfiles
  261.                 (source #rl2t_src)
  262.                 (dest #rl2t_dstdir)
  263.                 (optional "force" "askuser")
  264.             )
  265.           )
  266.         ) ; if
  267.       )
  268.     ) ; if
  269.  
  270.     ; Now delete the file/dir in the temporary storage area to conserve
  271.     ; disk space
  272.     (delete #rl2t_src (all) (optional "force"))
  273.  
  274. ) ; UPDATETEMP2DEST
  275.  
  276. ;------------------------------------------------------------------------
  277. ; Cleanup the temporary directory created in RUNLHEX2TEMP
  278. (procedure KILLTEMP
  279.  
  280.     (delete #rl2t_temppath (all) (optional "force"))
  281.  
  282. ) ; KILLTEMP
  283.  
  284. ;------------------------------------------------------------------------
  285. ; Save a prefs file into a suitable subdirectory
  286. (procedure SAVEPREFS #sps_basedir #sps_file
  287.  
  288.     (set #sps_name (tackon #sps_basedir #sps_file))
  289.     (if (exists #sps_name)
  290.       (
  291.         ; Yo. The file exists. Save it!
  292.         (set #sps_prefsdir (tackon (pathonly #sps_name) ".oldprefs"))
  293.  
  294.         (makedir #sps_prefsdir)
  295.         (copyfiles
  296.             (source #sps_name)
  297.             (dest #sps_prefsdir)
  298.             (optional "force" "askuser"))
  299.       )
  300.     ) ; if
  301.  
  302. ); SAVEPREFS
  303.  
  304. ;------------------------------------------------------------------------
  305. ; Ask the user if he wants to keep his/her prefs and cleanup
  306. ; things accordingly
  307. (procedure SAVEPREFSEND #spe_basedir #spe_subdir #spe_appname
  308.  
  309.     ; This matches SAVEPREFS
  310.     (set #spe_prefsdir (tackon #spe_basedir (tackon #spe_subdir ".oldprefs")))
  311.  
  312.     (if (exists #spe_prefsdir)
  313.       (
  314.         ; We got prefs to check. default is "Yes, keep them"
  315.         (if (askbool (prompt (#prefsave-prompt #spe_appname))
  316.                      (help   #prefsave-help)
  317.                      (default 1))
  318.           (
  319.             ; Yo. Keep the old prefs!
  320.             (copyfiles
  321.                 (source #spe_prefsdir)
  322.                 (dest (tackon #spe_basedir #spe_subdir))
  323.                 (pattern "#?")
  324.                 (optional "force" "askuser"))
  325.           )
  326.         ) ; if
  327.  
  328.         ; Ok, done keeping prefs. Now kill the backup!
  329.         (delete #spe_prefsdir (all) (optional "force"))
  330.       )
  331.     ) ; if
  332.  
  333. ); SAVEPREFSEND
  334.  
  335. ;------------------------------------------------------------------------
  336. ; We can't handle this script without Installer 42.9 or better!
  337. (if (< @installer-version 2752521)
  338.   (
  339.     ; Big problem!
  340.     (message #wrongversion)
  341.     (exit (quiet))
  342.   )
  343. )
  344.  
  345. ; find out how the user wants to install things
  346. (welcome #welcome)
  347.  
  348. (complete 0)
  349.  
  350. ;------------------------------------------------------------------------
  351. ; We have several destinations to check as our package is unfortunately
  352. ; somewhat spread out.
  353.  
  354.     ; We assume a new installation on an A1200 without MUI or INet!
  355.     (set AddWorkAssign FALSE)
  356.     (set AddINetAssign TRUE)
  357.     (set InstallMUI    FALSE)
  358.     (set AddMUIAssign  FALSE)
  359.     (set InstallINet   FALSE)
  360.     (set AddINetAssign FALSE)
  361.     (set IsUpdate FALSE)
  362.  
  363.     ; First find the Surfer base
  364.  
  365.     (set #surferdirbase (GETPATH "SurferPackage" "Work:" TRUE #surferdestdir-prompt #surferdestdir-help))
  366.  
  367.     ; We have to create a drawer "Internet" there!
  368.     (set #surferdir (tackon #surferdirbase "Internet"))
  369.  
  370.     ; If this is a new installation, we check the diskspace!
  371.     (if (not (exists #surferdir))
  372.       (
  373.         ; For a new setup, we should leave some space!
  374.         (if (< (getdiskspace #surferdirbase) 4000000)
  375.             (abort (#no-diskspace #surferdirbase 4000000))
  376.         )
  377.  
  378.         ; Just to be sure.
  379.         (makedir #surferdir (infos))
  380.       )
  381.       (
  382.         ; This must be an update!
  383.         (set IsUpdate TRUE)
  384.       )
  385.     )
  386.  
  387.     ; Ok, we found the correct destination now
  388.     (set @default-dest #surferdir)
  389.  
  390.     ; MUI only needs to be installed if there isn't a suitable version
  391.     ; already. So we need to check for MUI 14.107 first!
  392.     (if (< (getversion "LIBS:muimaster.library") 917611)
  393.       (
  394.         ; Hmm. We don't have suitable MUI. Install it
  395.         (set InstallMUI    TRUE)
  396.         (set AddMUIAssign  TRUE)
  397.       )
  398.       (
  399.         ; Ok. A suitable MUI is there. In expert mode ask the user if he
  400.         ; wants to overwrite it with the old one.
  401.         (if (= @user-level 2)
  402.           (
  403.             (if (askbool (prompt #muiinst-prompt)
  404.                          (help   #muiinst-help)
  405.                          (default 0))
  406.               (
  407.                 ; Ok. Install it anyway!
  408.                 (set InstallMUI    TRUE)
  409.                 (set AddMUIAssign  TRUE)
  410.               )
  411.             ) ; if
  412.           )
  413.         ) ; if
  414.       )
  415.     ) ; if
  416.  
  417.     ; If we already have INet, check before simply installing it
  418.     ; This works a lot like the MUI check!
  419.     ; We require INet 7.100.
  420.     (if (<> "" (getassign "INet" "av"))
  421.       (
  422.         (if (< (getversion "INet:libs/inet.library") 458852)
  423.           (
  424.             ; Hmm. We don't have suitable INet. Install it
  425.             (set InstallINet   TRUE)
  426.             (set AddINetAssign TRUE)
  427.           )
  428.           (
  429.             ; Ok. A suitable INet is there. In expert mode ask the user if he
  430.             ; wants to overwrite it with the old one.
  431.             (if (= @user-level 2)
  432.               (
  433.                 (if (askbool (prompt #inetinst-prompt)
  434.                              (help   #inetinst-help)
  435.                              (default 0))
  436.                   (
  437.                     ; Ok. Install it anyway!
  438.                     (set InstallINet   TRUE)
  439.                     (set AddINetAssign TRUE)
  440.                   )
  441.                 ) ; if
  442.               )
  443.             ) ; if
  444.           )
  445.         ) ; if
  446.       )
  447.       (
  448.         ; Hmm. We don't have suitable INet. Install it
  449.         (set InstallINet   TRUE)
  450.         (set AddINetAssign TRUE)
  451.       )
  452.     ) ; if
  453.  
  454.     ; This is tricky. We want the boot-volume as default, but the
  455.     ; user might have reassigned it. In that case we assume that
  456.     ; s/he knows what s/he is doing!
  457.     (if InstallMUI
  458.       (
  459.         (set #muidir     (GETPATH "" "SYS:" TRUE (#destdir-prompt #muidir-info) #destdir-help))
  460.       )
  461.     ) ; if
  462.  
  463.     (set #envdir     "ENVARC:")
  464.     (set #devsdir    (GETPATH "" "DEVS:"       TRUE (#destdir-prompt #devsdir-info) #destdir-help))
  465.     (set #classesdir (GETPATH "" "SYS:Classes" TRUE (#destdir-prompt #classesdir-info) #destdir-help))
  466.     (set #libsdir    (GETPATH "" "LIBS:"       TRUE (#destdir-prompt #libsdir-info) #destdir-help))
  467.     (set #localedir  (GETPATH "" "LOCALE:"     TRUE (#destdir-prompt #localedir-info) #destdir-help))
  468.     (set #fontsdir   (GETPATH "" "FONTS:"      TRUE (#destdir-prompt #fontsdir-info) #destdir-help))
  469.  
  470.     (complete 5)
  471.  
  472. ;------------------------------------------------------------------------
  473. ; First, we install lhex and Installer into C: This won't change and
  474. ; we need them.
  475. (askdisk (dest "SurferDisk1") (prompt #ask-disk1) (help @askdisk-help))
  476.  
  477. (working (#installing "Installer"))
  478. (copylib
  479.     (source "Installer")
  480.     (dest "C:")
  481.     (optional "force" "askuser")
  482. )
  483.  
  484. (complete 8)
  485.  
  486. (working (#installing "lhex"))
  487. (copylib
  488.     (source "lhex")
  489.     (dest "C:")
  490.     (optional "force" "askuser")
  491. )
  492.  
  493. (complete 5)
  494.  
  495. ;------------------------------------------------------------------------
  496. ; Now install Inet, fonts.lha and locale.lha, because they reside on disk #1
  497. (if InstallINet
  498.   (
  499.     (SAVEPREFS #surferdir "Inet/db/group")
  500.     (SAVEPREFS #surferdir "Inet/db/networks")
  501.     (SAVEPREFS #surferdir "Inet/db/protocols")
  502.     (SAVEPREFS #surferdir "Inet/db/services")
  503.     (SAVEPREFS #surferdir "Inet/db/syslog.conf")
  504.     (RUNLHEX "inet.lha" #surferdir "INet")
  505.     (SAVEPREFSEND #surferdir "Inet/db" "INet")
  506.   )
  507. ) ; if
  508. (complete 15)
  509.  
  510. (RUNLHEX "locale.lha"  #localedir #localedir-info)
  511. (complete 18)
  512.  
  513. (RUNLHEX "fonts.lha"   #fontsdir #fontsdir-info)
  514. (complete 19)
  515.  
  516. ;------------------------------------------------------------------------
  517. ; On disk #2, we got work_(www|email|irc|ftp).lha, libs.lha, devs.lha, envarc.lha
  518. (askdisk (dest "SurferDisk2") (prompt #ask-disk2) (help @askdisk-help))
  519.  
  520. (SAVEPREFS #surferdir "WWW/Bookmarks.html")
  521. (SAVEPREFS #surferdir "WWW/MindWalker.prefs")
  522. (RUNLHEX "SurferDisk2:work_www.lha"   #surferdir #surfdir-info)
  523. (SAVEPREFSEND #surferdir "WWW" "MindWalker")
  524. (complete 20)
  525.  
  526. (SAVEPREFS #surferdir "E-Mail/Voodoo.prefs")
  527. (RUNLHEX "SurferDisk2:work_email.lha"   #surferdir #surfdir-info)
  528. (SAVEPREFSEND #surferdir "E-Mail" "Voodoo")
  529. (complete 24)
  530.  
  531. (RUNLHEX "SurferDisk2:work_irc.lha"   #surferdir #surfdir-info)
  532. (complete 28)
  533. (RUNLHEX "SurferDisk2:work_ftp.lha"   #surferdir #surfdir-info)
  534. (complete 30)
  535.  
  536. (RUNLHEX2TEMP "SurferDisk2:libs.lha"   #libsdir #libsdir-info)
  537. (UPD_TEMP2DEST TRUE "gtlayout.library")
  538. (KILLTEMP)
  539.  
  540. (complete 35)
  541. (RUNLHEX2TEMP "SurferDisk2:devs.lha"   #devsdir #devsdir-info)
  542. (UPD_TEMP2DEST TRUE "networks/ppp.device")
  543. (UPD_TEMP2DEST TRUE "networks/slip.device")
  544. (UPD_TEMP2DEST FALSE "DataTypes")
  545. (KILLTEMP)
  546.  
  547. (complete 40)
  548.  
  549. (SAVEPREFS #envdir "sana2/ppp0.config")
  550. (SAVEPREFS #envdir "sana2/slip0.config")
  551. (RUNLHEX "SurferDisk2:envarc.lha" #envdir #envdir-info)
  552. (SAVEPREFSEND #envdir "sana2" #envdir-info)
  553. (complete 42)
  554.  
  555. ;------------------------------------------------------------------------
  556. ; On disk #3, we got classes.lha, locale.lha, fonts.lha, and MUI.lha
  557. (askdisk (dest "SurferDisk3") (prompt #ask-disk3) (help @askdisk-help))
  558.  
  559. (RUNLHEX2TEMP "SurferDisk3:classes.lha" #classesdir #classesdir-info)
  560. (UPD_TEMP2DEST TRUE "window.class")
  561. (UPD_TEMP2DEST TRUE "arexx.class")
  562. (UPD_TEMP2DEST TRUE "DataTypes/gif.datatype")
  563. (UPD_TEMP2DEST TRUE "DataTypes/jpeg.datatype")
  564. (UPD_TEMP2DEST TRUE "DataTypes/png.datatype")
  565. (UPD_TEMP2DEST TRUE "DataTypes/xbm.datatype")
  566. (UPD_TEMP2DEST TRUE "Gadgets/button.gadget")
  567. (UPD_TEMP2DEST TRUE "Gadgets/checkbox.gadget")
  568. (UPD_TEMP2DEST TRUE "Gadgets/clicktab.gadget")
  569. (UPD_TEMP2DEST TRUE "Gadgets/integer.gadget")
  570. (UPD_TEMP2DEST TRUE "Gadgets/layout.gadget")
  571. (UPD_TEMP2DEST TRUE "Gadgets/listbrowser.gadget")
  572. (UPD_TEMP2DEST TRUE "Gadgets/scroller.gadget")
  573. (UPD_TEMP2DEST TRUE "Gadgets/space.gadget")
  574. (UPD_TEMP2DEST TRUE "Gadgets/speedbar.gadget")
  575. (UPD_TEMP2DEST TRUE "Gadgets/string.gadget")
  576. (UPD_TEMP2DEST TRUE "Gadgets/textfield.gadget")
  577. (UPD_TEMP2DEST TRUE "Images/bevel.image")
  578. (UPD_TEMP2DEST TRUE "Images/drawlist.image")
  579. (UPD_TEMP2DEST TRUE "Images/glyph.image")
  580. (UPD_TEMP2DEST TRUE "Images/label.image")
  581. (UPD_TEMP2DEST TRUE "Images/penmap.image")
  582. (KILLTEMP)
  583.  
  584. (complete 62)
  585. (RUNLHEX "SurferDisk3:work.lha"   #surferdir #surfdir-info)
  586. (complete 65)
  587. ; Install MUI only if needed!
  588. (if InstallMUI
  589.   (
  590.     (RUNLHEX "SurferDisk3:mui.lha"     #muidir #muidir-info)
  591.   )
  592. ) ; if
  593. (complete 80)
  594.  
  595. ;------------------------------------------------------------------------
  596. ; There is the config backup-directory that might not exist yet.
  597. ; Some stuff depends on it!
  598. (makedir (tackon #surferdir "Surfer-Backup"))
  599.  
  600. ;------------------------------------------------------------------------
  601. ; We might need to create a Work: Assign. This is basically
  602. ; Surfer 1.1 magic!
  603. ; This is a necessary hack: Surfer MUST reside in Work:Internet currently!
  604. ; (Surfer 1.1!)
  605. (if (= "" (getassign "Work" "adv"))
  606.     (Set AddWorkAssign TRUE)
  607. ) ; if
  608.  
  609. (if AddWorkAssign
  610.   (
  611.     (set cmd (cat "Assign Work: \"" #surferdirbase "\"\n"))
  612.     (startup "INTERNET-SURFER"
  613.         (prompt (#startup-prompt "Surfer Package" cmd))
  614.         (help #startup-help)
  615.         (command cmd)
  616.     )
  617.  
  618.     ; If we have to add a Work: Assign, we better create one right now
  619.     ; The user might want to start the surfer right away!
  620.     (makeassign "Work" #surferdirbase)
  621.   )
  622. )
  623. (complete 82)
  624.  
  625. ; MUI might need one, too on a new installation
  626. (if AddMUIAssign
  627.   (
  628.     (set cmd (cat "Assign MUI: " (tackon #muidir "MUI-AT") "\nAssign LIBS: MUI:Libs ADD\nAssign LOCALE: MUI:Locale ADD\n"))
  629.     (startup "MUI-AT"
  630.         (prompt (#startup-prompt "AT-MUI" cmd))
  631.         (help #startup-help)
  632.         (command cmd)
  633.     )
  634.  
  635.     (if (not @pretend)
  636.     (
  637.       ; To help the poor fools
  638.       (makeassign "MUI" (tackon #muidir "MUI-AT"))
  639.       (run "Assign LIBS: MUI:Libs add")
  640.       (run "Assign LOCALE: MUI:Locale add")
  641.     ))
  642.   )
  643. )
  644. (complete 85)
  645.  
  646. ; We should not forget INet!
  647. (if AddINetAssign
  648.   (
  649.     (set #t (tackon #surferdir "INet"))
  650.     (set cmd (cat "IF EXISTS \"" #t "\"\n  Assign INet: \"" #t "\"\n  Path INet:C ADD\nENDIF\n"))
  651.     (startup "INet"
  652.         (prompt (#startup-prompt "AT-INet" cmd))
  653.         (help #startup-help)
  654.         (command cmd)
  655.     )
  656.  
  657.     ; Magic to avoid clashes!
  658.     (if (<> "" (getassign "INet" "adv"))
  659.         (run "Path INet:c remove")
  660.     )
  661.  
  662.     ; To help the poor fools
  663.     (if (not @pretend)
  664.     (
  665.       (makeassign "INet" #t)
  666.     ))
  667.  
  668.     (run "Path INet:c add")
  669.   )
  670. )
  671. (complete 90)
  672.  
  673. ;------------------------------------------------------------------------
  674. ; Something nifty. The user might still have an unmodified startup
  675. ; where T: points to RAM: We can't have that on an A1200 or Surfer
  676. ; won't run due to lack of memory. RAM: has the special feature
  677. ; that it is always full. We make use of this and expect at least 10K
  678. ; free temporary space!
  679. (if (< (getdiskspace "T:") 10000)
  680.   (
  681.     (set #t (tackon #surferdir "Temp"))
  682.     ; Hmm. It seems that this guy is using RAM:
  683.     (set cmd (cat "If Not Exists \"" #t "\"\n  MakeDir \"" #t "\"\nEndIf\nDelete >NIL: \"" (tackon #t "#?") "\" quiet all\nAssign T: \"" #t "\"\n"))
  684.     (startup "TEMPDIR"
  685.         (prompt (#startup-prompt "Surfer" cmd))
  686.         (help #startup-help)
  687.         (command cmd)
  688.     )
  689.  
  690.     (makedir #t)
  691.     (if (not @pretend)
  692.     (
  693.       (makeassign "T" #t)
  694.     ))
  695.   )
  696. )
  697. (complete 95)
  698.  
  699. ;------------------------------------------------------------------------
  700. ; Finally create some information about where surfer resides now
  701. (makedir "ENV:Surfer")
  702. (makedir "ENVARC:Surfer")
  703. (textfile (dest "ENV:Surfer/Path_SurferPackage") (append #surferdir))
  704. (textfile (dest "ENVARC:Surfer/Path_SurferPackage") (append #surferdir))
  705. (complete 97)
  706.  
  707. ;------------------------------------------------------------------------
  708. ; Inform the user about MF-Light
  709. (message #bonus-disk (all))
  710.  
  711. ;------------------------------------------------------------------------
  712. ; The user might want to update the configuration! This is valid for all
  713. ; user levels!
  714. (user 2)
  715. (if (askbool (prompt #ask-config) (help #ask-config-help) (default 1))
  716.   (
  717.     ; Just a try!
  718.     (run (tackon #surferdir "Internet-Setup"))
  719.   )
  720. )
  721.  
  722. ;------------------------------------------------------------------------
  723. ; That's it!
  724. (complete 100)
  725.  
  726. (CLEANUP)
  727. (exit)
  728.  
  729. ;------------------------------------------------------------------------
  730.  
  731. ; *** EOT ***
  732.