| !Run for !Viewer.  The Filer passes a double-clicked document as %*0
| through Alias$@RunType_<type>; running the application directory with
| no argument installs the module and puts the viewer on the icon bar,
| where documents can be dropped on it.
|
| Copyright (c) Martin Hiher and RISC OS Developments Ltd 2026.
| SPDX-License-Identifier: CDDL-1.0
| Licensed under the Common Development and Distribution License 1.0; see LICENSE.

Run <Obey$Dir>.!Boot

| The window, its toolbar and the gadgets on it are Toolbox objects,
| so the object modules have to be there.  On RISC OS 5 they are in
| the ROM; the checks are for anyone running this anywhere else.
RMEnsure Toolbox   1.36 RMLoad System:Modules.Toolbox.Toolbox
RMEnsure Toolbox   1.36 Error Viewer needs the Toolbox module
RMEnsure Window    1.58 RMLoad System:Modules.Toolbox.Window
RMEnsure Window    1.58 Error Viewer needs the Window module
RMEnsure Menu      0.35 RMLoad System:Modules.Toolbox.Menu
RMEnsure Menu      0.35 Error Viewer needs the Menu module

WimpSlot -min 2048K -max 32768K
Run <PDFRenderV$Dir>.Viewer %*0
