home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / CHIPinte022000.iso / office51 / os2 / misc / java / jre117 / JAVAINUF.EXE / tw / check.cmd < prev    next >
Encoding:
Text File  |  1998-09-01  |  3.0 KB  |  104 lines

  1. /* check prereqs                                                        */
  2. parse arg hFeature bootdrive where
  3. file = bootdrive'\kmcrpc10'
  4.  
  5. /*  These two messages are the only translatable items in the file:              */
  6. message1="ªw╕╦«M╕╦│n┼Θññ¿Sª│íuUnicode ªr┼ΘívíCñU╕ⁿªr┼Θ«M╕╦│n┼Θ¬║¼█├÷╕Ω░TíA╜╨░╤╛\ ReadmeíC"
  7. message2="│o¡╙¿t▓╬¿├ñú¼OÑHÑ┐╜T¬║íu¡╫Ñ┐¬⌐ív╡Ñ»┼¿╙¿╧Ñ╬ Unicode ªr┼ΘíC▒Nñú╖|ªw╕╦ Unicode ªr┼ΘíCíu¡╫Ñ┐¬⌐ívѲ¿M▒°Ñ≤¬║¼█├÷╕Ω░TíA╜╨░╤╛\ ReadmeíC"
  8. message3="▒z¿t▓╬ñW¬║ OS/2 ¬⌐Ñ╗╗Pªw╕╦ Java ¬║Ѳ¿M▒°Ñ≤ñú▓┼íAªw╕╦╡{ªíºY▒N▓╫ñεíC¼█├÷╕╘▓╙ñ║«eíA╜╨░╤╛\ ReadmeíC"
  9.  
  10.  
  11.  
  12. call RxFuncAdd 'RexxInstDeselect', 'WPINSTAL', 'RexxInstDeselect'
  13. call RxFuncAdd 'RexxInstResolveVariables', 'WPINSTAL', 'RexxInstResolveVariables'
  14. call RxFuncAdd 'RexxInstSetVariable', 'WPINSTAL', 'RexxInstSetVariable'
  15.  
  16.  
  17. continue = RexxInstResolveVariables( hFeature, "{Continue}", 1)
  18. path = RexxInstResolveVariables( hFeature, "{UserExitPath}", 1)
  19. say path
  20. if (where == PREREQ) then CALL PREREQ
  21.  
  22. /* check for font in install package */
  23. path = RexxInstResolveVariables( hFeature, "{UserExitPath}", 1)
  24. font = path"\..\package\tnrmt30.ttf"
  25. rc = stream( font, 'c', 'open read')
  26. empty = LINES( font )
  27. rc = stream( font, 'c', 'close' )
  28. if (empty == "0" ) then
  29.         DO
  30.         rc = RexxInstDeselect( hFeature, "" )
  31.         if continue <> "UNATTENDED" then
  32.         DO
  33.           keep = RexxInstResolveVariables( hFeature, "{Java11:MB_VAR}", 1)
  34.           zero = 0
  35.           rc = RexxInstSetVariable( hFeature,"Java11", "MB_VAR", zero );
  36.           new = RexxInstResolveVariables( hFeature, "{Java11:MB_VAR}", 1)
  37.           path'\..\message ' bootdrive hFeature message1
  38.           rc = RexxInstSetVariable( hFeature, "Java11", "MB_VAR", 4 );
  39.         END
  40.         EXIT
  41.         END
  42.  
  43.  
  44.  
  45. PREREQ:
  46.  
  47. /* check for FixPack 30 or higher    */
  48.  
  49. tmpfile = bootdrive'\j11servc.tmp'
  50. 'bldlevel 'bootdrive'\os2krnl >'  tmpfile
  51. line = LINEIN( tmpfile)
  52. ret = STREAM( tmpfile, 'c', 'close')
  53. '@erase' tmpfile
  54.  
  55. 'bldlevel 'bootdrive'\os2krnl >'  file
  56. line = LINEIN( file)
  57. say line
  58. PARSE VAR line temp '#@';
  59. temp = REVERSE( temp)
  60. PARSE VAR temp temp ':MBI';
  61. level = REVERSE( temp)
  62.  
  63. if (where == PREREQ) then CALL CHECKBASE
  64.  
  65. if level < 8.254
  66. then
  67. DO
  68. rc = RexxInstDeselect( hFeature, "" )
  69. if continue <> "UNATTENDED" then
  70. DO
  71.   keep = RexxInstResolveVariables( hFeature, "{MB_VAR}", 1)
  72.   rc = RexxInstSetVariable( hFeature, "Java11", "MB_VAR", 0 );
  73.   path'\..\message ' bootdrive hFeature message2
  74.   rc = RexxInstSetVariable( hFeature, "Java11", "MB_VAR", keep );
  75. END
  76. END
  77.  
  78. ret = STREAM( file, 'c', 'close')
  79. '@erase' file
  80. EXIT
  81.  
  82. CHECKBASE:
  83. if level < 9.23 then x = RexxInstSetVariable( hFeature, "Java11", "MERLIN", "NO")
  84. if level < 8.162
  85. then
  86. DO
  87. if level = 7.029 then CALL BYE
  88. if continue <> "UNATTENDED" then
  89. DO
  90.   rc = RexxInstSetVariable( hFeature, "Java11", "MB_VAR", 0 );
  91.   path'\..\message ' bootdrive hFeature message3
  92. END
  93. rc = RexxInstDeselect( hFeature, "Java11" )
  94. END
  95.  
  96.  
  97. BYE:
  98. ret = STREAM( file, 'c', 'close')
  99. '@erase' file
  100. EXIT
  101.  
  102.  
  103.  
  104.