IconSprites <SetPaths$Dir>.!Sprites
|
RMEnsure UtilityModule  3.70 RMEnsure CallASWI 0.02 RMLoad System:Modules.CallASWI
RMEnsure UtilityModule  3.70 RMEnsure CallASWI 0.02 Error Acorn C/C++ requires CallASWI 0.02 or later
RMEnsure FPEmulator     4.03 RMLoad System:Modules.FPEmulator
RMEnsure FPEmulator     4.03 Error Acorn C/C++ requires FPEmulator 4.03 or later
RMEnsure SharedCLibrary 5.17 RMLoad System:Modules.CLib
RMEnsure SharedCLibrary 5.34 Error Acorn C/C++ requires SharedCLibrary 5.34 or later

| Determine whether running on a version of RISC OS Select which can't softload CLib
WimpSlot -min 128K -max 128K
Unset LoadC$Failed
RMEnsure SharedCLibrary 5.28 /<SetPaths$Dir>.!RomPatch.CModState
If "<LoadC$Failed>"=1 Then /<SetPaths$Dir>.!RomPatch
If "<LoadC$Failed>"=1 Then /<SetPaths$Dir>.!RomPatch.CModState
If "<LoadC$Failed>"=1 Then Error The version of RISC OS you are using will not allow this program to run due to a SharedCLibrary conflict
If "<LoadC$Failed>"=2 Then Error Cannot load the SharedCLibrary - already in RAM
If "<LoadC$Failed>"=3 Then Error Cannot find required version (5.28 or later) of CLib in !System
If "<LoadC$Failed>"=4 Then Error CLib found in !System is too old (needs to be 5.28 or later)
If "<LoadC$Failed>"=5 Then Error Cannot load the SharedCLibrary
Unset LoadC$Failed

| Update some paths with our Lib32 directory (if not already there)
/<SetPaths$Dir>.SetLibPath <SetPaths$Dir>.Lib32.

| Set up some canonicalised directory and path variables
Set C/C++$Dir <SetPaths$Dir>.^
canonical C/C++$Dir
Set DDE$Dir <C/C++$Dir>.^.Apps.DDE
canonical DDE$Dir
Set DDE$Path <DDE$Dir>.

| Work-around a strange side-effect of using *Repeat (ticket #282)
IfThere <DDE$Dir> Then Repeat Filer_Boot <DDE$Dir> -Applications -Tasks

| Force our (ancient) perl to be run because we need this version (for InstRes)
Run <C/C++$Dir>.^.Programming.perl-5_001.!Perl.!Run

| Make sure a copy of !Routines has been 'seen' by the filer (required by !CreateSEC)
If "<Routines$Dir>" = "" Then Filer_Boot <C/C++$Dir>.^.Programming.Routines-1_48.!Routines
