|!Run for HardBack (Restore) last updated at v1.386
Set HardRestD$Dir <Obey$Dir>
IconSprites <HardRestD$Dir>.!Sprites
| This isn't strictly necessary, but it means FileEnsure works in a neat way
Set Run$PathTemp <Run$Path>
Set Run$Path <Run$Path>,<HardRestD$Dir>.
| This section sets the variable RiscOS$V to the version of Risc OS
SetEval RiscOS$V 500
|RMEnsure UtilityModule 5.00 SetEval RiscOS$V 400
RMEnsure UtilityModule 4.00 SetEval RiscOS$V 320
RMEnsure UtilityModule 3.20 SetEval RiscOS$V 300
RMEnsure UtilityModule 3.00 SetEval RiscOS$V 200
RMEnsure UtilityModule 2.00 SetEval RiscOS$V 120
| This section deals with checking for the MessageTrans module
Set HB$OK 1
RMEnsure MessageTrans 0.00 Set HB$OK 0
If "<System$Path>"="" AND "<HB$OK>"="0" AND "<RiscOS$V>"<300 Then Error "Open a directory containing !System."
RMEnsure MessageTrans 0.00 If "<RiscOS$V>">=300 then RMReInit MessageTrans
RMEnsure MessageTrans 0.00 FileEnsure System:Modules.MsgTrans "Error HardBack needs the MessageTrans module. It should be in !System.Modules as MsgTrans"