<font><font face="trebuchet ms,sans-serif">Has anyone used DeployQt4 successfully?<br clear="all"></font></font><font face="'trebuchet ms', sans-serif">James</font><div><font face="'trebuchet ms', sans-serif"><br>
</font><br><div class="gmail_quote">On Thu, Jan 5, 2012 at 12:44 PM, James Sutherland <span dir="ltr"><<a href="mailto:James.Sutherland@utah.edu">James.Sutherland@utah.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font face="'trebuchet ms', sans-serif">I am eager to use DeployQt4 because of the complexity of creating applications.</font>
<div><font face="'trebuchet ms', sans-serif"><br></font></div><div><font face="'trebuchet ms', sans-serif">This is a snippet of what I currently have:</font></div><div><font face="'trebuchet ms', sans-serif"><br>
</font></div><div><font face="'trebuchet ms', sans-serif">-------------- <snip> ------------</font></div><div><font face="'trebuchet ms', sans-serif"><div> if( APPLE )</div><div> set(GUI_TYPE MACOSX_BUNDLE)</div>
<div> set( app_postfix ".app" )</div><div> set( plugin_dest_dir bin/${appName}${app_postfix}/Contents/MacOS)</div><div> set( qtconf_dest_dir bin/${appName}${app_postfix}/Contents/Resources)</div><div> set( MACOSX_BUNDLE_ICON_FILE appIcon.icns )</div>
<div> set_source_files_properties( ${CMAKE_CURRENT_SOURCE_DIR}/images/appIcon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resource )</div><div> endif()</div><div><br></div><div> add_executable( ${appName} ${GUI_TYPE}</div>
<div> ${util_src}</div><div> ${gui_src}</div><div> ${gui_headers}</div><div> ${gui_headers_moc}</div><div> ${gui_forms_headers}</div><div> ${gui_resources_rcc}</div><div> )</div><div><br></div><div> target_link_libraries( ${appName} ${QT_LIBRARIES} )</div>
<div><br></div><div> install( TARGETS ${appName} COMPONENT Runtime DESTINATION "bin" )</div><div><br></div><div> include(CPack)</div><div> include( InstallRequiredSystemLibraries )</div><div> </div><div> if( APPLE OR WIN32 )</div>
<div> # must have CMAKE 2.8.7 or later</div><div> string( COMPARE GREATER ${CMAKE_VERSION} 2.8.6 VERSION_OK )</div><div> if( ${VERSION_OK} )</div><div> include( DeployQt4 ) # requires cmake 2.8.7 or later</div>
<div> set( PLUGINS qico;qtiff;qsvgicon )</div><div> message( STATUS "QT PLUGINS: ${QTPLUGINS}" )</div><div> install_qt4_executable( bin/${appName}${app_postfix} "${PLUGINS}" )</div><div>
endif()</div><div> endif()</div><div>------------ </snip> ---------------</div><div><br></div><div>On my Mac, the install completes without errors, but the executable just pops up a crash dialogue that doesn't mean anything to me.</div>
<div><br></div><div>One interesting observation is that the PLUGINS are not properly set in the call to install_qt4_executable. Output from cmake:</div><div><br></div></font></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><font face="'trebuchet ms', sans-serif"><div><div>-- fixup_qt4_executable</div></div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- executable='/Users/james/tmp/expr/bin/CreateExpr_1.0-0.app'</div>
</div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- qtplugins=''</div></div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- libs=''</div>
</div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- dirs='/opt/local/lib'</div></div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- plugins_dir=''</div>
</div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- request_qt_conf=''</div></div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- Writing /Users/james/tmp/expr/bin/CreateExpr_1.0-0.app/Contents/Resources/qt.conf</div>
</div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- fixup_bundle</div></div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- app='/Users/james/tmp/expr/bin/CreateExpr_1.0-0.app'</div>
</div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- libs=''</div></div></font></div><div><font face="'trebuchet ms', sans-serif"><div><div>-- dirs='/opt/local/lib'</div>
</div></font></div></blockquote><font face="'trebuchet ms', sans-serif"><br></font><div><font face="'trebuchet ms', sans-serif">I am confused at why "qtplugins" is empty. I have tried variations of how I pass PLUGINS to the install_qt4_executable() function, but no joy.</font></div>
<div><font face="'trebuchet ms', sans-serif"><br></font></div><div><font face="'trebuchet ms', sans-serif">Also, the "installed" app bundle has a few more things than the locally built one, but is missing a Frameworks directory, for example.</font></div>
<div><font face="'trebuchet ms', sans-serif"><br></font></div><div><font face="'trebuchet ms', sans-serif">Any ideas as to what I am doing wrong?</font></div><span class="HOEnZb"><font color="#888888"><div>
<font face="'trebuchet ms', sans-serif"><br>
</font></div><div><font face="'trebuchet ms', sans-serif">James</font></div>
</font></span></blockquote></div><br></div>