home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / MDSK14.ZIP / MakeDesk.txt < prev    next >
Text File  |  1993-02-10  |  13KB  |  349 lines

  1. MakeDesk v1.30 - Copyright 1993, Matthew Palcic
  2. All rights reserved.  Distributed as Freeware.
  3. ------------------------------------------------------------------------
  4.  
  5. Welcome to MakeDesk.  This product grew out of the need to provide a
  6. means to consistently create desktop configurations.
  7.  
  8. After making several OS/2 installations, each desktop was just a little
  9. bit different. It wasn't worth the hassle to make them all identical by
  10. changing the settings of each object.  Questions ran through my mind.
  11. What happens when we have 100 OS/2 machines and each configuration is
  12. just a little bit different?  What happens when we realize we need to
  13. make a change to the settings for Paradox 4.0 on every machine that runs
  14. it?  Who's going to run around and change them?  Who will accurately
  15. adjust the settings for objects on a new OS/2 installation?  Have fun
  16. pulling your hair out as you play a lot of sneaker net or just say
  17. "forget it" altogether.
  18.  
  19. If you are using a machine at home those questions might not bother you.
  20. But what happens when technical support tells you to do a Ctrl-Alt-F1 to
  21. "restore" your default CONFIG.SYS, OS2.INI, OS2SYS.INI?  You lose all of
  22. your customizations made to your desktop since installation.  What
  23. happens if your system bombs so bad you have to reinstall?  What happens
  24. if you are running a beta copy of OS/2 and have to reformat to apply the
  25. beta?  Have fun recreating your desktop each time.
  26.  
  27. MakeDesk allows you to easily manipulate desktop objects through the use
  28. of object definition (.DEF) files.  This includes creating, replacing
  29. and updating objects such as programs, folders, shadows, etc.  With
  30. MakeDesk you can easily associate the correct icons with your program
  31. objects every time and adjust DOS Settings for each DOS box using simple
  32. SET commands. You can also consistently create object definitions for
  33. all major applications used throughout your corporation.  Additionally,
  34. you'll save yourself hours of fiddling with settings each time you lose
  35. your desktop.
  36.  
  37. As much as I like the Workplace Shell, it's not perfect.  If I install
  38. OS/2 and spend a fair amount of time customizing it, what guarantee do I
  39. have that it will not get corrupted?  Unfortunately, I have none. After
  40. losing too many customizations, I wrote MakeDesk.
  41.  
  42. MakeDesk is a powerful REXX script that provides a simple definition
  43. language for creating objects for the Workplace Shell.  The REXX
  44. component of OS/2 2.0 must be installed for this script to operate.
  45.  
  46. Create a .DEF file with the object definitions you require.  Then run
  47. MakeDesk, passing your .DEF file as a parameter.
  48.  
  49.  
  50. Program command line parameters:
  51. ------------------------------------------------------------------------
  52.  
  53.   Syntax:
  54.     MakeDesk [/a,/d] deffile
  55.  
  56.   Parameters:
  57.     /a        process all objects in definition file without prompts
  58.     /d        disable ANSI colorization of display
  59.     deffile   Definition (.DEF) file to process
  60.  
  61. Parameters in brackets are optional.  Parameters separated by commas can
  62. be combined.  Parameters separated by a '|' are mutually exclusive.
  63. Example: MakeDesk /a /d mydesk.def
  64.  
  65. Running MakeDesk without any arguments will display a list of parameters
  66. so you won't have to refer to the documentation if you forget what your
  67. options are.
  68.  
  69.  
  70.  
  71.  
  72. Structure of a .DEF file:
  73. ------------------------------------------------------------------------
  74.  
  75. .DEF files consist of the following three commands and five subcommands:
  76.  
  77.   Commands:
  78.     '*'        - Comment
  79.     'Title'    - Declare an object block
  80.     'Define'   - Create a user-defined variable
  81.  
  82.   Subcommands:
  83.     '*'        - Comment
  84.     'Class'    - Declare the object class (i.e. WPFolder)
  85.     'Location' - Specifies where the object will live
  86.     'ObjectID' - Creates a handle for the object
  87.     'Setup'    - Set processing mode for the object
  88.  
  89.   All text after a 'Title' declaration and up to the next blank line
  90.   (and not considered a subcommand) is processed as a Setup String.
  91.  
  92.  
  93.  
  94.  
  95.   * (Comment)
  96.   ----------------------------------------------------------------------
  97.   Comments outside 'Title' blocks (command form) are displayed as they
  98.   are read from the .DEF file.  Comments inside 'Title' blocks
  99.   (subcommand form) are not displayed and are simply ignored.
  100.  
  101.   Examples:
  102.  
  103.     *Win-OS/2 object
  104.     *Required to run Quattro Pro
  105.  
  106.   This command/subcommand is not required.
  107.  
  108.  
  109.  
  110.  
  111.   Title
  112.   ----------------------------------------------------------------------
  113.   The title of the object is the name that will appear on the desktop.
  114.   To force a title to span multiple lines, use the '^' symbol before
  115.   each word that should be placed on the next line.  For instance,
  116.   'Windows^Apps' would use two lines.  If you use more than two lines,
  117.   you must separate the lines with a line-feed character.  See the
  118.   Define command for information on the ~LF~ variable.  The Title
  119.   command starts an object 'Title' block, which processes only
  120.   subcommands until the next blank line or the end of the file is
  121.   reached.
  122.  
  123.   Examples:
  124.  
  125.     Title Win-OS/2 3.1^Full Screen
  126.     Title Win-OS/2 3.1~LF~Full Screen~LF~256 Colors
  127.  
  128.   This command is required.
  129.  
  130.  
  131.  
  132.  
  133.   Define
  134.   ----------------------------------------------------------------------
  135.   'Define' is a slick way to create variables that you'll use throughout
  136.   an object definition file.  Typical use is for a directory name that
  137.   may change later, or for a folder ID you might reference in several
  138.   object definitions. The format is flexible, but you should try to
  139.   adopt a convention and stick with it.  Use symbols you won't be using
  140.   as title text or setup strings.  I use the '~' character on both ends
  141.   of my define names.  You can use any characters, or none at all as
  142.   long as you use a unique identifier. For example:
  143.  
  144.       Define ~MYVAR~ Something
  145.       Define $MYVAR Something else
  146.       Define MYVAR Something different
  147.  
  148.   Just be sure you use variable names you won't have to use as actual
  149.   text in your .DEF file.  A variable like STARTUP should be something
  150.   like $STARTUP$ instead.  In the first example above, anywhere in my
  151.   .DEF file that I use the variable ~MYVAR~, MakeDesk will substitute
  152.   the value 'Something' in its place.  Just think of it as a flexible
  153.   substitution feature that can save you from having to change the name
  154.   of a directory that you use in four or five object definitions.  I
  155.   list my 'Define' statements at the top of the file so that I can find
  156.   them easily.
  157.  
  158.   Define variables can not contain other symbols.
  159.  
  160.       Define ~OtherVAR~ SomeText~MYVAR~SomeText     <-- INVALID!
  161.  
  162.   The above example is invalid because the ~MYVAR~ symbol won't be
  163.   substituted.  In other words, variables are only substituted one level
  164.   deep.
  165.  
  166.   Example:
  167.  
  168.     Define ~CMDS~ D:\Cmds
  169.  
  170.   Note:  MakeDesk provides one predefined variable: ~LF~.  This variable
  171.          is used as a line-feed character to separate lines in a Title
  172.          declaration.  ~LF~ is also used to separate device driver lines
  173.          in the "SET DOS_DEVICE=..." DOS setting.  Example:
  174.  
  175.            SET DOS_DEVICE=DRIVER1.SYS~LF~DRIVER2.SYS
  176.  
  177.   This command is not required.
  178.  
  179.  
  180.  
  181.  
  182.   Class
  183.   ----------------------------------------------------------------------
  184.   Workplace Shell uses classes to determine the type of object you are
  185.   creating.  Folders, shadows, etc. are all examples of different kinds
  186.   of classes.  Folders use the WPFolder class.  Other applications may
  187.   add new class types to your system.  MakeDesk should be fully capable
  188.   of creating objects using new class types.  The method used to create
  189.   the objects shouldn't be dependent on building only 'stock' Workplace
  190.   objects.  MakeDesk also supports any object classes installed. For a
  191.   complete list of 'stock' object classes supported by OS/2 and their
  192.   associated setup strings, see the CrtObj.txt file.
  193.  
  194.   Example:
  195.  
  196.     Class WPShadow
  197.  
  198.   This subcommand is required.
  199.  
  200.  
  201.  
  202.  
  203.   Location
  204.   ----------------------------------------------------------------------
  205.   Objects have to live in a folder.  That folder can be the desktop, a
  206.   folder off the desktop, or some other directory on your system.
  207.   Locations are built one of two ways.  The first is simple; you use the
  208.   name of the directory in which you want to place the object:
  209.  
  210.       Location C:\OS2\MDOS
  211.  
  212.   The other method uses a "handle" to a folder.  You must know this
  213.   "handle" name ahead of time and already have it assigned.  You use the
  214.   name inside a pair of '< >' brackets:
  215.  
  216.       Location <WP_DESKTOP>
  217.  
  218.   For a list of 'stock' folder handles provided by the Workplace Shell
  219.   consult the CrtObj.txt file.  You can create your own handles, such as
  220.   <WORK_FOLDER>.  These handles can be used later to modify the settings
  221.   of the object.  See the description of ObjectID for more information
  222.   on handles.  You can't use a <OBJ_HANDLE> type of location unless the
  223.   folder was created using that handle.  Creating a folder using a
  224.   folder template will result in no handle name.
  225.  
  226.   Example:
  227.  
  228.     Location <WP_OS2SYS>
  229.  
  230.   This subcommand is required.
  231.  
  232.  
  233.  
  234.  
  235.   ObjectID
  236.   ----------------------------------------------------------------------
  237.   Although you don't need to use handles for folders, you should use
  238.   handles for program objects or any other objects you create.  If you
  239.   create a Win-OS/2 3.1 object called <WF_WIN31> you can later update
  240.   the settings for that object by referring to <WF_WIN31>.  These
  241.   ObjectID handles must be unique for each object.
  242.  
  243.   Suppose you create your <WF_WIN31> object with a location of
  244.   <WP_DESKTOP>. You later drag it into your Command Prompts folder.
  245.   Will MakeDesk get confused if you try to update the object?  No.  The
  246.   Workplace Shell is aware of every object's location change. This
  247.   allows you to make changes to an object without having to remember
  248.   where you moved it.  This is particularly useful since locations
  249.   referencing the desktop can result in pathnames like
  250.   "C:\OS!2 2.0 Desktop\System\Command Prompts".
  251.   Using a handle allows you to refer to the Command Prompts folder as
  252.   <WP_PROMPTS>.  Obviously the latter method is easier, and is
  253.   independent of where you move an object or folder.
  254.  
  255.   I recommend assigning a handle to every object you define, including
  256.   folders.  This makes it easier to access folders and any other objects
  257.   even if they've been moved.  Otherwise, an object's location (i.e.,
  258.   C:\OS2\MDOS) must be updated in your .DEF file each time you change
  259.   its folder's location.  With a handle, you don't need to be concerned
  260.   with whether or not objects have been moved.  Use folder handles as
  261.   locations rather than directory names.  Assign unique handles to
  262.   everything.
  263.  
  264.   Example:
  265.  
  266.     ObjectID <WF_NOTES>
  267.  
  268.   This subcommand is not required.
  269.  
  270.  
  271.  
  272.  
  273.   Setup
  274.   ----------------------------------------------------------------------
  275.   The Setup command declares the type of object creation method.  The
  276.   parameters are:
  277.  
  278.     Fail      - If an object exists with this handle, do nothing.
  279.     Replace   - If an object exists with this handle, replace it.
  280.     Update    - If an object exists with this handle, change it.
  281.  
  282.   Example:
  283.  
  284.     Setup Replace
  285.  
  286.   This subcommand is not required.
  287.  
  288.  
  289.  
  290.  
  291.   Setup String
  292.   ----------------------------------------------------------------------
  293.   Setup Strings are documented in the CrtObj.txt file. These strings
  294.   customize the settings of an object including the "DOS settings" for a
  295.   DOS program object.  MakeDesk supports more than one setup string per
  296.   line by using a ';' between each string.  Breaking up the lines makes
  297.   the settings more readable.
  298.  
  299.   Example:
  300.  
  301.     EXENAME=C:\UTILS\TEST.EXE;STARTUPDIR=C:\TEMP
  302.     SET DOS_BACKGROUND=1
  303.  
  304.   Setup strings are not required.
  305.  
  306.  
  307.  
  308.  
  309. Complete Example: PKUNZIP.DEF
  310. ------------------------------------------------------------------------
  311.  
  312. Define ~CMDS~ C:\Cmds
  313. Define ~ICONS~ C:\Icons
  314.  
  315. Title     PKUnzip
  316. Class     WPProgram
  317. Location  <WP_DESKTOP>
  318. ObjectID  <PKUNZIP>
  319. Setup     Update
  320. EXENAME=~CMDS~\PKUNZIP.BAT
  321. PARAMETERS=-d -n %* [Extract to which directory?]
  322. PROGTYPE=WINDOWEDVDM
  323. ICONFILE=~ICONS~\UNZIP.ICO
  324. NOAUTOCLOSE=YES
  325. SET DOS_BACKGROUND_EXECUTION=0
  326.  
  327. ------------------------------------------------------------------------
  328.  
  329. User assumes all risk by using this product.  Matthew Palcic holds no
  330. warranty or guarantee that this program will not cause side effects or
  331. crashes.  Use it at your own risk. MakeDesk only uses documented system
  332. calls to process desktop objects.  If your system gets corrupted, don't
  333. blame me.  Chances are that OS/2 bugs caused it.
  334.  
  335. **
  336.  
  337. I have developed a process for installing OS/2, the service pack, the
  338. NetWare requester, and desktop setups from a Novell NetWare file server
  339. requiring only a few diskettes at each station. Inquiries regarding this
  340. process can be directed to:
  341.  
  342.   Personal Computer Systems
  343.   5450 Olive Road
  344.   Dayton, OH  45426
  345.  
  346.   513-837-8486, 9am-8pm M-F
  347.   513-837-8286, Fax
  348.  
  349.