home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 October
/
VPR9810B.BIN
/
IBM_OS
/
JDK116
/
JAVAINTK.ZIP
/
syslvl.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-02-26
|
5KB
|
116 lines
/* rexx */
parse UPPER arg fHandle bootdrive PATH COMPONENT
file = bootdrive"\kmcrpc10.sl"
tmpfile = test.fi
pathlen = LENGTH( PATH)
looking = SUBSTR(path, 1, pathlen)
/* translation strings: */
message1R = "システム上の Java ランタイム・コンポーネントは、インストールするものより新しいバージョンです。それでもインストールしますか?"
message2R = "古いベータまたはアルファ・レベルの Java ランタイム・コンポーネントの上にインストールしようとしています。それでもインストールしますか?"
message1S = "システム上の「サンプル」コンポーネントは、インストールするものより新しいバージョンです。それでもインストールしますか?"
message2S = "古いベータまたはアルファ・レベルの「サンプル」コンポーネントの上にインストールしようとしています。それでもインストールしますか?"
message1T = "システム上の「ツールキット(JDK)」コンポーネントは、インストールするものより新しいバージョンです。それでもインストールしますか?"
message2T = "古いベータまたはアルファ・レベルの「ツールキット(JDK)」コンポーネントの上にインストールしようとしています。それでもインストールしますか?"
message1D = "システム上の ICATJAVA for OS/2 は、インストールするものより新しいバージョンです。それでもインストールしますか?"
message2D = "古いベータまたはアルファ・レベルの ICATJAVA for OS/2 の上にインストールしようとしています。それでもインストールしますか?"
call RxFuncAdd 'RexxInstResolveVariables', 'WPINSTAL', 'RexxInstResolveVariables'
call RxFuncAdd 'RexxInstSetVariable', 'WPINSTAL', 'RexxInstSetVariable'
call RxFuncAdd 'RexxInstDeselect', 'WPINSTAL', 'RexxInstDeselect'
continue = RexxInstResolveVariables( fHandle, "{Continue}", 1)
if continue = "UNATTENDED" then EXIT
/* 'syslevel > ' file */
rc = stream( tmpfile, 'c', 'open read')
rc = stream( tmpfile, 'c', 'close')
say "close tmpfile rc="rc
rc = stream( file, 'c', 'open read')
DO while LINES(file)
currline = LINEIN(file)
len = length( currline)
if (len-11) > 0 then check = substr( currline, len-11, 8 )
if check = "SYSLEVEL" then CALL PROCESS
END
EXIT
PROCESS:
ext = substr( currline, len-2, 3 )
if ext = COMPONENT
then found = SUBSTR( currline, 1, pathlen);
else RETURN;
PARSE UPPER VAR found found
if (looking = found) then CALL VERIFY
RETURN
VERIFY:
nextline = LINEIN(file)
nextline = LINEIN(file)
nextline = LINEIN(file)
len = LENGTH( nextline)
currentcsd = substr( nextline, len-3, 4)
if currentcsd = "9999" then CALL 9999;
else if currentcsd = "4006" then EXIT;
else if currentcsd >> "4006" then CALL LOWER
exit
9999: /* ALPHA/BETA level exists: */
path = RexxInstResolveVariables( fHandle, "{UserExitPath}", 1)
if (COMPONENT == "JAV") then
path'\message' bootdrive fHandle message2R
else
if (COMPONENT == "JSP") then
path'\message' bootdrive fHandle message2S
else
if (COMPONENT == "JTK") then
path'\message' bootdrive fHandle message2T
else
if (COMPONENT == "ICA") then
path'\message' bootdrive fHandle message2D
continue = RexxInstResolveVariables( fHandle, "{Continue}", 1)
if continue = "QUIT" then CALL STOP; else EXIT
LOWER: /* installing version lower than current version */
path = RexxInstResolveVariables( fHandle, "{UserExitPath}", 1)
if (COMPONENT == "JAV") then
path'\message' bootdrive fHandle message1R
else
if (COMPONENT == "JSP") then
path'\message' bootdrive fHandle message1S
else
if (COMPONENT == "JTK") then
path'\message' bootdrive fHandle message1T
else
if (COMPONENT == "ICA") then
path'\message' bootdrive fHandle message1D
continue = RexxInstResolveVariables( fHandle, "{Continue}", 1)
if continue = "QUIT" then CALL STOP; else EXIT
STOP:
if (COMPONENT == "JAV") then
DO
rc = RexxInstDeselect( fHandle, Runtime);
keepJAVA11U = RexxInstResolveVariables( fHandle, "{Java11:TlktDocSelected}", 1)
if ( keepJAVA11U == "NO" )
then
rc = RexxInstDeselect( fHandle, Java11U );
END;
else
if (COMPONENT == "JSP") then
rc = RexxInstDeselect( fHandle, Samples);
else
if (COMPONENT == "JTK") then
rc = RexxInstDeselect( fHandle, Toolkit);
else
if (COMPONENT == "ICA") then
rc = RexxInstDeselect( fHandle, Debugger);