home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / os2tex_3.zip / disk6.zip / disk_6 / concrete.cmd < prev    next >
OS/2 REXX Batch file  |  1997-12-29  |  4KB  |  181 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 directory(texmf) = '' then exit 1
  12.  
  13.  
  14. if language = '049' then do
  15.  
  16.   msg.1 = 'msg:Concrete: Lösche Verzeichnisse'
  17.   msg.2 = 'msg:Concrete: Entpacke Zeichensätze'
  18.   msg.3 = 'msg:Concrete: Erzeuge'
  19.   msg.4 = 'Lauf'
  20.   msg.5 = 'von'
  21.  
  22. end
  23. else do
  24.  
  25.   msg.1 = 'msg:Concrete: deleting directories'
  26.   msg.2 = 'msg:Concrete: installing files'
  27.   msg.3 = 'msg:Concrete: Creating'
  28.   msg.4 = 'run'
  29.   msg.5 = 'of'
  30.  
  31. end
  32.  
  33.  
  34.  
  35. install = texmf||'\os2tex\install'
  36. unzip   = install||'\unzip '
  37. kdir    = install||'\kdir '
  38. bin     = texmf||'\os2tex\bin'
  39. exec    = bin||'\tex.exe'
  40.  
  41.  
  42. if Pos("InstallFiles", options) > 0 then do
  43.  
  44.  
  45.    say msg.1
  46.  
  47.  
  48.    install||'\kdir '||texmf||'\fonts\source\public\concrete'
  49.    install||'\kdir '||texmf||'\fonts\source\public\concmath'
  50.    install||'\kdir '||texmf||'\fonts\source\public\ecc'
  51.  
  52.    install||'\kdir '||texmf||'\fonts\tfm\public\concrete'
  53.    install||'\kdir '||texmf||'\fonts\tfm\public\concmath'
  54.    install||'\kdir '||texmf||'\fonts\tfm\public\ecc'
  55.  
  56.  
  57.    say msg.2
  58.  
  59.  
  60.    install||'\unzip '||source||'\concrete.zip'
  61.  
  62.  
  63.    if directory(texmf||'\tex\latex') = '' then exit 1
  64.  
  65.  
  66.  
  67.    kdir||'beton'
  68.    kdir||'ccfonts'
  69.  
  70.    unzip||source||'\beton.zip'
  71.    unzip||source||'\ccfonts.zip'
  72.  
  73.  
  74.    kdir||texmf||'\doc\latex\beton'
  75.    kdir||texmf||'\doc\latex\ccfonts'
  76.  
  77.    'md '||texmf||'\doc\latex\beton'
  78.    'md '||texmf||'\doc\latex\ccfonts'
  79.  
  80.  
  81.    say 'msg:Concrete: beton.ins'
  82.  
  83.  
  84.    exec||' -ff latex.fmt -pf '||bin||' -po '||texmf||'\tex\latex\beton -pi '||texmf||'\tex\latex\beton;'||texmf||'\tex\latex\base beton.ins'
  85.  
  86.  
  87.    say 'msg:Concrete: ccfonts.ins'
  88.  
  89.    exec||' -a '||source||'\concrete.ans -ff latex.fmt -pf '||bin||' -po '||texmf||'\tex\latex\ccfonts -pi '||texmf||'\tex\latex\ccfonts;'||texmf||'\tex\latex\base ccfonts.ins'
  90.  
  91.  
  92.  
  93.    do i=1 to 2
  94.       say msg.3' beton.dvi 'msg.4' 'i' 'msg.5' 2'
  95.       exec||' -r -ff latex.fmt -pf '||bin||' -po '||texmf||'\doc\latex\beton -pt '||texmf||'\fonts\tfm -pi '||texmf||'\doc\latex\beton;'||texmf||'\tex\latex beton.dtx'
  96.    end
  97.  
  98.  
  99.    do i=1 to 2
  100.       say msg.3' ccfonts.dvi 'msg.4' 'i' 'msg.5' 2'
  101.       exec||' -r -ff latex.fmt -pf '||bin||' -po '||texmf||'\doc\latex\ccfonts -pt '||texmf||'\fonts\tfm -pi '||texmf||'\doc\latex\ccfonts;'||texmf||'\tex\latex ccfonts.dtx'
  102.    end
  103.  
  104.  
  105.    'copy '||texmf||'\tex\latex\ccfonts\liesmich '||texmf||'\doc\latex\ccfonts'
  106.    'copy '||texmf||'\tex\latex\ccfonts\readme '||texmf||'\doc\latex\ccfonts'
  107.  
  108.    'del '||texmf||'\tex\latex\ccfonts\liesmich'
  109.    'del '||texmf||'\tex\latex\ccfonts\readme'
  110.  
  111.  
  112.    'del '||texmf||'\tex\latex\beton\*.dtx'
  113.    'del '||texmf||'\tex\latex\beton\*.ins'
  114.  
  115.    'del '||texmf||'\tex\latex\ccfonts\*.dtx'
  116.    'del '||texmf||'\tex\latex\ccfonts\*.ins'
  117.  
  118. end
  119.  
  120.  
  121.  
  122. if SysOS2Ver()='2.30' then
  123.   top = 48
  124. else
  125.   top = 45
  126.  
  127.  
  128. if Pos("CreateObjects", options) > 0 then do
  129.  
  130.    classname = 'WPFolder'
  131.    if language = '049' then
  132.       objtitle  = 'Zeichensätze'
  133.    else
  134.       objtitle  = 'Fonts'
  135.    location  = '<OS2TEX_DOC_FOLDER>'
  136.    setup     = 'OBJECTID=<OS2TEX_FONTS_FOLDER>;ICONVIEW=MINI,NONFLOWED;ALWAYSSORT=YES;ICONVIEWPOS=50,50,25,'||top
  137.    duplicate = 'update'
  138.  
  139.  
  140.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  141.  
  142.    if rc = 0 then do
  143.       exit 1
  144.    end
  145.  
  146.  
  147.  
  148.  
  149.    classname = 'WPProgram'
  150.    objtitle  = 'Concrete'
  151.    location  = '<OS2TEX_FONTS_FOLDER>'
  152.    setup     = 'EXENAME='texmf'\os2tex\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='texmf'\os2tex\bin;OBJECTID=<OS2TEX_concrete_beton.dvi>;PARAMETERS='texmf'\doc\latex\beton\beton.dvi'
  153.    duplicate = 'replace'
  154.  
  155.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  156.  
  157.    if rc = 0 then do
  158.       exit 1
  159.    end
  160.  
  161.  
  162.  
  163.    classname = 'WPProgram'
  164.    objtitle  = 'Concrete ECC'
  165.    location  = '<OS2TEX_FONTS_FOLDER>'
  166.    setup     = 'EXENAME='texmf'\os2tex\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='texmf'\os2tex\bin;OBJECTID=<OS2TEX_ccfonts.dvi>;PARAMETERS='texmf'\doc\latex\ccfonts\ccfonts.dvi'
  167.    duplicate = 'replace'
  168.  
  169.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  170.  
  171.    if rc = 0 then do
  172.       exit 1
  173.    end
  174.  
  175.  
  176. end
  177.  
  178.  
  179.  
  180.  
  181.