Using packagemaker with cpack for Mac OS X

I need to create an installer for a product for Mac OS X using CPack with PackageMaker as a generator. I did a little work, but I have a lot of things that I want to learn.

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) 

Can you explain how:

  • How to add a custom icon to my application (the one that opens when you open the application directory)?
  • How to add custom background to visual installer?
  • How to properly use flags for post installer scripts to make scripts work?
  • What is the best way to add "other_executable" to my application?
  • Am I using the correct way to install my_app.app?
  • How to add a shortcut (or something else) of my application to the Dock)?
+8
cmake cpack macos packagemaker
source share

No one has answered this question yet.

See related questions:

1541
Find (and kill) port 3000 lock process on Mac
1052
Who listens to this TCP port on Mac OS X?
922
How to start a PostgreSQL server on Mac OS X?
359
Install ADB on macOS
128
Running shell scripts from an OS X dock?
thirteen
How to build a debian package with CPack to execute setup.py?
4
mac osX packageMaker: how to set destination in user home directory?
3
Add Registration Dialog to PackageMaker
one
change PackageMaker installer variables from script
0
Packagemaker for copy files

All Articles