home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 29 / amigaformatcd29.iso / -readerstuff- / andrew_edmonds / c / wbrun.doc < prev    next >
Encoding:
Text File  |  1998-05-28  |  4.0 KB  |  89 lines

  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2. /* |_o_o|\\ Copyright (c) 1986 The Software Distillery.  All Rights Reserved */
  3. /* |. o.| || This program may not be distributed without the permission of   */
  4. /* | .  | || the authors.                                                    */
  5. /* | o  | ||    Dave Baker    Ed Burnette        Stan Chow         BBS:      */
  6. /* |  . |//     Jay Denebeim  Gordon Keener      Jack Rouse   (919)-471-6436 */
  7. /* ======       John Toebes   Mary Ellen Toebes  Doug Walker                 */
  8. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  9.  
  10. WBRun II by John Toebes © 1986, 1988 The Software Distillery.
  11.  All Rights Reserved
  12.  235 Trillingham Ln, Cary, NC 27513
  13.  
  14. Contributions to continue development of this and other fine products for the
  15. Amiga should be sent to the Software Distillery at the above address.
  16.  
  17. Other Products produced by the Software Distillery are:
  18.    BLINK     - the Turbo-charged Alink replacement
  19.    POPCLI    - Screen saver and Pop up CLI hotkey
  20.    HACK      - The Amiga port of the famous UNIX game
  21.    MAKE      - A software development tool one shouldn't be without
  22.    KERMIT    - The World renown file transfer protocol brought to the Amiga
  23.    ICONEXEC, SETALTERNATE, SETWINDOW - Icon manipulation tools
  24.    TSIZE     - A short utility for determining directory sizes.
  25. All of these are available on our BBS.
  26.  
  27. Permission is hereby granted to distribute this program provided both this
  28. documentation accompanies the executable and that no charge is made for its
  29. distribution.  Contributions to the distillery are encouraged.  If you wish
  30. to include this program in a comercial product, contact us first.
  31.  
  32. WBRun is a program designed to allow any program to be invoked from CLI yet
  33. behave as if it were invoked from Workbench.  Note that workbench need not
  34. be loaded!  This is a boon for people who are short on memory and do not
  35. wish the extra overhead of workbench.
  36.  
  37. This permits running programs created with AmigaBasic and TrueBasic (or
  38. any other application that creates a workbench project icon) from CLI
  39. as either a turnkey application or even in a startup-sequence.
  40.  
  41. To invoke a program with WBRun you need to execute the command:
  42.   WBRun <icon1> <icon2> ...
  43.  
  44. Where <icon1> is the primary program to be run.  The name must correspond
  45. to a workbench Icon.  <icon2> and subsequent parameters are taken as 
  46. workbench arguments to be passed to the primary program.
  47.  
  48. For example:
  49.    To run Initialize:
  50.       WBRun SYS:System/Initialize
  51.  
  52.    To run a program (call it Printit) that takes arguments (normally shift
  53.    clicked on) you would type
  54.       WBRun Printit Arg1 Arg2
  55.  
  56. To run an AmigaBasic Program:
  57.   WBRun myprogram
  58.  
  59. Note that the arguments must be qualified if they are not in the current
  60. directory.
  61.  
  62. Supressing the Copyright message:
  63.   If you are building a turnkey application that you do not wish to have
  64. display the WBRun copyright message, you may supress it with the CLI
  65. redirection features:
  66.    WBRun >NIL: MyApplication
  67.  
  68. If you do this, you must give credit to the Software Distillery in your
  69. application.
  70.  
  71. Known Bugs:
  72.   None so far...
  73.  
  74. How it works:
  75.   WBRun simulates a phoney workbench by building an argument list of the
  76. locks and names corresponding to the command line arguments.  It then opens
  77. up the disk object for the first argument to determine the tool type.  For
  78. a TOOL it simply invokes that program, for a Project it determines the
  79. default tool to be invoked.  Once the program to be invoked is determined,
  80. it does a LoadSeg on it, CreateProc and sends the startup message to the
  81. newly created task.  Finally it waits for the response message from the
  82. task before terminating.  All resources allocated are freed upon completion
  83. or any error.
  84.  
  85. The code is written completely in Lattice C under 5.02 taking advantage
  86. of Blink and CBack.  Without messages to make it user friendly it is a
  87. shade over 2K, the messages and minimal IO support raise it to 4956 bytes.
  88. Note that all this is done without making any serious attempts at optimization.
  89.