1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** All rights reserved.
|
---|
5 | ** Contact: Nokia Corporation ([email protected])
|
---|
6 | **
|
---|
7 | ** This file is part of the documentation of the Qt Toolkit.
|
---|
8 | **
|
---|
9 | ** $QT_BEGIN_LICENSE:BSD$
|
---|
10 | ** You may use this file under the terms of the BSD license as follows:
|
---|
11 | **
|
---|
12 | ** "Redistribution and use in source and binary forms, with or without
|
---|
13 | ** modification, are permitted provided that the following conditions are
|
---|
14 | ** met:
|
---|
15 | ** * Redistributions of source code must retain the above copyright
|
---|
16 | ** notice, this list of conditions and the following disclaimer.
|
---|
17 | ** * Redistributions in binary form must reproduce the above copyright
|
---|
18 | ** notice, this list of conditions and the following disclaimer in
|
---|
19 | ** the documentation and/or other materials provided with the
|
---|
20 | ** distribution.
|
---|
21 | ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
|
---|
22 | ** the names of its contributors may be used to endorse or promote
|
---|
23 | ** products derived from this software without specific prior written
|
---|
24 | ** permission.
|
---|
25 | **
|
---|
26 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
---|
27 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
---|
28 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
---|
29 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
---|
30 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
---|
31 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
---|
32 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
33 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
34 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
35 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
---|
36 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
---|
37 | ** $QT_END_LICENSE$
|
---|
38 | **
|
---|
39 | ****************************************************************************/
|
---|
40 |
|
---|
41 | //! [0]
|
---|
42 | cd /path/to/Qt
|
---|
43 | ./configure -static -prefix /path/to/Qt <other parameters>
|
---|
44 | make sub-src
|
---|
45 | //! [0]
|
---|
46 |
|
---|
47 |
|
---|
48 | //! [1]
|
---|
49 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
50 | //! [1]
|
---|
51 |
|
---|
52 |
|
---|
53 | //! [2]
|
---|
54 | make clean
|
---|
55 | PATH=/path/to/Qt/bin:$PATH
|
---|
56 | export PATH
|
---|
57 | qmake -config release
|
---|
58 | make
|
---|
59 | //! [2]
|
---|
60 |
|
---|
61 |
|
---|
62 | //! [3]
|
---|
63 | ldd ./application
|
---|
64 | //! [3]
|
---|
65 |
|
---|
66 |
|
---|
67 | //! [4]
|
---|
68 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
69 | //! [4]
|
---|
70 |
|
---|
71 |
|
---|
72 | //! [5]
|
---|
73 | make clean
|
---|
74 | qmake -config release
|
---|
75 | make
|
---|
76 | //! [5]
|
---|
77 |
|
---|
78 |
|
---|
79 | //! [6]
|
---|
80 | cd ../plugandpaintplugins
|
---|
81 | make clean
|
---|
82 | qmake -config release
|
---|
83 | make
|
---|
84 | //! [6]
|
---|
85 |
|
---|
86 |
|
---|
87 | //! [7]
|
---|
88 | #!/bin/sh
|
---|
89 | appname=`basename $0 | sed s,\.sh$,,`
|
---|
90 |
|
---|
91 | dirname=`dirname $0`
|
---|
92 | tmp="${dirname#?}"
|
---|
93 |
|
---|
94 | if [ "${dirname%$tmp}" != "/" ]; then
|
---|
95 | dirname=$PWD/$dirname
|
---|
96 | fi
|
---|
97 | LD_LIBRARY_PATH=$dirname
|
---|
98 | export LD_LIBRARY_PATH
|
---|
99 | $dirname/$appname $*
|
---|
100 | //! [7]
|
---|
101 |
|
---|
102 |
|
---|
103 | //! [8]
|
---|
104 | DESTDIR = /path/to/Qt/plugandpaint/plugins
|
---|
105 | //! [8]
|
---|
106 |
|
---|
107 |
|
---|
108 | //! [9]
|
---|
109 | qApp->addLibraryPath("/some/other/path");
|
---|
110 | //! [9]
|
---|
111 |
|
---|
112 |
|
---|
113 | //! [10]
|
---|
114 | ldd ./application
|
---|
115 | //! [10]
|
---|
116 |
|
---|
117 |
|
---|
118 | //! [11]
|
---|
119 | cd C:\path\to\Qt
|
---|
120 | configure -static <any other options you need>
|
---|
121 | //! [11]
|
---|
122 |
|
---|
123 |
|
---|
124 | //! [12]
|
---|
125 | nmake sub-src
|
---|
126 | //! [12]
|
---|
127 |
|
---|
128 |
|
---|
129 | //! [13]
|
---|
130 | cd examples\tools\plugandpaint
|
---|
131 | //! [13]
|
---|
132 |
|
---|
133 |
|
---|
134 | //! [14]
|
---|
135 | nmake clean
|
---|
136 | qmake -config release
|
---|
137 | nmake
|
---|
138 | //! [14]
|
---|
139 |
|
---|
140 |
|
---|
141 | //! [15]
|
---|
142 | cd examples\tools\plugandpaint
|
---|
143 | //! [15]
|
---|
144 |
|
---|
145 |
|
---|
146 | //! [16]
|
---|
147 | nmake clean
|
---|
148 | qmake -config release
|
---|
149 | nmake
|
---|
150 | //! [16]
|
---|
151 |
|
---|
152 |
|
---|
153 | //! [17]
|
---|
154 | cd ..\plugandpaintplugins
|
---|
155 | nmake clean
|
---|
156 | qmake -config release
|
---|
157 | nmake
|
---|
158 | //! [17]
|
---|
159 |
|
---|
160 |
|
---|
161 | //! [18]
|
---|
162 | plugins\pnp_basictools.dll
|
---|
163 | plugins\pnp_extrafilters.dll
|
---|
164 | //! [18]
|
---|
165 |
|
---|
166 |
|
---|
167 | //! [19]
|
---|
168 | qApp->addLibraryPath("C:\some\other\path");
|
---|
169 | //! [19]
|
---|
170 |
|
---|
171 |
|
---|
172 | //! [20]
|
---|
173 | embed_manifest_dll
|
---|
174 | embed_manifest_exe
|
---|
175 | //! [20]
|
---|
176 |
|
---|
177 |
|
---|
178 | //! [21]
|
---|
179 | CONFIG += embed_manifest_exe
|
---|
180 | //! [21]
|
---|
181 |
|
---|
182 |
|
---|
183 | //! [22]
|
---|
184 | <Visual Studio Install Path>\VC\redist\<Architecture>\Microsoft.VC80.CRT
|
---|
185 | //! [22]
|
---|
186 |
|
---|
187 |
|
---|
188 | //! [23]
|
---|
189 | CONFIG-=embed_manifest_dll
|
---|
190 | //! [23]
|
---|
191 |
|
---|
192 |
|
---|
193 | //! [24]
|
---|
194 | depends <application executable>
|
---|
195 | //! [24]
|
---|
196 |
|
---|
197 |
|
---|
198 | //! [25]
|
---|
199 | C:<path to Qt>\plugins
|
---|
200 | //! [25]
|
---|
201 |
|
---|
202 |
|
---|
203 | //! [26]
|
---|
204 | CONFIG-=app_bundle
|
---|
205 | //! [26]
|
---|
206 |
|
---|
207 |
|
---|
208 | //! [27]
|
---|
209 | cd /path/to/Qt
|
---|
210 | ./configure -static <other parameters>
|
---|
211 | make sub-src
|
---|
212 | //! [27]
|
---|
213 |
|
---|
214 |
|
---|
215 | //! [28]
|
---|
216 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
217 | //! [28]
|
---|
218 |
|
---|
219 |
|
---|
220 | //! [29]
|
---|
221 | make clean
|
---|
222 | qmake -config release
|
---|
223 | make
|
---|
224 | //! [29]
|
---|
225 |
|
---|
226 |
|
---|
227 | //! [30]
|
---|
228 | otool -L plugandpaint.app/Contents/MacOs/plugandpaint
|
---|
229 | //! [30]
|
---|
230 |
|
---|
231 |
|
---|
232 | //! [31]
|
---|
233 | plugandpaint.app/Contents/MacOS/plugandpaint:
|
---|
234 | /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
|
---|
235 | (compatibility version 2.0.0, current version 128.0.0)
|
---|
236 | /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
|
---|
237 | (compatibility version 1.0.0, current version 10.0.0)
|
---|
238 | /usr/lib/libz.1.dylib
|
---|
239 | (compatibility version 1.0.0, current version 1.2.3)
|
---|
240 | /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
|
---|
241 | (compatibility version 1.0.0, current version 22.0.0)
|
---|
242 | /usr/lib/libstdc++.6.dylib
|
---|
243 | (compatibility version 7.0.0, current version 7.3.0)
|
---|
244 | /usr/lib/libgcc_s.1.dylib
|
---|
245 | (compatibility version 1.0.0, current version 1.0.0)
|
---|
246 | /usr/lib/libmx.A.dylib
|
---|
247 | (compatibility version 1.0.0, current version 92.0.0)
|
---|
248 | /usr/lib/libSystem.B.dylib
|
---|
249 | (compatibility version 1.0.0, current version 88.0.0)
|
---|
250 | //! [31]
|
---|
251 |
|
---|
252 |
|
---|
253 | //! [32]
|
---|
254 | -lQtGui
|
---|
255 | //! [32]
|
---|
256 |
|
---|
257 |
|
---|
258 | //! [33]
|
---|
259 | /where/static/qt/lib/is/libQtGui.a
|
---|
260 | //! [33]
|
---|
261 |
|
---|
262 |
|
---|
263 | //! [34]
|
---|
264 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
265 | //! [34]
|
---|
266 |
|
---|
267 |
|
---|
268 | //! [35]
|
---|
269 | make clean
|
---|
270 | qmake -config release
|
---|
271 | make
|
---|
272 | //! [35]
|
---|
273 |
|
---|
274 |
|
---|
275 | //! [36]
|
---|
276 | cd ../plugandpaintplugins
|
---|
277 | make clean
|
---|
278 | qmake -config release
|
---|
279 | make
|
---|
280 | //! [36]
|
---|
281 |
|
---|
282 |
|
---|
283 | //! [37]
|
---|
284 | otool -L QtGui.framework/QtGui
|
---|
285 | //! [37]
|
---|
286 |
|
---|
287 |
|
---|
288 | //! [38]
|
---|
289 | QtGui.framework/QtGui:
|
---|
290 | /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
---|
291 | (compatibility version 4.0.0, current version 4.0.1)
|
---|
292 | /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
|
---|
293 | (compatibility version 2.0.0, current version 128.0.0)
|
---|
294 | /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
|
---|
295 | (compatibility version 1.0.0, current version 10.0.0)
|
---|
296 | /path/to/Qt/QtCore.framework/Versions/4.0/QtCore
|
---|
297 | (compatibility version 4.0.0, current version 4.0.1)
|
---|
298 | /usr/lib/libz.1.dylib
|
---|
299 | (compatibility version 1.0.0, current version 1.2.3)
|
---|
300 | /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
|
---|
301 | (compatibility version 1.0.0, current version 22.0.0)
|
---|
302 | /usr/lib/libstdc++.6.dylib
|
---|
303 | (compatibility version 7.0.0, current version 7.3.0)
|
---|
304 | /usr/lib/libgcc_s.1.dylib
|
---|
305 | (compatibility version 1.0.0, current version 1.0.0)
|
---|
306 | /usr/lib/libmx.A.dylib
|
---|
307 | (compatibility version 1.0.0, current version 92.0.0)
|
---|
308 | /usr/lib/libSystem.B.dylib
|
---|
309 | (compatibility version 1.0.0, current version 88.0.0)
|
---|
310 | //! [38]
|
---|
311 |
|
---|
312 |
|
---|
313 | //! [39]
|
---|
314 | mkdir plugandpaint.app/Contents/Frameworks
|
---|
315 | cp -R /path/to/Qt/lib/QtCore.framework
|
---|
316 | plugandpaint.app/Contents/Frameworks
|
---|
317 | cp -R /path/to/Qt/lib/QtGui.framework
|
---|
318 | plugandpaint.app/Contents/Frameworks
|
---|
319 | //! [39]
|
---|
320 |
|
---|
321 |
|
---|
322 | //! [40]
|
---|
323 | install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
324 | plugandpaint.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
325 | install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
---|
326 | plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
|
---|
327 | //! [40]
|
---|
328 |
|
---|
329 |
|
---|
330 | //! [41]
|
---|
331 | install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
---|
332 | @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
333 | plugandpaint.app/Contents/MacOs/plugandpaint
|
---|
334 | install_name_tool -change path/to/qt/lib/QtGui.framework/Versions/4.0/QtGui
|
---|
335 | @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
---|
336 | plugandpaint.app/Contents/MacOs/plugandpaint
|
---|
337 | //! [41]
|
---|
338 |
|
---|
339 |
|
---|
340 | //! [42]
|
---|
341 | install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
---|
342 | @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
343 | plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
|
---|
344 | //! [42]
|
---|
345 |
|
---|
346 |
|
---|
347 | //! [43]
|
---|
348 | mv plugins plugandpaint.app/Contents
|
---|
349 | //! [43]
|
---|
350 |
|
---|
351 |
|
---|
352 | //! [44]
|
---|
353 | libpnp_basictools.dylib:
|
---|
354 | libpnp_basictools.dylib
|
---|
355 | (compatibility version 0.0.0, current version 0.0.0)
|
---|
356 | /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
---|
357 | (compatibility version 4.0.0, current version 4.0.1)
|
---|
358 | /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
|
---|
359 | (compatibility version 2.0.0, current version 128.0.0)
|
---|
360 | /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
|
---|
361 | (compatibility version 1.0.0, current version 10.0.0)
|
---|
362 | /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
---|
363 | (compatibility version 4.0.0, current version 4.0.1)
|
---|
364 | /usr/lib/libz.1.dylib
|
---|
365 | (compatibility version 1.0.0, current version 1.2.3)
|
---|
366 | /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
|
---|
367 | (compatibility version 1.0.0, current version 22.0.0)
|
---|
368 | /usr/lib/libstdc++.6.dylib
|
---|
369 | (compatibility version 7.0.0, current version 7.3.0)
|
---|
370 | /usr/lib/libgcc_s.1.dylib
|
---|
371 | (compatibility version 1.0.0, current version 1.0.0)
|
---|
372 | /usr/lib/libmx.A.dylib
|
---|
373 | (compatibility version 1.0.0, current version 92.0.0)
|
---|
374 | /usr/lib/libSystem.B.dylib
|
---|
375 | (compatibility version 1.0.0, current version 88.0.0)
|
---|
376 | //! [44]
|
---|
377 |
|
---|
378 |
|
---|
379 | //! [45]
|
---|
380 | install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
---|
381 | @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
382 | plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
|
---|
383 | install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
---|
384 | @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
---|
385 | plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
|
---|
386 | //! [45]
|
---|
387 |
|
---|
388 |
|
---|
389 | //! [46]
|
---|
390 | #elif defined(Q_OS_MAC)
|
---|
391 | if (pluginsDir.dirName() == "MacOS") {
|
---|
392 | pluginsDir.cdUp();
|
---|
393 | }
|
---|
394 | #endif
|
---|
395 | //! [46]
|
---|
396 |
|
---|
397 |
|
---|
398 | //! [47]
|
---|
399 | cp -R /path/to/Qt/plugins/imageformats
|
---|
400 | pluginandpaint.app/Contents/plugins
|
---|
401 | //! [47]
|
---|
402 |
|
---|
403 |
|
---|
404 | //! [48]
|
---|
405 | install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
---|
406 | @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
---|
407 | plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
|
---|
408 | install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
---|
409 | @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
410 | plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
|
---|
411 | //! [48]
|
---|
412 |
|
---|
413 |
|
---|
414 | //! [49]
|
---|
415 | QDir dir(QApplication::applicationDirPath());
|
---|
416 | dir.cdUp();
|
---|
417 | dir.cd("plugins");
|
---|
418 | QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
|
---|
419 | //! [49]
|
---|
420 |
|
---|
421 |
|
---|
422 | //! [50]
|
---|
423 | otool -L MyApp.app/Contents/MacOS/MyApp
|
---|
424 | //! [50]
|
---|
425 |
|
---|
426 |
|
---|
427 | //! [51]
|
---|
428 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
|
---|
429 | //! [51]
|
---|
430 |
|
---|
431 | //! [51a]
|
---|
432 | install_name_tool -change /System/Library/Frameworks/CoreVideo.framework/
|
---|
433 | Versions/A/CoreVideo /System/Library/Frameworks/QuartzCore.framework/
|
---|
434 | Versions/A/QuartzCore libphonon_qt7.dylib
|
---|
435 | //! [51a]
|
---|
436 |
|
---|
437 | //! [51b]
|
---|
438 | ./CONFIGURE - SDK MacOSX10.4u.sdk
|
---|
439 | //! [51b]
|
---|
440 |
|
---|
441 | //! [52]
|
---|
442 | ./configure (other arguments) -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
|
---|
443 | //! [52]
|
---|
444 |
|
---|
445 |
|
---|
446 | //! [53]
|
---|
447 | QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
|
---|
448 | CONFIG+=x86 ppc
|
---|
449 | //! [53]
|
---|
450 |
|
---|
451 |
|
---|
452 | //! [54]
|
---|
453 | qApp->addLibraryPath("C:/customPath/plugins");
|
---|
454 | //! [54]
|
---|
455 |
|
---|
456 | //! [55]
|
---|
457 | cd examples\widgets\wiggly
|
---|
458 | //! [55]
|
---|
459 |
|
---|
460 | //! [56]
|
---|
461 | vendorinfo = \
|
---|
462 | "%{\"Example Localized Vendor\"}" \
|
---|
463 | ":\"Example Vendor\""
|
---|
464 |
|
---|
465 | my_deployment.pkg_prerules = vendorinfo
|
---|
466 | DEPLOYMENT += my_deployment
|
---|
467 | //! [56]
|
---|
468 |
|
---|
469 | //! [57]
|
---|
470 | supported_platforms = \
|
---|
471 | "; This demo only supports S60 5.0" \
|
---|
472 | "[0x1028315F],0,0,0,{\"S60ProductID\"}"
|
---|
473 |
|
---|
474 | default_deployment.pkg_prerules -= pkg_platform_dependencies
|
---|
475 | my_deployment.pkg_prerules += supported_platforms
|
---|
476 | DEPLOYMENT += my_deployment
|
---|
477 | //! [57]
|
---|
478 |
|
---|
479 | //! [58]
|
---|
480 | qmake
|
---|
481 | make release-gcce
|
---|
482 | //! [58]
|
---|
483 |
|
---|
484 | //! [59]
|
---|
485 | make installer_sis
|
---|
486 | //! [59]
|
---|