home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / texsk103.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1997-01-25  |  4KB  |  161 lines

  1. /* TeX Sketch Installationsprogramm */
  2.  
  3. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  4. call SysLoadFuncs
  5.  
  6. call title
  7.  
  8. /* Installationsverzeichnis bestimmen */
  9.  
  10. instDir = value("emtexdir",,"os2environment")
  11. emtex = 0
  12.  
  13. if instDir <> "" then
  14. do
  15.   say
  16.   say "Es wurde eine emTeX Installation in" instDir "gefunden."
  17.   say
  18.   call charout, "TeX Sketch in das emTeX Verzeichnis installieren? [J/N] "
  19.   pull answer
  20.   if answer = "J" then
  21.     emtex = 1
  22. end
  23.  
  24. if \ emtex then
  25. do
  26.   say
  27.   say "Verzeichnis, in das TeX Sketch installiert werden soll?"
  28.   parse pull instDir
  29. end
  30.  
  31. /* Sprache bestimmen */
  32.  
  33. say
  34. call charout, "Deutsche oder englische Programmoberfläche? [D/E] "
  35. pull answer
  36. if answer = "D" then
  37.   lang = "G"
  38. else
  39.   lang = "E"
  40.  
  41. /* WPS Objekt? */
  42.  
  43. say
  44. call charout, "WPS Programmobjekt erzeugen? [J/N] "
  45. pull answer
  46. if answer = "J" then
  47.   wpsobj = 1
  48. else
  49.   wpsobj = 0
  50.  
  51. /* Sicherheitsabfrage ob alles korrekt */
  52.  
  53. call title
  54.  
  55. say
  56. say "· Folgende Verzeichnisse werden benutzt/erzeugt:"
  57. if emtex then
  58. do
  59.   say "   " instDir||"\bin"
  60.   say "   " instDir||"\dll          <== HINWEIS: in LIBPATH eintragen!"
  61.   say "   " instDir||"\book\german"
  62.   say "   " instDir||"\remove"
  63. end
  64. else
  65.   say "   " instDir
  66. say
  67. if lang = "G" then
  68.   call charout, "· Deutsche"
  69. else
  70.   call charout, "· Englische"
  71. say " Programmoberfläche."
  72. say
  73. if \ wpsobj then
  74.   call charout, "· Kein"
  75. else
  76.   call charout, "·"
  77. say " WPS Programmobjekt erzeugen."
  78. say
  79. call charout, "Sind diese Angaben korrekt? [J/N] "
  80. pull answer
  81. if answer <> "J" then
  82. do
  83.   say
  84.   say "Installation angebrochen."
  85.   exit
  86. end
  87.  
  88. /* Dateien kopieren */
  89.  
  90. call title
  91.  
  92. say
  93. call charout, "Installiere TeX Sketch ."
  94.  
  95. "@echo off"
  96.  
  97. if lang = "E" then
  98.   copy "tskresen.dll" "tskres.dll > nul"
  99. else
  100.   copy "tskresgr.dll" "tskres.dll > nul"
  101. call charout, "."
  102.  
  103. if emtex then
  104. do
  105.   xcopy "texsk.exe"  instdir||"\bin\ > nul"
  106.   call charout, "."
  107.   xcopy "texsk.ico"  instDir||"\bin\ > nul"
  108.   call charout, "."
  109.   xcopy "texsk.rem"  instDir||"\remove\ > nul"
  110.   call charout, "."
  111.   xcopy "tskdoc.inf" instDir||"\book\german\ > nul"
  112.   call charout, "."
  113.   xcopy "tskres.dll" instDir||"\dll\ > nul"
  114.   call charout, "."
  115. end
  116. else
  117. do
  118.   xcopy "texsk.exe"  instDir||"\ > nul"
  119.   call charout, "."
  120.   xcopy "texsk.ico"  instDir||"\ > nul"
  121.   call charout, "."
  122.   xcopy "tskdoc.inf" instDir||"\ > nul"
  123.   call charout, "."
  124.   xcopy "tskres.dll" instDir||"\ > nul"
  125.   call charout, "."
  126. end
  127.  
  128. del "tskres.dll"
  129.  
  130. /* WPS Objekt erzeugen */
  131.  
  132. if emtex then
  133.   exeDir = instDir||"\bin"
  134. else
  135.   exeDir = instDir
  136.  
  137. if wpsobj then
  138. do
  139.   rc = SysCreateObject( "WPProgram", "TeX Sketch", "<WP_DESKTOP>", "EXENAME="||exeDir||"\texsk.exe;STARTUPDIR="||exeDir";ICONFILE="||exeDir||"\texsk.ico;ASSOCFILTER=*.PIC" )
  140.   call charout, "."
  141. end
  142.  
  143. say
  144. say "Fertig."
  145.  
  146. exit
  147.  
  148. title: procedure
  149.  
  150. cls
  151. say "###############################################################################"
  152. say "#                                                                             #"
  153. say "#                               T e X  S k e t c h                            #"
  154. say "#                                  Installation                               #"
  155. say "#                                                                             #"
  156. say "#                       (c) copyright 1996 by Tim Bahnes                      #"
  157. say "#                                                                             #"
  158. say "###############################################################################"
  159.  
  160. return
  161.