home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / os2tex_3.zip / disk6.zip / disk_6 / amslatex.cmd next >
OS/2 REXX Batch file  |  1997-12-29  |  4KB  |  169 lines

  1. /**/
  2.  
  3. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. call SysLoadFuncs
  5.  
  6.  
  7. parse arg language texmf source options
  8.  
  9.  
  10. if language = '049' then do
  11.  
  12.   msg.1 = 'msg:AMS-LaTeX'
  13.   msg.2 = 'msg:AMS-LaTeX: Entpacke Dateien'
  14.   msg.3 = 'msg:AMS-LaTeX: amslatex.ins'
  15.   msg.4 = 'msg:AMS-LaTeX: amsclass.ins'
  16.   msg.5 = 'msg:AMS-LaTeX: amsldoc.tex sortiere Index amsldoc.idx'
  17.   msg.6 = 'msg:AMS-LaTeX: amsldoc.tex Lauf'
  18.   msg.7 = 'von'
  19.  
  20. end
  21. else do
  22.  
  23.   msg.1 = 'msg:AMS-LaTeX'
  24.   msg.2 = 'msg:AMS-LaTeX: installing files'
  25.   msg.3 = 'msg:AMS-LaTeX: amslatex.ins'
  26.   msg.4 = 'msg:AMS-LaTeX: amsclass.ins'
  27.   msg.5 = 'msg:AMS-LaTeX: amsldoc.tex sorting index amsldoc.idx'
  28.   msg.6 = 'msg:AMS-LaTeX: amsldoc.tex run'
  29.   msg.7 = 'of'
  30.  
  31. end
  32.  
  33. install = texmf||'\os2tex\install'
  34.  
  35.  
  36. if ""=directory(texmf) then do
  37.   say "err:Verzeichniswechsel nicht möglich!"
  38.   exit 1
  39. end
  40.  
  41.  
  42. if Pos("InstallFiles", options) > 0 then do
  43.  
  44.  
  45.    say msg.1
  46.  
  47.    install||'\kdir '||texmf||'\tex\latex\amslatex'
  48.    install||'\kdir '||texmf||'\doc\ams\amslatex'
  49.  
  50.  
  51.    'md '||texmf||'\doc'
  52.    'md '||texmf||'\doc\ams'
  53.    'md '||texmf||'\doc\ams\amslatex'
  54.  
  55.    'md '||texmf||'\tex\latex\amslatex'
  56.  
  57.  
  58.    say msg.2
  59.  
  60.    install||'\unzip '||source||'\amslatex.zip'
  61.  
  62.  
  63.  
  64.    tex = texmf||'\os2tex\bin\tex.exe'
  65.  
  66.  
  67.    say msg.3
  68.  
  69.    tex||' -r -ff latex.fmt -pf '||texmf||'\os2tex\bin -pi '||texmf||'\tex; -po '||texmf||'\tex\latex\amslatex amslatex.ins'
  70.  
  71.  
  72.    say msg.4
  73.  
  74.    tex||' -r -ff latex.fmt -pf '||texmf||'\os2tex\bin -pi '||texmf||'\tex; -po '||texmf||'\tex\latex\amslatex amsclass.ins'
  75.  
  76.    'copy '||texmf||'\tex\latex\amslatex\amsldoc.tex '||texmf||'\doc\ams\amslatex'
  77.    'del '||texmf||'\tex\latex\amslatex\amsldoc.tex'
  78.  
  79. end
  80.  
  81.  
  82.  
  83. if SysOS2Ver() = '2.30' then
  84.   top = 48
  85. else
  86.   top = 45
  87.  
  88.  
  89.  
  90. if Pos("CreateObjects", options) > 0 then do
  91.  
  92.    classname = 'WPFolder'
  93.    objtitle  = 'AMS-LaTeX'
  94.    location  = '<OS2TEX_DOC_FOLDER>'
  95.    setup     = 'OBJECTID=<OS2TEX_AMSLATEX_FOLDER>;ICONVIEW=MINI,NONFLOWED;ALWAYSSORT=YES;ICONVIEWPOS=50,50,25,'||top
  96.    duplicate = 'update'
  97.  
  98.  
  99.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  100.  
  101.    if rc = 0 then do
  102.       exit 1
  103.    end
  104.  
  105. end
  106.  
  107.  
  108. if Pos("InstallFiles", options) > 0 then do
  109.  
  110.  
  111.    do i=1 to 3
  112.  
  113.       if i=3 then do
  114.          say msg.5
  115.          texmf||'\os2tex\bin\makeindex '||texmf||'\doc\ams\amslatex\amsldoc.idx'
  116.       end
  117.  
  118.       say msg.6' 'i' 'msg.7' 3'
  119.       tex||' -r -ff latex.fmt -pf '||texmf||'\os2tex\bin -pi '||texmf||'\tex;'||texmf||'\doc\ams -po '||texmf||'\doc\ams\amslatex -pt '||texmf||'\fonts\tfm amsldoc.tex'
  120.  
  121.    end
  122.  
  123. end
  124.  
  125.  
  126. if Pos("CreateObjects", options) > 0 then do
  127.  
  128.    classname = 'WPProgram'
  129.  
  130.    if language = '049' then
  131.       objtitle  = 'AMS-LaTeX Dokumentation'
  132.    else
  133.       objtitle  = 'AMS-LaTeX Documentation'
  134.  
  135.    location  = '<OS2TEX_AMSLATEX_FOLDER>'
  136.    setup     = 'EXENAME='texmf'\os2tex\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='texmf'\os2tex\bin;OBJECTID=<OS2TEX_amsldoc.dvi>;PARAMETERS='texmf'\doc\ams\amslatex\amsldoc.dvi'
  137.    duplicate = 'replace'
  138.  
  139.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  140.  
  141.    if rc = 0 then do
  142.       exit 1
  143.    end
  144.  
  145.  
  146.  
  147.    classname = 'WPProgram'
  148.  
  149.    if language = '049' then
  150.       objtitle  = 'AMS-Zeichensätze'
  151.    else
  152.       objtitle  = 'AMS-Fonts'
  153.  
  154.    location  = '<OS2TEX_AMSLATEX_FOLDER>'
  155.    setup     = 'EXENAME='texmf'\os2tex\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='texmf'\os2tex\bin;OBJECTID=<OS2TEX_amsfndoc.dvi_2>;PARAMETERS='texmf'\doc\ams\amsfonts\amsfndoc.dvi'
  156.    duplicate = 'replace'
  157.  
  158.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  159.  
  160.    if rc = 0 then do
  161.       exit 1
  162.    end
  163.  
  164.  
  165. end
  166.  
  167.  
  168.  
  169.