home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / +look_here_1st!+ / af_on_the_web / aweb21demo / install < prev    next >
Text File  |  1997-02-27  |  14KB  |  410 lines

  1. ; $VER: Install_AWeb 2.1DEMO (31.10.96)
  2. ; Description: Installer script for AWeb-II 2.1DEMO
  3.  
  4. (set cpu (database "cpu"))
  5. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  6. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  7.  
  8. (set awn (getversion "AWeb"))
  9. (set awv (/ awn 65536))
  10. (set awr (- awn (* awv 65536)))
  11.  
  12. ; all strings used in this installer script
  13. (set #need39 "This program requires OS 3.0 or later to function.")
  14. (set #nohelp "No help available.")
  15. (set #welcome
  16.    (cat "AWeb-II is a fast, multithreaded World Wide Web browser for Amiga OS 3.0.\nIt understands virtually all widely used HTML and has many other features.\nAWeb-II runs with a wide variety of TCP-stacks.\nIt has an ARexx and Shell command interface."
  17.       ("\n\nThis installation procedure will install the AWeb-II browser version %ld.%ldDEMO and the necessary ClassAct gadget classes on your system.\n" awv awr)
  18.    )
  19. )
  20. (set #destdir-prompt "Please select the directory where you want AWeb-II DEMO installed.\n(If you do not accept the default, a directory 'AWeb21DEMO' will be created there.)")
  21. (set #destdir-help "A directory for AWeb21DEMO will be created here. By accepting the default directory, most of the files don't have to be copied.")
  22. (set #installing "Installing ")
  23. (set #memory-prompt "Is your Amiga equipped with more than 2MB of memory?")
  24. (set #memory-help "AWeb-II runs on a 2MB Amiga, but needs a special setup on such a machine. If you click the 'only 2MB' button, the appropriate settings will be installed.\n\nYou can always change the settings after installation.")
  25. (set #fonts-prompt "Do you want to install the \"times.font\" and \"courier.font\" sizes 30 and 36?")
  26. (set #fonts-help 
  27.    (cat "In order to provide AWeb-II with a consistent set of fonts, four fonts are included "
  28.       "in this archive, times/30, times/36, courier/30 and courier/36.\n\n"
  29.       "Because the demo uses these fonts by default, page headers might look really awful "
  30.       " if you don't install these fonts. It is highly recommended that you install them."
  31.    )   
  32. )
  33. (set #fixfonts-prompt "The FixFonts utility will be run to make the newly added fonts available.")
  34. (set #fixfonts-help
  35.    (cat "The FixFonts utility is needed to make the newly added fonts available to the system.\n\n"
  36.       "If you intend to use the fonts from this archive, you are strongly encouraged to "
  37.       "run FixFonts now.\n\n"
  38.       "Note that running this program may take a while."
  39.    )
  40. )
  41.  
  42. (set #readme "Displaying the version notes readme...")
  43. (set #bye 
  44.    (cat "In case you need help configuring or using AWeb-II DEMO, pressing the HELP key "
  45.       "when AWeb is active will bring up the documentation.\n"
  46.       "I hope you will enjoy using this demo and will consider purchasing the full version."
  47.    )
  48. )
  49.  
  50. ; ---------------------------------------------------------------------------
  51.  
  52. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  53. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  54. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  55. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  56.  
  57. ; ClassAct installation procedure V 1.5 (12.5.96) by Osma Ahvenlampi
  58.  
  59. ; percentage of the size of included ClassAct classes versus the whole
  60. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  61. (set classact-complete 50)
  62.  
  63. ; ClassAct installer scripts
  64. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  65. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  66.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  67.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  68.         )
  69.     )
  70. )
  71. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  72. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  73. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  74. (set #creating-dir "Creating directory ")
  75. (set #usbackup-prompt "User-Startup will now be backed up.")
  76. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  77. (set #adding-1 "Adding ")
  78. (set #adding-2 " to LIBS: assign\n")
  79. (set #adding-help "This is necessary so that the custom classes can be found.")
  80. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  81. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  82. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  83. (set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  84. (set #caprefs-startup-1 "Adding the command\n\n")
  85. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  86.  
  87. (procedure install-classact
  88. ; call this procedure to copy the classes included in the Classes directory
  89. ; in your distribution dir.
  90.     (if (exists "Classes") ; The archive contains a ClassAct library update.
  91.     (
  92.         (set comp-dest  (/ (* classact-complete 2) 10))
  93.         (set comp-libs  (/ (* classact-complete 3) 10))
  94.         (set comp-dirs  (/ (* classact-complete 4) 10))
  95.         (set comp-junod (/ (* classact-complete 5) 10))
  96.         (set comp-020   (/ (* classact-complete 6) 10))
  97.         (set comp-gad   (/ (* classact-complete 7) 10))
  98.         (set comp-im    (/ (* classact-complete 8) 10))
  99.         (set comp-prefs (/ (* classact-complete 9) 10))
  100.     
  101.         ; has the user installed ClassAct in CLASSACT: ?
  102.         (set @classact-dest (getassign "CLASSACT" "A"))
  103.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  104.         
  105.         ; is ClassAct already in SYS:Classes ?
  106.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  107.                 (= @user-level 2))
  108.             ; no, ask where it should be placed
  109.             (set @classact-dest
  110.                 (askdir
  111.                     (prompt #classdest-prompt)
  112.                     (help #classdest-help)
  113.                     (default @classact-dest)
  114.                     (newpath)
  115.                 )
  116.             )
  117.         )
  118.         
  119.         (complete comp-dest)
  120.         
  121.         (if (<> (run (cat "C/CheckAssign LIBS: " @classact-dest)) 0)
  122.             (
  123.                 (message #noclasses-message)
  124.                 (if (not (exists @classact-dest))
  125.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  126.                 )
  127.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  128.                 (startup "CLASSACT"
  129.                     (command @addassign)
  130.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  131.                     (help #adding-help)
  132.                 )
  133.                 (run (@addassign))
  134.             )
  135.         )
  136.         
  137.         (complete comp-libs)
  138.         
  139.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  140.         (set @classact-images (tackon @classact-dest "Images"))
  141.         
  142.         (if (not (exists @classact-gadgets (noreq)))
  143.             (makedir @classact-images
  144.                 (prompt (cat #creating-dir @classact-gadgets))
  145.             )
  146.         )
  147.         
  148.         (if (not (exists @classact-images (noreq)))
  149.             (makedir @classact-images
  150.                 (prompt (cat #creating-dir @classact-images))
  151.             )
  152.         )
  153.         
  154.         (complete comp-dirs)
  155.         
  156.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  157.             (if (< 41 (/ (getversion "SYS:Classes/Gadgets/button.gadget") 65536))
  158.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  159.                     (
  160.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  161.                         (message #junod-backed)
  162.                     )
  163.                     (message #junod-kept)
  164.                 )
  165.             )
  166.         )
  167.         
  168.         (complete comp-junod)
  169.         
  170.         (if (exists "Classes/Gadgets/layout.gadget.020")
  171.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default (and cpu020 v39))))
  172.             (set classes-020 0)
  173.         )
  174.  
  175.         (complete comp-020)
  176.         
  177.         (foreach "Classes/Gadgets" "#?.gadget"
  178.             (
  179.                 (set thislib (tackon "Classes/Gadgets" @each-name))
  180.                 (if (and classes-020 (exists (cat thislib ".020")))
  181.                     (set thislib (cat thislib ".020"))
  182.                 )
  183.                 (copylib (source thislib)
  184.                     (dest @classact-gadgets)
  185.                     (newname @each-name)
  186.                     (prompt (cat #installing @each-name))
  187.                     (help #classdest-help)
  188.                     (optional "force" "askuser")
  189.                 )
  190.             )
  191.         )
  192.         
  193.         (complete comp-gad)
  194.         
  195.         (foreach "Classes/Images" "#?.image"
  196.             (
  197.                 (set thislib (tackon "Classes/Images" @each-name))
  198.                 (if (and classes-020 (exists (cat thislib ".020")))
  199.                     (set thislib (cat thislib ".020"))
  200.                 )
  201.                 (copylib (source thislib)
  202.                     (dest @classact-images)
  203.                     (newname @each-name)
  204.                     (prompt (cat #installing @each-name))
  205.                     (help #classdest-help)
  206.                     (optional "force" "askuser")
  207.                 )
  208.             )
  209.         )
  210.         
  211.         (complete comp-im)
  212.  
  213.         (foreach "Classes" "#?.class"
  214.             (
  215.                 (set thislib (tackon "Classes" @each-name))
  216.                 (if (and classes-020 (exists (cat thislib ".020")))
  217.                     (set thislib (cat thislib ".020"))
  218.                 )
  219.                 (copylib (source thislib)
  220.                     (dest @classact-dest)
  221.                     (newname @each-name)
  222.                     (prompt (cat #installing @each-name))
  223.                     (help #classdest-help)
  224.                     (optional "force" "askuser")
  225.                 )
  226.             )
  227.         )
  228.     )
  229.     )
  230.     (if (exists "Prefs/ClassAct") ; The archive contains ClassAct prefs tools
  231.     (
  232.         (message #caprefs-message)
  233.         
  234.         (copylib (source "Prefs/CAPrefs") 
  235.             (dest "C:") 
  236.             (prompt (cat #installing "CAPrefs"))
  237.         )
  238.         (copylib (source "Prefs/ClassAct")
  239.             (dest "SYS:Prefs")
  240.             (prompt (cat #installing "ClassAct Prefs"))
  241.             (infos)
  242.         )
  243.         
  244.         (complete comp-prefs)
  245.         
  246.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  247.             (
  248.                 (makedir "ENVARC:ClassAct"
  249.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  250.                 )
  251.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  252.                     (append "")
  253.                 )
  254.             )
  255.         )
  256.                 
  257.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  258.         
  259.         (startup "CAPREFS"
  260.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  261.             (help #caprefs-message)
  262.             (command caprefs-cmd)
  263.         )
  264.     )
  265.     )
  266.  
  267.     (complete classact-complete)
  268. )
  269.  
  270. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  271. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  272.  
  273. ; ---------------------------------------------------------------------------
  274.  
  275. (complete 0)
  276.  
  277. (if (not v39)
  278.    (abort #need39)
  279. )
  280.  
  281. (message #welcome)
  282.  
  283. (set @source-dir (pathonly @icon))
  284.  
  285. (set defdir
  286.    (askdir
  287.       (prompt #destdir-prompt)
  288.       (help #destdir-help)
  289.       (default @source-dir)
  290.    )
  291. )
  292. (set @default-dest defdir)
  293.  
  294. (set nocopy (= @source-dir @default-dest))
  295.  
  296. (install-classact)
  297.  
  298. (if (not nocopy)
  299.     (
  300.        (set @default-dest (tackon @default-dest "AWeb21DEMO"))
  301.     
  302.        (set update-aweb (exists @default-dest))
  303.     
  304.        (if (not update-aweb)
  305.            (makedir @default-dest 
  306.                (prompt #creating-dir @default-dest) 
  307.                (infos)
  308.            )
  309.        )
  310.       (complete 55)
  311.  
  312.       (copyfiles
  313.          (source "")
  314.          (dest @default-dest)
  315.          (choices "AWeb" "AWebCfg")
  316.          (prompt #installing "AWeb")
  317.          (infos)
  318.       )
  319.       (complete 60)
  320.  
  321.       (set cache-dir (tackon @default-dest "Cache"))
  322.       (if (not (exists cache-dir))
  323.          (
  324.             (makedir cache-dir
  325.                (prompt #creating-dir cache-dir)
  326.                (infos)
  327.             )
  328.          )
  329.       )
  330.       (complete 65)
  331.  
  332.        (copyfiles
  333.          (source "")
  334.           (dest @default-dest)
  335.          (choices "ReadMe" "Docs" "Icons" "Extras" "Images")
  336.           (prompt #installing "AWeb")
  337.           (infos)
  338.        )
  339.  
  340.     )
  341. )
  342.  
  343. (complete 80)
  344.  
  345. ; Only ask if fonts should be installed in expert mode
  346. (if
  347.    (< @user-level 2)
  348.    (set #fonts 1)
  349.    (set #fonts
  350.       (askbool
  351.          (prompt #fonts-prompt)
  352.          (help #fonts-help)
  353.          (choices "Yes" "No")
  354.          (default 1)
  355.       )
  356.    )
  357. )
  358. (if
  359.    (> #fonts 0)
  360.    (
  361.       (copyfiles
  362.          (source "Fonts")
  363.          (dest "Fonts:")
  364.          (choices "times" "courier")
  365.          (prompt #installing "fonts")
  366.       )
  367.       (run "SYS:System/FixFonts"
  368.          (confirm)
  369.          (prompt #fixfonts-prompt)
  370.          (help #fixfonts-help)
  371.       )
  372.    )
  373. )
  374.  
  375. (complete 90)
  376.  
  377. (set #memory
  378.    (askbool
  379.       (prompt #memory-prompt)
  380.       (help #memory-help)
  381.       (choices "More than 2MB" "Only 2MB")
  382.       (default 1)
  383.   )
  384. )
  385.  
  386. (if (= #memory 0)
  387.    (
  388.       (makedir
  389.          (tackon @default-dest "T")
  390.       )
  391.       (makedir "ENVARC:AWeb")
  392.       (copyfiles
  393.          (source "2MBsettings")
  394.          (dest "ENVARC:AWeb")
  395.          (all)
  396.       )
  397.       (copyfiles
  398.          (source "ENVARC:AWeb")
  399.          (dest "ENV:AWeb")
  400.          (all)
  401.       )
  402.    )
  403. )
  404.  
  405. (complete 100)
  406.  
  407. (run "run >NIL: SYS:Utilities/MultiView ReadMe" (prompt #readme))
  408.  
  409. (exit #bye)
  410.