| !Run file for !TTXeditor
|
Set TTXeditor$Dir <Obey$Dir>
IconSprites <TTXeditor$Dir>.!Sprites


| We need to load a few things from !Teletext...
%If "<Teletext$Dir>" = "" Then <TTXeditor$Dir>.trybootTTX
%If "<Teletext$Dir>" = "" Then Error Unable to locate the <34>!Teletext<34> application, please ensure this has been 'seen' by the filer before running TTXeditor.
RMEnsure Teletext+      2.34 RMLoad <Teletext$Dir>.Teletext+
RMEnsure Teletext+      2.34 Error TTXeditor needs <34>Teletext+<34> v2.34 or later
RMEnsure TTXHelper      0.01 RMLoad <Teletext$Dir>.TTXHelper
RMEnsure TTXHelper      0.01 Error TTXeditor needs <34>TTXHelper<34> v0.01 or later


| Now we need to ensure our 'environment' is sufficiently up to date.
| This application is 26/32 neutral so it REQUIRES a fairly new CLib. You might get
| away with version 5.17, but NOTHING earlier.
| We also check for a reasonably new FPEmulator. The version given is the version
| supplied with RISC OS 3.70 - which has actually been superceded, so there
| shouldn't be a problem here. If you don't have this version, try the one you do
| have, but there's no guarantee it'll work...
| The ColourTrans check is mostly a formality.
%If "<System$Path>" = "" Then Error System resources cannot be found
RMEnsure UtilityModule  3.10 Error TTXeditor requires RISC OS 3 (or later). Sorry, this software will not work on RISC OS 2 machines.

RMEnsure SharedCLibrary 5.34 RMLoad System:Modules.CLib
RMEnsure SharedCLibrary 5.34 Error TTXeditor needs <34>SharedCLibrary<34> v5.34 or later
RMEnsure FPEmulator     4.06 RMLoad System:Modules.FPEmulator
RMEnsure FPEmulator     4.06 Error TTXeditor needs <34>FPEmulator<34> v4.06 or later
RMEnsure ColourTrans    0.52 RMLoad System:Modules.Colours
RMEnsure ColourTrans    0.52 Error TTXeditor needs <34>ColourTrans<34> v0.52 or later

| Check we have enough memory handy, and then rrrrrun it!
WimpSlot -min 128K -max 128K
Run <TTXeditor$Dir>.!RunImage %*0