IconSprites <Obey$Dir>.!Sprites
IconSprites <Obey$Dir>.Resources.Pointers
IconSprites <Obey$Dir>.Resources.Icons

Set HID$Dir <Obey$Dir>
Set HID$Path <Obey$Dir>.
Set HID$Apps <Obey$Dir>.Apps
Set HIDApps$Path <Obey$Dir>.Apps.

Set Dummy$Path <Run$Path>,<HID$Dir>.Resources.
Run Dummy:Resfind HID
Unset Dummy$Path

| Load some modules

RMEnsure USBInfo    0.30 RMLoad <HID$Dir>.RMStore.USBInfo
RMEnsure VideoUtils 2.20 RMLoad <HID$Dir>.RMStore.Video

| Check RISC OS version and USBDriver version

Set RO$Version 5
RMEnsure UtilityModule 5.00 Set RO$Version 3
IF "<RO$Version>" = "5" THEN RMEnsure USBDriver 0.34 Error You need USBDriver 0.34 or later.

| Ensure the ABCLib module

Set ABCLib 1
RMEnsure ABCLibrary 0.00 Set ABCLib 0
If ABCLib = 0 Then IfThere System:modules.ABCLib THEN RMLoad System:modules.ABClib
If ABCLib = 0 Then RMEnsure ABClibrary 0.00 Copy <HID$Dir>.RMStore.ABCLib <System$Dir>.310.Modules.ABCLib ~C~VFR
If ABCLib = 0 Then RMEnsure ABClibrary 0.00 RMLoad System:modules.ABClib
RMEnsure ABCLibrary 4.14 Copy <HID$Dir>.RMStore.ABCLib <System$Dir>.310.Modules.ABCLib ~C~VFR
RMEnsure ABCLibrary 4.14 Error Your version of ABCLib is too old. A newer version has just been installed, but you need to restart the computer before it can be used.
Unset ABCLib

| Launch the application

Set HID$Logging 0
WimpSlot -min 296K -max 296K
Run <HID$Dir>.!RunImage %*0
