home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / os2tex.zip / disk2.zip / bin.cmd next >
OS/2 REXX Batch file  |  1996-11-27  |  6KB  |  342 lines

  1. /* Rexx-Script zur Erzeugung der OS2TeX-Objekte */
  2.  
  3.  
  4.  
  5.  
  6.  
  7. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  8. call SysLoadFuncs
  9.  
  10.  
  11. parse arg language target
  12.  
  13.  
  14. if language = '' then do
  15.    exit 1
  16. end
  17.  
  18.  
  19. if target = '' then do
  20.    exit 1
  21. end
  22.  
  23.  
  24.  
  25. /* SysDestroyObject('<TEX_SHELL_FOLDER>') */
  26.  
  27.  
  28.  
  29.  
  30.  
  31. if language = '049' then do
  32.  
  33.  
  34.  
  35.  
  36. cf = 'Erzeuge Ordner'
  37. co = 'Erzeuge Objekt'
  38.  
  39.  
  40.  
  41. /* OS2TeX Ordner erzeugen */
  42.  
  43.  
  44.  
  45.  
  46. classname = 'WPFolder'
  47. title     = 'OS/2 TeX'
  48. location  = '<WP_DESKTOP>'
  49. setup     = 'ICONFILE='target'\bin\folder.ico;OBJECTID=<OS2TEX_FOLDER>;ICONVIEW=NONFLOWED;OPEN=ICON'
  50. duplicate = 'update'
  51.  
  52. say cf title
  53.  
  54.  
  55. rc = SysCreateObject(classname,title,location,setup,duplicate)
  56.  
  57. if rc = 0 then do 
  58.    exit 1
  59. end
  60.  
  61.  
  62.  
  63.  
  64. /* Programmobjekte erzeugen */
  65.  
  66.  
  67.  
  68.  
  69. classname = 'WPProgram'
  70. title     = 'Shell'
  71. location  = '<OS2TEX_FOLDER>'
  72. setup     = 'EXENAME='target'\bin\shell.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_SHELL>;ASSOCFILTER=*.txp;'
  73. duplicate = 'replace'
  74.  
  75. say co title
  76.  
  77. rc = SysCreateObject(classname,title,location,setup,duplicate)
  78.  
  79. if rc = 0 then do 
  80.    exit 1
  81. end
  82.  
  83.  
  84.  
  85.  
  86.  
  87. classname = 'WPProgram'
  88. title     = 'Server Konfiguration'
  89. location  = '<OS2TEX_FOLDER>'
  90. setup     = 'EXENAME='target'\bin\service.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_SERVICE>'
  91. duplicate = 'replace'
  92.  
  93. say co title
  94.  
  95. rc = SysCreateObject(classname,title,location,setup,duplicate)
  96.  
  97. if rc = 0 then do 
  98.    exit 1
  99. end
  100.  
  101.  
  102.  
  103.  
  104.  
  105. classname = 'WPProgram'
  106. title     = 'Dvi Previewer'
  107. location  = '<OS2TEX_FOLDER>'
  108. setup     = 'EXENAME='target'\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_PREVIEWER>;ASSOCFILTER=*.dvi;'
  109. duplicate = 'replace'
  110.  
  111. say co title
  112.  
  113. rc = SysCreateObject(classname,title,location,setup,duplicate)
  114.  
  115. if rc = 0 then do 
  116.    exit 1
  117. end
  118.  
  119.  
  120.  
  121.  
  122.  
  123. classname = 'WPProgram'
  124. title     = 'Image'
  125. location  = '<OS2TEX_FOLDER>'
  126. setup     = 'EXENAME='target'\bin\image.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_IMAGE>'
  127. duplicate = 'replace'
  128.  
  129. say co title
  130.  
  131. rc = SysCreateObject(classname,title,location,setup,duplicate)
  132.  
  133. if rc = 0 then do 
  134.    exit 1
  135. end
  136.  
  137.  
  138. /* Referenz auf das projects-Verzeichnis erzeugen */
  139.  
  140.  
  141.  
  142. say "Erzeuge Referenz auf das Verzeichnis projects"
  143.  
  144.  
  145. classname = 'WPShadow'
  146. title     = 'Projekte'
  147. location  = '<OS2TEX_FOLDER>'
  148. setup     = 'SHADOWID='target'\projects;OBJECTID=<OS2TEX_PROJECTS>'
  149. duplicate = 'replace'
  150.  
  151. rc = SysCreateObject(classname,title,location,setup,duplicate)
  152.  
  153. if rc = 0 then do
  154.    exit 1
  155. end
  156.  
  157.  
  158.  
  159. /* Schablonenobjekt fuer OS2TeX-Projekte erzeugen */
  160.  
  161.  
  162.  
  163.  
  164.  
  165. say "Erzeuge Schablonenobjekt os2tex.txp"
  166.  
  167.  
  168. objectid = target || "\bin\os2tex.txp"
  169.  
  170.  
  171. rc = SysSetObjectData(objectid,'TEMPLATE=YES')
  172.  
  173.  
  174. classname = 'WPShadow'
  175. title     = 'os2tex.txp'
  176. location  = '<OS2TEX_FOLDER>'
  177. setup     = "OBJECTID=<OS2TEX_TEMPLATE>;SHADOWID=" || target || "\bin\os2tex.txp"
  178. duplicate = 'replace'
  179.  
  180.  
  181. rc = SysCreateObject(classname,title,location,setup,duplicate)
  182.  
  183.  
  184.  
  185. if rc = 0 then do 
  186.    exit 1
  187. end
  188.  
  189.  
  190. end
  191.  
  192.  
  193.  
  194. if language = '044' then do
  195.  
  196.  
  197. cf = 'Creating folder'
  198. co = 'Creating object'
  199.  
  200.  
  201. /* OS2TeX Ordner erzeugen */
  202.  
  203.  
  204. classname = 'WPFolder'
  205. title     = 'OS/2 TeX'
  206. location  = '<WP_DESKTOP>'
  207. setup     = 'ICONFILE='target'\bin\folder.ico;OBJECTID=<OS2TEX_FOLDER>;ICONVIEW=NONFLOWED;OPEN=ICON'
  208. duplicate = 'update'
  209.  
  210.  
  211. say cf title
  212.  
  213. rc = SysCreateObject(classname,title,location,setup,duplicate)
  214.  
  215. if rc = 0 then do 
  216.    exit 1
  217. end
  218.  
  219.  
  220.  
  221.  
  222. /* Programmobjekte erzeugen */
  223.  
  224.  
  225. classname = 'WPProgram'
  226. title     = 'Shell'
  227. location  = '<OS2TEX_FOLDER>'
  228. setup     = 'PARAMETERS=-044;EXENAME='target'\bin\shell.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_SHELL>;ASSOCFILTER=*.txp;'
  229. duplicate = 'replace'
  230.  
  231.  
  232. say co title
  233.  
  234.  
  235. rc = SysCreateObject(classname,title,location,setup,duplicate)
  236.  
  237. if rc = 0 then do 
  238.    exit 1
  239. end
  240.  
  241.  
  242. classname = 'WPProgram'
  243. title     = 'Server Configuration'
  244. location  = '<OS2TEX_FOLDER>'
  245. setup     = 'PARAMETERS=-044;EXENAME='target'\bin\service.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_SERVICE>'
  246. duplicate = 'replace'
  247.  
  248. say co title
  249.  
  250. rc = SysCreateObject(classname,title,location,setup,duplicate)
  251.  
  252. if rc = 0 then do 
  253.    exit 1
  254. end
  255.  
  256.  
  257. classname = 'WPProgram'
  258. title     = 'Dvi Previewer'
  259. location  = '<OS2TEX_FOLDER>'
  260. setup     = 'PARAMETERS=-044;EXENAME='target'\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_PREVIEWER>;ASSOCFILTER=*.dvi;'
  261. duplicate = 'replace'
  262.  
  263. say co title
  264.  
  265. rc = SysCreateObject(classname,title,location,setup,duplicate)
  266.  
  267. if rc = 0 then do 
  268.    exit 1
  269. end
  270.  
  271.  
  272. classname = 'WPProgram'
  273. title     = 'Image'
  274. location  = '<OS2TEX_FOLDER>'
  275. setup     = 'PARAMETERS=-044;EXENAME='target'\bin\image.exe;PROGTYPE=PM;STARTUPDIR='target'\bin;OBJECTID=<OS2TEX_IMAGE>'
  276. duplicate = 'replace'
  277.  
  278. say co title
  279.  
  280. rc = SysCreateObject(classname,title,location,setup,duplicate)
  281.  
  282. if rc = 0 then do 
  283.    exit 1
  284. end
  285.  
  286.  
  287. /* Referenz auf das projects-Verzeichnis erzeugen */
  288.  
  289.  
  290. classname = 'WPShadow'
  291. title     = 'Projects'
  292. location  = '<OS2TEX_FOLDER>'
  293. setup     = 'SHADOWID='target'\projects;OBJECTID=<OS2TEX_PROJECTS>'
  294. duplicate = 'replace'
  295.  
  296.  
  297. say co title
  298.  
  299. rc = SysCreateObject(classname,title,location,setup,duplicate)
  300.  
  301. if rc = 0 then do
  302.    exit 1
  303. end
  304.  
  305.  
  306.  
  307. /* Schablonenobjekt fuer OS2TeX-Projekte erzeugen */
  308.  
  309.  
  310.  
  311. objectid = target || "\bin\os2tex.txp"
  312.  
  313.  
  314. rc = SysSetObjectData(objectid,'TEMPLATE=YES')
  315.  
  316.  
  317. classname = 'WPShadow'
  318. title     = 'os2tex.txp'
  319. location  = '<OS2TEX_FOLDER>'
  320. setup     = 'SHADOWID='target'\bin\os2tex.txp;OBJECTID=<OS2TEX_TEMPLATE>'
  321. duplicate = 'replace'
  322.  
  323. say co title
  324.  
  325. rc = SysCreateObject(classname,title,location,setup,duplicate)
  326.  
  327.  
  328.  
  329.  
  330. if rc = 0 then do 
  331.    exit 1
  332. end
  333.  
  334.  
  335. end
  336.  
  337.  
  338. exit 0
  339.  
  340.  
  341.  
  342.