<document title="Fortune">
<define name="version" value="1.10">
<define name="date" value="6 December 2002" length=30 align="right">





<literal mode="Text">
=============================================================================
Fortune - Display a random fortune with the welcome banner       Version $$version$$

(C) Stephen Fryatt, 1997-2014                  $$date$$
=============================================================================

</literal>






<chapter title="Licence" file="Licence">

<cite>Fortune</cite> is licensed under the EUPL, Version&nbsp;1.1 only (the "Licence"); you may not use this work except in compliance with the Licence.

You may obtain a copy of the Licence at <link ref="#url http://joinup.ec.europa.eu/software/page/eupl">http://joinup.ec.europa.eu/software/page/eupl</link>

Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an &quot;<strong>as is</strong>&quot; basis, <strong>without warranties or conditions of any kind</strong>, either express or implied.

See the Licence for the specific language governing permissions and limitations under the Licence.

The source for <cite>Fortune</cite> can be found alongside this binary download, at <link ref="#url http://www.stevefryatt.org.uk/software">http://www.stevefryatt.org.uk/software</link>

The necessary libraries and build tools can be found at <link ref="#url http://www.stevefryatt.org.uk/software/build">http://www.stevefryatt.org.uk/software/build</link>

</chapter>





<chapter title="Introduction" file="Introduction">

<cite>Fortune</cite> is a small module to display a random fortune when the Desktop starts up, under the welcome banner.  It should work on any version of RISC OS from 3.1 onwards.  The module is 26/32 bit neutral and should work on RISC OS 5.

</chapter>





<chapter title="Installing Fortune" file="Install">

To install <cite>Fortune</cite> on a system with the new <file>!Boot</file> structure, copy the <file>Fortune</file> directory from this archive into <file>Choices:Boot.PreDesk</file>.

You will need to provide a file of fortunes for the module to use: these are in the form of a text file containing one fortune per line, with a carriage return (ASCII 10, the standard for normal RISC OS text files) between each one.  Files like this are freely available on the Internet.  Copy the file into the Fortune directory (a dummy file called Fortunes has been supplied with some rather silly lines in it).

Load the <file>Fortune.!Run</file> file into a text editor.  There is one line that needs to be edited for your specific fortunes file:

<codeblock>
Set Welcome$FortuneFile &lt;Obey$Dir&gt;.Fortunes
</codeblock>

where the <code>Fortunes</code> at the end should be changed to the name of the text file you have supplied. See the comments in the file for more details.

If you are not using the new <file>!Boot</file> you must ensure that the <cite>Fortunes</cite> module is loaded and the two system variables are set up before the Desktop is entered.  How this is achieved depends on how your boot sequence has been built.

</chapter>






<chapter title="Version History" file="History">

The following is a list of all the versions of <cite>Fortune</cite>.


<subhead title="1.00 (17 June 1997)">

<list>
<li>First version.
</list>


<subhead title="1.02 (16 September 2001)">

<list>
<li>Initial public release version.
</list>


<subhead title="1.10 (6 December 2002)">

Public Beta release.

<list>
<li>Module converted to new format and checked for 32-bit compatibility.
</list>


<subhead title="1.20 (2 February 2014)">

<list>
<li>Converted source to ObjAsm format and checked for ARMv7 compatibility.
<li>Count fortunes in file on loading, to avoid the need to set <code>&lt;Welcome$Fortunes&gt;</code> to the correct value (modification supplied by Martin Bazley).
<li>Ensure that <code>OS_Find&nbsp;0</code> is always called with a valid file handle (fix supplied by Martin Bazley).
</list>

</chapter>






<literal mode="Text">

Updates and Contacting Me
-------------------------

  If you have any comments about Fortune, or would like to report any
  bugs that you find, you can email me at the address below.

  Updates to Fortune and more programs for RISC OS computers can be
  found on my website at http://www.stevefryatt.org.uk/software/

  Stephen Fryatt
  email: steve@stevefryatt.org.uk
</literal>
