From 71db29f5b05659a760f91ce0a5f0901786d0fea3 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 9 Dec 2008 11:12:58 +0000 Subject: Build !Run at compile time. This ensures that the WimpSlot size is always correct. svn path=/trunk/netsurf/; revision=5889 --- !NetSurf/!Run,feb | 112 ----------------------------------------------------- Makefile | 12 +++++- Makefile.sources | 10 +++++ riscos/scripts/Run | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 114 deletions(-) delete mode 100644 !NetSurf/!Run,feb create mode 100644 riscos/scripts/Run diff --git a/!NetSurf/!Run,feb b/!NetSurf/!Run,feb deleted file mode 100644 index 7e264f985..000000000 --- a/!NetSurf/!Run,feb +++ /dev/null @@ -1,112 +0,0 @@ -| Run file for NetSurf. ( $Revision$ ) -| -| 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 - -| 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 -/.KickNS -| If not running, then unset system variables and continue -If "" = "0" Then Set Alias$NetSurfRunning UnSet Alias$NetSurfRunning|mUnSet NetSurf$Running -| Invoke our alias to clean up -NetSurfRunning - -| Resource Locations -| The following are read-only locations -SetMacro NetSurf$Path Choices:WWW.NetSurf.,. -| The following are write-only locations -SetMacro NetSurf$ChoicesSave .WWW.NetSurf.Choices - -| 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 NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://acorn.riscos.com/ - -| Check for various key resources - can't do much if they don't exist -If "" = "" Then Set System$Path_Message System resources not found. -If "" = "" Then Error Scrap resource not found. -If "" = "" Then Error Internet resources can not be found -If "" = "" Then Error NetSurf requires the !Unicode resource. This can be found, along with the Iconv module, at http://www.netsurf-browser.org/projects/iconv/ -If "" = "" Then Set Inet$MimeMappings InetDBase:MimeMap - -| Define this alias for clarity -| Syntax: NetSurfRMLoad -Set Alias$NetSurfRMLoad IfThere %%*0 Then RMLoad %%*0 - -| Ensure a 32bit SharedCLibrary is installed -| http://www.iyonix.com/32bit/ -| (5.17 == first 32bit SCL, 5.43 == C99 features) -RMEnsure SharedCLibrary 5.17 NetSurfRMLoad System:Modules.CLib -RMEnsure SharedCLibrary 5.43 Error NetSurf requires SharedCLibrary 5.43 or later. This can be downloaded from http://www.iyonix.com/32bit/system.shtml - -| Ensure CallASWI is installed -| http://www.iyonix.com/32bit/ -RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.02 NetSurfRMLoad System:Modules.CallASWI -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 - -| Ensure DrawFile module is installed -| http://acorn.riscos.com/riscos/releases/drawfile.arc -| Should be installed in !System.310.Modules -RMEnsure DrawFile 1.30 NetSurfRMLoad System:Modules.DrawFile -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 - -| Ensure SharedUnixLibrary is installed -| http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip -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 - -| Load AcornURI if it isn't already -| http://sudden.recoil.org/ -Unset NetSurf$Start_URI_Handler -RMEnsure AcornURI 0.12 Set NetSurf$Start_URI_Handler 1 -RMEnsure AcornURI 0.12 NetSurfRMLoad System:Modules.Network.URI -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/ -RMEnsure AcornURI 0.12 Unset NetSurf$Start_URI_Handler - -| Check for mime map module -RMEnsure MimeMap 0.10 NetSurfRMLoad System:Modules.Network.MimeMap -RMEnsure MimeMap 0.10 Error NetSurf requires MimeMap 0.10 or later - -| Ensure Tinct is loaded -| http://www.tinct.net/ -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/ - -| Ensure Iconv -| http://www.netsurf-browser.org/iconv/ -RMEnsure Iconv 0.10 NetSurfRMLoad System:Modules.Iconv -RMEnsure Iconv 0.10 Error NetSurf requires Iconv 0.10 or later. This can be downloaded from http://www.netsurf-browser.org/iconv/ - -| Disable SpecialFX, if present -Set NetSurf$SpecialFX 1 -RMEnsure SpecialFX 1.00 Set NetSurf$SpecialFX 0 -If Then SpecialFX ~B~G~L NetSurf -Unset NetSurf$SpecialFX - -| No longer need this alias -Unset Alias$NetSurfRMLoad - -| Now attempt to create Scrap directories -CDir .WWW -CDir .WWW.NetSurf - -| Install NetSurf-specific fonts -| NB: trailing dot is required -FontInstall NetSurf:Resources.Fonts. - -WimpSlot -min 2240k -max 2240k -Run .!RunImage -v %*0 2>.WWW.NetSurf.Log - -| Uninstall NetSurf-specific fonts -FontRemove NetSurf:Resources.Fonts. diff --git a/Makefile b/Makefile index 9f283290f..044e7b27f 100644 --- a/Makefile +++ b/Makefile @@ -116,6 +116,8 @@ ifeq ($(TARGET),riscos) GCCSDK_INSTALL_ENV := CCRES := ccres TPLEXT := + MAKERUN := makerun + RUNEXT := CC := gcc EXEEXT := PKG_CONFIG := @@ -126,6 +128,8 @@ ifeq ($(TARGET),riscos) GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin CCRES := $(GCCSDK_INSTALL_CROSSBIN)/ccres TPLEXT := ,fec + MAKERUN := $(GCCSDK_INSTALL_CROSSBIN)/makerun + RUNEXT := ,feb CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc) ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC))) SUBTARGET := -elf @@ -545,6 +549,8 @@ $(DEPROOT)/created: $(OBJROOT)/created CLEANS := clean-target +POSTEXES := + include Makefile.sources OBJECTS := $(sort $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(patsubst %.s,%.o,$(SOURCES))))))) @@ -595,7 +601,7 @@ ifeq ($(TARGET),riscos) define compile_template !NetSurf/Resources/$(1)/Templates$$(TPLEXT): $(2) $$(VQ)echo "TEMPLATE: $(2)" - $$(Q)$$(CC) -x c -E -P $$(CFLAGS) $(2) > processed_template + $$(Q)$$(CC) -x c -E -P $$(CFLAGS) -o processed_template $(2) $$(Q)$$(CCRES) processed_template $$(subst /,.,$$@) $$(Q)$(RM) processed_template CLEAN_TEMPLATES += !NetSurf/Resources/$(1)/Templates$$(TPLEXT) @@ -629,7 +635,9 @@ clean-builddir: $(Q)$(RM) -r $(OBJROOT) CLEANS += clean-builddir -all-program: $(EXETARGET) +all-program: $(EXETARGET) post-exe + +post-exe: $(POSTEXES) .SUFFIXES: diff --git a/Makefile.sources b/Makefile.sources index a4b94dfcd..bba47dd14 100644 --- a/Makefile.sources +++ b/Makefile.sources @@ -161,6 +161,16 @@ CLEANS += clean-intermediates # Finally select the correct set of sources for this build... ifeq ($(TARGET),riscos) +!NetSurf/!Run$(RUNEXT): riscos/scripts/Run + $(VQ)echo " MAKERUN: $@" + $(Q)$(MAKERUN) $(EXETARGET) $< $@ +POSTEXES += !NetSurf/!Run$(RUNEXT) + +clean-run: + $(VQ)echo " CLEAN: !NetSurf/!Run$(RUNEXT)" + $(Q) $(RM) !NetSurf/!Run$(RUNEXT) +CLEANS += clean-run + SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_RISCOS) EXETARGET := !NetSurf/!RunImage$(EXEEXT) endif diff --git a/riscos/scripts/Run b/riscos/scripts/Run new file mode 100644 index 000000000..fe9980df3 --- /dev/null +++ b/riscos/scripts/Run @@ -0,0 +1,112 @@ +| Run file for NetSurf. ( $Revision$ ) +| +| 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 + +| 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 +/.KickNS +| If not running, then unset system variables and continue +If "" = "0" Then Set Alias$NetSurfRunning UnSet Alias$NetSurfRunning|mUnSet NetSurf$Running +| Invoke our alias to clean up +NetSurfRunning + +| Resource Locations +| The following are read-only locations +SetMacro NetSurf$Path Choices:WWW.NetSurf.,. +| The following are write-only locations +SetMacro NetSurf$ChoicesSave .WWW.NetSurf.Choices + +| 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 NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://acorn.riscos.com/ + +| Check for various key resources - can't do much if they don't exist +If "" = "" Then Set System$Path_Message System resources not found. +If "" = "" Then Error Scrap resource not found. +If "" = "" Then Error Internet resources can not be found +If "" = "" Then Error NetSurf requires the !Unicode resource. This can be found, along with the Iconv module, at http://www.netsurf-browser.org/projects/iconv/ +If "" = "" Then Set Inet$MimeMappings InetDBase:MimeMap + +| Define this alias for clarity +| Syntax: NetSurfRMLoad +Set Alias$NetSurfRMLoad IfThere %%*0 Then RMLoad %%*0 + +| Ensure a 32bit SharedCLibrary is installed +| http://www.iyonix.com/32bit/ +| (5.17 == first 32bit SCL, 5.43 == C99 features) +RMEnsure SharedCLibrary 5.17 NetSurfRMLoad System:Modules.CLib +RMEnsure SharedCLibrary 5.43 Error NetSurf requires SharedCLibrary 5.43 or later. This can be downloaded from http://www.iyonix.com/32bit/system.shtml + +| Ensure CallASWI is installed +| http://www.iyonix.com/32bit/ +RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.02 NetSurfRMLoad System:Modules.CallASWI +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 + +| Ensure DrawFile module is installed +| http://acorn.riscos.com/riscos/releases/drawfile.arc +| Should be installed in !System.310.Modules +RMEnsure DrawFile 1.30 NetSurfRMLoad System:Modules.DrawFile +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 + +| Ensure SharedUnixLibrary is installed +| http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip +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 + +| Load AcornURI if it isn't already +| http://sudden.recoil.org/ +Unset NetSurf$Start_URI_Handler +RMEnsure AcornURI 0.12 Set NetSurf$Start_URI_Handler 1 +RMEnsure AcornURI 0.12 NetSurfRMLoad System:Modules.Network.URI +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/ +RMEnsure AcornURI 0.12 Unset NetSurf$Start_URI_Handler + +| Check for mime map module +RMEnsure MimeMap 0.10 NetSurfRMLoad System:Modules.Network.MimeMap +RMEnsure MimeMap 0.10 Error NetSurf requires MimeMap 0.10 or later + +| Ensure Tinct is loaded +| http://www.tinct.net/ +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/ + +| Ensure Iconv +| http://www.netsurf-browser.org/iconv/ +RMEnsure Iconv 0.10 NetSurfRMLoad System:Modules.Iconv +RMEnsure Iconv 0.10 Error NetSurf requires Iconv 0.10 or later. This can be downloaded from http://www.netsurf-browser.org/iconv/ + +| Disable SpecialFX, if present +Set NetSurf$SpecialFX 1 +RMEnsure SpecialFX 1.00 Set NetSurf$SpecialFX 0 +If Then SpecialFX ~B~G~L NetSurf +Unset NetSurf$SpecialFX + +| No longer need this alias +Unset Alias$NetSurfRMLoad + +| Now attempt to create Scrap directories +CDir .WWW +CDir .WWW.NetSurf + +| Install NetSurf-specific fonts +| NB: trailing dot is required +FontInstall NetSurf:Resources.Fonts. + +WIMPSLOT +Run .!RunImage -v %*0 2>.WWW.NetSurf.Log + +| Uninstall NetSurf-specific fonts +FontRemove NetSurf:Resources.Fonts. -- cgit v1.2.3