!RunD,feb 5.4 KB
Newer Older
1
| !Run file for Browse
2
| (C) Tematic 2006
3
|
4
| Last modified: 02/03/2006
5

6 7 8 9 10 11 12
Set      Browse$Dir          <Obey$Dir>

SetMacro Browse$Path         Choices:WWW.Browse.,<Browse$Dir>.,<Wimp$ScrapDir>.WWW.Browse.,<Browse$Dir>.User.
SetMacro Browse$ChoicesFile  Browse:Choices
SetMacro Browse$ControlsFile Browse:Controls
SetMacro Browse$ChoicesSave  <Choices$Write>.WWW.Browse.Choices

13 14 15 16 17 18
| URI handler support

Set Alias$Open_URI_http   <Browse$Dir>.!Run
Set Alias$Open_URI_ftp    <Browse$Dir>.!Run
Set Alias$Open_URI_gopher <Browse$Dir>.!Run

19 20
| Support the ANT URL protocol

21 22 23 24
SetMacro Alias$URLOpen_HTTP   Run <Browse$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_Gopher Run <Browse$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_File   Run <Browse$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_FTP    Run <Browse$Dir>.!Run -url %%*0
25

26 27 28 29 30 31 32
| Kick DDT

Set DDT$Present Yes
RMEnsure DDT 0.00 Set DDT$Present No
If "<DDT$Present>" = "Yes" Then RMKill DDT
UnSet DDT$Present

33 34 35 36 37 38 39
| Can't do much if we haven't got various key system resources...

If "<System$Path>"       = "" Then Set System$Path_Message System resources not found.
If "<InetDBase$Path>"    = "" Then Error Internet resources not found.
If "<Unicode$Path>"      = "" Then Error Unicode resources not found.
If "<Inet$MimeMappings>" = "" Then Set Inet$MimeMappings InetDBase:Mimemap

40 41 42 43 44
| For font choices, if someone else hasn't already set them up

If "<Font$Bold>"   = "" Then Set Font$Bold   "Bold Demi ExtraBold Ultra Heavy"
If "<Font$Italic>" = "" Then Set Font$Italic "Italic Oblique Slant"

45 46
| HTTP fetcher controls

47 48 49
Set Browse$AcceptAllCookies off
Set Browse$CookieFile       Browse:User.Cookies
Set Browse$CookieFileFormat 2
50

51
| Fundamental modules
52

53
RMEnsure WindowManager  3.98 Error Browse requires version 3.98 or later of the WindowManager ('nested WIMP') module
54

55 56 57
| Ensure specific versions of Toolbox modules (or later ones)
| are present

58 59
RMEnsure Toolbox        1.43 RMLoad System:Modules.Toolbox.Toolbox
RMEnsure Toolbox        1.43 Error Browse requires version 1.43 or later of the Toolbox module
60
RMEnsure IconBar        1.18 RMLoad System:Modules.Toolbox.IconBar
61
RMEnsure IconBar        1.18 Error Browse requires version 1.18 or later of the IconBar module
62
RMEnsure ProgInfo       0.14 RMLoad System:Modules.Toolbox.ProgInfo
63
RMEnsure ProgInfo       0.14 Error Browse requires version 0.14 or later of the ProgInfo module
64 65 66 67
RMEnsure Window         1.54 RMLoad System:Modules.Toolbox.Window
RMEnsure Window         1.54 Error Browse requires version 1.54 or later of the Window module
RMEnsure Menu           0.33 RMLoad System:Modules.Toolbox.Menu
RMEnsure Menu           0.33 Error Browse requires version 0.33 or later of the Menu module
68
RMEnsure ToolAction     0.15 RMLoad System:Modules.Toolbox.ToolAction
69
RMEnsure ToolAction     0.15 Error Browse requires version 0.15 or later of the ToolAction module
70
RMEnsure PrintDBox      0.14 RMLoad System:Modules.Toolbox.PrintDBox
71
RMEnsure PrintDBox      0.14 Error Browse requires version 0.14 or later of the PrintDBox module
72
RMEnsure FontMenu       0.21 RMLoad System:Modules.Toolbox.FontMenu
73
RMEnsure FontMenu       0.21 Error Browse requires version 0.21 or later of the FontMenu module
74 75
RMEnsure TextGadgets    0.28 RMLoad System:Modules.Toolbox.TextGadget
RMEnsure TextGadgets    0.28 Error Browse requires version 0.28 or later of the TextGadgets module
76 77 78

| Important networking modules

79 80
RMEnsure URL_Fetcher    0.41 RMLoad System:Modules.Network.URL.URL
RMEnsure URL_Fetcher    0.41 Error Browse requires version 0.41 or later of the URL module
ROOL's avatar
ROOL committed
81
RMEnsure AcornHTTP      0.84 RMLoad System:Modules.Network.URL.AcornHTTP
82
RMEnsure AcornHTTP      0.84 Error Browse requires version 0.84 or later of the HTTP module
83
RMEnsure FileFetcher    0.38 RMLoad System:Modules.Network.URL.File
84
RMEnsure FileFetcher    0.38 Error Browse requires version 0.38 or later of the File module
85 86
RMEnsure FTPFetcher     0.32 RMLoad System:Modules.Network.URL.FTP
RMEnsure FTPFetcher     0.32 Error Browse requires version 0.32 or later of the FTP module
87 88

RMEnsure MimeMap        0.05 RMLoad System:Modules.Network.MimeMap
89
RMEnsure MimeMap        0.05 Error Browse requires version 0.05 or later of the MimeMap module
90

91 92 93 94 95 96
| Other support modules

RMEnsure DragAnObject   0.09 RMLoad System:Modules.DragAnObj
RMEnsure DragAnObject   0.09 Error Browse requires version 0.09 or later of the DragAnObject module

| The URI handler
97

98
RMEnsure AcornURI       0.12 RMLoad System:Modules.Network.URI
99

100
| The URI handler has a Wimp task side, so want to do a
101
| '*Desktop' when inside the application after Wimp_Initialise
102
| to start it. Set a system variable if this is NOT needed.
103 104

Set Browse$IssueDesktopCommand "yes"
105
RMEnsure AcornURI 0.12 Set Browse$IssueDesktopCommand "no"
106

107
| JPEG support for OS versions without this in SpriteExtend
108 109 110 111 112 113

RMEnsure SpriteExtend 0.99 RMEnsure JPEGMsgs   0.00 RMLoad System:Modules.JPEGMsgs
RMEnsure SpriteExtend 0.99 RMEnsure JPEGRender 0.00 RMLoad System:Modules.JPEGRender

| Routine actions...

114 115
Set Browse$Sprites "<Browse$Dir>.!Sprites"
IconSprites <Browse$Sprites>
116 117

Set File$Type_FAF HTML
118
Set File$Type_F91 URI
119
Set File$Type_F81 JSScript
120 121 122
Set File$Type_695 GIF
Set File$Type_C85 JPEG
Set File$Type_B60 PNG
123 124 125

Set Alias$@RunType_FAF /<Browse$Dir>.!Run -html %%*0
Set Alias$@RunType_F91 /<Browse$Dir>.!Run -uri %%*0
126
Set Alias$@RunType_F81 /<Browse$Dir>.!Run -jss %%*0
127 128 129

| And finally, run the application.

130
WimpSlot -Min 8192K -Max 8192K
131 132

|Run <Browse$Dir>.!RunImage -debug CMal,CFle %*0 2> Pipe:$.StdErr
133
Run <Browse$Dir>.!RunImage %*0