/* warpin_env.cmd: This script tries to find WarpIN and call the supplied envwic.cmd so you can call the necessary. (c) 2006 - Juergen Ulbts */ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs' call SysLoadFuncs /* get WarpIN path from OS2.INI */ WARPIN_INSTALL_DIR = SysIni("USER", "WarpIN", "Path") if (WARPIN_INSTALL_DIR = "ERROR:") then do SAY "ERROR: The WarpIN path could not be found in OS2.INI. WarpIN not installed?"; SAY " Terminating script!"; exit; end; /* this thing is null-terminated, so get rid of the null byte */ p = pos('0'x, WARPIN_INSTALL_DIR); if (p \= 0) then do WARPIN_INSTALL_DIR = left(WARPIN_INSTALL_DIR, p - 1); end SAY "WarpIN found at: "||WARPIN_INSTALL_DIR if (stream(WARPIN_INSTALL_DIR||'\envwic.cmd', 'C', 'QUERY EXISTS') \== '') then do /* Execute the WIC script that comes with WarpIN */ SAY "Calling envwic.cmd from WarpIN install directory..." ''||WARPIN_INSTALL_DIR||'\envwic.cmd' end else do /* Set up WarpIN environment manually */ SAY "Setting up WarpIN environment..." '@set PATH=%PATH%;'WARPIN_INSTALL_DIR '@set BEGINLIBPATH=%BEGINLIBPATH%;'WARPIN_INSTALL_DIR end exit;