[cmake-developers] Using packagemaker with cpack for mac os x

Nikola Kocovski nikolakoco89 at gmail.com
Mon Aug 20 08:10:18 EDT 2012


I need to create installer for a product fo Mac OS X using CPack with
PackageMaker as the generator. I have don some small work, but I have many
things that I want to find out.

  set(CPACK_PACKAGE_NAME "MyApp")
  set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
  set(CMAKE_INSTALL_PREFIX /Applications)
  set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
  set(CPACK_RESOURCE_FILE_README "${PACKAGE_BINARY_DIR}/Readme.txt")
  set(CPACK_RESOURCE_FILE_LICENSE "${PACKAGE_BINARY_DIR}/EULA.txt")
  set(CPACK_RESOURCE_FILE_WELCOME "${PACKAGE_BINARY_DIR}/Welcome.txt")
  set(CPACK_GENERATOR PackageMaker)

  install(DIRECTORY ${PACKAGE_BINARY_DIR}/my_app.app DESTINATION
${CMAKE_INSTALL_PREFIX}/)
  install(PROGRAMS ${PACKAGE_BINARY_DIR}/other_executable DESTINATION
${CMAKE_INSTALL_PREFIX}/my_app.app/Contents/MacOS/)
  install(FILES ${PACKAGE_BINARY_DIR}/com.my_app.my_app_daemon.plist
DESTINATION ${CMAKE_INSTALL_PREFIX}/Resources)

So I'm looking a way how to:

   1. How to add custom icon to my application (The one when you open
Applications directory)
   2. How to add a custom background to the visual installer
   3. How to properly use the flags for post installer scripts so that
the scripts will be working
   4. What is the best way to add "other_executable" to my application
   5. Am I using the proper way to install my_app.app
   6. How to add shortcut (or whatever else is used, of my application
to the Dock)

So hopefully that someone can help me with this issues
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120820/60008ce9/attachment.html>


More information about the cmake-developers mailing list