IMERJ
path = VALUE('OSDIR',,'OS2ENVIRONMENT')
IF path <> '' THEN
RETURN path
_bd = SysBootDrive()
IF _bd == '' THEN
_bd = FILESPEC('DRIVE', VALUE('COMSPEC',,'OS2ENVIRONMENT'))
RETURN _bd'\OS2\APPS'
/* Searches the system LIBPATH for the specified DLL. If not found,
* displays a popup dialog, and optionally aborts the installation.
*
* Parameters:
* dname Name of the DLL to look for (must include extension)
* fail If 1, abort installation if the DLL was not found
* message Message text to be shown when the DLL is not found
* If text includes '|' then the text is parsed as follows:
* common text | no-yum text | with-yum text | wpi file
* All but 'common text' are optional. Remarks follow:
*
* If yum is detected on the system, 'with-yum text' will be
* displayed after 'common text', UNLESS the file specified
* in 'wpi file' is found in the current directory, in
* which case the logic for 'no-yum text' will be used.
*
* 'no-yum text' will be displayed after 'common text' if
* yum is not detected, *unless* it begins with 'REQUIRES='
* - in which case NO message will be displayed, and instead
* this function will simply return the string as a value.
*/
CALL RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
CALL SysLoadFuncs
PARSE ARG dname fail message
IF dname == '' THEN RETURN ''
_bd = SysBootDrive()
IF _bd == '' THEN
_bd = FILESPEC('DRIVE', VALUE('COMSPEC',,'OS2ENVIRONMENT'))
_csys = _bd'\CONFIG.SYS'
CALL SysFileSearch 'LIBPATH=', _csys, 'match.'
DO i = 1 TO match.0
PARSE UPPER VAR match.i _lead 'LIBPATH=' _lpath
IF (_lead == '') & (_lpath <> '') THEN LEAVE
END
CALL SETLOCAL
_testenv = 'TEST_'dname'_LIBPATH'
CALL VALUE _testenv, _lpath, 'OS2ENVIRONMENT'
location = SysSearchPath( _testenv, dname )
CALL ENDLOCAL
IF location == '' THEN DO
title = dname 'Not Found'
PARSE VAR message common '|' no_yum '|' with_yum '|' look_wpi
no_yum = STRIP( no_yum )
with_yum = STRIP( with_yum )
look_wpi = STRIP( look_wpi )
yum = WirexxGetEnv('YUM_ROOT')
IF look_wpi <> '' THEN DO
wpipath = WirexxGetEnv('WI_ARCHIVE_PATH')
IF STREAM( wpipath'\'look_wpi, 'C', 'QUERY EXISTS') <> '' THEN
yum = ''
END
IF yum <> '' THEN DO
IF with_yum <> '' THEN with_yum = '0d0a0d0a'x || with_yum
show_text = common with_yum
END
ELSE DO
IF TRANSLATE( LEFT( no_yum, 9 )) == 'REQUIRES=' THEN
RETURN TRANSLATE( no_yum, '"', "'")
ELSE DO
IF no_yum <> '' THEN no_yum = '0d0a0d0a'x || no_yum
show_text = common no_yum
END
END
rc = WirexxShowMessage( title, show_text )
IF fail == 1 THEN CALL WirexxCancel
END
RETURN ''
/* Searches the system LIBPATH for the specified DLL. If not found,
* returns the string 'REQUIRES=xxx'.
*
* Parameters:
* dname Name of the DLL to look for (must include extension)
* reqpkg Value of REQUIRES string to return if DLL is not found
*/
PARSE ARG dname reqpkg
IF dname == '' THEN RETURN ''
_bd = SysBootDrive()
IF _bd == '' THEN
_bd = FILESPEC('DRIVE', VALUE('COMSPEC',,'OS2ENVIRONMENT'))
_csys = _bd'\CONFIG.SYS'
CALL SysFileSearch 'LIBPATH=', _csys, 'match.'
DO i = 1 TO match.0
PARSE UPPER VAR match.i _lead 'LIBPATH=' _lpath
IF (_lead == '') & (_lpath <> '') THEN LEAVE
END
CALL SETLOCAL
_testenv = 'TEST_'dname'_LIBPATH'
CALL VALUE _testenv, _lpath, 'OS2ENVIRONMENT'
location = SysSearchPath( _testenv, dname )
CALL ENDLOCAL
IF location == '' THEN DO
CALL WirexxPutEnv dname, '0'
IF reqpkg <> '' THEN
RETURN 'REQUIRES='reqpkg
END
CALL WirexxPutEnv dname, '1'
RETURN ''
/* Searches the system LIBPATH for the requisite version of the
* specified DLL. If not found, returns the string 'REQUIRES=xxx';
* if an obsolete version was found, warn the user and abort.
*
* NOTE: This _only_ works for REXX DLLs which have a version
* function that returns a string of the form
* 'major[.minor[.refresh]]'.
*
* Parameters:
* dname Name of the DLL to look for (must include extension)
* func Name of the DLL's version-check function
* minver Minimum version required
* reqpkg Value of REQUIRES string to return if DLL is not found
*/
CALL RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
CALL SysLoadFuncs
PARSE ARG dname func minver reqpkg
IF dname == '' THEN RETURN ''
_bd = SysBootDrive()
IF _bd == '' THEN
_bd = FILESPEC('DRIVE', VALUE('COMSPEC',,'OS2ENVIRONMENT'))
_csys = _bd'\CONFIG.SYS'
CALL SysFileSearch 'LIBPATH=', _csys, 'match.'
DO i = 1 TO match.0
PARSE UPPER VAR match.i _lead 'LIBPATH=' _lpath
IF (_lead == '') & (_lpath <> '') THEN LEAVE
END
CALL SETLOCAL
_testenv = 'TEST_'dname'_LIBPATH'
CALL VALUE _testenv, _lpath, 'OS2ENVIRONMENT'
location = SysSearchPath( _testenv, dname )
CALL ENDLOCAL
/* DLL was not found, so return REQUIRES string. */
IF location == '' THEN DO
CALL WirexxPutEnv dname, '0'
IF reqpkg <> '' THEN
RETURN 'REQUIRES='reqpkg
END
/* Otherwise, check the installed version. */
CALL RxFuncAdd func, dname, func
INTERPRET 'foundver =' func'()'
PARSE VAR minver _mmajor'.'_mminor'.'_mrefresh
PARSE VAR foundver _fmajor'.'_fminor'.'_frefresh
CALL RxFuncDrop func
IF _fmajor == '' | _mmajor == '' THEN RETURN ''
IF ( VERIFY( _fmajor, '0123456789') > 0 ) |,
( VERIFY( _mmajor, '0123456789') > 0 ) THEN RETURN ''
major_ok = 0
minor_ok = 0
refresh_ok = 0
IF _fmajor >= _mmajor THEN major_ok = 1
IF _mminor == '' THEN minor_ok = 1
ELSE IF _fminor <> '' THEN DO
IF ( VERIFY( _fminor, '0123456789') == 0 ) &,
( VERIFY( _mminor, '0123456789') == 0 )
THEN
IF _fminor >= _mminor THEN minor_ok = 1
END
IF _mrefresh == '' THEN refresh_ok = 1
ELSE IF _frefresh <> '' THEN DO
IF ( VERIFY( _frefresh, '0123456789') == 0 ) &,
( VERIFY( _mrefresh, '0123456789') == 0 )
THEN
IF _frefresh >= _mrefresh THEN refresh_ok = 1
END
IF major_ok & minor_ok & refresh_ok THEN DO
CALL WirexxPutEnv dname, '1'
RETURN ''
END
/* DLL was found but is obsolete. We can't really handle
* this situation automatically, so inform the user and then
* exit.
*/
rc = WirexxShowMessage('Obsolete' dname 'Detected',,
'This package requires a newer version ('minver') of' dname,
'than the one currently installed on this system ('foundver').',
|| '0d0a0d0a'x ||,
'You can install the latest version using this package;',
'however, to avoid conflicts, you must uninstall the',
'existing version ('location') yourself before continuing.',
|| '0d0a0d0a'x ||,
'This installation program will now exit.')
CALL WirexxCancel
RETURN ''
PARSE ARG dllname title
was_found = WirexxGetEnv( dllname )
IF was_found == 1 THEN
RETURN '[Already Installed]' title
ELSE
RETURN title
PARSE ARG dllname
was_found = WirexxGetEnv( dllname )
IF was_found == 1 THEN
RETURN ''
ELSE
RETURN 'SELECT'
ulspath = STRIP( VALUE('ULSPATH',,'OS2ENVIRONMENT'), 'T', ';')
IF ulspath == '' THEN ulspath = SysBootDrive() || '\LANGUAGE'
IF STREAM( ulspath'\CODEPAGE\IBM954', 'C', 'QUERY EXISTS') == '' THEN DO
rc = WirexxShowMessage('Codepage 954 Not Installed',,
'The translation table for codepage 954 (EUC-JP)',
'does not appear to be installed. You can still',
'use IMERJ without it, but kanji conversion will',
'be disabled.' || '0d0a0d0a'x ||,
'Refer to the release notes on the first page',
'(or README.TXT), "REQUIREMENTS" section, for',
'instructions on how to install codepage 954.',
'0d0a0d0a'x )
END
RETURN 0
This package contains the IMERJ program files
This package contains the minimal EDICT word dictionary (EDICT_SUB) needed for word-based kanji conversion
This package contains the kanji character dictionary (KANJIDIC) needed for single kanji conversion
This package contains a sample auxiliary dictionary (AUXDICT) with over 400 proper nouns
This package contains the required library VROBJEX.DLL
This package contains the required library RXULS.DLL
~Next
This package will install IMERJ, along with the EDICT_SUB and KANJIDIC dictionaries.
readme.txt
~Next
IMERJ is licensed under the terms listed below.
COPYING
~Next
Select the components to install.
EDICT_SUB and KANJIDIC should be selected unless you already have versions of EDICT and KANJIDIC installed on your system. AUXDICT is recommended unless you are installing over an already-customized auxiliary dictionary.
Ready to install.
I~nstall