Commit 080840ee authored by Andrew Hodgkinson's avatar Andrew Hodgkinson
Browse files

PDF export, some major redraw structural changes, updated resources, new build...

PDF export, some major redraw structural changes, updated resources, new build system, extensive Makefile modifications, const/restrict additions, various bug fixes.

Detail:
  PDF export facility. SEE Docs.User FOR DETAILS (important!). Includes
  UI for headers/footers in Choices and option switch in Print dialogue
  box. Minor bug fixes include printing bullet points and, at long last,
  the "print dialogue box contents are not set up" problem. Redraw engine
  now based entirely on function pointers. Draw export routine replaces
  screen output functions with Draw output functions; PDF does similar.
  Coordinate scaling system in Scale.c/h to help. Makefile changes: Now
  supports a more consistent set of build variants and has minimal
  duplication of object and library lists. New build system: !Mk...
  script files removed, FrontEnd tool !MkBrowse replaces it. See !ReadMe
  (replacing old ReadMe) in root for details. Requires FrontEnd 1.29,
  HTMLLib 0.02 and ImageLib 0.04 (by CVS VersionNum). Updated resources:
  Some attempt to bring all variants to a working level, but not much
  testing. Only the Phoenix JavaScript capable builds (Unicode or normal)
  are fully up to date, though, including PDF UI additions. Many other
  minor tweaks, and extensive use of const and restrict qualifiers
  propagated through source code in response to their use in the new
  redraw system.
Admin:
  Draw and PDF export tested quite heavily. Appears to work well. Text
  file 'Docs.User' describes limitations. Note required new module and
  library versions listed above. Note that only JavaScript capable
  Phoenix resources are updated and only Phoenix was heavily tested.

Version 2.12. Tagged as 'Browse-2_12'
parent 692c7f02
| Copyright 2006 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
IconSprites <Obey$Dir>.!Sprites
\ No newline at end of file
| Copyright 2006 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Set MkBrowse$Dir <Obey$Dir>
If "<System$Path>" = "" Then Error 0 System resources cannot be found
IconSprites <Obey$Dir>.!Sprites
RMEnsure UtilityModule 3.10 Error This application only runs on RISC OS 3 (version 3.10) or later
RMEnsure SharedCLibrary 3.99 Error This application requires the Shared C Library module
RMEnsure FPEmulator 2.87 Error This application requires the FP Emulator module
RMEnsure TaskWindow 0.47 Error This application requires the Task Window module
RMEnsure FrontEnd 0 System:Modules.FrontEnd
RMEnsure FrontEnd 1.29 Error You need version 1.29 of the FrontEnd module to run !MkBrowse
RMEnsure DDEUtils 0 System:Modules.DDEUtils
RMEnsure DDEUtils 1.52 Error You need version 1.52 of the DDEUtils module to run !MkBrowse
WimpSlot -Min 32k -Max 32k
FrontEnd_Start -app MkBrowse -desc <MkBrowse$Dir>.desc
\ No newline at end of file
File added
File added
# First section of messages file is general to all applications
# Third parties can change FEinterr1 to their company name so that
# internal error messages will come up "Please report to <your name>"
FECmd1:String too long (limit %d current %d addition %d)
FECmd2:You cannot change the command used to run this tool
FECmd3:Output
FECmd4:ReRun
FECmd5:OK
FECmd6:Run
FEdbox1:Can't import from other applications when invoked from !Make
FEdbox2:Unable to start up -- not enough space (or too many windows)
FEinterr1:Pace
FEinterr2:%s: internal error: %s (%s/%d)
FEinterr3:Please report this error to %s
FEmem1:Out of memory, on request for %d bytes
FEmenu1:>Info,Save options,Options,Help,Quit
FEmenu2:Options
FEmenu3:Auto Run,Auto Save,Display
FEmenu4:Display
FEmenu5:Text,Summary
FEmenu6:>Command line
FEmenu7:>Info,>Cmd Line,>Save,Abort,Pause,Continue
FEmenu8:>Info,>Cmd Line,>Save
FEmenus9:Task(s) active: are you sure you want to quit?
FEmsg1:Wimp$Scrap must be set to do this transfer
FEmsg2:Invalid DataSave (filename != Wimp$Scrap)
FEoutput1:No more memory for output display - requesting %d bytes
FEoutput2:Running
FEoutput3:Aborted
FEoutput4:Paused
FEoutput5:Completed
FEoutput6:Task active: abort and close?
FEoutput7:Output file produced but not saved and will be lost. OK to continue?
FEoutput8:Continue
FEoutput9:Pause
FEsaveas1:Directories can only be saved to a filer viewer
FEsaveas2:To save, drag the icon to a directory viewer.
FEtask1:Task window not active
FEtask2:Application needs at least %dK to start up
FEtask3:Command line too long for task window module
FERuleRec:Illegally constructed Desc file icon or menu entry rules; cannot complete rule execution as infinite recursion would result.
utils1:Field is too long
utils2:Save failed %s -> %s
# General help messages
CMDLINE:This dialogue box displays the command line equivalent|Mof dialogue box and menu settings.|M
CMDLINE1:This is the command line equivalent of dialogue box and menu settings.
CMDLINE0:Click here to Run/ReRun the tool or to send options back to !Make.
SETUP:This dialogue box sets commonly used options.
SETUP0:Click here to run the application with the current options.
SETUP1:Click here to return to the previous set of options for this application.
SUMMARY:This dialogue box gives a summary of the command which has been run|Mor is running.
SUMMARY1:This is the icon for this application.
SUMMARY2:Click here to abort a running task.
SUMMARY3:Click here to continue a paused task.
SUMMARY4:This gives the number of lines produced by this task.
SUMMARY5:This gives the time at which a task was run.
SAVE:This dialogue box is used to save the file output of a command.
SAVE0:Click here to save the file output.
SAVE2:Filename for output appears here.
SAVE3:Drag this icon to save file output.
Mmain0:This gives version information.
Mmain1:Click here to save current options settings.
Mmain2:This is used to set options for the application.
Mmain20:If this option is set, the tool is run as soon as a file is dragged onto|Mthe icon bar.
Mmain21:If this option is set, any produced output file is saved|Mwithout prompting.
Mmain22:This sets how output is displayed by default.
Mmain220:Display text output in a scrolling text window.
Mmain221:Display text output using a summary dialogue box.
Mmain3:Click here to get a help window.
Mmain4:Click here to quit the application.
Msetup0:This shows the command line equivalent of the dialogue box|M and menu settings.
Mtext0:This gives version information.
Mtext1:This shows the command line equivalent of the dialogue box|M and menu settings.
Mtext2:This allows textual output to be saved.
Mtext3:Abort a running task.
Mtext4:Pause a running task.
Mtext5:Continue a paused task.
Msummary0:This gives version information.
Msummary1:This shows the command line equivalent of the dialogue box|M and menu settings.
Msummary2:This allows textual output to be saved.
# Tool-specific messages follow here
SETUP3:Enter the filename or directory of the source file(s) here.
SETUP5:Enter the filename for the output image here.
SETUP8:Click here to select an image type suitable for an OS upgrade.
SETUP9:Click here to select an image type suitable for a font upgrade (presently not supported).
SETUPa:Click here to select an image type suitable for a transient executable (deleted after being run).
SETUPb:Click here to select an image type suitable for a permanent executable (locked in CacheFS, so survives until power-off).
SETUPc:Click here to select an image type suitable for a resident executable (left in CacheFS but unlocked, so expired over time).
SETUPd:When selected, items to be programmed into FLASH ROM will be put on the card FLASH (bank 6), else the on-board FLASH (bank 0).
SETUPf:Enter a string to be displayed during the download process here.
SETUPh:For items to be programmed into FLASH ROM, enter a comma separated list of allowed builds that must be present to proceed.
SETUPj:Enter a comma separated list of locales that this image will be suitable for.
| Copyright 2006 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <MkBrowse$Dir>.^
Echo Making browser...
amu -E %*0 install
\ No newline at end of file
-------------------------------------------------------------------------------
History
=======
02-Mar-2006 (ADH): Created, replacing old, outdated ReadMe.
-------------------------------------------------------------------------------
Contents
========
Contents
How to build the browser
Notes on supported variants
More information on each variant
Cleaning
Further reading
How to build the browser
========================
In the past, a large number of TaskObey files sat in the root directory of
the browser and built all sorts of variants. This became impractical so these
files have been replaced. They're still available in Resources.Scripts, but
are possibly in a poor state of repair; changes to the Makefile made since the
scripts were tested may not have been reflected in updates to those scripts.
The replacement is the FrontEnd-based !MkBrowse application. It offers a set
of basic choices of the main variant of browser (e.g. Phoenix, Customer build)
along with some build options (JavaScript, Unicode, debug). Some variants
dictates certain build options. When these variants are selected, options that
cannot be user-modified are set up to reflect the values required by the
variant but greyed out so they cannot be changed.
!MkBrowse drives the Makefile using these principle elements:
SYSTEM The name of the build to create
INSTDIR By default "Targets.<SYSTEM>.!<SYSTEM>", but can be overridden
SUFFIX A sequence of letters indicating the variant
DEBUGFLAG A letter indicating debugging is switched on
install Rule used to build the variant into INSTDIR
SYSTEM and INSTDIR values can be set to whatever you like. The Makefile will
assume application resources for installation are present in directory
"Resources.UK.<SYSTEM>". SUFFIX values are limited as follows:
Empty A non-Unicode, non-Javascript ("simple") build
j JavaScript only
u Unicode only
ju JavaScript and Unicode - must be in the order "ju", not "uj"
The DEBUGFLAG is either empty, or the letter 'd'. It is used just in front of
SUFFIX inside the Makefile to create names of executable images and object
directories. For example, objects are placed in directories called "o", "oj",
"ou" or "oju" for non-debug versions of the four types listed above; or "od",
"odj", "odu" and "odju" for debug versions. Executable files are placed in
directory "abs" under the name "!RI" followed by letters as just described for
the object directories (e.g. "!RId", "!RIju" etc.) before being copied into the
installation directory derived from SYSTEM or explicitly given in INSTDIR.
Throwback during compilation will be disabled unless "THROWBACK=-throwback" is
given on the AMU command line.
As usual the build process writes dependency information back to the Makefile
so it is imperative that you do not attempt to build more than one thing at
any given time.
Notes on supported variants
===========================
Browse, Phoenix, Ursula and Customer variants may be built in any of the four
combinations of simple, JavaScript, Unicode or JavaScript plus Unicode. There
can be debug versions too. Object files for each of these 8 "flavours" sit in
independent directories so complete browser rebuilds can be avoided whilst
switching between them. All of these variants share the resulting eight object
directories, since they differ only by the resources that they use.
Customer and Customer versions are different. Customer builds are JavaScript
plus Unicode capable, but have no local hotlist support, using server based
hotlists only. Object directories to allow a debug and non-debug version will
be used; if you want to change other compilation options you will need to do a
complete rebuild. Customer builds are non-Unicode JavaScript versions with
multiuser support - they will expect the PostIn/PostOut user management system
of Customer to be available. Again, only standard and debug versions can
coexist.
More information on each variant
================================
See the !Help for !MkBrowse for a bit more information on each variant's
characteristics.
Cleaning
========
!MkClean deletes all object files but leaves any built targets intact.
!MkClnAll deletes all object files and targets, resetting the build to
a completely clean state.
Further reading
===============
Additional documentation can be found in the "Docs" directory.
--
Andrew Hodgkinson, for Endurance Technology / Tematic
......@@ -2,7 +2,9 @@
History
=======
20/05/98 (ADH): Created.
20/05/1998 (ADH): Created.
01/03/2006 (ADH): Updated list of source files and a couple of other bits,
though the document really needs a proper full update.
-------------------------------------------------------------------------------
Contents
......@@ -64,7 +66,7 @@ Despite the apparent complexity and inefficiency of the tables code, a great dea
The current Browser 2 architecture is showing its age. Text flow around images or floating tables are more or less impossible given the line / chunk structure of the page (see later). There isn't much of an object model internally, so DHTML would be very tricky. The redraw routines need to work on flat structures for a variety of reasons. Because of such considerations, significant rewrites of large sections of the code may well be undertaken for the next generation architecture (predictably called Browser 3).
At the time of writing, partial JavaScript support is being implemented in the existing browser architecture, largely as practice for the planned full implementation in the next generation version.
At the time of writing, partial JavaScript support is being implemented in the existing browser architecture, largely as practice for the planned full implementation in the next generation version. In addition, changes to the redraw engine to allow PDF export and better DrawFile export have led to the introduction of "user-points". These are a device independent coordinate system which at 100% scaling are the same size as millipoints. Functions to convert between millipoints and OS units etc. exist in Utils.c; more modern and flexible conversion functions for all kinds of units are in Scale.c, though the overall rollout of use of this file to produce a reformatted structure in user-points and allow a freely scalable view has not been completed yet. The reformatter works in OS units and millipoints; the redraw engine does a lot of on the fly conversions for different output devices (screen, Draw, PDF...).
Why are there 'c' and 'h' directories?
......@@ -107,6 +109,7 @@ Source file name Purpose
---------------- -------
About Create the page given when a URL of 'about:' is requested
Arrays Simple array handling
Authorise Handle the authorisation dialogue box
Browser Largely browser window content related functions -
scrolling, finding items in the page, checking what the
......@@ -117,6 +120,7 @@ Source file name Purpose
DragBox [Unfinished] User drag box code (UI stuff, not used at
the moment, unimportant)
Encoding Handle character set encoding issues
EventLogs Handle the event log dialogue box and related UI elements
Fetch Mid level fetch functions - deal with structures from the
HTML parser and pass them up to higher level items, but
don't do much in the way of talking directly to the
......@@ -160,12 +164,14 @@ Source file name Purpose
JavaScript [Unfinished] High level JavaScript interface
JSconsts [Unfinished] Fill in string constants etc. for JavaScript
JSdocument [Unfinished] Implement the JavaScript Document object
JSnavigtr [Unfinished] Implement the JavaScript Navigator object
JSscreen [Unfinished] Implement the JavaScript Screen object
JSURL [Unfinished] Implement the JavaScript URL / Location
objects
JSutils Miscellaneous JavaScript specific support utilities
JSwindow [Unfinished] Implement the JavaScript Window object
Customer [Deprecated] Nasty hacks for a specific customer of the
browser from some time ago that needed a particular
JavaScript site working
List Handle list user interfaces, for e.g. "don't fetch
images", "don't accept cookies" etc. configuration
Main Application initialisation, environment configuration,
and main polling loop
Markers Remember positions on the page (in-page bookmarks)
......@@ -193,6 +199,9 @@ Source file name Purpose
Protocols RISC OS message protocol support; for file transfer, the
message part of plug-ins, and so-on
Redraw Redrawing the page
RedrawCore Veneers and veneer manipulation functions for the lower
level graphics operations used by Redraw; changing this
table allows 'redrawing' to a Draw file, PDF etc.
Reformat Taking the HTML parser structures and turning them into
something the redraw engine can deal with more easily
RMA An odd RISC OS specific method of memory allocation that
......@@ -213,21 +222,22 @@ Source file name Purpose
SaveObject Handle the Save Object dialogue box - there can be many
open at once, and they are persistent (don't automatically
close, but they aren't modal either)
SavePDF Save page as a PDF file, in conjunction with the printing
loop - PDF export is native, rather than run through the
printer driver, so document hyperlinks can be preserved
SaveSHelp [Unfinished] Save pages as StrongHelp manuals
SaveText Back-end to 'Save.c' for saving a web page as a plain
text file with a few annotations.
Scale Coordinate conversion
SetPBoxes Part of the Customer multiuser support code
svcprint Debug library that pushes information down a piece of
hardware known as a 'TML card', an expansion card that
connects to another machine and displays results on that
second machine. Has various build options to instead
display information on the same machine as the running
application
Tables Table reformatting
TGutils Support functions to help with the TextGadgets module
TokenUtils Mostly concerned with finding where HTML parser structures
are inside the redraw engine's page display structures
Toolbars Handle the browser window toolbars
Trace Various trace functions for debug builds
Unifont More support for extended character sets
URIfile URI file handling
URLstat Basically a linked list handler for a particular structure
used heavily during fetching objects from the Web
URLutils Mostly, manipulation of URLs in various ways
......
......@@ -52,7 +52,7 @@ Errors which are specific to a single callee are not detailed further than their
Mild errors
===========
* NoMemFet
* NoMemFet (raise using make_no_fetch_memory_error, Utils.h)
--------
Reports the generator by a number in brackets after the error. Built through the make_no_fetch_memory_error function. Typically signal a memory allocation failure during early stages of a fetch. Generator numbers are as follows:
......@@ -103,7 +103,7 @@ Number Generator Reason
(Forms.h) constructed with 'onclick' info.
* NoMemRea
* NoMemRea (raise using make_no_cont_memory_error, Utils.h)
--------
Reports the generator by a number in brackets after the error. Built through the make_no_cont_memory function. Typically signal a memory allocation failure during a fetch. Generator numbers are as follows:
......@@ -135,7 +135,7 @@ Number Generator Reason
'about:' internal page.
* NoMemTab
* NoMemTab (raise using make_no_table_memory_error, Utils.h)
--------
Reports the generator by a number in brackets after the error. Built through the make_no_table_memory_error function. Typically signal a memory allocation failure when dealing with tables. Generator numbers are as follows:
......@@ -169,7 +169,7 @@ Number Generator Reason
(Numbers 7 and 8 were present in an earlier version of the widthing code but have since been removed).
* NoMemGen
* NoMemGen (raise using make_no_memory_error, Utils.h)
--------
Reports the generator by a number in brackets after the error. Built through the make_no_memory_error function. Typically signal a memory allocation failure for some immediate operation. Generator numbers are as follows:
......@@ -208,13 +208,13 @@ No. Generator What failed
(Hotlist.c)
16 hotlist_newren_directoryl_handler malloc for directory name.
(Hotlist.c)
17 choices_get_contents malloc for Home Page string.
(Choices.c)
17 choices_retrieve_text_item malloc for strings being read from a
(Choices.c) writable field into a Choices item.
18 choices_set_encoding_field malloc for encoding name.
(Choices.c)
19 choices_set_save_field malloc for save type (for hotlist or
(Choices.c) history).
20 choices_set_display_field malloc for hotlist display type.
20 Various functions malloc for temporary string buffers.
(Choices.c)
21 plugin_add_queue_entry malloc for a new structure in the
(PlugIn.c) Plug-In queue.
......@@ -260,9 +260,22 @@ No. Generator What failed
(EventLogs.c)
42 eventlogs_log_message malloc for message text.
(EventLogs.c)
* NoMemImg
43 Various functions Attempts to create PDF data arrays.
(SavePDF.c)
44 Various functions Attempts to duplicate strings.
(SavePDF.c)
45 arrays_extend Change of array dimensions.
(Arrays.c)
46 Various functions Allocation of structures or buffers
(SavePDF.c) for PDF file output.
47 fm_putsl Allocation of string of requested
(FontManage.c) number of characters plus one.
48 image_to_draw_file Various internal allocations.
(Images.c)
49 redraw_read_section realloc for inferred section text.
(Redraw.c)
* NoMemImg (raise directly - no Utils.h function available)
--------
Reports the generator by a number in brackets after the error. Typically signal a browser side (as opposed to image library side) memory allocation failure when dealing with errors. Generator numbers are as follows:
......@@ -275,7 +288,7 @@ No. Generator Reason
(Images.c) failed during fetching of an image.
* NoMemJSc
* NoMemJSc (raise using make_no_javascript_memory_error, Utils.h)
--------
Reports the generator by a number in brackets after the error. Signals a probable memory allocation failure when performing some JavaScript operation. Generator numbers are as follows:
......
......@@ -48,6 +48,14 @@ NB Don't forget to keep the 'User' version of this file updated in parallel!
18/08/98 (ADH): WRITE_DUMP_FILE_ON_ERROR local compile time option documented.
07/09/98 (ADH): ALL_FAST local compile time option documented.
01/03/06 (ADH): Some changes to bring things up to date - CUSTOMER_SPECIAL has
been removed, the Choices section wasn't useful and has been
removed, nothing new added as there's nothing particularly
that has been added over the last few years (!). Needs a
full overhaul to make sure everything is accurate though.
03/03/06 (ADH): Added warning about use of 'restrict'.
-------------------------------------------------------------------------------
Contents
......@@ -56,6 +64,7 @@ Contents
Overview
Key notes for coders (very important)
Documentation
Use of 'restrict'
Hard coded limits
Compile-time options
Lines and chunks - referencing
......@@ -66,13 +75,6 @@ Key notes for coders (very important)
Multiple application name support - system variable dependencies
Other system variables
Choices file
Entries in the user choices structure 'choices'
Entries to read straight from the file or a dialogue box
Controls file
Entries in the fixed choices structure 'controls'
Entries to read straight from the file or a dialogue box
Component and event code numberspaces
Miscellaneous
Toolbars (Toolbars.h)
......@@ -131,6 +133,14 @@ Key notes for coders (very important)
All comments and related text files (such as this one) must be kept up to date! It is a fairly arduous task, but without doubt the best approach is to always modify as required at the moment an affecting change is made. Never let this sort of thing build up over time...
* Use of 'restrict'
-----------------
The C99 qualifier 'restrict' is extremely useful for optimising pointer-based data structure access. Without it, any reference to a field of a structure through a pointer will always go to memory and never be cached in a register. Using the qualifier can lead to some very significant optimisations. When using flex, though, great care must be taken. Any data structure containing a flex anchor - such as a reformat_cell - may be updated by the flex library if the flex heap moves, even though that structure itself stays at the same address. With budging enabled, this may occur even on a simple function call due to a stack extension, regardless of whether or not that function has anything to do with the structure in question.
Qualifying a pointer to such a structure with 'restrict' allows the compiler to cache a flex anchor's value. In reformat cells, this might commonly be a field such as "ldata" - the line array. Should the flex heap move whilst this pointer is cached, obscure faults including aborts at odd but convincing looking addresses will arise, will be intermittent and will disappear in debug builds since the 'restrict' optimisations are turned off. The bottom line is - be very careful with this qualifier in the browser sources.
* Hard coded limits
-----------------
......@@ -146,13 +156,13 @@ If altering #defined values inside the compiler options, you *must* then recompi
ROM The ROM build !Mkxxxx files use this.
TRACE Enable general debugging.
STRICT_PARSER Gives more warnings at parse time.
STRICT_PARSER Gives more warnings at parse time (including reporting
ImageLib errors even in redraw loops).
ALIAS_URLS E.g. instead of file://...hotlist, just say 'Hotlist'.
HIDE_CGI Don't show the info after a '?' in URL displays.
ANTI_TWITTER Use software anti-twitter.
REMOTE_HOTLIST Use HTML files fetched to the page for hotlists,
rather than compiling in the whole hotlist manager.
CUSTOMER_SPECIAL Include hard coded JavaScript for www.customer.net.
UNIFONT Multilingual support.
USE_MALLOC_REPLACEMENT Uses the 'MemLib' malloc-in-a-dynamic-area replacement
for malloc. Not all mallocs will be replaced with
......@@ -363,211 +373,6 @@ For the token dump functions in Trace.c, '<Browse$Dir>.Tokens-L' and '<Browse$Di
The browser will of course load a variety of file formats, and the relevant Alias$@RunType_xxx variables may be set or left alone as required. Files that may be loaded by double-click are URI (0xf91), HTML (0xfaf), GIF (0x695), JPEG (0xc85), PNG (0xb60), and TIFF (0xff0). Text (0xfff) and URL files (0xb28 - from the ANT suite) can be loaded by dragging to the browser. Setting an Alias$@RunType_B28 for URL files will work; setting an Alias$@RunType_FFF for Text files will cause big problems with the View Source button, for obvious reasons. Recommended settings are just for HTML and URI files (the latter being used only if the URI handler module is not present).
Choices file
============
* Entries in the user choices structure 'choices'
-----------------------------------------------
HomePage
BackColour
TextColour
LinkColour
UsedColour
FollColour
SeleColour
SupportTables
TableOuter
TableInner
FontSize
TTAspect
SystemFont
Encoding
UnderlineLinks
UseSourceCols
ShowForeground
ShowBackground
LeftMargin
RightMargin
QuoteMargin
Leading
LeftIndent
MaxImages
ClientPull
SupportFrames
SupportObject
PlugInControl
SeeFetches
HotlistPath
SaveHotlist
AddHotlist
HotlistType
AutoOpenDelay
AutoScrollDelay
AutoScrollMargin
HistoryPath
ImageHistoryPath
MaxSize
ImageMaxSize
ExpiryAge
ImageExpiryAge
ShowURLs
SaveHistory
SaveImageHistory
URLbar
ButtonBar
StatusBar
MoveGadgets
Width
Height
OverrideX
OverrideY
SolidResize
FullScreen
HScroll
VScroll
RefoWait
RefoHang
RefoTime
FixedPtr
HighlightLks
KeyboardCtl
PostIn (if SINGLE_USER not defined)
PostOut (if SINGLE_USER not defined)
Clone
UseProxy
ProxyAddress
StartProxy
LITimeout
* Entries to read straight from the file or a dialogue
----------------------------------------------------
HotlistSave
HistorySave
ImageHistorySave
LoadResources (if SINGLE_USER not defined)
OpenResources (if SINGLE_USER not defined)
PrintCopies \
PrintStart |
PrintEnd | Read by the Print dialogue
PrintReform |
PrintOrient /
PrintBack \ Read by the Print Style dialogue
PrintBlack /
PrintPlain - Read by Print for Print Style
DefaultUser \
DefaultName | For the Log In dialogue (if SINGLE_USER not defined)
DefaultPass /
Controls file
=============
* Entries in the fixed choices structure 'controls'
-------------------------------------------------
AnimSpeed
AnimDrift
DBoxAnims
MinConvergence
DontGrey
SwapBars
BackWindow
ClaimHelp
ShowHelpFor
ShowDStatFor
ShowLinksFor
ShowMiscFor
Quantise
ProgressDelay
AppendStatus
UseBrackets
ColourProgress
MinFrmHeight
MinFrmWidth
KeepHighlight
KeepCaret
ClearFirst
LockToLine
IgnoreAdjust
AppendURLs
BrickWall
StopWebServ
BackOffAt [not implemented, but has entry]
RefoSingle [prototype option, not fully implemented]
PtrLnkActvX
PtrLnkActvY
PtrMapActvX
PtrMapActvY
PtrUDActvX
PtrUDActvY
PtrLRActvX
PtrLRActvY
PtrUDLRActvX
PtrUDLRActvY
PtrNoRActvX
PtrNoRActvY
PtrToSActvX
PtrToSActvY
PtrScrActvX
PtrScrActvY
* Entries to read straight from the file or a dialogue
----------------------------------------------------
ProtocolMax
ProtocolM1
ProtocolU1
.
.
. (to Mn and Un where n = ProtocolMax)
ShowFHighFor
AppendWith
AlterNumranges
AlterWith
JumpTo00
.
.
JumpTo7f
Component and event code numberspaces
=====================================
......
......@@ -54,8 +54,4 @@ ahodgkin_208_i2 Intermediate 2.08 build. Printing headers and
features (25-Feb-2000).
ahodgkin_208_i3 Intermediate 2.08 build. Printing headers and
footers now work... (01-Mar-2000).
ahodgkin_208_i4 Intermediate 2.08 build. Various fixes over i3
(31-May-2000).
ahodgkin_208_i4_2 The Phoenix variant identifies itself as 2.08
i2-4. Source changed to use DebugLib, not that
much else changed (14-Nov-2000).
ahodgkin_208_i4 Intermediate 2.08 build. Various fixes over i3.
......@@ -11,6 +11,11 @@ NB Don't forget to keep the 'Notes' version of this file updated in parallel!
04/12/97 (ADH): Put in information on using a local proxy server as a cache
(i.e. basically controlling WebServe from the browser!) and
added to the descriptions of keyboard modifiers.
01/03/06 (ADH): Couple of corrections noted from a quick look through. Needs a
full overhaul to make sure everything is accurate though.
13/03/06 (ADH): Added description of new PDF export features.
-------------------------------------------------------------------------------
Contents
......@@ -40,6 +45,9 @@ External control of the browser
Remote hotlists
Home page
PDF export functions
Features and limitations
Draw file inline converter limitations
Multiple application name support - system variable dependencies
================================================================
......@@ -252,7 +260,7 @@ User interface features: Save dialogues
The Save File dialogue is set to raise event 0x13ff (ESaveFileToBeShown) before it opens. Only one dialogue can be visible at a time (in the Res file, the object has its 'shared object' bit set, and the code assumes that this will always be the case); so no event is raised when closing - there is no need to deregister event handlers and so-forth.
When ESaveFileToBeShown is raised, the saveobject_to_be_shown function will fill in the contents of the dialogue in an appropriate fashion automatically. To do this, it has to know certain methods of generation. First, it expects to have an ancestor ID. This should point to a browser or hotlist window. If a browser window, the component ID of the menu entry generating the item is looked at. This will be (from Save.h):
When ESaveFileToBeShown is raised, the saveobject_to_be_shown function will fill in the contents of the dialogue in an appropriate fashion automatically. To do this, it has to know certain methods of generation. First, it expects to have an ancestor ID. This should point to a browser or hotlist window. If a browser window, the component ID of the menu entry generating the item is looked at. This will be (from Menus.h):
FileSaveFrame Save this frame as HTML
FileSaveParent Save the parent frameset as HTML
......@@ -261,6 +269,7 @@ HotlistSaveHotlist Save the hotlist
MiscHotlistSaveObject Save an object from the hotlist (URI file, selection, directory)
ExportAsDraw Export the page as a Drawfile
ExportAsText Export the page as text
ExportAsSHelp Export the page as a StrongHelp manual
ExportLink Export the link contents as a URI file
ExportPicture Export the image as a sprite
ExportBackground Export background image as a sprite
......@@ -378,3 +387,181 @@ When a new window is opened, in the absence of any other action (see above) the
example, a RISC OS path for a local file, as with the third method of
finding the Hotlist file as described above). Again, this token must
exist in the Choices file, or an error will be raised.
PDF export functions
====================
Adobe PDF files may be generated from the browser by printing to a file with a PostScript printer driver and converting the result. This produces an unstructured result, with none of the document hyperlinks preserved and images often in a poor state due to the odd way in which the PostScript driver handles image printing. In early 2006 the browser was extended to include native PDF export functions to provide much cleaner and more structured PDF files.
A conversion of PostScript printer driver output will often produce a more accurate likeness of the Web page, particularly where things like alpha-transparent PNGs or complex Draw files may be included. However, the internal converter is competent and extensive and should produce adequate to excellent output in the majority of cases.
* Features and limitations
------------------------
1) The converter writes files conforming to the PDF 1.3 specification.
It uses features not available in PDF 1.2 or earlier.
2) The exporter runs through the print engine; paper sizes and
margins are taken from there. At no point is anything actually
sent to the printer driver, though, so you can install a printer
driver purely for its paper and margin specification if need be,
without having to actually have such a printer available.
3) Many previously hidden aspects of printing, particularly those to
control header and footer output, may now be modified using a new
Choices dialogue box pane. The options affect both printing and
PDF output.
4) When appropriate sprites are present, 180 DPI bullet point images
will be used for printing and PDF output instead of the normal
screen-friendly 90 DPI versions. Depending on how competent your
PDF reader is at rendering images these may look good or bad, but
they should always look much better on a printed page.
5) Inferred section headings, as used for headers and footers, are
used to build up a document outline (the "tree" that is shown in
the "Bookmarks" panel in Adobe Acrobat Reader, or opened using the
pop-up icon at the top left of a !PDF viewer window). Links inside
a page are preserved, jumping to the relevant new page of the
document and scrolling vertically to the target area (assuming the
viewer application supports it). External Web links are launched
from the viewer in whatever way it normally defines. There is no
visible manifestation of a link unless your viewer application
introduces one (e.g. !PDF has a "Highlight links" menu entry). As
a result, in general when you print to a PDF file, you should turn
off any of the "text in black" options in the Print Style dialogue
box and probably leave link underlining turned on too. This ability
to maintain link information and generate outlines is the principle
reason that PDF export has been added to the browser core.
6) Draw files included in a Web page using OBJECT tags are, whenever
possible, converted into a native series of PDF drawing instructions
rather than converted to a sprite (as done during output to a Draw
file). Since this is quite a complex process with several
limitations it is discussed in a separate section below.
7) If there is an error processing a Draw file of any kind the browser
will abandon the conversion, rewind and attempt to use a bitmap
conversion of the Draw file instead. This is *not* done just because
an object that is not implemented in the converter is encountered;
it only happens for actual processing errors, which may imply a
malformed input file or could be as mundane as insufficient RAM.
8) The browser now uses a redraw engine which runs through function
tables to achieve output. Draw file and PDF output is done this way
(in the latter case under instruction from the print engine). The
accuracy of Draw file export in this version is consequently higher
than in versions of the browser that did not include PDF support.
PDF export consequently should closely follow the visual redraw
results too, within the limitations and caveats noted herein. Both
Draw, PDF and printer page count routines now involve no code
duplication (compared to vast swathes of copied and modified
redraw routines that were adapted for various output types before).
9) To avoid having to compile content streams for each page in RAM,
page data is written to the output file as it is 'printed'. It is
therefore not possible to compress the content stream output. While
images are compressed (see below), the uncompressed content stream
can often become quite large. PDF output converted from the
PostScript driver is usually much more compact because of content
stream compression (assuming you use a converter that supports it!).
The document may shrink dramatically if put in something like a
SparkFS archive or Zip file, though, so it is wise to archive the
output if intending to send it to another person or make it
available for download, or if local disc space is at a premium. As
a guide, a technical specification with various Draw images at a
total including HTML of about 581K exports to a PDF file of around
2.4MB. When ZIPped with SparkFS it shrinks to just under 300K.
10) Clipping rectangles are used extensively but a lack of support
for clipping will only be problematic in certain specific cases,
such as a Web page too wide to squeeze down to the given page width,
text displayed in an image placeholder which is larger than the
placeholder itself, or text in a TEXTAREA forms field.
11) The converter cannot embed or synthesise fonts, so only the PDF
standard set are supported. This means you must use Homerton,
Trinity and Corpus in the browser font choices. You can, however,
use them in any order, sizes or weights. System font is *not*
supported. The main page content will all be rendered in Windows
CP 1252 encoding. Outlines are rendered in PDF document encoding,
similar to Windows 1252; UTF-16 is allowed but some viewers do
not accept it (e.g. !PDF). The document title, at least, is sent
through as UTF-16 so at least that aspect of a document using
characters outside of the Windows 1252 range will survive!
12) Images are rendered at 100% native resolution in the PDF file with
ZLib compression at 24bpp. Any unpleasant aspects of rendering are
down to the PDF viewer in use (Adobe Acroread seems pretty poor at
bitmap images, for example). PDF allows an image to specify that
the viewer application should use some form of interpolation during
rendering, but this is not requested by Browse because it provokes
bugs in some viewers (e.g. the PDF-capable !GView application at
the time of writing the converter). A binary mask accompanies the
image if the original had one that could be converted, but note that
not all PDF viewers handle these (the PDF-capable !GView and Adobe
Acroread application do, while !PDF does not). Sometimes there may
be a small amount of "leakage" around areas that are meant to be
masked. This odd effect seems to be a bug in many reader programs;
the image and mask are at exactly the same resolution and plotted
in the same location with the same scaling (if you understand PDF
format you can verify this by inspection, since only the image data
is ZLib compressed; the content stream is not). Alpha-PNGs will be
composited in the same way as with the "save as sprite" menu option.
All images except for Draw files have to be dumped to a sprite in
Scrap before conversion so you will notice disc activity when
converting Web pages containing images even if saving to RAM disc.
13) Sprites are converted as above, both for forms items using sprites
from the browser pool, and for sprites in Draw files. High level OS
calls are used to read the sprite and mask data in an attempt to
support as wide a range of sprite types as possible, however some
newer types have not been tested, notably RISC OS 4 alpha-sprites
and CMYK variants. Standard RGB sprites in new and old format with
binary masks and 2, 4, 16, 256, 32K or 16M colours with or without
palettes have been tested and should work properly. This high level
approach does come with a penalty - the conversion is quite slow,
most of the time being spent in OS calls to read sprite pixels.
14) For Web pages with many images or very large images it may be
better to print to a PostScript file and convert that, unless you
absolutely must retain links within the document. Very large images
take a long time to convert even on an Iyonix and you cannot escape
the process (only kill the browser using the Alt+Break watchdog).
* Draw file inline converter limitations
--------------------------------------
1) PDF does not support different end caps on a line, whereas Draw
allows different start and end caps. Normally, the ending end cap (!)
is used for both ends of the line in the PDF file. PDF does not have
triangle end types, so those are constructed specially; since this
may hide the end of the line, if a line ends in a triangle, its
start cap will be used in the PDF file instead. The PostScript driver
actually expresses the line as a rectangle and constructs the end
caps manually, for cases where one line has different end types;
Browse doesn't attempt this.
2) Text areas are not converted at all. Such objects will be ignored.
3) Some quite eclectic path element types are not supported - these are
rare in typical Draw files. Pointers to continuation paths (element
1) are ignored. The rare 'move to without affecting winding numbers'
(element 3) and 'gap to' (element 7) are both treated as 'move to', so
do start new sub-paths and affect winding numbers. Close subpath with
a gap rather than a line (element 4) is treated as closing a subpath
with a line.
4) Font flags in transformed text objects are ignored - notably, the
kerning on/off flag. PDF 1.3 does not provide a way to turn kerning
on or off, with an implied default of "on". The PDF 1.3 specification
does not mention kerning at all, except in a passing reference
related to external metrics files. This reference does imply that
kerning data is always used, though.
5) Only the standard four variants of the standard three fonts
(Trinity, Homerton, Corpus) are supported. Anything else will be
mapped to Trinity Medium.
| !Boot file for Browse
| (C) Acorn Computers Ltd. 1994
| (C) Tematic 2006
|
| Last modified: 08/10/1998
| Last modified: 02/03/2006
Set Browse$Dir <Obey$Dir>
......@@ -22,14 +22,15 @@ Set Alias$Open_URI_gopher <Browse$Dir>.!Run
| Support the ANT URL protocol
SetMacro Alias$URLOpen_HTTP Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_Gopher Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_File Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_FTP Run <Phoenix$Dir>.!Run -url %%*0
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
| Routine actions...
IconSprites <Browse$Dir>.!Sprites
Set Browse$Sprites "<Browse$Dir>.!Sprites"
IconSprites <Browse$Sprites>
Set File$Type_FAF HTML
Set File$Type_F91 URI
......
| !Boot file for Browse
| (C) Acorn Computers Ltd. 1994
| (C) Tematic 2006
|
| Last modified: 08/10/1998
| Last modified: 02/03/2006
Set Browse$Dir <Obey$Dir>
......@@ -22,14 +22,15 @@ Set Alias$Open_URI_gopher <Browse$Dir>.!Run
| Support the ANT URL protocol
SetMacro Alias$URLOpen_HTTP Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_Gopher Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_File Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_FTP Run <Phoenix$Dir>.!Run -url %%*0
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
| Routine actions...
IconSprites <Browse$Dir>.!Sprites
Set Browse$Sprites "<Browse$Dir>.!Sprites"
IconSprites <Browse$Sprites>
Set File$Type_FAF HTML
Set File$Type_F91 URI
......
| !Run file for Browse
| (C) Acorn Computers Ltd. 1994
| (C) Tematic 2006
|
| Last modified: 08/10/1998
| Last modified: 02/03/2006
Set Browse$Dir <Obey$Dir>
......@@ -18,10 +18,10 @@ Set Alias$Open_URI_gopher <Browse$Dir>.!Run
| Support the ANT URL protocol
SetMacro Alias$URLOpen_HTTP Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_Gopher Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_File Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_FTP Run <Phoenix$Dir>.!Run -url %%*0
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
| Can't do much if we haven't got various key system resources...
......@@ -37,9 +37,9 @@ If "<Font$Italic>" = "" Then Set Font$Italic "Italic Oblique Slant"
| HTTP fetcher controls
Set Browse$AcceptAllCookies off
UnSet Browse$CookieFile
UnSet Browse$CookieFileFormat
Set Browse$AcceptAllCookies off
Set Browse$CookieFile Browse:User.Cookies
Set Browse$CookieFileFormat 2
| Fundamental modules
......@@ -64,8 +64,8 @@ RMEnsure PrintDBox 0.14 RMLoad System:Modules.Toolbox.PrintDBox
RMEnsure PrintDBox 0.14 Error Browse requires version 0.14 or later of the PrintDBox module
RMEnsure FontMenu 0.21 RMLoad System:Modules.Toolbox.FontMenu
RMEnsure FontMenu 0.21 Error Browse requires version 0.21 or later of the FontMenu module
RMEnsure TextGadgets 0.19 RMLoad System:Modules.Toolbox.TextGadget
RMEnsure TextGadgets 0.19 Error Browse requires version 0.19 or later of the TextGadgets module
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
| Important networking modules
......@@ -77,41 +77,35 @@ RMEnsure FileFetcher 0.38 RMLoad System:Modules.Network.URL.File
RMEnsure FileFetcher 0.38 Error Browse requires version 0.38 or later of the File module
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
RMEnsure GopherFetcher 0.12 RMLoad SysteM:Modules.Network.URL.Gopher
RMEnsure GopherFetcher 0.12 Error Browse requires version 0.12 or later of the Gopher module
RMEnsure MimeMap 0.05 RMLoad System:Modules.Network.MimeMap
RMEnsure MimeMap 0.05 Error Browse requires version 0.05 or later of the MimeMap module
| TaskModule for catching service calls (not required for
| some UIs, so let it fail silently); also the URI handler,
| which may be present but can do without it.
| 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
RMEnsure AcornURI 0.12 RMLoad System:Modules.Network.URI
RMEnsure TaskModule 0.11 RMLoad System:Modules.TaskModule
| Both of the above start Wimp task sides, so want to do a
| The URI handler has a Wimp task side, so want to do a
| '*Desktop' when inside the application after Wimp_Initialise
| to start those tasks. Set a system variable if this is NOT
| needed.
| to start it. Set a system variable if this is NOT needed.
Set Browse$IssueDesktopCommand "yes"
RMEnsure AcornURI 0.12 Set Browse$IssueDesktopCommand "no"
RMEnsure TaskModule 0.11 If "<Browse$IssueDesktopCommand>" = "yes" Then Set Browse$IssueDesktopCommand "no"
RMEnsure AcornURI 0.12 Set Browse$IssueDesktopCommand "no"
| JPEG support for OS versions without this in SpriteExtend;
| again, not technically essential so let this fail too.
| JPEG support for OS versions without this in SpriteExtend
RMEnsure SpriteExtend 0.99 RMEnsure JPEGMsgs 0.00 RMLoad System:Modules.JPEGMsgs
RMEnsure SpriteExtend 0.99 RMEnsure JPEGRender 0.00 RMLoad System:Modules.JPEGRender
| | Get round the 'problematic' last stage of the printer protocol
|
| Set Alias$@PrintType_FF4 "Copy %%0 Printer: ~A ~C ~D F ~L ~N ~P ~Q ~R ~S ~T ~V"
| Routine actions...
IconSprites <Browse$Dir>.!Sprites
Set Browse$Sprites "<Browse$Dir>.!Sprites"
IconSprites <Browse$Sprites>
Set File$Type_FAF HTML
Set File$Type_F91 URI
......@@ -123,13 +117,7 @@ Set File$Type_B60 PNG
Set Alias$@RunType_FAF /<Browse$Dir>.!Run -html %%*0
Set Alias$@RunType_F91 /<Browse$Dir>.!Run -uri %%*0
| Set the slot size and run the application. RISC OS 3 versions
| prior to RISC OS 3.5 need more memory allocated initially.
WimpSlot -Min 736K -Max 736K
If "<Boot$OSVersion>"="300" Then WimpSlot -Min 864K -Max 864K
If "<Boot$OSVersion>"="310" Then WimpSlot -Min 864K -Max 864K
If "<Boot$OSVersion>"="311" Then WimpSlot -Min 864K -Max 864K
| Set the slot size and run the application.
WimpSlot -Min 840K -Max 840K
Run <Browse$Dir>.!RunImage %*0
| !Run file for Browse
| (C) Acorn Computers Ltd. 1994
| (C) Tematic 2006
|
| Last modified: 08/10/1998
| Last modified: 02/03/2006
Set Browse$Dir <Obey$Dir>
......@@ -18,17 +18,10 @@ Set Alias$Open_URI_gopher <Browse$Dir>.!Run
| Support the ANT URL protocol
SetMacro Alias$URLOpen_HTTP Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_Gopher Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_File Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_FTP Run <Phoenix$Dir>.!Run -url %%*0
| 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
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
| Kick DDT
......@@ -37,6 +30,13 @@ RMEnsure DDT 0.00 Set DDT$Present No
If "<DDT$Present>" = "Yes" Then RMKill DDT
UnSet DDT$Present
| 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
| For font choices, if someone else hasn't already set them up
If "<Font$Bold>" = "" Then Set Font$Bold "Bold Demi ExtraBold Ultra Heavy"
......@@ -44,9 +44,9 @@ If "<Font$Italic>" = "" Then Set Font$Italic "Italic Oblique Slant"
| HTTP fetcher controls
Set Browse$AcceptAllCookies off
UnSet Browse$CookieFile
UnSet Browse$CookieFileFormat
Set Browse$AcceptAllCookies off
Set Browse$CookieFile Browse:User.Cookies
Set Browse$CookieFileFormat 2
| Fundamental modules
......@@ -71,8 +71,8 @@ RMEnsure PrintDBox 0.14 RMLoad System:Modules.Toolbox.PrintDBox
RMEnsure PrintDBox 0.14 Error Browse requires version 0.14 or later of the PrintDBox module
RMEnsure FontMenu 0.21 RMLoad System:Modules.Toolbox.FontMenu
RMEnsure FontMenu 0.21 Error Browse requires version 0.21 or later of the FontMenu module
RMEnsure TextGadgets 0.19 RMLoad System:Modules.Toolbox.TextGadget
RMEnsure TextGadgets 0.19 Error Browse requires version 0.19 or later of the TextGadgets module
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
| Important networking modules
......@@ -84,37 +84,35 @@ RMEnsure FileFetcher 0.38 RMLoad System:Modules.Network.URL.File
RMEnsure FileFetcher 0.38 Error Browse requires version 0.38 or later of the File module
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
RMEnsure GopherFetcher 0.12 RMLoad SysteM:Modules.Network.URL.Gopher
RMEnsure GopherFetcher 0.12 Error Browse requires version 0.12 or later of the Gopher module
RMEnsure MimeMap 0.05 RMLoad System:Modules.Network.MimeMap
RMEnsure MimeMap 0.05 Error Browse requires version 0.05 or later of the MimeMap module
| TaskModule for catching service calls (not required for
| some UIs, so let it fail silently); also the URI handler,
| which may be present but can do without it.
| 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
RMEnsure AcornURI 0.12 RMLoad System:Modules.Network.URI
RMEnsure TaskModule 0.11 RMLoad System:Modules.TaskModule
| Both of the above start Wimp task sides, so want to do a
| The URI handler has a Wimp task side, so want to do a
| '*Desktop' when inside the application after Wimp_Initialise
| to start those tasks. Set a system variable if this is NOT
| needed.
| to start it. Set a system variable if this is NOT needed.
Set Browse$IssueDesktopCommand "yes"
RMEnsure AcornURI 0.12 Set Browse$IssueDesktopCommand "no"
RMEnsure TaskModule 0.11 If "<Browse$IssueDesktopCommand>" = "yes" Then Set Browse$IssueDesktopCommand "no"
RMEnsure AcornURI 0.12 Set Browse$IssueDesktopCommand "no"
| JPEG support for OS versions without this in SpriteExtend;
| again, not technically essential so let this fail too.
| JPEG support for OS versions without this in SpriteExtend
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...
IconSprites <Browse$Dir>.!Sprites
Set Browse$Sprites "<Browse$Dir>.!Sprites"
IconSprites <Browse$Sprites>
Set File$Type_FAF HTML
Set File$Type_F91 URI
......@@ -129,9 +127,7 @@ Set Alias$@RunType_F81 /<Browse$Dir>.!Run -jss %%*0
| And finally, run the application.
WimpSlot -Min 5120K -Max 5120K
WimpSlot -Min 8192K -Max 8192K
%UnSet ChangeFSI$Dir
|Run <Browse$Dir>.!RunImage -debug CMal,CFle %*0 2> Pipe:$.StdErr
|Run <Browse$Dir>.!RunImage -debug JScr %*0
Run <Browse$Dir>.!RunImage %*0
| !Run file for Browse
| (C) Acorn Computers Ltd. 1994
| (C) Tematic 2006
|
| Last modified: 08/10/1998
| Last modified: 02/03/2006
Set Browse$Dir <Obey$Dir>
......@@ -18,10 +18,10 @@ Set Alias$Open_URI_gopher <Browse$Dir>.!Run
| Support the ANT URL protocol
SetMacro Alias$URLOpen_HTTP Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_Gopher Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_File Run <Phoenix$Dir>.!Run -url %%*0
SetMacro Alias$URLOpen_FTP Run <Phoenix$Dir>.!Run -url %%*0
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
| Can't do much if we haven't got various key system resources...
......@@ -37,81 +37,62 @@ If "<Font$Italic>" = "" Then Set Font$Italic "Italic Oblique Slant"
| HTTP fetcher controls
Set Browse$AcceptAllCookies off
UnSet Browse$CookieFile
UnSet Browse$CookieFileFormat
Set Browse$AcceptAllCookies off
Set Browse$CookieFile Browse:User.Cookies
Set Browse$CookieFileFormat 2
| Fundamental modules
RMEnsure WindowManager 3.98 Error Browse requires version 3.98 or later of the WindowManager ('nested WIMP') module
| Ensure specific versions of Toolbox modules (or later ones)
| are present
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
RMEnsure IconBar 1.18 RMLoad System:Modules.Toolbox.IconBar
RMEnsure IconBar 1.18 Error Browse requires version 1.18 or later of the IconBar module
RMEnsure ProgInfo 0.14 RMLoad System:Modules.Toolbox.ProgInfo
RMEnsure ProgInfo 0.14 Error Browse requires version 0.14 or later of the ProgInfo module
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
RMEnsure ToolAction 0.15 RMLoad System:Modules.Toolbox.ToolAction
RMEnsure ToolAction 0.15 Error Browse requires version 0.15 or later of the ToolAction module
RMEnsure PrintDBox 0.14 RMLoad System:Modules.Toolbox.PrintDBox
RMEnsure PrintDBox 0.14 Error Browse requires version 0.14 or later of the PrintDBox module
RMEnsure FontMenu 0.21 RMLoad System:Modules.Toolbox.FontMenu
RMEnsure FontMenu 0.21 Error Browse requires version 0.21 or later of the FontMenu module
RMEnsure TextGadgets 0.19 RMLoad System:Modules.Toolbox.TextGadget
RMEnsure TextGadgets 0.19 Error Browse requires version 0.19 or later of the TextGadgets module
| Important networking modules
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
RMEnsure AcornHTTP 0.84 RMLoad System:Modules.Network.URL.HTTP
RMEnsure AcornHTTP 0.84 Error Browse requires version 0.84 or later of the HTTP module
RMEnsure FileFetcher 0.38 RMLoad System:Modules.Network.URL.File
RMEnsure FileFetcher 0.38 Error Browse requires version 0.38 or later of the File module
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
RMEnsure GopherFetcher 0.12 RMLoad SysteM:Modules.Network.URL.Gopher
RMEnsure GopherFetcher 0.12 Error Browse requires version 0.12 or later of the Gopher module
RMEnsure MimeMap 0.05 RMLoad System:Modules.Network.MimeMap
RMEnsure MimeMap 0.05 Error Browse requires version 0.05 or later of the MimeMap module
| TaskModule for catching service calls (not required for
| some UIs, so let it fail silently); also the URI handler,
| which may be present but can do without it.
RMEnsure AcornURI 0.12 RMLoad System:Modules.Network.URI
RMEnsure TaskModule 0.11 RMLoad System:Modules.TaskModule
| Both of the above start Wimp task sides, so want to do a
| Toolbox modules
<Browse$Dir>.RMTry -app Browse -name Toolbox -version 1.43 -path System:Modules.Toolbox.Toolbox
<Browse$Dir>.RMTry -app Browse -name IconBar -version 1.18 -path System:Modules.Toolbox.IconBar
<Browse$Dir>.RMTry -app Browse -name ProgInfo -version 0.14 -path System:Modules.Toolbox.ProgInfo
<Browse$Dir>.RMTry -app Browse -name Window -version 1.54 -path System:Modules.Toolbox.Window
<Browse$Dir>.RMTry -app Browse -name Menu -version 0.33 -path System:Modules.Toolbox.Menu
<Browse$Dir>.RMTry -app Browse -name ToolAction -version 0.15 -path System:Modules.Toolbox.ToolAction
<Browse$Dir>.RMTry -app Browse -name PrintDBox -version 0.14 -path System:Modules.Toolbox.PrintDBox
<Browse$Dir>.RMTry -app Browse -name FontMenu -version 0.21 -path System:Modules.Toolbox.FontMenu
<Browse$Dir>.RMTry -app Browse -name TextGadgets -version 0.28 -path System:Modules.Toolbox.TextGadget
| Fetchers
<Browse$Dir>.RMTry -app Browse -name URL_Fetcher -version 0.41 -path System:Modules.Network.URL.URL
<Browse$Dir>.RMTry -app Browse -name AcornHTTP -version 0.84 -path System:Modules.Network.URL.HTTP
<Browse$Dir>.RMTry -app Browse -name FileFetcher -version 0.38 -path System:Modules.Network.URL.File
<Browse$Dir>.RMTry -app Browse -name FTPFetcher -version 0.32 -path System:Modules.Network.URL.FTP
| Other networking modules
<Browse$Dir>.RMTry -app Browse -name MimeMap -version 0.05 -path System:Modules.Network.MimeMap
| General support modules
<Browse$Dir>.RMTry -app Browse -name DragAnObject -version 0.09 -path System:Modules.DragAnObj
| Try to get a new enough version of the URI handler. The module
| is not required, but its services will be used if available.
<Browse$Dir>.RMTry -silent -app Browse -name AcornURI -version 0.12 -path System:Modules.Network.URI
| The URI handler has a Wimp task side, so we want to do a
| '*Desktop' when inside the application after Wimp_Initialise
| to start those tasks. Set a system variable if this is NOT
| needed.
| to start it. Set a system variable if this is NOT needed.
Set Browse$IssueDesktopCommand "yes"
RMEnsure AcornURI 0.12 Set Browse$IssueDesktopCommand "no"
RMEnsure TaskModule 0.11 If "<Browse$IssueDesktopCommand>" = "yes" Then Set Browse$IssueDesktopCommand "no"
RMEnsure AcornURI 0.12 Set Browse$IssueDesktopCommand "no"
| JPEG support for OS versions without this in SpriteExtend;
| again, not technically essential so let this fail too.
| JPEG support for OS versions without this in SpriteExtend.
RMEnsure SpriteExtend 0.99 RMEnsure JPEGMsgs 0.00 RMLoad System:Modules.JPEGMsgs
RMEnsure SpriteExtend 0.99 RMEnsure JPEGRender 0.00 RMLoad System:Modules.JPEGRender
| | Get round the 'problematic' last stage of the printer protocol
|
| Set Alias$@PrintType_FF4 "Copy %%0 Printer: ~A ~C ~D F ~L ~N ~P ~Q ~R ~S ~T ~V"
| Routine actions...
IconSprites <Browse$Dir>.!Sprites
Set Browse$Sprites "<Browse$Dir>.!Sprites"
IconSprites <Browse$Sprites>
Set File$Type_FAF HTML
Set File$Type_F91 URI
......@@ -124,13 +105,7 @@ Set Alias$@RunType_FAF /<Browse$Dir>.!Run -html %%*0
Set Alias$@RunType_F91 /<Browse$Dir>.!Run -uri %%*0
Set Alias$@RunType_F81 /<Browse$Dir>.!Run -jss %%*0
| Set the slot size and run the application. RISC OS 3 versions
| prior to RISC OS 3.5 need more memory allocated initially.
WimpSlot -Min 1024K -Max 1024K
If "<Boot$OSVersion>"="300" Then WimpSlot -Min 1152K -Max 1152K
If "<Boot$OSVersion>"="310" Then WimpSlot -Min 1152K -Max 1152K
If "<Boot$OSVersion>"="311" Then WimpSlot -Min 1152K -Max 1152K
| Set the slot size and run the application.
WimpSlot -Min 1280K -Max 1280K
Run <Browse$Dir>.!RunImage %*0
File added
| !Boot file for Phoenix
| (C) Castle Technology Limited 2005
| (C) Tematic 2006
|
| Last modified: 26/04/2005
| Last modified: 02/03/2006
Set Phoenix$Dir <Obey$Dir>
......@@ -25,7 +25,9 @@ SetMacro Alias$URLOpen_FTP Run <Phoenix$Dir>.!Run -url %%*0
| Routine actions...
IconSprites <Phoenix$Dir>.!Sprites
Set Phoenix$Sprites "<Phoenix$Dir>.!Sprites"
If "<Boot$OSVersion>" >= "500" Then Set Phoenix$Sprites "<Phoenix$Dir>.5Sprites"
IconSprites <Phoenix$Sprites>
Set File$Type_FAF HTML
Set File$Type_F91 URI
......
| !Boot file for Phoenix
| (C) Castle Technology Limited 2005
| (C) Tematic 2006
|
| Last modified: 26/04/2005
| Last modified: 02/03/2006
Set Phoenix$Dir <Obey$Dir>
......@@ -25,7 +25,9 @@ SetMacro Alias$URLOpen_FTP Run <Phoenix$Dir>.!Run -url %%*0
| Routine actions...
IconSprites <Phoenix$Dir>.!Sprites
Set Phoenix$Sprites "<Phoenix$Dir>.!Sprites"
If "<Boot$OSVersion>" >= "500" Then Set Phoenix$Sprites "<Phoenix$Dir>.5Sprites"
IconSprites <Phoenix$Sprites>
Set File$Type_FAF HTML
Set File$Type_F91 URI
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment