source: trunk/doc/src/snippets/code/doc_src_deployment.qdoc@ 561

Last change on this file since 561 was 561, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.1 sources.

File size: 11.2 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 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:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42//! [0]
43cd /path/to/Qt
44./configure -static -prefix /path/to/Qt <other parameters>
45make sub-src
46//! [0]
47
48
49//! [1]
50cd /path/to/Qt/examples/tools/plugandpaint
51//! [1]
52
53
54//! [2]
55make clean
56PATH=/path/to/Qt/bin:$PATH
57export PATH
58qmake -config release
59make
60//! [2]
61
62
63//! [3]
64ldd ./application
65//! [3]
66
67
68//! [4]
69cd /path/to/Qt/examples/tools/plugandpaint
70//! [4]
71
72
73//! [5]
74make clean
75qmake -config release
76make
77//! [5]
78
79
80//! [6]
81cd ../plugandpaintplugins
82make clean
83qmake -config release
84make
85//! [6]
86
87
88//! [7]
89#!/bin/sh
90appname=`basename $0 | sed s,\.sh$,,`
91
92dirname=`dirname $0`
93tmp="${dirname#?}"
94
95if [ "${dirname%$tmp}" != "/" ]; then
96dirname=$PWD/$dirname
97fi
98LD_LIBRARY_PATH=$dirname
99export LD_LIBRARY_PATH
100$dirname/$appname $*
101//! [7]
102
103
104//! [8]
105DESTDIR = /path/to/Qt/plugandpaint/plugins
106//! [8]
107
108
109//! [9]
110qApp->addLibraryPath("/some/other/path");
111//! [9]
112
113
114//! [10]
115ldd ./application
116//! [10]
117
118
119//! [11]
120cd C:\path\to\Qt
121configure -static <any other options you need>
122//! [11]
123
124
125//! [12]
126nmake sub-src
127//! [12]
128
129
130//! [13]
131cd examples\tools\plugandpaint
132//! [13]
133
134
135//! [14]
136nmake clean
137qmake -config release
138nmake
139//! [14]
140
141
142//! [15]
143cd examples\tools\plugandpaint
144//! [15]
145
146
147//! [16]
148nmake clean
149qmake -config release
150nmake
151//! [16]
152
153
154//! [17]
155cd ..\plugandpaintplugins
156nmake clean
157qmake -config release
158nmake
159//! [17]
160
161
162//! [18]
163plugins\pnp_basictools.dll
164plugins\pnp_extrafilters.dll
165//! [18]
166
167
168//! [19]
169qApp->addLibraryPath("C:\some\other\path");
170//! [19]
171
172
173//! [20]
174embed_manifest_dll
175embed_manifest_exe
176//! [20]
177
178
179//! [21]
180CONFIG += embed_manifest_exe
181//! [21]
182
183
184//! [22]
185<Visual Studio Install Path>\VC\redist\<Architecture>\Microsoft.VC80.CRT
186//! [22]
187
188
189//! [23]
190CONFIG-=embed_manifest_dll
191//! [23]
192
193
194//! [24]
195depends <application executable>
196//! [24]
197
198
199//! [25]
200C:<path to Qt>\plugins
201//! [25]
202
203
204//! [26]
205CONFIG-=app_bundle
206//! [26]
207
208
209//! [27]
210cd /path/to/Qt
211./configure -static <other parameters>
212make sub-src
213//! [27]
214
215
216//! [28]
217cd /path/to/Qt/examples/tools/plugandpaint
218//! [28]
219
220
221//! [29]
222make clean
223qmake -config release
224make
225//! [29]
226
227
228//! [30]
229otool -L plugandpaint.app/Contents/MacOs/plugandpaint
230//! [30]
231
232
233//! [31]
234plugandpaint.app/Contents/MacOS/plugandpaint:
235/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
236 (compatibility version 2.0.0, current version 128.0.0)
237/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
238 (compatibility version 1.0.0, current version 10.0.0)
239/usr/lib/libz.1.dylib
240 (compatibility version 1.0.0, current version 1.2.3)
241/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
242 (compatibility version 1.0.0, current version 22.0.0)
243/usr/lib/libstdc++.6.dylib
244 (compatibility version 7.0.0, current version 7.3.0)
245/usr/lib/libgcc_s.1.dylib
246 (compatibility version 1.0.0, current version 1.0.0)
247/usr/lib/libmx.A.dylib
248 (compatibility version 1.0.0, current version 92.0.0)
249/usr/lib/libSystem.B.dylib
250 (compatibility version 1.0.0, current version 88.0.0)
251//! [31]
252
253
254//! [32]
255-lQtGui
256//! [32]
257
258
259//! [33]
260/where/static/qt/lib/is/libQtGui.a
261//! [33]
262
263
264//! [34]
265cd /path/to/Qt/examples/tools/plugandpaint
266//! [34]
267
268
269//! [35]
270make clean
271qmake -config release
272make
273//! [35]
274
275
276//! [36]
277cd ../plugandpaintplugins
278make clean
279qmake -config release
280make
281//! [36]
282
283
284//! [37]
285otool -L QtGui.framework/QtGui
286//! [37]
287
288
289//! [38]
290QtGui.framework/QtGui:
291/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
292 (compatibility version 4.0.0, current version 4.0.1)
293/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
294 (compatibility version 2.0.0, current version 128.0.0)
295/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
296 (compatibility version 1.0.0, current version 10.0.0)
297/path/to/Qt/QtCore.framework/Versions/4.0/QtCore
298 (compatibility version 4.0.0, current version 4.0.1)
299/usr/lib/libz.1.dylib
300 (compatibility version 1.0.0, current version 1.2.3)
301/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
302 (compatibility version 1.0.0, current version 22.0.0)
303/usr/lib/libstdc++.6.dylib
304 (compatibility version 7.0.0, current version 7.3.0)
305/usr/lib/libgcc_s.1.dylib
306 (compatibility version 1.0.0, current version 1.0.0)
307/usr/lib/libmx.A.dylib
308 (compatibility version 1.0.0, current version 92.0.0)
309/usr/lib/libSystem.B.dylib
310 (compatibility version 1.0.0, current version 88.0.0)
311//! [38]
312
313
314//! [39]
315mkdir plugandpaint.app/Contents/Frameworks
316cp -R /path/to/Qt/lib/QtCore.framework
317 plugandpaint.app/Contents/Frameworks
318cp -R /path/to/Qt/lib/QtGui.framework
319 plugandpaint.app/Contents/Frameworks
320//! [39]
321
322
323//! [40]
324install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
325 plugandpaint.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
326install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
327 plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
328//! [40]
329
330
331//! [41]
332install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
333 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
334 plugandpaint.app/Contents/MacOs/plugandpaint
335install_name_tool -change path/to/qt/lib/QtGui.framework/Versions/4.0/QtGui
336 @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
337 plugandpaint.app/Contents/MacOs/plugandpaint
338//! [41]
339
340
341//! [42]
342install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
343 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
344 plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
345//! [42]
346
347
348//! [43]
349mv plugins plugandpaint.app/Contents
350//! [43]
351
352
353//! [44]
354libpnp_basictools.dylib:
355libpnp_basictools.dylib
356 (compatibility version 0.0.0, current version 0.0.0)
357/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
358 (compatibility version 4.0.0, current version 4.0.1)
359/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
360 (compatibility version 2.0.0, current version 128.0.0)
361/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
362 (compatibility version 1.0.0, current version 10.0.0)
363/path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
364 (compatibility version 4.0.0, current version 4.0.1)
365/usr/lib/libz.1.dylib
366 (compatibility version 1.0.0, current version 1.2.3)
367/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
368 (compatibility version 1.0.0, current version 22.0.0)
369/usr/lib/libstdc++.6.dylib
370 (compatibility version 7.0.0, current version 7.3.0)
371/usr/lib/libgcc_s.1.dylib
372 (compatibility version 1.0.0, current version 1.0.0)
373/usr/lib/libmx.A.dylib
374 (compatibility version 1.0.0, current version 92.0.0)
375/usr/lib/libSystem.B.dylib
376 (compatibility version 1.0.0, current version 88.0.0)
377//! [44]
378
379
380//! [45]
381install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
382 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
383 plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
384install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
385 @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
386 plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
387//! [45]
388
389
390//! [46]
391#elif defined(Q_OS_MAC)
392if (pluginsDir.dirName() == "MacOS") {
393 pluginsDir.cdUp();
394}
395#endif
396//! [46]
397
398
399//! [47]
400cp -R /path/to/Qt/plugins/imageformats
401 pluginandpaint.app/Contents/plugins
402//! [47]
403
404
405//! [48]
406install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
407 @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
408 plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
409install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
410 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
411 plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
412//! [48]
413
414
415//! [49]
416QDir dir(QApplication::applicationDirPath());
417dir.cdUp();
418dir.cd("plugins");
419QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
420//! [49]
421
422
423//! [50]
424otool -L MyApp.app/Contents/MacOS/MyApp
425//! [50]
426
427
428//! [51]
429QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
430//! [51]
431
432//! [51a]
433install_name_tool -change /System/Library/Frameworks/CoreVideo.framework/
434Versions/A/CoreVideo /System/Library/Frameworks/QuartzCore.framework/
435Versions/A/QuartzCore libphonon_qt7.dylib
436//! [51a]
437
438//! [51b]
439./CONFIGURE - SDK MacOSX10.4u.sdk
440//! [51b]
441
442//! [52]
443./configure (other arguments) -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
444//! [52]
445
446
447//! [53]
448QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
449CONFIG+=x86 ppc
450//! [53]
451
452
453//! [54]
454qApp->addLibraryPath("C:/customPath/plugins");
455//! [54]
456
457//! [55]
458cd examples\widgets\wiggly
459//! [55]
460
461//! [56]
462vendorinfo = \
463 "%{\"Example Localized Vendor\"}" \
464 ":\"Example Vendor\""
465
466default_deployment.pkg_prerules = vendorinfo
467//! [56]
468
469//! [57]
470supported_platforms = \
471 "; This demo only supports S60 5.0" \
472 "[0x1028315F],0,0,0,{\"S60ProductID\"}"
473
474default_deployment.pkg_prerules += supported_platforms
475//! [57]
476
477//! [58]
478embedded_deployments = \
479 "; Embed Qt dependencies" \
480 "@\"$$[QT_INSTALL_PREFIX]/qt_installer.sis\",(0x2001E62D)"
481
482default_deployment.pkg_prerules += embedded_deployments
483//! [58]
484
485//! [59]
486qmake
487make release-gcce
488//! [59]
489
490//! [60]
491make sis
492//! [60]
Note: See TracBrowser for help on using the repository browser.