| !Run for !DiscMedic.
|
| Copyright (c) 2026 Martin Eastwood.  MIT licence.

Set DiscMedic$Dir <Obey$Dir>
IconSprites <DiscMedic$Dir>.!Sprites
Set Alias$DiscMedic <DiscMedic$Dir>.DMEngine %%*0

| The window has a progress bar gadget (Toolbox32's ProgressBar) where the
| Toolbox 1.x Window module has only a slider.  Without it the plain
| resources, which use the slider, are loaded instead.
Set DiscMedic$ResDir <DiscMedic$Dir>
Set DiscMedic$Bar 1
RMEnsure ProgressBar 8.00 Set DiscMedic$ResDir <DiscMedic$Dir>.Plain
RMEnsure ProgressBar 8.00 Unset DiscMedic$Bar

| DiscMedic needs RISC OS 5 and the Toolbox.  Say what is missing rather
| than failing with something the user cannot act on.
RMEnsure UtilityModule 5.00 Error DiscMedic needs RISC OS 5 or later.
RMEnsure FPEmulator 4.03 RMLoad System:Modules.FPEmulator
RMEnsure SharedCLibrary 5.34 RMLoad System:Modules.CLib
RMEnsure SharedCLibrary 5.34 Error DiscMedic needs version 5.34 or later of the Shared C Library.
RMEnsure TaskWindow 0.53 Error DiscMedic needs the TaskWindow module, which is normally part of RISC OS.
RMEnsure Toolbox 1.60 RMLoad System:Modules.Toolbox.Toolbox
RMEnsure Toolbox 1.60 Error DiscMedic needs the Toolbox modules.  Install them from the RISC OS distribution and try again.
RMEnsure Window 1.76 RMLoad System:Modules.Toolbox.Window
RMEnsure Menu 0.35 RMLoad System:Modules.Toolbox.Menu
RMEnsure Iconbar 1.23 RMLoad System:Modules.Toolbox.Iconbar
RMEnsure ProgInfo 0.17 RMLoad System:Modules.Toolbox.ProgInfo
RMEnsure TextGadgets 0.17 RMLoad System:Modules.Toolbox.TextGadget
RMEnsure TextGadgets 0.17 Error DiscMedic needs the TextGadgets module for its report window.

WimpSlot -min 320K -max 320K
Run <DiscMedic$Dir>.!RunImage
