1 | //! [0]
|
---|
2 | cd /path/to/Qt
|
---|
3 | ./configure -static -prefix /path/to/Qt <other parameters>
|
---|
4 | make sub-src
|
---|
5 | //! [0]
|
---|
6 |
|
---|
7 |
|
---|
8 | //! [1]
|
---|
9 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
10 | //! [1]
|
---|
11 |
|
---|
12 |
|
---|
13 | //! [2]
|
---|
14 | make clean
|
---|
15 | PATH=/path/to/Qt/bin:$PATH
|
---|
16 | export PATH
|
---|
17 | qmake -config release
|
---|
18 | make
|
---|
19 | //! [2]
|
---|
20 |
|
---|
21 |
|
---|
22 | //! [3]
|
---|
23 | ldd ./application
|
---|
24 | //! [3]
|
---|
25 |
|
---|
26 |
|
---|
27 | //! [4]
|
---|
28 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
29 | //! [4]
|
---|
30 |
|
---|
31 |
|
---|
32 | //! [5]
|
---|
33 | make clean
|
---|
34 | qmake -config release
|
---|
35 | make
|
---|
36 | //! [5]
|
---|
37 |
|
---|
38 |
|
---|
39 | //! [6]
|
---|
40 | cd ../plugandpaintplugins
|
---|
41 | make clean
|
---|
42 | qmake -config release
|
---|
43 | make
|
---|
44 | //! [6]
|
---|
45 |
|
---|
46 |
|
---|
47 | //! [7]
|
---|
48 | #!/bin/sh
|
---|
49 | appname=`basename $0 | sed s,\.sh$,,`
|
---|
50 |
|
---|
51 | dirname=`dirname $0`
|
---|
52 | tmp="${dirname#?}"
|
---|
53 |
|
---|
54 | if [ "${dirname%$tmp}" != "/" ]; then
|
---|
55 | dirname=$PWD/$dirname
|
---|
56 | fi
|
---|
57 | LD_LIBRARY_PATH=$dirname
|
---|
58 | export LD_LIBRARY_PATH
|
---|
59 | $dirname/$appname $*
|
---|
60 | //! [7]
|
---|
61 |
|
---|
62 |
|
---|
63 | //! [8]
|
---|
64 | DESTDIR = /path/to/Qt/plugandpaint/plugins
|
---|
65 | //! [8]
|
---|
66 |
|
---|
67 |
|
---|
68 | //! [9]
|
---|
69 | qApp->addLibraryPath("/some/other/path");
|
---|
70 | //! [9]
|
---|
71 |
|
---|
72 |
|
---|
73 | //! [10]
|
---|
74 | ldd ./application
|
---|
75 | //! [10]
|
---|
76 |
|
---|
77 |
|
---|
78 | //! [11]
|
---|
79 | cd C:\path\to\Qt
|
---|
80 | configure -static <any other options you need>
|
---|
81 | //! [11]
|
---|
82 |
|
---|
83 |
|
---|
84 | //! [12]
|
---|
85 | nmake sub-src
|
---|
86 | //! [12]
|
---|
87 |
|
---|
88 |
|
---|
89 | //! [13]
|
---|
90 | cd examples\tools\plugandpaint
|
---|
91 | //! [13]
|
---|
92 |
|
---|
93 |
|
---|
94 | //! [14]
|
---|
95 | nmake clean
|
---|
96 | qmake -config release
|
---|
97 | nmake
|
---|
98 | //! [14]
|
---|
99 |
|
---|
100 |
|
---|
101 | //! [15]
|
---|
102 | cd examples\tools\plugandpaint
|
---|
103 | //! [15]
|
---|
104 |
|
---|
105 |
|
---|
106 | //! [16]
|
---|
107 | nmake clean
|
---|
108 | qmake -config release
|
---|
109 | nmake
|
---|
110 | //! [16]
|
---|
111 |
|
---|
112 |
|
---|
113 | //! [17]
|
---|
114 | cd ..\plugandpaintplugins
|
---|
115 | nmake clean
|
---|
116 | qmake -config release
|
---|
117 | nmake
|
---|
118 | //! [17]
|
---|
119 |
|
---|
120 |
|
---|
121 | //! [18]
|
---|
122 | plugins\pnp_basictools.dll
|
---|
123 | plugins\pnp_extrafilters.dll
|
---|
124 | //! [18]
|
---|
125 |
|
---|
126 |
|
---|
127 | //! [19]
|
---|
128 | qApp->addLibraryPath("C:\some\other\path");
|
---|
129 | //! [19]
|
---|
130 |
|
---|
131 |
|
---|
132 | //! [20]
|
---|
133 | embed_manifest_dll
|
---|
134 | embed_manifest_exe
|
---|
135 | //! [20]
|
---|
136 |
|
---|
137 |
|
---|
138 | //! [21]
|
---|
139 | CONFIG += 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]
|
---|
149 | CONFIG-=embed_manifest_dll
|
---|
150 | //! [23]
|
---|
151 |
|
---|
152 |
|
---|
153 | //! [24]
|
---|
154 | depends <application executable>
|
---|
155 | //! [24]
|
---|
156 |
|
---|
157 |
|
---|
158 | //! [25]
|
---|
159 | C:<path to Qt>\plugins
|
---|
160 | //! [25]
|
---|
161 |
|
---|
162 |
|
---|
163 | //! [26]
|
---|
164 | CONFIG-=app_bundle
|
---|
165 | //! [26]
|
---|
166 |
|
---|
167 |
|
---|
168 | //! [27]
|
---|
169 | cd /path/to/Qt
|
---|
170 | ./configure -static <other parameters>
|
---|
171 | make sub-src
|
---|
172 | //! [27]
|
---|
173 |
|
---|
174 |
|
---|
175 | //! [28]
|
---|
176 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
177 | //! [28]
|
---|
178 |
|
---|
179 |
|
---|
180 | //! [29]
|
---|
181 | make clean
|
---|
182 | qmake -config release
|
---|
183 | make
|
---|
184 | //! [29]
|
---|
185 |
|
---|
186 |
|
---|
187 | //! [30]
|
---|
188 | otool -L plugandpaint.app/Contents/MacOs/plugandpaint
|
---|
189 | //! [30]
|
---|
190 |
|
---|
191 |
|
---|
192 | //! [31]
|
---|
193 | plugandpaint.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]
|
---|
224 | cd /path/to/Qt/examples/tools/plugandpaint
|
---|
225 | //! [34]
|
---|
226 |
|
---|
227 |
|
---|
228 | //! [35]
|
---|
229 | make clean
|
---|
230 | qmake -config release
|
---|
231 | make
|
---|
232 | //! [35]
|
---|
233 |
|
---|
234 |
|
---|
235 | //! [36]
|
---|
236 | cd ../plugandpaintplugins
|
---|
237 | make clean
|
---|
238 | qmake -config release
|
---|
239 | make
|
---|
240 | //! [36]
|
---|
241 |
|
---|
242 |
|
---|
243 | //! [37]
|
---|
244 | otool -L QtGui.framework/QtGui
|
---|
245 | //! [37]
|
---|
246 |
|
---|
247 |
|
---|
248 | //! [38]
|
---|
249 | QtGui.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]
|
---|
274 | mkdir plugandpaint.app/Contents/Frameworks
|
---|
275 | cp -R /path/to/Qt/lib/QtCore.framework
|
---|
276 | plugandpaint.app/Contents/Frameworks
|
---|
277 | cp -R /path/to/Qt/lib/QtGui.framework
|
---|
278 | plugandpaint.app/Contents/Frameworks
|
---|
279 | //! [39]
|
---|
280 |
|
---|
281 |
|
---|
282 | //! [40]
|
---|
283 | install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
284 | plugandpaint.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
|
---|
285 | install_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]
|
---|
291 | install_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
|
---|
294 | install_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]
|
---|
301 | install_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]
|
---|
308 | mv plugins plugandpaint.app/Contents
|
---|
309 | //! [43]
|
---|
310 |
|
---|
311 |
|
---|
312 | //! [44]
|
---|
313 | libpnp_basictools.dylib:
|
---|
314 | libpnp_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]
|
---|
340 | install_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
|
---|
343 | install_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)
|
---|
351 | if (pluginsDir.dirName() == "MacOS") {
|
---|
352 | pluginsDir.cdUp();
|
---|
353 | }
|
---|
354 | #endif
|
---|
355 | //! [46]
|
---|
356 |
|
---|
357 |
|
---|
358 | //! [47]
|
---|
359 | cp -R /path/to/Qt/plugins/imageformats
|
---|
360 | pluginandpaint.app/Contents/plugins
|
---|
361 | //! [47]
|
---|
362 |
|
---|
363 |
|
---|
364 | //! [48]
|
---|
365 | install_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
|
---|
368 | install_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]
|
---|
375 | QDir dir(QApplication::applicationDirPath());
|
---|
376 | dir.cdUp();
|
---|
377 | dir.cd("plugins");
|
---|
378 | QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
|
---|
379 | //! [49]
|
---|
380 |
|
---|
381 |
|
---|
382 | //! [50]
|
---|
383 | otool -L MyApp.app/Contents/MacOS/MyApp
|
---|
384 | //! [50]
|
---|
385 |
|
---|
386 |
|
---|
387 | //! [51]
|
---|
388 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
|
---|
389 | //! [51]
|
---|
390 |
|
---|
391 | //! [51a]
|
---|
392 | install_name_tool -change /System/Library/Frameworks/CoreVideo.framework/
|
---|
393 | Versions/A/CoreVideo /System/Library/Frameworks/QuartzCore.framework/
|
---|
394 | Versions/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]
|
---|
407 | QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
|
---|
408 | CONFIG+=x86 ppc
|
---|
409 | //! [53]
|
---|
410 |
|
---|
411 |
|
---|
412 | //! [54]
|
---|
413 | qApp->addLibraryPath("C:/customPath/plugins");
|
---|
414 | //! [54]
|
---|