***** BEGIN LICENSE BLOCK ***** Version: CDDL 1.0 The contents of this file are subject to the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.sun.com/cddl/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is "netlabs.org Open Source Archive Administrator/Client" The Original Distribution Package is named "netlabs.org Open Source Archive Administrator/Client" and maintained and distributed by the Initial Developer and/or netlabs.org only. In addition to the CDDL the following applies: If you modify the Original Code, you may distribute it only as a part of a distribution package where - the name of the package, created directories or OS2.INI entries do not contain any of the terms - "netlabs.org Open Source Archive" - "NOSA" - "NOSAC" - "NOSAADM" - neither netlabs.org nor the Initial Developer is stated as the vendor or originator of the resulting Distribution Package, which contains the Modified Code. The Initial Developer of the Original Code is netlabs.org: Christian Langanke . Portions created by the Initial Developer are Copyright (C) 1999-2008 the Initial Developer. All Rights Reserved. Contributor(s): ***** END LICENSE BLOCK ***** */ =("Initialize_GetTitle") env = 'OS2ENVIRONMENT'; TRUE = (1 = 1); FALSE = (0 = 1); CALL RxfuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'; CALL SysLoadFuncs; /* ------------------------------------------------ */ /* read the config file */ RuntimeDir = Initialize( 9, 'nosa.in'); IF (RuntimeDir = '') THEN RETURN( "ERROR: cannot initialize!"); /* make all entries hidden by default*/ DO i = 1 TO 5 DummyPackageId = '=("PackageId Dummy'i'")'; PckAttrs = 'INDEX="29999"', 'PACKAGEID="'DummyPackageId'"', 'TITLE="DummyTitle"', 'TARGET="?:\"', 'EXTERNAL="$_DummyExternalPackage_$"'; rc = WirexxPutEnv( 'PckAttrs'i, PckAttrs); END; /* ------------------------------------------------ */ /* determine basic WarpIN values */ Vendor = WirexxGetEnv( 'VENDOR'); AppName = WirexxGetEnv( 'NAME'); ShortName = WirexxGetEnv( 'SHORTNAME'); FullAppName = WirexxGetEnv( 'FULLNAME'); ClientName = WirexxGetEnv( 'CLIENT_PROGTYPE'); AdminName = WirexxGetEnv( 'ADMIN_PROGTYPE'); CvsPackageName = WirexxGetEnv( 'CVS_PACKAGENAME'); CvsNosaVersion = WirexxGetEnv( 'CVS_NOSA_VERSION'); /* check if a NOSA default path is set - used for debugging */ DefTargetDir = VALUE( 'NOSA_DEFAULTPATH',,env); IF (DefTargetDir \= '') THEN rc = WirexxPutEnv( 'TARGETDIR', DefTargetDir); /* ------------------------------------------------ */ /* determine if required progs are available */ ProgFound = ''; ProgMissing = ''; ProgFooter = ''; RequiredList = TRANSLATE( WirexxGetEnv( 'REQUIREDLIST')); s = 0; DO WHILE (RequiredList \= '') PARSE VAR RequiredList ThisFile RequiredList; PARSE VAR ThisFile ThisName'.'ThisType; ProgTitle = WirexxGetEnv( 'PROGRAM_'ThisName); /* check for the program file and/or version */ SELECT WHEN (ThisFile = 'EMX.DLL') THEN fProgFound = IsEmxAvailable( '61'); WHEN (ThisType = 'EXE') THEN fProgFound = (SysSearchPath( 'PATH', ThisFile) \= ''); OTHERWISE fProgFound = FALSE; END; /* create result text */ IF (fProgFound) THEN ProgFound = ProgFound'
  • 'ProgTitle; ELSE ProgMissing = ProgMissing'
  • 'ProgTitle; END; /* set result vars */ IF (ProgFound \= '') THEN DO ProgFound = 'The following required programs are installed:
      'ProgFound'
    '; ProgFooter = '

    All requirements for the 'ShortName' programs are met.'; END; IF (ProgMissing \= '') THEN DO ProgMissing = 'The following programs are missing:

      'ProgMissing'
    '; ProgFooter = '

    The 'ShortName' programs may not work properly fully or in part!', '
    Please check the online help, section Prerequisites', 'for download URLs and instructions.'; END; rc = WirexxPutEnv( 'ProgFound', ProgFound); rc = WirexxPutEnv( 'ProgMissing', ProgMissing); rc = WirexxPutEnv( 'ProgFooter', ProgFooter); /* ------------------------------------------------ */ /* setup admin item */ PckIndex = 1; ComponentName = AdminName; ComponentTitle = AppName ComponentName; PckAttrs = 'INDEX='PckIndex 'PACKAGEID="=("PackageId' ComponentName'")"', 'TITLE="'ComponentTitle'"', 'TARGET="=("Var TARGETDIR")\=("Var ADMIN_FILESTEM")" LONGFILENAMES', 'EXECUTE="$('PckIndex')\install\install.cmd"', 'DEEXECUTE="$('PckIndex')\install\cvswps.cmd|/REMOVE"'; IF (InstallCvs = 'FORCE') THEN PckAttrs = PckAttrs 'REQUIRES=3'; PckDesc = 'The' ComponentTitle, 'lets you setup and secure CVS archives with a handful of batch', 'commands on an OS/2 or eComStation system and provide access for others.'; rc = WirexxPutEnv( 'PckAttrs'PckIndex, PckAttrs); rc = WirexxPutEnv( 'PckDesc'PckIndex, PckDesc); /* ------------------------------------------------ */ /* setup client item */ PckIndex = 2; ComponentName = ClientName; ComponentTitle = AppName ComponentName; PckAttrs = 'INDEX='PckIndex 'PACKAGEID="=("PackageId' ComponentName'")"', 'TITLE="'ComponentTitle'"', 'TARGET="=("Var TARGETDIR")\=("Var CLIENT_FILESTEM")" SELECT LONGFILENAMES', 'EXECUTE="$('PckIndex')\install\install.cmd"2', 'DEEXECUTE="$('PckIndex')\install\cvswps.cmd|/REMOVE"'; IF (InstallCvs = 'FORCE') THEN PckAttrs = PckAttrs 'REQUIRES=3'; PckDesc = 'The' ComponentTitle, 'lets you download sources of all 'AppName's,', 'including sources of well known OS/2 and', 'eComStation related and internet based projects.' rc = WirexxPutEnv( 'PckAttrs'PckIndex, PckAttrs); rc = WirexxPutEnv( 'PckDesc'PckIndex, PckDesc); /* ------------------------------------------------ */ /* cleanup the temporary directory */ Terminate( RuntimeDir); RETURN( FullAppName); /* ------------------------------------------------ */ Initialize: PROCEDURE; PARSE ARG RuntimePck, ConfigFile; /* unpack config file */ TmpDir = VALUE( 'TMP',,'OS2ENVIRONMENT'); RuntimeDir = SysTempFilename( TmpDir'\wpirt.???'); rcx = SysMkDir( RuntimeDir); rcx = DIRECTORY( RuntimeDir); rc = WirexxExtract( RuntimePck,, RuntimeDir); IF ((ConfigFile \= '') & , (STREAM( ConfigFile, 'C', 'QUERY EXISTS') \= '')) THEN DO WHILE (LINES( ConfigFile) > 0) /* read consecutive lines */ ThisLine = LINEIN( ConfigFile); /* check for empty or comment lines */ IF (STRIP( ThisLine) = '') THEN ITERATE; IF (LEFT( ThisLine, 1) = '#') THEN ITERATE; /* read consecutive lines */ DO WHILE (RIGHT( ThisLine, 1) = '\') NextLine = LINEIN( ThisLine); IF (LEFT( NextLine, 1) \= '#') THEN ThisLine = ThisLine NextLine; END; /* check for equal char */ IF (POS( '=', ThisLine) = 0) THEN ITERATE; /* tokenize and set values */ PARSE Var ThisLine VarName'='VarValue; VarName = STRIP( VarName); VarValue = STRIP( VarValue); /* set value */ rc = WirexxPutEnv( Varname, VarValue); END; rcx = STREAM( ConfigFile, 'C', 'CLOSE'); /* prepare package version information */ AppName = WirexxGetEnv( 'Name'); Vendor = WirexxGetEnv( 'Vendor'); AppVersionLit = WirexxGetEnv( 'VersionLit'); AppRevision = WirexxGetEnv( 'Revision'); AppPatch = WirexxGetEnv( 'Patch'); PARSE VAR AppVersionLit 'V'vMajor'.'vMinor; PackageIdPrefix = Vendor'\'AppName AppVersionLit; PackageIdSuffix = vMajor'\'vMinor'\'AppRevision'\'AppPatch; CALL WirexxPutEnv 'PackageIdPrefix', PackageIdPrefix; CALL WirexxPutEnv 'PackageIdSuffix', PackageIdSuffix; RETURN( RuntimeDir); /* ------------------------------------------------ */ Terminate: PROCEDURE PARSE ARG RuntimeDir; IF (RuntimeDir \= '') THEN DO /* leave and remove tmp dir */ rcx = DIRECTORY( RuntimeDir'\..'); rc = SysFileTree( RuntimeDir'\*', 'File.', 'FOS', '*****', '**---'); DO i = File.0 TO 1 BY -1 rc = SysFileDelete( File.i); END; rc = SysFileTree( RuntimeDir'\*', 'Dir.', 'DOS'); DO i = Dir.0 TO 1 BY -1 rc = SysRmDir( Dir.i); END; rc = SysRmDir( RuntimeDir); END; RETURN(''); /* ------------------------------------------------ */ IsEmxAvailable: PROCEDURE PARSE ARG ReqMinVersion; CurrentRev = 0; CALL RxFuncAdd 'emx_revision', 'EMX', 'emx_revision' SIGNAL ON SYNTAX NAME EMX_LOADERROR CurrentRev = emx_revision() EMX_LOADERROR: SIGNAL OFF SYNTAX CALL RxFuncDrop emx_revision RETURN( CurrentRev >= ReqMinVersion); PARSE ARG Varname; RETURN( WirexxGetEnv( VarName)); trace i PARSE ARG PageIndex; RETURN( PageIndex); PARSE ARG PackageName; PackageIdPrefix = WirexxGetEnv( PackageIdPrefix); PackageIdSuffix = WirexxGetEnv( PackageIdSuffix); RETURN( PackageIdPrefix'\'PackageName'\'PackageIdSuffix); =("Var PckDesc1") =("Var PckDesc2") =("Var PckDesc3") Welcome to the installation of the
    =("Var FULLNAME") (=("Var SHORTNAME")).

    The =("Var SHORTNAME") =("Var ADMIN_PROGTYPE") lets you setup and secure CVS archives with a handful of batch commands on an OS/2 or eComStation system provide access for others. The =("Var SHORTNAME") =("Var CLIENT_PROGTYPE") lets you download sources of all =("Var NAME")s, including sources of well known OS/2 and eComStation related and internet based projects.

    The =("Var SHORTNAME") packages are written and Copyright (c) by
    =("Var AUTHOR") <=("Var EMAIL")> =("Var YEARS")
    for =("Var VENDOR"), All rights reserved.

    The source is available under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0. This package is maintained and supported by =("Var VENDOR") and may not be distributed modified or in other form as this WarpIN package under the same package name.

    =("Var SHORTNAME") homepage: =("Var HOMEPAGE")
    netlabs.org homepage: http://www.netlabs.org

    The =("Var SHORTNAME") packages require certain programs to be available on your system.

    =("Var ProgFound") =("Var ProgMissing") =("Var ProgFooter") On installation please select the actions to be taken. Press Install to start the (de)installation. I~nstall