bury components in a shell application inside the server-console

This commit is contained in:
Stephen Birarda 2016-01-07 13:40:57 -08:00
parent 86facc15d1
commit dedb7e2778
3 changed files with 9 additions and 22 deletions

View file

@ -12,8 +12,8 @@
macro(install_beside_console) macro(install_beside_console)
# install this component beside the installed server-console executable # install this component beside the installed server-console executable
if (APPLE) if (APPLE)
set(SHELL_APP_CONTENTS "Components.app/Contents") set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents")
set(COMPONENT_DESTINATION "${SHELL_APP_CONTENTS}/MacOS") set(COMPONENT_DESTINATION "${CONSOLE_APP_CONTENTS}/MacOS/Components.app/Contents/MacOS")
else () else ()
set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR}) set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR})
endif () endif ()
@ -26,7 +26,7 @@ macro(install_beside_console)
if (TARGET_NAME STREQUAL domain-server) if (TARGET_NAME STREQUAL domain-server)
if (APPLE) if (APPLE)
set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_APP_PATH}/Contents/MacOS) set(RESOURCES_DESTINATION ${COMPONENT_DESTINATION})
else () else ()
set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_DIR}) set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_DIR})
endif () endif ()
@ -36,6 +36,7 @@ macro(install_beside_console)
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources
DESTINATION ${RESOURCES_DESTINATION} DESTINATION ${RESOURCES_DESTINATION}
USE_SOURCE_PERMISSIONS USE_SOURCE_PERMISSIONS
COMPONENT ${SERVER_COMPONENT}
) )
endif () endif ()
@ -46,21 +47,6 @@ macro(install_beside_console)
include(BundleUtilities) include(BundleUtilities)
fixup_bundle(\"${EXECUTABLE_NEEDING_FIXUP}\" \"\" \"${FIXUP_LIBS}\") fixup_bundle(\"${EXECUTABLE_NEEDING_FIXUP}\" \"\" \"${FIXUP_LIBS}\")
" COMPONENT ${SERVER_COMPONENT}) " 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 () endif ()
endmacro() endmacro()

View file

@ -40,7 +40,7 @@ exports.searchPaths = function(name, binaryType) {
if (contentEndIndex != -1) { if (contentEndIndex != -1) {
// this is an app bundle, check in Contents/MacOS for the binaries // this is an app bundle, check in Contents/MacOS for the binaries
var appPath = __dirname.substring(0, contentEndIndex); var appPath = __dirname.substring(0, contentEndIndex);
appPath += ".app/Contents/MacOS/"; appPath += ".app/Contents/MacOS/Components.app/Contents/MacOS/";
paths.push(appPath + name + extension); paths.push(appPath + name + extension);
} }

View file

@ -239,10 +239,11 @@ fixup_interface()
# if present, add an install of the DDE components # if present, add an install of the DDE components
# which will be presented as an option during install # which will be presented as an option during install
if (APPLE AND DDE_APP_PATH) if (APPLE AND DEFINED ENV{DDE_APP_PATH})
install( install(
PROGRAMS ${DDE_APP_PATH} DIRECTORY $ENV{DDE_APP_PATH}
DESTINATION ${INTERFACE_INSTALL_PATH}/Contents/MacOS DIRECTORY_PERMISSIONS
DESTINATION ${INTERFACE_INSTALL_APP_PATH}/Contents/MacOS
COMPONENT ${DDE_COMPONENT} COMPONENT ${DDE_COMPONENT}
) )
endif () endif ()