From 5802723281ef8b6672e1c3f0e76c9b2a42bd22f9 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 27 Sep 2004 05:21:00 +0000 Subject: [project @ 2004-09-27 05:21:00 by jmb] Improve !Boot file and support protocol fallback positions. svn path=/import/netsurf/; revision=1287 --- !NetSurf/!Boot,feb | 81 ++++++++++++++++++++++++++++++++++++++++++++---------- !NetSurf/!Run,feb | 26 +++++++++++++++--- 2 files changed, 88 insertions(+), 19 deletions(-) (limited to '!NetSurf') diff --git a/!NetSurf/!Boot,feb b/!NetSurf/!Boot,feb index b42526e65..578af5c6f 100644 --- a/!NetSurf/!Boot,feb +++ b/!NetSurf/!Boot,feb @@ -1,14 +1,37 @@ +| Boot file for NetSurf. ( $Revision: 1.10 $ ) +| +| This file sets up various system variables which NetSurf may use. +| Additionally, it places the NetSurf application sprites into the Wimp +| sprite pool. +| +| This file may be executed in two ways: +| 1. When NetSurf is first seen by the OS. +| 2. When NetSurf is run by the user (called from the !Run file). +| In the first instance, NetSurf-specific variables are set and non +| NetSurf-specific variables which are unset are initialised. +| In the second instance, all variables are set, irrespective of their +| previous state. This is achieved by use of the NetSurf$ForceVars +| variable, which is set by the !Run file prior to calling this file. + +| Set up NetSurf$Dir Set NetSurf$Dir +| Filetype -> Type name mappings +| +| These get set whether they were previously set or not Set File$Type_695 GIF +Set File$Type_B28 URL Set File$Type_B60 PNG Set File$Type_C85 JPEG Set File$Type_F78 JNG Set File$Type_F79 CSS Set File$Type_F83 MNG +Set File$Type_F91 URI Set File$Type_FAF HTML | Application system variables +| +| See http://www.iyonix.com/32bit/help.shtml for more details. Set NetSurf$Help .Docs.docs_en Set NetSurf$Version "Development Build" Set NetSurf$Web "http://netsurf.sourceforge.net/" @@ -17,21 +40,49 @@ Set NetSurf$Publisher "The NetSurf Developers" Set NetSurf$Description "Web browser" | NetSurf Sprites +| +| The sprite file used is based on the OS version: +| RO < Select 3 uses !Sprites +| RO >= Select 3 uses ASprites +| RO >= 5 uses 5Sprites If "" < "436" Then IconSprites .!Sprites Else If "" < "500" Then IconSprites .ASprites Else IconSprites .5Sprites | Acorn URI protocol -If "" = "" Then Set Alias$Open_URI_http .URILaunch -If "" = "" Then Set Alias$Open_URI_https .URILaunch -If "" = "" Then Set Alias$Open_URI_file .URILaunch - -| ANT URI protocol -| Not yet ;) -|If "" = "" Then Set Alias$URLOpen_http .URILaunch %%*0 -|If "" = "" Then Set Alias$URLOpen_https .URILaunch %%*0 -|If "" = "" Then Set Alias$URLOpen_file .URILaunch %%*0 - -| Claim HTML and URI files -| Not Yet ;) -|If "" = "" Then Set Alias$@RunType_FAF .URILaunch -|If "" = "" Then Set Alias$@RunType_B28 .URILaunch -|If "" = "" Then If "" = "" Then Set Alias$@RunType_F91 .URILaunch +| +| Format: Alias$Open_URI_ +| +| These are basically a last resort. The URI module will initially broadcast +| Message_URI_MProcess. If this isn't claimed, then it'll check if an +| appropriate Alias$Open_URI_ variable is set. If such a variable +| exists, then it will attempt to launch the task named by the variable. +| If the launch is successful, the Message_URI_MProcess is rebroadcast. +| The -nowin is required to ensure only one window is opened (this only has +| an effect if the user has configured auto window opening at startup). +If (("" = "") OR ("" = "1")) Then Set Alias$Open_URI_http .!Run -nowin +If (("" = "") OR ("" = "1")) Then Set Alias$Open_URI_https .!Run -nowin +If (("" = "") OR ("" = "1")) Then Set Alias$Open_URI_file .!Run -nowin + +| ANT URL protocol +| +| Format: Alias$URLOpen_ +| +| These handle the "load" stage of the protocol. The appropriate variable's +| existence is checked then, if it is present, the URL to be opened is +| appended to the string "URLOpen_ " and this is then fed to +| Wimp_StartTask. +If (("" = "") OR ("" = "1")) Then Set Alias$URLOpen_http /.!Run -url %%*0 +If (("" = "") OR ("" = "1")) Then Set Alias$URLOpen_https /.!Run -url %%*0 +If (("" = "") OR ("" = "1")) Then Set Alias$URLOpen_file /.!Run -url %%*0 + +| Claim HTML and URL files +| +| Format: Alias$@RunType_ +| +| Again, a fallback. The filer initially tries a DataOpen message. If that +| bounces, it looks at these variables. +If (("" = "") OR ("" = "1")) Then Set Alias$@RunType_FAF /.!Run -html %%*0 +If (("" = "") OR ("" = "1")) Then Set Alias$@RunType_B28 /.!Run -urlf %%*0 + +| We don't claim the URI filetype as the spec tells us not to: +| "Applications must not set an Alias$@RunType variable for the URI filetype" +| Obviously this means that Browse/Phoenix and the Oreganos are incorrect. diff --git a/!NetSurf/!Run,feb b/!NetSurf/!Run,feb index ab38922a1..ecc17ffdc 100644 --- a/!NetSurf/!Run,feb +++ b/!NetSurf/!Run,feb @@ -1,14 +1,26 @@ +| Run file for NetSurf. ( $Revision: 1.29 $ ) +| +| This file ensures that the system resources required by NetSurf are +| present. Additionally, it forces setting of system variables related +| to NetSurf. + +| Set system variables and application sprites +Set NetSurf$ForceVars 1 .!Boot +UnSet NetSurf$ForceVars | Can't run more than one copy of NetSurf at once. If "" = "yes" Then Error NetSurf is already running -| We need RISC OS 3 +| We need RISC OS 3 RMEnsure UtilityModule 3.00 Error NetSurf needs RISC OS 3 or later | Ensure Nested WIMP is installed | http://acorn.riscos.com (in the universal boot archive) -RMEnsure WindowManager 3.80 Error 0 NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://acorn.riscos.com/ +RMEnsure WindowManager 3.80 Error NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://acorn.riscos.com/ + +| Ensure the System resource exists - can't do much if it doesn't +If "" = "" Then Set System$Path_Message System resources not found. | Ensure CallASWI is installed | http://www.iyonix.com/32bit/ @@ -45,7 +57,13 @@ RMEnsure MimeMap 0.10 Error NetSurf requires MimeMap 0.10 or later RMEnsure Tinct 0.07 RMLoad System:Modules.Tinct RMEnsure Tinct 0.07 Error NetSurf requires Tinct 0.07 or later. This can be downloaded from http://www.tinct.net -Wimpslot -min 2240k -max 2240k +| Ensure Iconv +| http://moose.mine.nu:6888/iconv002.zip +| Not an error if not present - there'll be no charset conversion. +RMEnsure Iconv 0.02 RMLoad System:Modules.Iconv + +WimpSlot -min 2240k -max 2240k + Set NetSurf$Running yes -Run .!RunImage 2>.stderr +Run .!RunImage %*0 2>.stderr UnSet NetSurf$Running \ No newline at end of file -- cgit v1.2.3