Skip to content

Modifying application's name in the superproject

LoicCadour edited this page Feb 3, 2016 · 8 revisions

Here is a tuto to help you renaming an application based on medInria. In the following lines, the main idea is to replace medInria by the name of your application.

CMakeLists.txt

Changing version is very easy: set(${PROJECT_NAME}_VERSION_MAJOR 2 CACHE STRING

LICENSE.txt

You might want to change LICENSE.txt as well.

Packaging folder

Packaging.cmake

l.16 set(CPACK_PACKAGE_NAME medinria)

You might also want to change (from l.21):

  • set(CPACK_PACKAGE_DESCRIPTION ...
  • set(CPACK_PACKAGE_VENDOR http://med.inria.fr/)
  • set(CPACK_PACKAGE_CONTACT "medInria Team <medinria-userfeedback@inria.fr>")

apple/ApplePackScript.cmake.in

l.1 execute_process(COMMAND rm -f @PROJECT_BINARY_DIR@/medInria-@@PROJECT_NAME@_VERSION@.dmg)

apple/mac_packager.sh.in

  • l.21 cp -r medInria.app TmpInstall
  • l.25 @QT_BINARY_DIR@/macdeployqt medInria.app
  • l.34 @dtk_DIR@/bin/dtkDeploy medInria.app $injectDirs &>/dev/null
  • l.36 cd medInria.app/Contents
  • l.65 diskutil rename "medInria base" "medInria @medInria-superProject_VERSION@" (/!\keep "medInria base")
  • l.66 \cp -rf @medInria_DIR@/bin/TmpInstall/medInria.app /Volumes/"medInria @medInria-superProject_VERSION@"/
  • l.70 hdiutil convert MedinriaPackage.sparseimage -format UDZO -imagekey zlib-level=9 -o "medInria-@medInria-superProject_VERSION@.dmg" 1>/dev/null 2>/dev/null

linux/PostArchiveCleanupScript.cmake.in

l.22 if(NOT bin MATCHES "^med") became for MUSIC if(NOT bin MATCHES "^MUS")

linux/medInria.desktop.in

  • l.3 Name=medInria
  • l.6 Icon=@CPACK_PACKAGING_INSTALL_PREFIX@/share/icons/medInria.png
  • l.7 Exec=medInria %U

linux/postinst.in

l.23 ln -s @CPACK_PACKAGING_INSTALL_PREFIX@/bin/medInria_launcher.sh /usr/bin/medInria

linux/prerm.in

l.5 [ -h /usr/bin/medInria ] && rm -f /usr/bin/medInria

unix/Launchers.cmake

  • l.31 set(MEDINRIA_BIN ${binary_dir}/bin/medInria.app/Contents/MacOS/medInria)
  • l.33 set(MEDINRIA_BIN ${binary_dir}/bin/medInria)
  • l.38 configure_file(${CURRENT_SRC_DIR}/medInria.sh.in medInria.sh @ONLY)
  • l.46 set(MEDINRIA_BIN "\${MEDINRIA_DIR}/bin/medInria.app/Contents/MacOS/medInria")
  • l.48 set(MEDINRIA_BIN "\${MEDINRIA_DIR}/bin/medInria")
  • l.53 configure_file(${CURRENT_SRC_DIR}/medInria.sh.in ${CURRENT_BIN_DIR}/medInria_launcher.sh @ONLY)
  • l.54 install(PROGRAMS ${CURRENT_BIN_DIR}/medInria_launcher.sh

windows/WindowsPackaging.cmake

  • l.46 set(CPACK_CREATE_DESKTOP_LINKS "medInria")
  • l.49 set(CPACK_NSIS_INSTALLED_ICON_NAME bin\\\\medInria.exe)
  • l.55 set(CPACK_PACKAGE_EXECUTABLES "medInria" "medInria")
  • l.58 set(CPACK_NSIS_MENU_LINKS "http://med.inria.fr/" "Homepage for medInria")
  • l.61 set(CPACK_NSIS_MUI_FINISHPAGE_RUN "medInria.exe")
  • l.79 set(APP "\${CMAKE_INSTALL_PREFIX}/bin/medInria.exe")