From dedb7e277847c79104a5b2dd625adc0f9cb7d7c3 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 7 Jan 2016 13:40:57 -0800 Subject: [PATCH] bury components in a shell application inside the server-console --- cmake/macros/InstallBesideConsole.cmake | 22 ++++------------------ console/src/modules/path-finder.js | 2 +- interface/CMakeLists.txt | 7 ++++--- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/cmake/macros/InstallBesideConsole.cmake b/cmake/macros/InstallBesideConsole.cmake index 54d3272c7a..7e03b40ce6 100644 --- a/cmake/macros/InstallBesideConsole.cmake +++ b/cmake/macros/InstallBesideConsole.cmake @@ -12,8 +12,8 @@ macro(install_beside_console) # install this component beside the installed server-console executable if (APPLE) - set(SHELL_APP_CONTENTS "Components.app/Contents") - set(COMPONENT_DESTINATION "${SHELL_APP_CONTENTS}/MacOS") + set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents") + set(COMPONENT_DESTINATION "${CONSOLE_APP_CONTENTS}/MacOS/Components.app/Contents/MacOS") else () set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR}) endif () @@ -26,7 +26,7 @@ macro(install_beside_console) if (TARGET_NAME STREQUAL domain-server) if (APPLE) - set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_APP_PATH}/Contents/MacOS) + set(RESOURCES_DESTINATION ${COMPONENT_DESTINATION}) else () set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_DIR}) endif () @@ -36,6 +36,7 @@ macro(install_beside_console) DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources DESTINATION ${RESOURCES_DESTINATION} USE_SOURCE_PERMISSIONS + COMPONENT ${SERVER_COMPONENT} ) endif () @@ -46,21 +47,6 @@ macro(install_beside_console) include(BundleUtilities) fixup_bundle(\"${EXECUTABLE_NEEDING_FIXUP}\" \"\" \"${FIXUP_LIBS}\") " COMPONENT ${SERVER_COMPONENT}) - - # once installed copy the contents of the shell Components.app to the console application - - set(INSTALLED_CONSOLE_CONTENTS "\${CMAKE_INSTALL_PREFIX}/${CONSOLE_INSTALL_APP_PATH}/Contents") - - set(INSTALLED_SHELL_CONTENTS "\${CMAKE_INSTALL_PREFIX}/${SHELL_APP_CONTENTS}") - install(CODE " - file(GLOB FRAMEWORKS \"${INSTALLED_SHELL_CONTENTS}/Frameworks/*\") - message(STATUS \"Copying \${FRAMEWORKS} to ${INSTALLED_CONSOLE_CONTENTS}/Frameworks\") - file(COPY \${FRAMEWORKS} DESTINATION \"${INSTALLED_CONSOLE_CONTENTS}/Frameworks\") - file(GLOB BINARIES \"${INSTALLED_SHELL_CONTENTS}/MacOS/*\") - message(STATUS \"Copying \${BINARIES} to ${INSTALLED_CONSOLE_CONTENTS}/Frameworks\") - file(COPY \${BINARIES} DESTINATION \"${INSTALLED_CONSOLE_CONTENTS}/MacOS\") - " COMPONENT ${SERVER_COMPONENT}) - endif () endmacro() diff --git a/console/src/modules/path-finder.js b/console/src/modules/path-finder.js index c26f3b445f..e12037a26d 100644 --- a/console/src/modules/path-finder.js +++ b/console/src/modules/path-finder.js @@ -40,7 +40,7 @@ exports.searchPaths = function(name, binaryType) { if (contentEndIndex != -1) { // this is an app bundle, check in Contents/MacOS for the binaries var appPath = __dirname.substring(0, contentEndIndex); - appPath += ".app/Contents/MacOS/"; + appPath += ".app/Contents/MacOS/Components.app/Contents/MacOS/"; paths.push(appPath + name + extension); } diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index fdae3da232..8e61f3a6de 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -239,10 +239,11 @@ fixup_interface() # if present, add an install of the DDE components # which will be presented as an option during install -if (APPLE AND DDE_APP_PATH) +if (APPLE AND DEFINED ENV{DDE_APP_PATH}) install( - PROGRAMS ${DDE_APP_PATH} - DESTINATION ${INTERFACE_INSTALL_PATH}/Contents/MacOS + DIRECTORY $ENV{DDE_APP_PATH} + DIRECTORY_PERMISSIONS + DESTINATION ${INTERFACE_INSTALL_APP_PATH}/Contents/MacOS COMPONENT ${DDE_COMPONENT} ) endif ()