home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / os2 / pc2_150.zip / MAKEOBJ.CMD < prev    next >
OS/2 REXX Batch file  |  1993-04-14  |  3KB  |  75 lines

  1. /***********************************************************************\
  2.  *                                 PC2.c                               *
  3.  *                 Copyright (C) by Stangl Roman, 1993                 *
  4.  * This Code may be freely distributed, provided the Copyright isn't   *
  5.  * removed.                                                            *
  6.  *                                                                     *
  7.  * Install.cmd  Installation batch file.                               *
  8.  *                                                                     *
  9.  *              INSTALL <InstallationPathDirectory>                    *
  10.  *              F.e. INSTALL C:\PMAPPS\PC2                             *
  11.  *                                                                     *
  12. \***********************************************************************/
  13.  
  14.                                         /* Register REXX APIs */
  15. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  16. Call SysLoadFuncs
  17. Signal On Halt Name SignalHandler       /* Exception handler */
  18.  
  19. NewObjectID=" "
  20. Do While NewObjectID=" "
  21.     Call SysCls
  22.     Say "                   Empty WPS Objects Installer"
  23.     Say
  24.     Say " To install any empty Object with an registered Object ID (Idendity) onto the"
  25.     Say " WPS, you must provide a symbolic name for this registered Object. You may"
  26.     Say " then use PC/2 to launch this object, after you have configured this empty"
  27.     Say " Object with the application you want to install as an object. F.e. you may"
  28.     Say " want to create an empty Object and then configure it as an seamless WIN-OS2"
  29.     Say " session, allowing you to launch this seamless WIN-OS2 session from PC/2."
  30.     Say
  31.     Say " Syntax:       INSTALL WPSObjectID"
  32.     Say
  33.     Say " Example:      INSTALL <WP_MyObject>"
  34.     Say
  35.     Parse Value SysCurPos() with Row Col
  36.     Say " Please input: "
  37.     Col=Col+15
  38.     Call SysCurPos Row, Col
  39.     Pull NewObjectID
  40. End
  41. Say
  42. SetupString="OBJECTID="NewObjectID
  43.                                         /* Now create the WPS Object on the Desktop */
  44. rc=SysCreateObject("WPProgram",,
  45.                    NewObjectID,,
  46.                    "<WP_DESKTOP>",,
  47.                    SetupString)
  48. If rc=0 Then Do
  49.     Say " Sorry, WPS Object couldn't be created..."
  50. End
  51. Else Do
  52.     Say " WPS Object sucessfully created..."
  53.     Say
  54.     Say " You may now want to open the Settings of the newly created empty WP Object to"
  55.     Say " configure it to an application, f.e. an PM, DOS or seamless WIN-OS2 session."
  56.     Say
  57.     Say " Press Enter to continue!..."
  58.     Pull IgnoreInput
  59. End
  60. Call SysCls
  61. Exit
  62.  
  63. /*--------------------------------------------------------------------------------------*\
  64.  * The signal handler to exit after an exception                                        *
  65.  * Req:                                                                                 *
  66.  *      none                                                                            *
  67.  * Returns:                                                                             *
  68.  *      none                                                                            *
  69. \*--------------------------------------------------------------------------------------*/
  70. SignalHandler:
  71. Call SysCls
  72. Say "PC/2 abnormal error - exiting..."
  73. Exit
  74.  
  75.