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

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

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 8.7 KB
Line 
1//! [0]
2cd /path/to/Qt
3./configure -static -prefix /path/to/Qt <other parameters>
4make sub-src
5//! [0]
6
7
8//! [1]
9cd /path/to/Qt/examples/tools/plugandpaint
10//! [1]
11
12
13//! [2]
14make clean
15PATH=/path/to/Qt/bin:$PATH
16export PATH
17qmake -config release
18make
19//! [2]
20
21
22//! [3]
23ldd ./application
24//! [3]
25
26
27//! [4]
28cd /path/to/Qt/examples/tools/plugandpaint
29//! [4]
30
31
32//! [5]
33make clean
34qmake -config release
35make
36//! [5]
37
38
39//! [6]
40cd ../plugandpaintplugins
41make clean
42qmake -config release
43make
44//! [6]
45
46
47//! [7]
48#!/bin/sh
49appname=`basename $0 | sed s,\.sh$,,`
50
51dirname=`dirname $0`
52tmp="${dirname#?}"
53
54if [ "${dirname%$tmp}" != "/" ]; then
55dirname=$PWD/$dirname
56fi
57LD_LIBRARY_PATH=$dirname
58export LD_LIBRARY_PATH
59$dirname/$appname $*
60//! [7]
61
62
63//! [8]
64DESTDIR = /path/to/Qt/plugandpaint/plugins
65//! [8]
66
67
68//! [9]
69qApp->addLibraryPath("/some/other/path");
70//! [9]
71
72
73//! [10]
74ldd ./application
75//! [10]
76
77
78//! [11]
79cd C:\path\to\Qt
80configure -static <any other options you need>
81//! [11]
82
83
84//! [12]
85nmake sub-src
86//! [12]
87
88
89//! [13]
90cd examples\tools\plugandpaint
91//! [13]
92
93
94//! [14]
95nmake clean
96qmake -config release
97nmake
98//! [14]
99
100
101//! [15]
102cd examples\tools\plugandpaint
103//! [15]
104
105
106//! [16]
107nmake clean
108qmake -config release
109nmake
110//! [16]
111
112
113//! [17]
114cd ..\plugandpaintplugins
115nmake clean
116qmake -config release
117nmake
118//! [17]
119
120
121//! [18]
122plugins\pnp_basictools.dll
123plugins\pnp_extrafilters.dll
124//! [18]
125
126
127//! [19]
128qApp->addLibraryPath("C:\some\other\path");
129//! [19]
130
131
132//! [20]
133embed_manifest_dll
134embed_manifest_exe
135//! [20]
136
137
138//! [21]
139CONFIG += embed_manifest_exe
140//! [21]
141
142
143//! [22]
144<Visual Studio Install Path>\VC\redist\<Architecture>\Microsoft.VC80.CRT
145//! [22]
146
147
148//! [23]
149CONFIG-=embed_manifest_dll
150//! [23]
151
152
153//! [24]
154depends <application executable>
155//! [24]
156
157
158//! [25]
159C:<path to Qt>\plugins
160//! [25]
161
162
163//! [26]
164CONFIG-=app_bundle
165//! [26]
166
167
168//! [27]
169cd /path/to/Qt
170./configure -static <other parameters>
171make sub-src
172//! [27]
173
174
175//! [28]
176cd /path/to/Qt/examples/tools/plugandpaint
177//! [28]
178
179
180//! [29]
181make clean
182qmake -config release
183make
184//! [29]
185
186
187//! [30]
188otool -L plugandpaint.app/Contents/MacOs/plugandpaint
189//! [30]
190
191
192//! [31]
193plugandpaint.app/Contents/MacOS/plugandpaint:
194/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
195 (compatibility version 2.0.0, current version 128.0.0)
196/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
197 (compatibility version 1.0.0, current version 10.0.0)
198/usr/lib/libz.1.dylib
199 (compatibility version 1.0.0, current version 1.2.3)
200/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
201 (compatibility version 1.0.0, current version 22.0.0)
202/usr/lib/libstdc++.6.dylib
203 (compatibility version 7.0.0, current version 7.3.0)
204/usr/lib/libgcc_s.1.dylib
205 (compatibility version 1.0.0, current version 1.0.0)
206/usr/lib/libmx.A.dylib
207 (compatibility version 1.0.0, current version 92.0.0)
208/usr/lib/libSystem.B.dylib
209 (compatibility version 1.0.0, current version 88.0.0)
210//! [31]
211
212
213//! [32]
214-lQtGui
215//! [32]
216
217
218//! [33]
219/where/static/qt/lib/is/libQtGui.a
220//! [33]
221
222
223//! [34]
224cd /path/to/Qt/examples/tools/plugandpaint
225//! [34]
226
227
228//! [35]
229make clean
230qmake -config release
231make
232//! [35]
233
234
235//! [36]
236cd ../plugandpaintplugins
237make clean
238qmake -config release
239make
240//! [36]
241
242
243//! [37]
244otool -L QtGui.framework/QtGui
245//! [37]
246
247
248//! [38]
249QtGui.framework/QtGui:
250/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
251 (compatibility version 4.0.0, current version 4.0.1)
252/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
253 (compatibility version 2.0.0, current version 128.0.0)
254/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
255 (compatibility version 1.0.0, current version 10.0.0)
256/path/to/Qt/QtCore.framework/Versions/4.0/QtCore
257 (compatibility version 4.0.0, current version 4.0.1)
258/usr/lib/libz.1.dylib
259 (compatibility version 1.0.0, current version 1.2.3)
260/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
261 (compatibility version 1.0.0, current version 22.0.0)
262/usr/lib/libstdc++.6.dylib
263 (compatibility version 7.0.0, current version 7.3.0)
264/usr/lib/libgcc_s.1.dylib
265 (compatibility version 1.0.0, current version 1.0.0)
266/usr/lib/libmx.A.dylib
267 (compatibility version 1.0.0, current version 92.0.0)
268/usr/lib/libSystem.B.dylib
269 (compatibility version 1.0.0, current version 88.0.0)
270//! [38]
271
272
273//! [39]
274mkdir plugandpaint.app/Contents/Frameworks
275cp -R /path/to/Qt/lib/QtCore.framework
276 plugandpaint.app/Contents/Frameworks
277cp -R /path/to/Qt/lib/QtGui.framework
278 plugandpaint.app/Contents/Frameworks
279//! [39]
280
281
282//! [40]
283install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
284 plugandpaint.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
285install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
286 plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
287//! [40]
288
289
290//! [41]
291install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
292 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
293 plugandpaint.app/Contents/MacOs/plugandpaint
294install_name_tool -change path/to/qt/lib/QtGui.framework/Versions/4.0/QtGui
295 @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
296 plugandpaint.app/Contents/MacOs/plugandpaint
297//! [41]
298
299
300//! [42]
301install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
302 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
303 plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
304//! [42]
305
306
307//! [43]
308mv plugins plugandpaint.app/Contents
309//! [43]
310
311
312//! [44]
313libpnp_basictools.dylib:
314libpnp_basictools.dylib
315 (compatibility version 0.0.0, current version 0.0.0)
316/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
317 (compatibility version 4.0.0, current version 4.0.1)
318/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
319 (compatibility version 2.0.0, current version 128.0.0)
320/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
321 (compatibility version 1.0.0, current version 10.0.0)
322/path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
323 (compatibility version 4.0.0, current version 4.0.1)
324/usr/lib/libz.1.dylib
325 (compatibility version 1.0.0, current version 1.2.3)
326/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
327 (compatibility version 1.0.0, current version 22.0.0)
328/usr/lib/libstdc++.6.dylib
329 (compatibility version 7.0.0, current version 7.3.0)
330/usr/lib/libgcc_s.1.dylib
331 (compatibility version 1.0.0, current version 1.0.0)
332/usr/lib/libmx.A.dylib
333 (compatibility version 1.0.0, current version 92.0.0)
334/usr/lib/libSystem.B.dylib
335 (compatibility version 1.0.0, current version 88.0.0)
336//! [44]
337
338
339//! [45]
340install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
341 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
342 plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
343install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
344 @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
345 plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
346//! [45]
347
348
349//! [46]
350#elif defined(Q_OS_MAC)
351if (pluginsDir.dirName() == "MacOS") {
352 pluginsDir.cdUp();
353}
354#endif
355//! [46]
356
357
358//! [47]
359cp -R /path/to/Qt/plugins/imageformats
360 pluginandpaint.app/Contents/plugins
361//! [47]
362
363
364//! [48]
365install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
366 @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
367 plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
368install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
369 @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
370 plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
371//! [48]
372
373
374//! [49]
375QDir dir(QApplication::applicationDirPath());
376dir.cdUp();
377dir.cd("plugins");
378QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
379//! [49]
380
381
382//! [50]
383otool -L MyApp.app/Contents/MacOS/MyApp
384//! [50]
385
386
387//! [51]
388QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
389//! [51]
390
391//! [51a]
392install_name_tool -change /System/Library/Frameworks/CoreVideo.framework/
393Versions/A/CoreVideo /System/Library/Frameworks/QuartzCore.framework/
394Versions/A/QuartzCore libphonon_qt7.dylib
395//! [51a]
396
397//! [51b]
398./CONFIGURE - SDK MacOSX10.4u.sdk
399//! [51b]
400
401//! [52]
402./configure (other arguments) -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
403//! [52]
404
405
406//! [53]
407QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
408CONFIG+=x86 ppc
409//! [53]
410
411
412//! [54]
413qApp->addLibraryPath("C:/customPath/plugins");
414//! [54]
Note: See TracBrowser for help on using the repository browser.