source: packaging/lib.wis.tpl@ 628

Last change on this file since 628 was 546, checked in by Dmitry A. Kuminov, 16 years ago

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

File size: 11.9 KB
Line 
1<WARPIN VERSION="0.9.20" OS="OS2_4x">
2
3<HEAD>
4
5<TITLE>Qt Runtime Libraries ${version} (${date})</TITLE>
6
7<REXX NAME="GetDLLPath">
8 rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
9 rc = SysLoadFuncs()
10 ret = SysBootDrive()'\OS2\DLL'
11 bestPath = SysBootDrive()'\ecs\dll'
12 config_sys = SysBootDrive()'\config.sys'
13 do while lines(config_sys)
14 line = linein(config_sys)
15 if (left(line, 8) == 'LIBPATH=') then do
16 /* locate the previous occurence of path */
17 libpath = translate(substr(line, 9))
18 path = translate(bestPath)
19 l = length(path)
20 found = 0; p = 1
21 do while (\found)
22 p = pos(path, libpath, p)
23 if (p == 0) then leave
24 cb = ''; ca = ''
25 /*<*/
26 if (p > 1) then cb = substr(libpath, p - 1, 1)
27 if (p + l <= length(libpath)) then ca = substr(libpath, p + l, 1)
28 /*>*/
29 found = (cb == '' | cb == ';') & (ca == '' | ca == ';')
30 if (\found) then p = p + 1
31 end
32 if (found) then do
33 ret = bestPath
34 leave
35 end
36 end
37 end
38 return ret
39</REXX>
40
41<REXX NAME="GetDocPath">
42 rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
43 rc = SysLoadFuncs()
44 ret = SysBootDrive()'\OS2\DOC'
45 bestPath = SysBootDrive()'\ecs\DOC'
46 curDir = directory()
47 if (directory(bestPath) \== '') then ret = bestPath
48 call directory curdir
49 return ret
50</REXX>
51
52<REXX NAME="GetSysAppPath">
53 rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
54 rc = SysLoadFuncs()
55 ret = SysBootDrive()'\OS2\APPS'
56 bestPath = SysBootDrive()'\ecs\SYSTEM'
57 curDir = directory()
58 if (directory(bestPath) \== '') then ret = bestPath
59 call directory curdir
60 return ret
61</REXX>
62
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
90 end
91 end
92 end
93 end
94 end
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
171</REXX>
172
173<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
174
175<PCK INDEX=1
176 PACKAGEID="netlabs.org\Qt4\Runtime\${version_path}"
177 TITLE="Runtime"
178 NODESELECT
179 REQUIRES="netlabs.org\kLIBC\LIBC 0.6 Runtime\0\6\3"
180 REQUIRES="netlabs.org\GCC4\Runtime\4\4\2\20091204"
181 TARGET="=("GetDLLPath")" FIXED
182 LONGFILENAMES
183 EXECUTE="$(2)\util\UpdateQtSysConf.cmd|Prefix=$(2),Settings=$\(ETC\)/xdg"
184 DEEXECUTE="del $(ETC)\qtsys.conf"
185>Contains Qt runtime libraries. This package is required</PCK>
186
187<PCK INDEX=2
188 PACKAGEID="netlabs.org\Qt4\Installation Utilities\${version_path}"
189 TITLE="Installation Utilities"
190 NODESELECT
191 REQUIRES="1"
192 TARGET="=("GetSysAppPath")\Qt4"
193 LONGFILENAMES
194>Contains installation utilities. This package is required. The installation directory of this package serves as a base directory for all other Qt packages except Runtime</PCK>
195
196<PCK INDEX=3
197 PACKAGEID="netlabs.org\Qt4\Plugins\${version_path}"
198 TITLE="Plugins"
199 NODESELECT
200 REQUIRES="1"
201 TARGET="$(2)\plugins" FIXED
202 LONGFILENAMES
203>Contains standard Qt plugins. This package is required</PCK>
204
205<PCK INDEX=4
206 PACKAGEID="netlabs.org\Qt4\Translations\${version_path}"
207 TITLE="Translations"
208 SELECT
209 REQUIRES="1"
210 TARGET="$(2)\translations" FIXED
211 LONGFILENAMES
212>Contains translations of the Qt runtime. This package is recommended</PCK>
213
214<PCK INDEX=5
215 PACKAGEID="netlabs.org\Qt4\SysTray\${version_path}"
216 TITLE="Extended System Tray widget for XCenter"
217 =("GetPkgSelectAttrFixed Ulrich Möller\XWorkplace\Kernel")
218 REQUIRES="1"
219 REQUIRES="Ulrich M”ller\XWorkplace\Kernel\0\9\9"
220 TARGET="=("GetPkgPathRefFixed Ulrich Möller\XWorkplace\Kernel, Ulrich M”ller\XWorkplace\Kernel")" FIXED
221 LONGFILENAMES
222>Provides support for the system tray to Qt applications. This package is recommended</PCK>
223
224<PCK INDEX=6
225 PACKAGEID="netlabs.org\Qt4\Readme\${version_path}"
226 TITLE="Readmes and Licenses"
227 SELECT
228 TARGET="$(2)" FIXED
229 LONGFILENAMES
230>Contains the readme files and license agreements</PCK>
231
232</HEAD>
233
234<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
235
236<BODY>
237
238<PAGE INDEX=1 TYPE=README>
239<TEXT>Welcome to the Qt 4 Runtime Installation Program!
240
241Please read through the following pages by pressing "Next" to continue or press "Cancel" to abort the installation.</TEXT>
242