|
| !Run file for AMPlay v2  
|
Set AMPlay$Dir <Obey$Dir>
Iconsprites <AMPlay$Dir>.!Sprites


| Filetype handling:
| Our own file type first - always set this.
Set File$Type_1B3 AMPlay
Set Alias$@RunType_1B3 Run <AMPlay$Dir>.!Run %%*0
| Then MP3, if it isn't already claimed.
If "<File$Type_1AD>" = "" Then Set File$Type_1AD AMPEG
If "<Alias$@RunType_1AD>" = "" Then Set Alias$@RunType_1AD Run <AMPlay$Dir>.!Run %%*0


| Command line control:
Set Alias$AMPlayCmd <AMPlay$Dir>.Internal.AMPlayCmd %%*0


| Ensure CallASWI is loaded if on RO less than 5.
| Required for OS_Heapsort32 to work.
RMEnsure UtilityModule 5.00 RMEnsure CallASWI 0.03 IfThere System:Modules.CallASWI Then RMLoad System:Modules.CallASWI
RMEnsure UtilityModule 5.00 RMEnsure CallASWI 0.03 Error AMPlay requires CallASWI 0.03 or later. Please download it from http://www.iyonix.com/32bit and install it.


| Ensure ABCLib is loaded.
RMEnsure ABCLibrary 4.15 RMLoad System:Modules.ABClib
Set AMPlay%ABC 1
RMEnsure ABCLibrary 0.00 Set AMPlay%ABC 0
IF AMPlay%ABC = 0 THEN RMEnsure ABClibrary 4.15 IfThere System:Modules.ABCLib Then RMLoad System:Modules.ABClib
IF AMPlay%ABC = 0 THEN RMEnsure ABCLibrary 4.15 Error AMPlay requires ABCLib 4.15 or later. A copy of this, with instructions, should have been included in the AMPlay distribution. 
IF AMPlay%ABC = 1 THEN RMEnsure ABCLibrary 4.15 Error AMPlay requires ABCLib 4.15 or later. You are running an old version of ABCLib. Please update ABCLib to 4.15 or later.
Unset AMPlay%ABC


| Ensure AcornURI is loaded.
| (Only needed for the links on the proginfo window, so not fatal if we
| can't get it. If acornuri needs to be loaded, then we need to issue a
| *desktop once up and running.)
Set AMPlay$URI 0
RMEnsure AcornURI 0.12 Set AMPlay$URI 1
RMEnsure AcornURI 0.12 IfThere System:Modules.Network.URI Then RMLoad System:Modules.Network.URI
RMEnsure AcornURI 0.12 Set AMPlay$URI 2
| 0=already there. no *desktop.
| 1=loaded by !run.  *desktop needed.
| 2=not loaded, can't find it. no *desktop. URLs not launchable.
| This variable gets unset later on by AMPlay.


| Ensure AMPlayer module is loaded.
| (essential)
RMEnsure AMPlayer 1.39 IfThere System:Modules.Audio.MP3.AMPlayer Then RMLoad System:Modules.Audio.MP3.AMPlayer
RMEnsure AMPlayer 1.39 Error AMPlayer module 1.39 could not be loaded. Please download it from http://www.amplayer.org and install it.


| Use Resfind to work out where to load messages and templates from.
Run <AMPlay$Dir>.Internal.ResFind AMPlay


| Set wimpslot.
| (Does not limit database size)
WimpSlot -min 1100k -max 1100k

| Run AMPlay
Run <AMPlay$Dir>.!RunImage %*0
