| >!Run file for SHeretic
|  Justin Fletcher, 1998
|
Set SHeretic$Dir <Obey$Dir>
IconSprites <SHeretic$Dir>.!Sprites
|
| We need to load the SHeretic module
If "<Heretic$Dir>"="" Then Error SHeretic requires Heretic to be have been seen. Please locate Heretic before running SHeretic.
|
| If HereticSupport is loaded, and HereticNetwork is loaded, all is well
| If HereticSupport is loaded, and HereticNetwork is not loaded, all is well
| If HereticSupport is not loaded, and HereticNetwork is loaded, kill HereticNetwork
| If HereticSupport is not loaded, then load it
| Why ?
| Because we need to ensure we are poking into the correct module, and if
| HereticNetwork is running but there is no HereticSupport then things WILL go
| awry.
Set SHeretic$NeedHereticSupport No
RMEnsure HereticSupport 1.03 Set SHeretic$NeedHereticSupport Yes
If "<SHeretic$NeedHereticSupport>" = "Yes" Then Set SHeretic$KillHereticNetwork Yes
If "<SHeretic$NeedHereticSupport>" = "Yes" Then RMEnsure HereticNetwork 0 Set SHeretic$KillHereticNetwork No
If "<SHeretic$NeedHereticSupport>" = "Yes" AND "<SHeretic$KillHereticNetwork>" = "Yes" Then RMKill HereticNetwork
If "<SHeretic$NeedHereticSupport>" = "Yes" Then RMLoad <Heretic$Dir>.Support
RMEnsure HereticSupport 1.03 Error SHeretic requires HereticSupport 1.03 or later.
Unset SHeretic$NeedHereticSupport
Unset SHeretic$KillHereticNetwork
|
| We need to know in the program if we just loaded the module
Set SHeretic$Loaded 0
RMEnsure HereticNetwork 0.00 Set SHeretic$Loaded 1
RMEnsure HereticNetwork 0.00 RMLoad <SHeretic$Dir>.NetDriver
|
| If they only wanted the modules loaded, don't run the program
If "%0" = "-quit" Then Obey
|
| If we are running under an older window manager we need to load BorderUtils
RMEnsure WindowManager 3.20 RMEnsure BorderUtils 0.00 RMLoad System:Modules.BorderUtil
WimpSlot -min 48k -max 48k
Run <SHeretic$Dir>.!RunImage %*0