Changeset 546


Ignore:
Timestamp:
Feb 8, 2010, 4:10:32 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

packaging: Allow the "lib" WPI package to be installed w/o XWorkplace present (#128).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packaging/lib.wis.tpl

    r544 r546  
    6161</REXX>
    6262
    63 <REXX NAME="CheckPkg">
    64     rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
    65     rc = SysLoadFuncs()
    66     aAppId = 'netlabs.org\Qt4\Runtime'
    67     ver = ''
    68     WarpInDir = strip(SysIni('USER', 'WarpIN', 'Path'), 'T', '0'x)
    69     if (WarpInDir \== '') then do
    70         rc = SysFileTree(WarpInDir'\DATBAS_?.INI', 'inis', 'FO')
    71         if (rc == 0) then do
    72             do i = 1 to inis.0
    73                 rc = SysIni(inis.i, 'ALL:', 'apps')
    74                 if (rc == '') then do
    75                     do j = 1 to apps.0
    76                         apps.j = strip(apps.j, 'T', '0'x)
    77                         if (left(apps.j, length(aAppId)) == aAppId) then do
    78                             /* found the app */
    79                             ver = right(apps.j, length(apps.j) - length(aAppId) - 1)
    80                             ver = translate(ver, '.', '\')
     63<REXX NAME="CheckQt4RuntimePkg">
     64    ver = GetPkgVersion('netlabs.org\Qt4\Runtime')
     65    call WirexxPutEnv 'Qt4RuntimePkgVersion', ver
     66    if (ver == '') then return 4
     67    return 6
     68
     69    /* same as below... */
     70    GetPkgVersion: procedure
     71        parse arg aPkgId
     72        rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
     73        rc = SysLoadFuncs()
     74        ver = ''
     75        WarpInDir = strip(SysIni('USER', 'WarpIN', 'Path'), 'T', '0'x)
     76        if (WarpInDir \== '') then do
     77            rc = SysFileTree(WarpInDir'\DATBAS_?.INI', 'inis', 'FO')
     78            if (rc == 0) then do
     79                do i = 1 to inis.0
     80                    rc = SysIni(inis.i, 'ALL:', 'apps')
     81                    if (rc == '') then do
     82                        do j = 1 to apps.0
     83                            apps.j = strip(apps.j, 'T', '0'x)
     84                            if (left(apps.j, length(aPkgId)) == aPkgId) then do
     85                                /* found the app */
     86                                ver = right(apps.j, length(apps.j) - length(aPkgId) - 1)
     87                                ver = translate(ver, '.', '\')
     88                                leave
     89                            end
    8190                        end
    8291                    end
     
    8493            end
    8594        end
    86     end
    87     call WirexxPutEnv 'OtherVersion', ver
    88     if (ver == '') then return 4
    89     return 6
    90 </REXX>
    91 
    92 <REXX NAME="GetOtherVersion">
    93     return WirexxGetEnv('OtherVersion')
     95        return ver
     96</REXX>
     97
     98<REXX NAME="GetQt4RuntimePkgVersion">
     99    return WirexxGetEnv('Qt4RuntimePkgVersion')
     100</REXX>
     101
     102<REXX NAME="GetPkgPathRefFixed">
     103    parse arg aPkgIdUtf8', 'aPkgIdLocal
     104    ver = GetPkgVersion(aPkgIdUtf8)
     105    if (ver == '') then return 'Unable to determine the installation path'
     106    return '$('aPkgIdLocal')'
     107
     108    /* same as above... */
     109    GetPkgVersion: procedure
     110        parse arg aPkgId
     111        rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
     112        rc = SysLoadFuncs()
     113        ver = ''
     114        WarpInDir = strip(SysIni('USER', 'WarpIN', 'Path'), 'T', '0'x)
     115        if (WarpInDir \== '') then do
     116            rc = SysFileTree(WarpInDir'\DATBAS_?.INI', 'inis', 'FO')
     117            if (rc == 0) then do
     118                do i = 1 to inis.0
     119                    rc = SysIni(inis.i, 'ALL:', 'apps')
     120                    if (rc == '') then do
     121                        do j = 1 to apps.0
     122                            apps.j = strip(apps.j, 'T', '0'x)
     123                            if (left(apps.j, length(aPkgId)) == aPkgId) then do
     124                                /* found the app */
     125                                ver = right(apps.j, length(apps.j) - length(aPkgId) - 1)
     126                                ver = translate(ver, '.', '\')
     127                                leave
     128                            end
     129                        end
     130                    end
     131                end
     132            end
     133        end
     134        return ver
     135</REXX>
     136
     137<REXX NAME="GetPkgSelectAttrFixed">
     138    /* makes sure the package is selected only if the prerequisite is present */
     139    parse arg aPkgId
     140    ver = GetPkgVersion(aPkgId)
     141    if (ver == '') then return ''
     142    return 'SELECT'
     143
     144    /* same as above... */
     145    GetPkgVersion: procedure
     146        parse arg aPkgId
     147        rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
     148        rc = SysLoadFuncs()
     149        ver = ''
     150        WarpInDir = strip(SysIni('USER', 'WarpIN', 'Path'), 'T', '0'x)
     151        if (WarpInDir \== '') then do
     152            rc = SysFileTree(WarpInDir'\DATBAS_?.INI', 'inis', 'FO')
     153            if (rc == 0) then do
     154                do i = 1 to inis.0
     155                    rc = SysIni(inis.i, 'ALL:', 'apps')
     156                    if (rc == '') then do
     157                        do j = 1 to apps.0
     158                            apps.j = strip(apps.j, 'T', '0'x)
     159                            if (left(apps.j, length(aPkgId)) == aPkgId) then do
     160                                /* found the app */
     161                                ver = right(apps.j, length(apps.j) - length(aPkgId) - 1)
     162                                ver = translate(ver, '.', '\')
     163                                leave
     164                            end
     165                        end
     166                    end
     167                end
     168            end
     169        end
     170        return ver
    94171</REXX>
    95172
     
    138215     PACKAGEID="netlabs.org\Qt4\SysTray\${version_path}"
    139216     TITLE="Extended System Tray widget for XCenter"
    140      SELECT
     217     =("GetPkgSelectAttrFixed Ulrich Möller\XWorkplace\Kernel")
    141218     REQUIRES="1"
    142219     REQUIRES="Ulrich M”ller\XWorkplace\Kernel\0\9\9"
    143      TARGET="$(Ulrich M”ller\XWorkplace\Kernel)" FIXED
     220     TARGET="=("GetPkgPathRefFixed Ulrich Möller\XWorkplace\Kernel, Ulrich M”ller\XWorkplace\Kernel")" FIXED
    144221     LONGFILENAMES
    145222>Provides support for the system tray to Qt applications. This package is recommended</PCK>
     
    197274
    198275<PAGE INDEX=3 TYPE=README>
    199 <NEXTBUTTON TARGET="=("CheckPkg")">~I agree</NEXTBUTTON>
     276<NEXTBUTTON TARGET="=("CheckQt4RuntimePkg")">~I agree</NEXTBUTTON>
    200277<TEXT>Please read the Qt GNU GPL v. 3.0 license agreement now.
    201278
     
    233310<NEXTBUTTON TARGET=6>~Next</NEXTBUTTON>
    234311<TEXT>
    235 A different version of the Qt 4 Runtime Libraries is installed on this computer (=("GetOtherVersion")).
     312A different version of the Qt 4 Runtime Libraries is installed on this computer (=("GetQt4RuntimePkgVersion")).
    236313
    237314This version cannot be installed over the existing one. You must uninstall the currently installed version first and then retry the installation.
Note: See TracChangeset for help on using the changeset viewer.