<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks for the prompt answer. This looks like a quick fix.<div><br></div><div>The other problem I narrowed down (the actual reason the QTest.app failed to launch) is that the Cocoa build requires Resources that are not copied. So it's exiting with the following error:</div><div><br></div><div><div>Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.</div><div>Abort trap</div><div><br></div><div>Which makes me really wonder if this bundle utility is ready for prime time?</div><div><br></div><div>Brad</div></div><div><br><div><div>On Mar 12, 2010, at 3:43 PM, Michael Jackson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I had to over-load the gp_item_default_embedded_path_override CMake <br>function with the following:<br><br># gp_item_default_embedded_path item default_embedded_path_var<br>#<br># Return the path that others should refer to the item by when the item<br># is embedded inside a bundle.<br>#<br># Override on a per-project basis by providing a project-specific<br># gp_item_default_embedded_path_override function.<br>#<br>function(gp_item_default_embedded_path_override item <br>default_embedded_path_var)<br> #<br> # The assumption here is that all executables in the bundle will be<br> # in same-level-directories inside the bundle. The parent directory<br> # of an executable inside the bundle should be MacOS or a sibling of<br> # MacOS and all embedded paths returned from here will begin with<br> # "@executable_path/../" and will work from all executables in all<br> # such same-level-directories inside the bundle.<br> #<br><br> # By default, embed things right next to the main bundle executable:<br> #<br> set(path "@executable_path/../../Contents/MacOS")<br><br> set(overridden 0)<br> # For Qt Based Plugins for the image formats, the plugins MUST <br>reside in<br> # the "PlugIns/imageformats" directory. Since THIS particular <br>project ONLY has<br> # the Qt Frameworks AND the plugins the below regex will suffice to <br>separate<br> # them from each other. On other projects we could use better logic <br>to<br> # put things where they go. Maybe using some "configured" CMake <br>List of libraries<br> # then looking through each list for the currect library being <br>fixed up.<br> # Embed .dylibs right next to the main bundle executable:<br> #<br> if(item MATCHES "<a href="smb://.dylib$">\\.dylib$</a>")<br> set(path "@executable_path/../PlugIns/imageformats")<br> set(overridden 1)<br> endif(item MATCHES "<a href="smb://.dylib$">\\.dylib$</a>")<br><br> # Embed .so right next to the main bundle executable:<br> #<br> if(item MATCHES "<a href="smb://.so$">\\.so$</a>")<br> set(path "@executable_path/../Plugins/imageformats")<br> set(overridden 1)<br> endif(item MATCHES "<a href="smb://.so$">\\.so$</a>")<br><br> # Embed frameworks in the embedded "Frameworks" directory (sibling <br>of MacOS):<br> #<br> if(NOT overridden)<br> if(item MATCHES "[^/]+\\.framework/")<br> set(path "@executable_path/../Frameworks")<br> set(overridden 1)<br> endif(item MATCHES "[^/]+\\.framework/")<br> endif(NOT overridden)<br><br> set(${default_embedded_path_var} "${path}" PARENT_SCOPE)<br>endfunction(gp_item_default_embedded_path_override)<br><br>Which is a complete hack (as it does not take into account other types <br>of plugins) but worked for my limited Application bundle.<br>___________________________________________________________<br>Mike Jackson <a href="http://www.bluequartz.net">www.bluequartz.net</a><br>Principal Software Engineer <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>BlueQuartz Software Dayton, Ohio<br><br><br>On Mar 12, 2010, at 3:20 PM, Bradley Lowekamp wrote:<br><br><blockquote type="cite">Hello,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am trying run the QtTest-Package-Example from: <a href="http://www.vtk.org/Wiki/BundleUtilitiesExample">http://www.vtk.org/Wiki/BundleUtilitiesExample</a> <br></blockquote><blockquote type="cite"> and I am getting some errors on install.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am running CMake 2.8, with Qt 4.6.2 Cocoa universal, on OSX 10.6.2.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">During the fixup_bundle phase I am getting some error message and <br></blockquote><blockquote type="cite">some undesired behavior. It appears the qt plugin libraries are <br></blockquote><blockquote type="cite">problematic. Here is snipits of the output:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- Install configuration: ""<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/./QtTest.app<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/./QtTest.app/Contents<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/./QtTest.app/Contents/ <br></blockquote><blockquote type="cite">Info.plist<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/./QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/./QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/QtTest<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/./QtTest.app/Contents/ <br></blockquote><blockquote type="cite">Resources<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/./QtTest.app/Contents/ <br></blockquote><blockquote type="cite">Resources/QtTest.icns<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqgif.dylib<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqico.dylib<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqjpeg.dylib<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqmng.dylib<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqsvg.dylib<br></blockquote><blockquote type="cite">-- Installing: ~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqtiff.dylib<br></blockquote><blockquote type="cite">-- fixup_bundle<br></blockquote><blockquote type="cite">-- app='./install/QtTest.app'<br></blockquote><blockquote type="cite">-- libs='~/Downloads/QtTest/./install/QtTest.app/Contents/MacOS/ <br></blockquote><blockquote type="cite">plugins/imageformats/libqgif.dylib;~/Downloads/QtTest/./install/ <br></blockquote><blockquote type="cite">QtTest.app/Contents/MacOS/plugins/imageformats/libqico.dylib;~/ <br></blockquote><blockquote type="cite">Downloads/QtTest/./install/QtTest.app/Contents/MacOS/plugins/ <br></blockquote><blockquote type="cite">imageformats/libqjpeg.dylib;~/Downloads/QtTest/./install/QtTest.app/ <br></blockquote><blockquote type="cite">Contents/MacOS/plugins/imageformats/libqmng.dylib;~/Downloads/ <br></blockquote><blockquote type="cite">QtTest/./install/QtTest.app/Contents/MacOS/plugins/imageformats/ <br></blockquote><blockquote type="cite">libqsvg.dylib;~/Downloads/QtTest/./install/QtTest.app/Contents/MacOS/ <br></blockquote><blockquote type="cite">plugins/imageformats/libqtiff.dylib'<br></blockquote><blockquote type="cite">-- dirs=''<br></blockquote><blockquote type="cite">-- fixup_bundle: preparing...<br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">warning: cannot resolve item 'libqgif.dylib'<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> possible problems:<br></blockquote><blockquote type="cite"> need more directories?<br></blockquote><blockquote type="cite"> need to use InstallRequiredSystemLibraries?<br></blockquote><blockquote type="cite"> run in install tree instead of build tree?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-- warning: gp_resolved_file_type non-absolute file 'libqgif.dylib' <br></blockquote><blockquote type="cite">returning type 'other' -- possibly incorrect<br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">warning: cannot resolve item 'libqgif.dylib'<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> possible problems:<br></blockquote><blockquote type="cite"> need more directories?<br></blockquote><blockquote type="cite"> need to use InstallRequiredSystemLibraries?<br></blockquote><blockquote type="cite"> run in install tree instead of build tree?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">warning: target 'libqgif.dylib' is not absolute...<br></blockquote><blockquote type="cite">warning: target 'libqgif.dylib' does not exist...<br></blockquote><blockquote type="cite">/usr/bin/otool: can't open file: libqgif.dylib (No such file or <br></blockquote><blockquote type="cite">directory)<br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(repeated for each other plugin)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Then it copies things again:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- fixup_bundle: copying...<br></blockquote><blockquote type="cite">-- 1/22: copying '~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqgif.dylib'<br></blockquote><blockquote type="cite">-- 2/22: copying '/Library/Frameworks/QtCore.framework/Versions/4/ <br></blockquote><blockquote type="cite">QtCore'<br></blockquote><blockquote type="cite">-- 3/22: copying '/Library/Frameworks/QtGui.framework/Versions/4/ <br></blockquote><blockquote type="cite">QtGui'<br></blockquote><blockquote type="cite">-- 4/22: copying '~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqico.dylib'<br></blockquote><blockquote type="cite">-- 5/22: copying '~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqjpeg.dylib'<br></blockquote><blockquote type="cite">-- 6/22: copying '~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqmng.dylib'<br></blockquote><blockquote type="cite">-- 7/22: copying '~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqsvg.dylib'<br></blockquote><blockquote type="cite">-- 8/22: copying '/Library/Frameworks/QtSvg.framework/Versions/4/ <br></blockquote><blockquote type="cite">QtSvg'<br></blockquote><blockquote type="cite">-- 9/22: copying '/Library/Frameworks/QtXml.framework/Versions/4/ <br></blockquote><blockquote type="cite">QtXml'<br></blockquote><blockquote type="cite">-- 10/22: copying '~/Downloads/QtTest/./install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/plugins/imageformats/libqtiff.dylib'<br></blockquote><blockquote type="cite">-- 11/22: *NO~T* copying '~/Downloads/QtTest/./install/QtTest.app/ <br></blockquote><blockquote type="cite">Contents/MacOS/QtTest'<br></blockquote><blockquote type="cite">-- fixup_bundle: fixing...<br></blockquote><blockquote type="cite">-- 12/22: fixing up '~/Downloads/QtTest/install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/libqgif.dylib'<br></blockquote><blockquote type="cite">-- 13/22: fixing up '~/Downloads/QtTest/install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">Frameworks/QtCore.framework/Versions/4/QtCore'<br></blockquote><blockquote type="cite">-- 14/22: fixing up '~/Downloads/QtTest/install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">Frameworks/QtGui.framework/Versions/4/QtGui'<br></blockquote><blockquote type="cite">-- 15/22: fixing up '~/Downloads/QtTest/install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/libqico.dylib'<br></blockquote><blockquote type="cite">-- 16/22: fixing up '~/Downloads/QtTest/install/QtTest.app/Contents/ <br></blockquote><blockquote type="cite">MacOS/libqjpeg.dylib'<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">And this may be useful too:<br></blockquote><blockquote type="cite">$ otool -L /Developer/Applications/Qt/plugins/imageformats/ <br></blockquote><blockquote type="cite">libqgif.dylib<br></blockquote><blockquote type="cite">/Developer/Applications/Qt/plugins/imageformats/libqgif.dylib:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>libqgif.dylib (compatibility version 0.0.0, current version 0.0.0)<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, <br></blockquote><blockquote type="cite">current version 4.6.2)<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>QtCore.framework/Versions/4/QtCore (compatibility version 4.6.0, <br></blockquote><blockquote type="cite">current version 4.6.2)<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current <br></blockquote><blockquote type="cite">version 7.9.0)<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current <br></blockquote><blockquote type="cite">version 103.0.0)<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current <br></blockquote><blockquote type="cite">version 125.0.0)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Any thoughts or suggestions, before I dive too deep into <br></blockquote><blockquote type="cite">GetPrerequisites.cmake?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Brad<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">========================================================<br></blockquote><blockquote type="cite">Bradley Lowekamp<br></blockquote><blockquote type="cite">Lockheed Martin Contractor for<br></blockquote><blockquote type="cite">Office of High Performance Computing and Communications<br></blockquote><blockquote type="cite">National Library of Medicine<br></blockquote><blockquote type="cite"><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Powered by <a href="http://www.kitware.com">www.kitware.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br></blockquote><blockquote type="cite"><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">========================================================</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-family: Arial; "><span class="Apple-style-span" style="font-family: Arial; ">Lockheed Martin </span></span></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Contractor for</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Office of High Performance Computing and Communications</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span>
</div>
<br></div></body></html>