home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12ort1.exe / bin / reg1part.cmd < prev    next >
OS/2 REXX Batch file  |  1997-04-02  |  1KB  |  63 lines

  1. @echo off
  2. : REM--- @(#) 1.11 os2/src/tools/reg1part.cmd, odinstall, od96os2, odos29712d 11/12/96 11:02:18 [3/21/97 17:43:11] --REM
  3. : OS/2 command file used to add an OpenDoc part to the Registry
  4.  
  5. if "%ODBASE%x" == "x" goto setODBASE
  6. goto chkArgs
  7.  
  8. :----------
  9. :setODBASE
  10. :----------
  11. echo The environment variable ODBASE has not been set.
  12. echo Please ensure that all OpenDoc environment variables are properly set
  13. echo before attempting to run reg1part.
  14. goto cmdDone
  15.  
  16. :----------
  17. :chkArgs
  18. :----------
  19. if "%1x" == "x" goto badArgs
  20. goto runReg
  21.  
  22. :----------
  23. :badArgs
  24. :----------
  25. echo Usage: reg1part Classname [IDLname, IDLname,...]
  26. goto cmdDone
  27.  
  28. :----------
  29. :runReg
  30. :----------
  31. set REGTOOL=odregprt
  32. set SC=%SOMBASE%\bin\sc.exe
  33. set CLASS=%1
  34. if "%2x" == "x" goto defaultIDL
  35. set IDLNAME=%2
  36. goto runSC
  37.  
  38. :----------
  39. :defaultIDL
  40. :----------
  41. set IDLNAME=%CLASS%
  42.  
  43. :-----
  44. :runSC
  45. :-----
  46. echo %CLASS% in %IDLNAME% ...
  47. %SC% -sir -u -mnolock -ESMINCLUDE="" -ESOMIR="%ODCFG%\od.ir" -p -c -I. -I%SOMBASE%\include -D_PLATFORM_OS2_ -I%ODBASE%\include -I%ODSRC%\include %IDLNAME%.idl
  48.  
  49. if "%3" == "" goto :runRG
  50. set IDLNAME=%3
  51. shift
  52. goto runSC
  53.  
  54. :----------
  55. :runRG
  56. :----------
  57. %REGTOOL% %CLASS% 
  58.  
  59. :----------
  60. :cmdDone
  61. :----------
  62. echo Done.
  63.