home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / os2tex_2.zip / disk4.zip / disk_4 / l2graph.cmd < prev    next >
OS/2 REXX Batch file  |  1997-12-29  |  3KB  |  162 lines

  1. /**/
  2.  
  3. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. call SysLoadFuncs
  5.  
  6.  
  7. parse arg language texmf source options
  8.  
  9.  
  10.  
  11. if language = '049' then do
  12.  
  13.   msg.1  = 'msg:LaTeX2e Graphics'
  14.   msg.2  = 'msg:LaTeX2e Graphics entpacke Dateien'
  15.   msg.3  = 'msg:LaTeX2e Graphics graphics.ins'
  16.   msg.10 = 'msg:LaTeX2e Graphics'
  17.   msg.11 = 'Lauf'
  18.   msg.12 = 'von'
  19.  
  20. end
  21. else do
  22.  
  23.   msg.1  = 'msg:LaTeX2e Graphics'
  24.   msg.2  = 'msg:LaTeX2e Graphics installing files'
  25.   msg.3  = 'msg:LaTeX2e Graphics graphics.ins'
  26.   msg.10 = 'msg:LaTeX2e Graphics'
  27.   msg.11 = 'run'
  28.   msg.12 = 'of'
  29.  
  30. end
  31.  
  32.  
  33. say msg.1
  34.  
  35.  
  36. bin      = texmf||'\os2tex\bin'
  37. tfm      = texmf||'\fonts\tfm'
  38. tex      = texmf||'\tex'
  39. doc      = texmf||'\doc'
  40. fmt      = bin
  41.  
  42. target   = texmf||'\tex\latex\graphics'
  43.  
  44. exec     = bin||'\tex.exe'
  45.  
  46. install = texmf||'\os2tex\install'
  47.  
  48.  
  49.  
  50. if Pos("InstallFiles", options) > 0 then do
  51.  
  52.    install||'\kdir '||target
  53.  
  54.    'md '||tex
  55.    'md '||tex||'\latex'
  56.    'md '||tex||'\latex\graphics'
  57.  
  58.  
  59.    say msg.2
  60.  
  61.  
  62.    call directory texmf||'\tex\latex'
  63.  
  64.    install||'\unzip '||source||'\l2graph.zip'
  65.  
  66.  
  67.  
  68.    say msg.3
  69.  
  70.    exec||' -pf '||bin||' -po '||target||' -pi '||target||';'||tex||'\latex\base;'||bin||' '||'graphics.ins'
  71.  
  72.  
  73.    'md '||doc
  74.    'md '||doc||'\latex'
  75.    'md '||doc||'\latex\graphics'
  76.  
  77.    'copy '||target||'\grfguide.tex '||texmf||'\doc\latex\graphics'
  78.    'copy '||target||'\*.ps '||texmf||'\doc\latex\graphics'
  79.  
  80.    'del '||target||'\grfguide.tex'
  81.    'del '||target||'\*.ps'
  82.  
  83.  
  84.  
  85.  
  86.  
  87.    filename = texmf||'\tex\latex\graphics\color.cfg'
  88.    call lineout filename, "\ExecuteOptions{dvips}"
  89.    call lineout filename
  90.  
  91.    filename = texmf||'\tex\latex\graphics\graphics.cfg'
  92.    call lineout filename, "\ExecuteOptions{dvips}"
  93.    call lineout filename
  94.  
  95. end
  96.  
  97.  
  98.  
  99. if SysOS2Ver() = '2.30' then
  100.   top = '48'
  101. else
  102.   top = '45'
  103.  
  104.  
  105.  
  106.  
  107. if Pos("CreateObjects", options) > 0 then do
  108.  
  109.    classname = 'WPFolder'
  110.  
  111.    if language = '049' then
  112.       objtitle  = 'Zusatzpakete/Styles'
  113.    else
  114.       objtitle  = 'Packages/Styles'
  115.  
  116.    location  = '<OS2TEX_DOC_FOLDER>'
  117.    setup     = 'OBJECTID=<OS2TEX_MISC_FOLDER>;ICONVIEW=MINI,NONFLOWED;ALWAYSSORT=YES;ICONVIEWPOS=50,50,25,'||top
  118.    duplicate = 'update'
  119.  
  120.  
  121.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  122.  
  123.    if rc = 0 then do
  124.       exit 1
  125.    end
  126.  
  127. end
  128.  
  129.  
  130.  
  131. if Pos("InstallFiles", options) > 0 then do
  132.  
  133.    do i=1 to 2
  134.  
  135.       say msg.10' grfguide.dvi 'msg.11' 'i' 'msg.12' 2'
  136.       exec||' -r -ff latex.fmt -pf '||texmf||'\os2tex\bin -po '||texmf||'\doc\latex\graphics -pi '||texmf||'\doc\latex\graphics;'||texmf||'\tex\latex -pt '||texmf||'\fonts\tfm grfguide.tex'
  137.  
  138.    end
  139.  
  140. end
  141.  
  142.  
  143.  
  144. if Pos("CreateObjects", options) > 0 then do
  145.  
  146.    classname = 'WPProgram'
  147.    objtitle  = 'graphics [D. Carlisle]'
  148.    location  = '<OS2TEX_MISC_FOLDER>'
  149.    setup     = 'EXENAME='texmf'\os2tex\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='texmf'\os2tex\bin;OBJECTID=<OS2TEX_grfguide.dvi>;PARAMETERS='texmf'\doc\latex\graphics\grfguide.dvi'
  150.    duplicate = 'replace'
  151.  
  152.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  153.  
  154.    if rc = 0 then do
  155.       exit 1
  156.    end
  157.  
  158. end
  159.  
  160.  
  161.  
  162.