| Impression Style !Run File
| --------------------------
| (c) 1989-1993 Computer Concepts Limited.

WimpSlot -min 608K -max 608K
Set ImpressionStyle$Dir <Obey$Dir>
Set ImpressionStyle$Resources <ImpressionStyle$Dir>
Set Impression$Path <ImpressionStyle$Dir>.!Run
Set ImpressionStyle$Path <ImpressionStyle$Dir>.!Run

SetEval SysBootShare 0
If "<CCShared$Dir>"="" Then Run <ImpressionStyle$Dir>.FileEnsure System:!CCShared.!Boot SysBootShare
If SysBootShare Then Obey System:!CCShared.!Boot
Unset SysBootShare

Run <ImpressionStyle$Dir>.RiscOSV
IF RiscOS$Version = 200 THEN RMEnsure ColourTrans 0.52 RMLoad <ImpressionStyle$Dir>.RMStore.Colours
IF RiscOS$Version = 200 THEN RMEnsure ColourTrans 0.52 Error 0 You need ColourTrans 0.52 or later
IF RiscOS$Version = 200 THEN RMEnsure FontManager 2.42 Error 0 You need FontManager 2.42 or later. Locate !Fonts (on the Fonts disc).
IF RiscOS$Version = 300 THEN RMEnsure ColourTrans 0.96 Error 0 You need ColourTrans 0.96 or later
IF RiscOS$Version = 300 THEN RMEnsure FontManager 2.98 Error 0 You need FontManager 2.98 or later
IF "<Font$Path>"="" THEN Error 0 Fonts cannot be found. Locate !Fonts (on the Fonts disc).

RMEnsure Impulse 0.18 RMLoad <ImpressionStyle$Resources>.RMStore.ImpulseII
Set DocumentManager$Scrap <Wimp$ScrapDir>.!Style

| If ABI not already loaded, look for it in !System. If not present get it from inside !Style
SetEval SysABI 0
RMEnsure ABI 2.85 SetEval SysABI -1
IF "System:"="" Then SetEval SysABI 0
IF SysABI THEN Run <ImpressionStyle$Dir>.FileEnsure System:Modules.ABIMod SysABI
IF SysABI THEN RMEnsure ABI 2.85 RMLoad System:Modules.ABIMod
IF SysABI THEN RMEnsure ABI 2.85 Error "ABIModule in !System is out of date. Please refer to the section 'Updating ABI' in the manual."
RMEnsure ABI 2.85 RMLoad <ImpressionStyle$Resources>.RMStore.ABIMod
RMEnsure ABI 2.85 Error "The copy of ABI inside !Style is out of date. Impression Style may not have installed correctly. Please re-install Impression Style or seek technical help."
Unset SysABI

Set ImpSpell Present
Set OldImpSpell Present
RMEnsure ImpressionSpell 0.00 Set OldImpSpell NotPresent
RMEnsure ImpressionSpell 1.24 Set ImpSpell NotPresent
If "<ImpSpell>"="NotPresent" AND "<OldImpSpell>"="Present" THEN RmKill ImpressionSpell
Set ImpSpell Present
Set OldImpSpell Present
RMEnsure SpellMaster 0.00 Set OldImpSpell NotPresent
RMEnsure SpellMaster 1.24 Set ImpSpell NotPresent
If "<ImpSpell>"="NotPresent" AND "<OldImpSpell>"="Present" THEN RmKill SpellMaster
UnSet ImpSpell 
UnSet OldImpSpell

IconSprites <ImpressionStyle$Dir>.!Sprites
Set File$Type_D87 DocData
Set File$Type_D88 Stories
Set File$Type_D89 IModule
Set File$Type_D8A Excep'ns
Set File$Type_D8B Abbrev
Set File$Type_D8E ABIDefs
Set File$Type_D94 ArtWork
Set File$Type_ff5 PoScript
Set File$Type_ff0 TIFF
Set File$Type_DFE CSV
Set File$Type_AFF DrawFile
Set File$Type_BC5 ImpDoc
Set File$Type_C25 AWord
Set File$Type_BD6 AudioWrk

Set Alias$@RunType_C25 "Run <ImpressionStyle$Path> %%*0"
Set Alias$@PrintType_C25 "Run <ImpressionStyle$Path> -print %%*0"
Set Alias$@RunType_BC5 "Run <ImpressionStyle$Path> %%*0"
Set Alias$@PrintType_BC5 "Run <ImpressionStyle$Path> -print %%*0"

If "<Style$TimeFormat>"="" then Set Style$TimeFormat "%z12:%mi:%se %pm"
If "<Style$DateFormat>"="" then Set Style$DateFormat "%zdy%st %mo %ce%yr"

WimpSlot -min 608K -max 608K
Run "<ImpressionStyle$Dir>.!RunImage" %*0