2006-05-07 21:47:54 +04:00
| Run file for NetSurf. ( $Revision$ )
2004-09-27 09:21:00 +04:00
|
| 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
2003-08-25 02:39:55 +04:00
<Obey$Dir>.!Boot
2004-09-27 09:21:00 +04:00
UnSet NetSurf$ForceVars
2002-10-15 15:09:56 +04:00
2006-05-20 23:25:52 +04:00
| Detect if NetSurf is already running and, if so, force the
| current instance to open a new window. Then stop this script.
Set Alias$NetSurfRunning UnSet Alias$NetSurfRunning|mUnSet NetSurf$Running|mObey
Set NetSurf$Running 0
WimpSlot -min 64k -max 64k
/<NetSurf$Dir>.KickNS
| If not running, then unset system variables and continue
If "<NetSurf$Running>" = "0" Then Set Alias$NetSurfRunning UnSet Alias$NetSurfRunning|mUnSet NetSurf$Running
| Invoke our alias to clean up
NetSurfRunning
2006-01-08 04:51:33 +03:00
| Resource Locations
| The following are read-only locations
SetMacro NetSurf$Path Choices:WWW.NetSurf.,<NetSurf$Dir>.
| The following are write-only locations
SetMacro NetSurf$ChoicesSave <Choices$Write>.WWW.NetSurf.Choices
2004-09-27 09:21:00 +04:00
| We need RISC OS 3
2003-08-25 02:39:55 +04:00
RMEnsure UtilityModule 3.00 Error NetSurf needs RISC OS 3 or later
2002-10-15 15:09:56 +04:00
2003-08-25 02:39:55 +04:00
| Ensure Nested WIMP is installed
2005-04-04 13:41:25 +04:00
| http://acorn.riscos.com/ (in the universal boot archive)
2004-09-27 09:21:00 +04:00
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/
2005-12-17 19:53:09 +03:00
| Check for various key resources - can't do much if they don't exist
2004-09-27 09:21:00 +04:00
If "<System$Path>" = "" Then Set System$Path_Message System resources not found.
2005-12-17 19:53:09 +03:00
If "<Wimp$ScrapDir>" = "" Then Error Scrap resource not found.
If "<InetDBase$Path>" = "" Then Error Internet resources can not be found
2006-05-07 21:47:54 +04:00
If "<Unicode$Path>" = "" Then Error NetSurf requires the !Unicode resource. This can be found, along with the Iconv module, at http://netsurf.sourceforge.net/iconv/
2005-12-17 19:53:09 +03:00
If "<Inet$MimeMappings>" = "" Then Set Inet$MimeMappings InetDBase:MimeMap
2002-10-15 15:09:56 +04:00
2005-01-05 23:09:49 +03:00
| Define this alias for clarity
| Syntax: NetSurfRMLoad <Path to module>
Set Alias$NetSurfRMLoad IfThere %%*0 Then RMLoad %%*0
2003-08-25 02:39:55 +04:00
| Ensure CallASWI is installed
| http://www.iyonix.com/32bit/
2005-01-05 23:09:49 +03:00
RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.02 NetSurfRMLoad System:Modules.CallASWI
2003-11-01 23:16:00 +03:00
RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.02 Error NetSurf requires the CallASWI module. This can be downloaded from http://www.iyonix.com/32bit/system.shtml
2003-08-25 02:39:55 +04:00
2003-09-11 02:27:15 +04:00
| Ensure DrawFile module is installed
| http://acorn.riscos.com/riscos/releases/drawfile.arc
| Should be installed in !System.310.Modules
2005-01-05 23:09:49 +03:00
RMEnsure DrawFile 1.30 NetSurfRMLoad System:Modules.DrawFile
2003-11-01 23:16:00 +03:00
RMEnsure DrawFile 1.30 Error NetSurf requires the DrawFile module. An old verson of this can be downloaded from http://acorn.riscos.com/riscos/releases/drawfile.arc
2003-09-11 02:27:15 +04:00
2003-08-25 02:39:55 +04:00
| Ensure SharedUnixLibrary is installed
2006-05-07 14:17:51 +04:00
| http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
2007-02-20 14:38:55 +03:00
RMEnsure SharedUnixLibrary 1.07 NetSurfRMLoad System:Modules.SharedULib
RMEnsure SharedUnixLibrary 1.07 Error NetSurf requires SharedUnixLibrary 1.07 or later. This can be downloaded from http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
2003-08-25 02:39:55 +04:00
| Load AcornURI if it isn't already
| http://sudden.recoil.org/
2003-11-08 02:51:13 +03:00
Unset NetSurf$Start_URI_Handler
RMEnsure AcornURI 0.12 Set NetSurf$Start_URI_Handler 1
2005-01-05 23:09:49 +03:00
RMEnsure AcornURI 0.12 NetSurfRMLoad System:Modules.Network.URI
2003-11-01 23:16:00 +03:00
RMEnsure AcornURI 0.12 Error NetSurf requires AcornURI 0.12 or later. A version of this can be found at http://sudden.recoil.org/others/
2003-11-08 02:51:13 +03:00
RMEnsure AcornURI 0.12 Unset NetSurf$Start_URI_Handler
2003-08-25 02:39:55 +04:00
| Check for mime map module
2005-01-05 23:09:49 +03:00
RMEnsure MimeMap 0.10 NetSurfRMLoad System:Modules.Network.MimeMap
2003-08-25 02:39:55 +04:00
RMEnsure MimeMap 0.10 Error NetSurf requires MimeMap 0.10 or later
2003-07-30 17:06:22 +04:00
2004-03-10 13:41:27 +03:00
| Ensure Tinct is loaded
2005-04-04 13:41:25 +04:00
| http://www.tinct.net/
2005-08-02 17:34:55 +04:00
RMEnsure Tinct 0.13 NetSurfRMLoad System:Modules.Tinct
RMEnsure Tinct 0.13 Error NetSurf requires Tinct 0.13 or later. This can be downloaded from http://www.tinct.net/
2004-03-10 13:41:27 +03:00
2004-09-27 09:21:00 +04:00
| Ensure Iconv
2007-03-11 16:58:15 +03:00
| http://www.netsurf-browser.org/iconv/
RMEnsure Iconv 0.08 NetSurfRMLoad System:Modules.Iconv
RMEnsure Iconv 0.08 Error NetSurf requires Iconv 0.08 or later. This can be downloaded from http://www.netsurf-browser.org/iconv/
2005-04-20 02:07:03 +04:00
2005-11-20 20:50:49 +03:00
| Disable SpecialFX, if present
Set NetSurf$SpecialFX 1
RMEnsure SpecialFX 1.00 Set NetSurf$SpecialFX 0
If <NetSurf$SpecialFX> Then SpecialFX ~B~G~L NetSurf
Unset NetSurf$SpecialFX
2005-01-05 23:09:49 +03:00
| No longer need this alias
Unset Alias$NetSurfRMLoad
2004-09-27 09:21:00 +04:00
2005-12-17 19:53:09 +03:00
| Now attempt to create Scrap directories
2006-01-08 04:18:21 +03:00
CDir <Wimp$ScrapDir>.WWW
CDir <Wimp$ScrapDir>.WWW.NetSurf
2005-12-17 19:53:09 +03:00
2007-05-15 02:57:11 +04:00
| Install NetSurf-specific fonts
| NB: trailing dot is required
FontInstall NetSurf:Resources.Fonts.
2006-01-27 02:49:48 +03:00
WimpSlot -min 2240k -max 2240k
2007-05-31 02:27:58 +04:00
Run <NetSurf$Dir>.!RunImage -v %*0 2><Wimp$ScrapDir>.WWW.NetSurf.Log
2007-05-15 02:57:11 +04:00
| Uninstall NetSurf-specific fonts
2007-05-31 02:27:58 +04:00
FontRemove NetSurf:Resources.Fonts.