home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / boota / !!ReadMe
Encoding:
Text File  |  1993-06-02  |  21.4 KB  |  529 lines

  1.  
  2. !BootA Version 2.01 - 02 June 1993
  3. ----------------------------------
  4.  
  5. CONTENTS OF THE BOOTA_ETC DIRECTORY
  6.  
  7. The BootA_Etc directory contains the !BootA application plus
  8. several other applications which provide examples of how to use
  9. !BootA.
  10.  
  11.  
  12. PURPOSE OF THIS DOCUMENT
  13.  
  14. This document is intended to provide an introduction to the
  15. !BootA application. The !Help file in the !BootA application
  16. directory provides reference information on using !BootA once you
  17. have read this introduction.
  18.  
  19.  
  20. INTRODUCTION TO !BOOTA
  21.  
  22. !BootA is a RISC OS desktop application which provides a simple
  23. front-end for running non WIMP-based applications and utilities
  24. as if they themselves were proper desktop applications.
  25.  
  26. Such utilities would normally have to be started by command
  27. outside the desktop environment, or from within an !Edit task
  28. window, or at the very least by pressing f12 in the desktop in
  29. order to enter the command.
  30.  
  31. By using !BootA as a front-end, the application or utility looks
  32. very much like any normal RISC OS desktop application. It has an
  33. application directory on which you double click to install the
  34. application on the icon bar, and you can then drag files to this
  35. icon for processing by the application.
  36.  
  37. All the applications accompanying !BootA (e.g. !Lock, !UnLock,
  38. etc) are actually examples of using !BootA as a front-end for non
  39. Wimp-based applications. These are referred to below (and in the
  40. !BootA !Help file) as 'client applications' to emphasise that
  41. they rely on !BootA to do many of the things for them that a real
  42. RISC OS desktop application does for itself.
  43.  
  44.  
  45. TRYING OUT !BOOTA
  46.  
  47. The !BootA application itself is set up so that when you double
  48. click on it, you install all these example 'client applications'.
  49. Normally, you would never do this. Rather, you would double click
  50. on whichever individual 'client application' you wanted to
  51. install. This would automatically start up !BootA, although no
  52. icon for !BootA itself would appear on the icon bar, only the
  53. icon for the client application.
  54.  
  55. However, on this occasion, to get a feel for the use of !BootA,
  56. double click on the !BootA icon to install the icons for all the
  57. example client applications. Then click the mouse menu button
  58. over these icons one by one, chosing 'Help' for each one. This
  59. will give you a brief summary of what each application does. You
  60. can also move the mouse pointer over the arrow at the right of
  61. the 'CmdOpts' option on these menus. This will display a dialogue
  62. box for entering additional input for the application. Some of
  63. the applications will have default 'CmdOpts' information, others
  64. will have none.
  65.  
  66. One of the icons installed on the icon bar will be for the !Dummy
  67. application, which does nothing but echo some information to your
  68. screen and is a silhouette of a dummy's face. Click on this to
  69. see what happens. Then drag to it any file or directory icon and
  70. again observe the result. Try changing the 'CmdOpts' information
  71. for !Dummy and repeating the above.
  72.  
  73.  
  74. SUMMARY OF !BOOTA FUNCTIONS
  75.  
  76. To summarise, !BootA provides the following services for its
  77. client applications:
  78.  
  79.  -  installing the client application's icon on the icon bar when
  80.     you double-click the mouse SELECT (or ADJUST) buttons on that
  81.     application's icon in a directory viewer window
  82.  
  83.  -  displaying a menu with a 'quit' choice when you click the
  84.     mouse MENU button on the installed icon, and removing it from
  85.     the icon bar if you chose this 'quit' option
  86.  
  87.  -  providing a 'help' option in the same menu and displaying a
  88.     brief help message if you chose this 'help' option
  89.  
  90.  -  running the client application when you click the mouse
  91.     SELECT or ADJUST buttons on the installed icon, or when you
  92.     drag a file or directory to it (clicking ADJUST over the
  93.     installed icon will also remove it from the icon bar)
  94.  
  95.  -  responding to requests for help text from the '!Help'
  96.     application (which displays the text in an 'Interactive help'
  97.     window)
  98.  
  99.  -  supplying additional input ('command options') to the client
  100.     application when it is run.
  101.  
  102.  -  changing the sprite used to display the client application
  103.     icon on the icon bar when requested to do so (see description
  104.     of BootAutil program below for more details of this).
  105.  
  106. As touched on above, you do not need to install the !BootA
  107. application before installing the first client application on the
  108. icon bar. !BootA is automatically activated when you double-click
  109. on a client application icon in the directory viewer window, and
  110. becomes resident in memory at that point.
  111.  
  112. Note that at this time, the client application itself has NOT
  113. been started and is NOT using any memory. Only !BootA is actually
  114. active and using memory. !BootA simply records the whereabouts of
  115. the client application directory so that it can issue the
  116. appropriate '*RUN' command when the time comes. However, this
  117. does mean that the client application directory must be
  118. accessible at that time - no problem with a hard disk, but with a
  119. floppy-disks RISC OS may call for the diskette to be re-inserted
  120. if it has been removed in the meantime.
  121.  
  122. When you install a second client application (by double clicking
  123. on its icon in a directory viewer), this initially causes another
  124. copy of !BootA to start-up, but this second copy immediately
  125. realises that the first copy is active and passes the
  126. responsibility for the client application to it and then shuts
  127. down. This means that only one copy of !BootA will be resident in
  128. memory regardless of the number of client applications installed
  129. Note: installing a large number of client applications may cause
  130. !BootA's memory allocation to expand as it adds details of the
  131. additional applications to its internal tables.
  132.  
  133. Double-clicking on the !BootA icon itself will cause !BootA to
  134. start up and to automatically install a list of client
  135. applications contained in the '!Init' file of the !BootA
  136. directory. This list is initially set up to include all the
  137. example client applications, so you should edit it to eliminate
  138. the ones you do not want installed in this way (note: !BootA will
  139. ignore any item in the list that begins with '|').
  140.  
  141. See the '!Help' file in the !BootA directory for more details.
  142.  
  143.  
  144. CONTENTS OF !BOOTA APPLICATION DIRECTORY
  145.  
  146. The !BootA application directory contains the following files:
  147.  
  148.     !Run       -  obey file to install and start up !BootA
  149.     !RunImage  -  !BootA application program
  150.     !Sprites   -  sprite file containing !BootA sprite
  151.     !Help      -  help text (displayed when HELP chosen from filer menu)
  152.     !Init      -  list of clients installed by !Run
  153.     !Auto      -  suggested list of clients to start
  154.                   automatically from the desktop boot file
  155.     BootAutil  -  additional utility for dynamically changing
  156.                   sprite used for client application icon on icon
  157.                   bar (see below for more details)
  158.  
  159. SUMMARY OF THE EXAMPLE CLIENT APPLICATIONS
  160.  
  161. The following example client applications accompany !BootA:
  162.  
  163.     !Dummy     -  demonstrates how a client application works
  164.     !FileInfo  -  issues *FILEINFO command against a file
  165.     !Ex        -  issues *EX command against a directory
  166.     !SetType   -  issues *SETTYPE command against a file
  167.     !Lock      -  issues *ACCESS ... LR command against a file
  168.     !UnLock    -  issues *ACCESS ... WR command against a file
  169.     !SetDir    -  sets the curently selected directory
  170.     !CCompile  -  invokes the Acorn ANSI C compiler
  171.     !Compare   -  compares two files
  172.     !1stMake   -  converts text file to 1stWord+ file
  173.     !1stUnMake -  converts 1stWord+ file to text file
  174.     !BasicEdit -  loads Basic program file into the Basic Editor
  175.     !Twin      -  loads file into the Twin editor
  176.     !ARCtoIBM  -  changes end-of-line delimiters from LF to CRLF
  177.     !IBMtoARC  -  changes end-of-line delimiters from CRLF to LF
  178.     !BootA     -  removes IBM mainframe style line numbers from file
  179.  
  180. See  below for more details of these client applications.
  181.  
  182. The client application directories will typically contain the
  183. following files:
  184.  
  185.     !Run       -  obey file to start up !BootA to install client icon
  186.     !RunA      -  obey file used by !BootA to run the client appl.
  187.     !HelpMsg   -  text for menu 'help' option & interactive !Help
  188.     !CmdOpts   -  initial value for command options data
  189.     !Sprites   -  usual RISC OS application sprites file
  190.     !Boot      -  usual RISC OS application boot file
  191.     !RunImage  -  application program
  192.  
  193. Of these files, only '!Run' and '!RunA' are mandatory. All the
  194. others are optional, depending on the requirements of the
  195. particular client application.
  196.  
  197. !BootA requires a minimum of 32K of memory. This is enough to
  198. install approximately ten to fourteen client applications,
  199. depending on the amount of help message text and command options
  200. text in total. This memory allocation will automatically expand
  201. if more space is needed, taking it from the computer's free
  202. memory (a feature of the shared C-library version 3.75 or later).
  203. If there is no more free memory, !BootA will display a normal
  204. Wimp_ReportError message and then terminate (which will
  205. automatically de-install all the client icons).
  206.  
  207.  
  208. C-SOURCE DIRECTORY
  209.  
  210. In addition to the example applications, there is one non-
  211. application directory accompanying !BootA: the 'C-source'
  212. directory.
  213.  
  214. The 'C-source' directory contains the C source and header files
  215. for the 1stMake, 1stUnMake, ARCtoIBM, IBMtoARC, UnNum and BootA
  216. application programs, plus three files of common functions:
  217. ArgFuncs, Beep and GetDirs (note that the source files have a
  218. file type of "00C" and the header files a file type of "00D" -
  219. this is a whim of mine and these filetypes correspond to sprites
  220. contained in the !CCompile application). It also contains the
  221. assembler source for the BootAutil program (which was assembled
  222. using the Acorn AAsm assembler), and the make files for the above.
  223.  
  224.  
  225. ADDITIONAL DETAILS OF THE EXAMPLE CLIENT APPLICATIONS
  226.  
  227. Most of these client applications are (deliberately) trivial in
  228. order to provide simple examples of the use of !BootA. Some of
  229. them are useless, or outclassed by other generally available
  230. applications, or obsoleted by RISC OS 3. Some may actually be
  231. useful.
  232.  
  233.  
  234. (1)  !Dummy application
  235.  
  236.      This example application does nothing but display
  237.      information on the screen using 'Echo' commands in its !RunA
  238.      file. This information includes a mock-up of the command
  239.      that !BootA generates to start up a client application, so
  240.      providing an insight into how a client application is run.
  241.      This is achieved by the following command in the !RunA
  242.      file for !Dummy:
  243.  
  244.           Echo *WimpTask Run <Obey$Dir>.!RunA %*0
  245.  
  246.      which, after the values assigned to 'Obey$Dir' and '%*0'
  247.      have been substituted for the variables, will display the
  248.      equivalent of the command issued internally by !BootA.
  249.  
  250.      After installing the !Dummy icon (by double clicking on it),
  251.      just drag to it the icon for any file, directory or
  252.      application directory to see what 'Run' command will result.
  253.      Experiment with changing the 'CmdOpts' value (via the
  254.      'CmdOpts' option on the menu) to see how this is inserted
  255.      into the command.
  256.  
  257.      The !RunA file also includes other 'Echo' commands to
  258.      display the system variables set by !BootA before issuing
  259.      the 'Run' command.
  260.  
  261.  
  262. (2)  !FileInfo application
  263.  
  264.      This trivial example provides a quick means of issuing the
  265.      '*FileInfo' command against a file (or directory). The !RunA
  266.      file includes the following command:
  267.  
  268.           FileInfo %*0
  269.  
  270.      It is, of course, obsoleted by RISC OS 3, which provides an
  271.      'Info' option on its filer menu.
  272.  
  273.  
  274. (3)  !Ex application
  275.  
  276.      This trivial example provides a quick means of issuing the
  277.      EX command against a directory. The !RunA file includes the
  278.      following command:
  279.  
  280.           Ex <BootA$Dir>
  281.  
  282.      making use of one of the system variables set by !BootA
  283.      before running the client application. If a file is dragged
  284.      to the !Ex icon, then the result will be an '*EX' command
  285.      issued for the directory containing that file.
  286.  
  287.  
  288. (4)  !SetType application
  289.  
  290.      This example shows how easy it is to set up a simple
  291.      application using a 'CmdOpts' value. The !RunA file contains
  292.      the command:
  293.  
  294.           Settype %*0
  295.  
  296.      and the !CmdOpts file contains the default filetype of
  297.      'text'. Dragging a file to the installed 'SetType' icon will
  298.      set that file's type to 'text'. Update the 'CmdOpts' data
  299.      via menu option 'CmdOpts' to chose a different type. This
  300.      application is less sophisticated than many of the 'SetType'
  301.      applications already in the public domain and is obsoleted
  302.      by RISC OS 3 which has a 'Set type' option on the filer
  303.      menu.
  304.  
  305.  
  306. (5)  !Lock application
  307.  
  308.      This !RunA file for this application includes the command:
  309.  
  310.           Access %*0
  311.  
  312.      and the CmdOpts value is set to 'LR'. Drag any file or
  313.      directory icon to the !Lock icon to lock the file. This can
  314.      often be much quicker and convenient than using the 'Access'
  315.      option from the filer menu. This application is also
  316.      obsoleted by RISC OS 3, which has a much more convenient
  317.      'Access' option on the filer menu.
  318.  
  319.  
  320. (6)  !UnLock application
  321.  
  322.      This is almost identical to the !Lock application. The only
  323.      difference is that CmdOpts value is set to 'WR' and the
  324.      !Sprites file contains a different icon. Drag any file or
  325.      directory icon to the !Unlock icon in order to unlock it.
  326.      Like !Lock, this application is obsoleted by RISC OS 3.
  327.  
  328.  
  329. (7)  !SetDir application
  330.  
  331.      Drag a directory to the installed SetDir icon to make that
  332.      directory the 'current' directory. Dragging a file instead
  333.      of a directory will set the current directory to the
  334.      directory containing the dragged file. Click on the
  335.      installed SetDir icon to set the root directory of the
  336.      current drive as the current directory.
  337.  
  338.  
  339. (8)  !CCompile application
  340.  
  341.      This application will invoke the AcornSoft ANSI C compiler
  342.      to compile a C source file (assuming you have the C compiler
  343.      installed in the library on your system!). The current
  344.      directory is set to the parent of the one containing the
  345.      dragged file (according to the normal practice for using the
  346.      ANSI C compiler). The 'CmdOpts' are initially set to
  347.      '-c -list' so that only compilation occurs and a compilation
  348.      listing is generated (including any error messages).
  349.  
  350.  
  351. (9)  !Compare application
  352.  
  353.      Drag two files to this icon to compare them to see if they
  354.      are the same. The !RunA file invokes a program in the same
  355.      directory to perform the actual comparison. This program is
  356.      a very simple comparison utility which reports if the file
  357.      contents and catalog information match. This example shows
  358.      how easy it is to process two files by writing a !RunA obey
  359.      file to save the details of the first file dragged to it
  360.      until a second is dragged. The !RunA obey file for this
  361.      client application also contains commands to run the
  362.      BootAutil program in order to change the sprite used for
  363.      the !Compare icon on the icon bar.
  364.  
  365.  
  366. (10) !1stMake application
  367.  
  368.      Drag a text file to the installed 1stMake icon to convert it
  369.      to a 1stWord+ document. Click on the 1stMake icon to see the
  370.      syntax of the 1stMake command. This application shows how a
  371.      traditional command orientated utility (which 1stMake is)
  372.      can be set up as a convenient-to-use desktop application.
  373.  
  374.  
  375. (11) !1stUnMake application
  376.  
  377.      Drag a 1stWord+ document file to the installed 1stUnMake
  378.      icon to convert it to a plain text file. Click on the
  379.      1stUnMake icon to see the syntax of the 1stUnMake command.
  380.      This application is just the reverse of 1stMake and is
  381.      similarly structured.
  382.  
  383.  
  384. (12) !BasicEdit application
  385.  
  386.      Drag a basic program file here to load it into the Basic
  387.      Editor (a text file can also be dragged and will be
  388.      automatically tokenised by BASIC). The current directory is
  389.      set to the directory containing the dragged file (and
  390.      restored afterwards). The !RunA file also sets two function
  391.      keys - f4 to issue an '*QUIT' command (to return to the
  392.      desktop after returning from the Basic Edit to BASIC) and f2
  393.      to issue an 'EDIT.' command (to re-invoke the Basic Editor
  394.      after returning to BASIC). This application is obsoleted by
  395.      the version of !Edit in RISC OS 3, which provides a desktop
  396.      compliant way of editing BASIC programs.
  397.  
  398.  
  399. (13) !Twin application
  400.  
  401.      This application assumes you have Twin installed in the ADFS
  402.      library on your system. Drag a file here to load it into
  403.      Twin, set the colours to a nice (?) yellow on black and set
  404.      the current directory to the directory containing the
  405.      dragged file (and restore it afterwards). There are still
  406.      some things that Twin does better than anything else!
  407.  
  408.  
  409. (14) !ARCtoIBM
  410.  
  411.      This application changes Archimedes end-of-line characters
  412.      (LF) to DOS format end-of-line characters (CRLF). Drag a
  413.      file here to convert it and replace the existing file with
  414.      the updated file. Drag a directory here to convert all the
  415.      files therein.
  416.  
  417.  
  418. (15) !IBMtoARC
  419.  
  420.      This application changes DOS format end-of-line characters
  421.      (CRLF) to Archimedes end-of-line characters (LF). Drag a
  422.      file here to convert it and replace the existing file with
  423.      the updated file. Drag a directory here to convert all the
  424.      files therein.
  425.  
  426.      With RISC OS 3, you can use this to convert DOS files in-
  427.      situ on the DOS diskette, then edit the files using !Edit
  428.      without the annoying '[0d]' at the end of each line, and
  429.      finally convert the edited files back to DOS mode again in-
  430.      situ by using !ARCtoIBM.
  431.  
  432.  
  433. (16) !UnNum application
  434.  
  435.      This application deletes line sequence numbers from IBM
  436.      mainframe style files. It is obviously a specialised
  437.      utility which was written to meet a particular need. Drag a
  438.      text file to the !UnNum icon after it has been installed on
  439.      the icon bar to 'unnumber' it, or drag a directory to the
  440.      !UnNum icon to 'unnumber' all text files in the directory.
  441.      These text files must be correctly sequenced numbered in the
  442.      first place and must not contain any unprintable characters
  443.      or they will be rejected by !UnNum.
  444.  
  445.  
  446. BOOTAUTIL PROGRAM
  447.  
  448. This program is included in the !BootA application directory and
  449. can be executed from a client application's !RunA file by issuing
  450. a command such as the following:
  451.  
  452.      *Run <BootA$Appl>.BootAutil -sprite newname
  453.  
  454. which will send a message to BootA requesting that sprite 'newname'
  455. should be used for displaying the client application's icon on the
  456. icon bar. The sprite 'newname' must already be loaded into the Wimp
  457. sprite pool (best done by including it in the !sprites file for the
  458. client application).
  459.  
  460. The !Compare application provides an example of the use of
  461. BooyAutil. When first installed by BootA, the sprite used to
  462. display its icon on the icon bar is '!compare'. As soon as a file
  463. is dragged to this icon, the sprite is changed to 'compare0' to
  464. indicate that it is now waiting for the second file. When a
  465. second file is so dragged, the sprite is changed to 'compare1'
  466. and the comparison takes place. When the comparison is finished
  467. (or if you click on the icon to 'reset' it, rather than dragging
  468. a file to it), the sprite is changed back to '!compare'. The
  469. !sprites file for !Compare contains all three sprites:
  470. '!compare', 'compare0' and 'compare1'; so that when the directory
  471. viewer first sees the !Compare application directory, all three
  472. sprites are loaded into the Wimp sprite pool.
  473.  
  474. When using replacement sprites in this way, all should be of the
  475. same size. The icon bounding box will be set by the first sprite
  476. displayed (i.e. the sprite with the same name as the application
  477. itself).
  478.  
  479. BootAutil has a file type of 'absolute' which means that when run
  480. it loads into the application workspace at &8000. This is the
  481. same area used by other application programs (e.g. programs
  482. written in Basic, C, etc), so that it is not a good idea to issue
  483. the command to run BootAutil from within such an application
  484. program as BootAutil will replace the issuing program in the
  485. application workspace (although it could be used as a way of
  486. intentionally ending the application and updating its icon on the
  487. icon bar at the same time). BootAutil should normally be run from
  488. the client application's !RunA obey file.
  489.  
  490. BootAutil accepts three arguments:
  491.  
  492.      -sprite xxxx  -  specifies name of sprite to be used (sprite
  493.                       should already be loaded into the Wimp
  494.                       sprite pool)
  495.  
  496.      -quit         -  requests BootA to remove the client's icon
  497.                       from the icon bar (same effect as 'Quit' on
  498.                       the menu)
  499.  
  500.      -handle nnnn  -  supplies the handle identifying the
  501.                       client's icon; BootA sets system variable
  502.                       'BootA$Handle' to this handle before
  503.                       running the client's !RunA obey file; if
  504.                       '-handle' is not specified then BootAutil
  505.                       uses the value of the system variable.
  506.  
  507.  
  508. CHANGE HISTORY
  509.  
  510. Version 2.00 (15 December 1991) - first publically distributed version
  511.  
  512. Version 2.01 (02 June 1993)     - 1stMake, 1stUnMake, ARCtoIBM, IBMtoARC
  513.                                   and UnNum example applications updated
  514.                                   to work with SparkFS archives
  515.  
  516. COPYRIGHT NOTICE
  517.  
  518. BootA, BootAutil, 1stMake, 1stUnMake, ARCtoIBM, IBMtoARC and UnNum
  519. are subject to Copyright.
  520.  
  521. Permission is granted by the author to any recipient of this
  522. material to use and make/disseminate copies of the application
  523. provided that no charges are made for doing so (other than to
  524. cover any cost of media or postage) and that this notice is
  525. included with all copies.
  526.  
  527. Paul Witheridge  - 02 June 1993.
  528.  
  529.