From 5743c8046c837211650c1dfe15ec4a0801a3d1a3 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 11:15:49 -0800 Subject: [PATCH 01/11] install the server-console in a subdir on win32 --- cmake/macros/InstallBesideConsole.cmake | 22 ++++------------------ cmake/macros/SetPackagingParameters.cmake | 12 +++++++++++- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/cmake/macros/InstallBesideConsole.cmake b/cmake/macros/InstallBesideConsole.cmake index c17e8d2564..e257defcb7 100644 --- a/cmake/macros/InstallBesideConsole.cmake +++ b/cmake/macros/InstallBesideConsole.cmake @@ -12,25 +12,17 @@ macro(install_beside_console) if (WIN32 OR APPLE) # install this component beside the installed server-console executable - if (APPLE) - set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents") - set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app") - set(COMPONENT_DESTINATION "${COMPONENT_APP_PATH}/Contents/MacOS") - else () - set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR}) - endif () - if (APPLE) install( TARGETS ${TARGET_NAME} - RUNTIME DESTINATION ${COMPONENT_DESTINATION} + RUNTIME DESTINATION ${COMPONENT_INSTALL_DIR} COMPONENT ${SERVER_COMPONENT} ) else () # setup install of executable and things copied by fixup/windeployqt install( FILES "$/" - DESTINATION ${COMPONENT_DESTINATION} + DESTINATION ${COMPONENT_INSTALL_DIR} COMPONENT ${SERVER_COMPONENT} ) @@ -40,16 +32,10 @@ macro(install_beside_console) endif () if (TARGET_NAME STREQUAL domain-server) - if (APPLE) - set(RESOURCES_DESTINATION ${COMPONENT_DESTINATION}) - else () - set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_DIR}) - endif () - # install the resources folder for the domain-server where its executable will be install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources - DESTINATION ${RESOURCES_DESTINATION} + DESTINATION ${COMPONENT_INSTALL_DIR} USE_SOURCE_PERMISSIONS COMPONENT ${SERVER_COMPONENT} ) @@ -81,7 +67,7 @@ macro(install_beside_console) endif () # set variables used by manual ssleay library copy - set(TARGET_INSTALL_DIR ${COMPONENT_DESTINATION}) + set(TARGET_INSTALL_DIR ${COMPONENT_INSTALL_DIR}) set(TARGET_INSTALL_COMPONENT ${SERVER_COMPONENT}) manually_install_ssl_eay() diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 5bfbb0794d..9aba143c03 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -52,8 +52,18 @@ macro(SET_PACKAGING_PARAMETERS) set(CONSOLE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) set(INTERFACE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) + + set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents") + set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app") + set(COMPONENT_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/MacOS") else () - set(CONSOLE_INSTALL_DIR ".") + if (WIN32) + set(CONSOLE_INSTALL_DIR "server-console") + else () + set(CONSOLE_INSTALL_DIR ".") + endif () + + set(COMPONENT_INSTALL_DIR ".") set(INTERFACE_INSTALL_DIR ".") endif () From 9039334af565fa9c2432c57f91245ba48bb86cca Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 12:01:00 -0800 Subject: [PATCH 02/11] reinstate the search filter in log --- server-console/src/log.css | 1 - 1 file changed, 1 deletion(-) diff --git a/server-console/src/log.css b/server-console/src/log.css index 0a0aa4acb5..0b2a05554e 100644 --- a/server-console/src/log.css +++ b/server-console/src/log.css @@ -82,7 +82,6 @@ ul.tabs li.current { } .search { - display: none; float: right; margin: 10px; } From 055a0ff7d9c10fd28f9bb06b1852bc8148879166 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 13:39:47 -0800 Subject: [PATCH 03/11] check a level up from server-console.exe for win32 --- server-console/src/modules/path-finder.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server-console/src/modules/path-finder.js b/server-console/src/modules/path-finder.js index d4cb9aa277..1898db91ac 100644 --- a/server-console/src/modules/path-finder.js +++ b/server-console/src/modules/path-finder.js @@ -23,9 +23,10 @@ exports.searchPaths = function(name, binaryType, releaseType) { if (!releaseType) { // check in the developer build tree for binaries + var typeSpecificPath = (binaryType == "local-release" ? "Release/" : "Debug/") paths = [ devBasePath + name + extension, - devBasePath + (binaryType == "local-release" ? "Release/" : "Debug/") + name + extension + devBasePath + typeSpecificPath + name + extension ] } else { // check directly beside the binary @@ -33,6 +34,11 @@ exports.searchPaths = function(name, binaryType, releaseType) { path.join(path.dirname(process.execPath), name + extension) ]; + if (process.platform == "win32") { + // check a level back in case we're packaged on windows + paths.push(path.resolve(path.dirname(process.execPath), '../' + name + extension)) + } + // assume we're inside an app bundle on OS X if (process.platform == "darwin") { var contentPath = ".app/Contents/"; From 47a630f0ade70219e97852cc63e0dc2361b96e70 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 14:18:45 -0800 Subject: [PATCH 04/11] manually install msvc DLLs with Interface/DS/AC --- cmake/macros/InstallBesideConsole.cmake | 1 + cmake/macros/ManuallyInstallMSVC.cmake | 37 +++++++++++++++++++++++++ interface/CMakeLists.txt | 1 + 3 files changed, 39 insertions(+) create mode 100644 cmake/macros/ManuallyInstallMSVC.cmake diff --git a/cmake/macros/InstallBesideConsole.cmake b/cmake/macros/InstallBesideConsole.cmake index e257defcb7..5f1dd00821 100644 --- a/cmake/macros/InstallBesideConsole.cmake +++ b/cmake/macros/InstallBesideConsole.cmake @@ -70,5 +70,6 @@ macro(install_beside_console) set(TARGET_INSTALL_DIR ${COMPONENT_INSTALL_DIR}) set(TARGET_INSTALL_COMPONENT ${SERVER_COMPONENT}) manually_install_ssl_eay() + manually_install_msvc() endmacro() diff --git a/cmake/macros/ManuallyInstallMSVC.cmake b/cmake/macros/ManuallyInstallMSVC.cmake new file mode 100644 index 0000000000..45e9362c91 --- /dev/null +++ b/cmake/macros/ManuallyInstallMSVC.cmake @@ -0,0 +1,37 @@ +# +# ManuallyInstallMSVC.cmake +# cmake/macros +# +# Copyright 2016 High Fidelity, Inc. +# Created by Stephen Birarda on January 22nd, 2016 +# +# Distributed under the Apache License, Version 2.0. +# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +# + +# On windows fixup_bundle does not find msvcr120.dll and msvcp120.dll that our targets need to be re-distributable. +# We use this macro to find them and manually install them beside the targets + +macro(manually_install_msvc) + if (WIN32) + # look for the msvcr DLLs required by this target + find_path(MSVC_DLL_PATH msvcr120.dll PATHS "C:/Windows/SysWOW64" NO_DEFAULT_PATH) + + if (MSVC_DLL_PATH-NOTFOUND) + # we didn't get the path to the DLLs - on production or PR build this is a fail + if (PRODUCTION_BUILD OR PR_BUILD) + message(FATAL_ERROR "Did not find MSVC_DLL_PATH for msvcr120.dll and msvcp120.dll.\ + Both are required to package re-distributable installer." + ) + endif () + else () + # manually install the two DLLs for this component + install( + FILES "${MSVC_DLL_PATH}/msvcr120.dll" "${MSVC_DLL_PATH}/msvcp120.dll" + DESTINATION ${TARGET_INSTALL_DIR} + COMPONENT ${TARGET_INSTALL_COMPONENT} + ) + endif () + + endif () +endmacro() diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index b4ce53b92a..3ae01f3673 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -267,6 +267,7 @@ if (WIN32) set(TARGET_INSTALL_DIR ${INTERFACE_INSTALL_DIR}) set(TARGET_INSTALL_COMPONENT ${CLIENT_COMPONENT}) manually_install_ssl_eay() + manually_install_msvc() package_libraries_for_deployment() endif() From 53eee270866a44df113d5a9dd17752838f3fdfe5 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 14:26:20 -0800 Subject: [PATCH 05/11] use incredibly dumb win path to 64-bit dlls --- cmake/macros/ManuallyInstallMSVC.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/macros/ManuallyInstallMSVC.cmake b/cmake/macros/ManuallyInstallMSVC.cmake index 45e9362c91..ac899427a7 100644 --- a/cmake/macros/ManuallyInstallMSVC.cmake +++ b/cmake/macros/ManuallyInstallMSVC.cmake @@ -15,7 +15,7 @@ macro(manually_install_msvc) if (WIN32) # look for the msvcr DLLs required by this target - find_path(MSVC_DLL_PATH msvcr120.dll PATHS "C:/Windows/SysWOW64" NO_DEFAULT_PATH) + find_path(MSVC_DLL_PATH msvcr120.dll PATHS "C:/Windows/System32" NO_DEFAULT_PATH) if (MSVC_DLL_PATH-NOTFOUND) # we didn't get the path to the DLLs - on production or PR build this is a fail From 971603bd571e88bb42598dd3498168f928a99375 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 14:53:05 -0800 Subject: [PATCH 06/11] make shortcuts to server-console point to right place --- cmake/templates/CPackProperties.cmake.in | 1 + cmake/templates/NSIS.template.in | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/templates/CPackProperties.cmake.in b/cmake/templates/CPackProperties.cmake.in index 7b3d0ae53e..285de84d39 100644 --- a/cmake/templates/CPackProperties.cmake.in +++ b/cmake/templates/CPackProperties.cmake.in @@ -11,6 +11,7 @@ set(INTERFACE_SHORTCUT_NAME "@INTERFACE_SM_SHORTCUT_NAME@") set(INTERFACE_WIN_EXEC_NAME "@INTERFACE_EXEC_PREFIX@.exe") +set(CONSOLE_INSTALL_SUBDIR "@CONSOLE_INSTALL_DIR@") set(CONSOLE_SHORTCUT_NAME "@CONSOLE_SM_SHORTCUT_NAME@") set(CONSOLE_WIN_EXEC_NAME "@CONSOLE_EXEC_NAME@") set(DS_EXEC_NAME "@DS_EXEC_NAME@") diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 075b3df38b..1f3ebcd8c0 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -769,7 +769,7 @@ Section "-Core installation" ; Conditional handling for server console shortcut ${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@} CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" \ - "$INSTDIR\@CONSOLE_WIN_EXEC_NAME@" + "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" ${EndIf} CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\@UNINSTALLER_NAME@" @@ -958,7 +958,7 @@ Function HandlePostInstallOptions ${NSD_GetState} $DesktopServerCheckbox $DesktopServerState ${If} $DesktopServerState == ${BST_CHECKED} - CreateShortCut "$DESKTOP\@CONSOLE_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_WIN_EXEC_NAME@" + CreateShortCut "$DESKTOP\@CONSOLE_SHORTCUT_NAME@.lnk" "$INSTDIR\\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" !insertmacro WritePostInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ YES ${Else} !insertmacro WritePostInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ NO @@ -968,7 +968,7 @@ Function HandlePostInstallOptions ${NSD_GetState} $ServerStartupCheckbox $ServerStartupState ${If} $ServerStartupState == ${BST_CHECKED} - CreateShortCut "$SMSTARTUP\@CONSOLE_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_WIN_EXEC_NAME@" + CreateShortCut "$SMSTARTUP\@CONSOLE_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" !insertmacro WritePostInstallOption @CONSOLE_STARTUP_REG_KEY@ YES ${Else} @@ -1012,7 +1012,7 @@ Function HandlePostInstallOptions ; both launches use the explorer trick in case the user has elevated permissions for the installer ; it won't be possible to use this approach if either application should be launched with a command line param ${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@} - Exec '"$WINDIR\explorer.exe" "$INSTDIR\@CONSOLE_WIN_EXEC_NAME@"' + Exec '"$WINDIR\explorer.exe" "$INSTDIR\\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"' ${Else} Exec '"$WINDIR\explorer.exe" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"' ${EndIf} From 921d4dccd7e388b54ddf32afccce42b486ae7a3e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 15:02:30 -0800 Subject: [PATCH 07/11] remove anything previously installed by old server-console --- cmake/templates/NSIS.template.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 1f3ebcd8c0..fd4358285f 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -685,6 +685,30 @@ FunctionEnd ;Installer Sections Section "-Core installation" + ;Delete any server-console files installed before it was placed in sub-folder + ;This is temporary and can be removed once users who had the initial installer have updated + Delete "$INSTDIR\server-console.exe" + Delete "$INSTDIR\locales" + Delete "$INSTDIR\resources\app" + Delete "$INSTDIR\resources\atom.asar" + Delete "$INSTDIR\build-info.json" + Delete "$INSTDIR\content_resources_200_percent.pak" + Delete "$INSTDIR\content_shell.pak" + Delete "$INSTDIR\d3dcompiler_47.dll" + Delete "$INSTDIR\icudtl.dat" + Delete "$INSTDIR\libEGL.dll" + Delete "$INSTDIR\libGLESv2.dll" + Delete "$INSTDIR\LICENSE" + Delete "$INSTDIR\LICENSES.chromium.html" + Delete "$INSTDIR\natives_blob.bin" + Delete "$INSTDIR\node.dll" + Delete "$INSTDIR\pdf.dll" + Delete "$INSTDIR\snapshot_blob.bin" + Delete "$INSTDIR\ui_resources_200_percent.pak" + Delete "$INSTDIR\vccorlib120.dll" + Delete "$INSTDIR\version" + Delete "$INSTDIR\xinput1_3.dll" + ;Use the entire tree produced by the INSTALL target. Keep the ;list of directories here in sync with the RMDir commands below. SetOutPath "$INSTDIR" From da1902ac72aca4a7f48aae847f2b4eb13bc487dc Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 15:27:30 -0800 Subject: [PATCH 08/11] use CMake InstallRequiredSystemLibraries for MSVC --- cmake/macros/GenerateInstallers.cmake | 5 ++++ cmake/macros/InstallBesideConsole.cmake | 1 - cmake/macros/ManuallyInstallMSVC.cmake | 37 ------------------------- interface/CMakeLists.txt | 1 - 4 files changed, 5 insertions(+), 39 deletions(-) delete mode 100644 cmake/macros/ManuallyInstallMSVC.cmake diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index 4d7119d737..e0523f32d3 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -25,6 +25,11 @@ macro(GENERATE_INSTALLERS) set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_DISPLAY_NAME}) if (WIN32) + # include CMake module that will install compiler system libraries + # so that we have msvcr120 and msvcp120 installed with targets + set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ${INTERFACE_INSTALL_DIR}) + include(InstallRequiredSystemLibraries) + set(CPACK_NSIS_MUI_ICON "${HF_CMAKE_DIR}/installer/installer.ico") # install and reference the Add/Remove icon diff --git a/cmake/macros/InstallBesideConsole.cmake b/cmake/macros/InstallBesideConsole.cmake index 5f1dd00821..e257defcb7 100644 --- a/cmake/macros/InstallBesideConsole.cmake +++ b/cmake/macros/InstallBesideConsole.cmake @@ -70,6 +70,5 @@ macro(install_beside_console) set(TARGET_INSTALL_DIR ${COMPONENT_INSTALL_DIR}) set(TARGET_INSTALL_COMPONENT ${SERVER_COMPONENT}) manually_install_ssl_eay() - manually_install_msvc() endmacro() diff --git a/cmake/macros/ManuallyInstallMSVC.cmake b/cmake/macros/ManuallyInstallMSVC.cmake deleted file mode 100644 index ac899427a7..0000000000 --- a/cmake/macros/ManuallyInstallMSVC.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# -# ManuallyInstallMSVC.cmake -# cmake/macros -# -# Copyright 2016 High Fidelity, Inc. -# Created by Stephen Birarda on January 22nd, 2016 -# -# Distributed under the Apache License, Version 2.0. -# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -# - -# On windows fixup_bundle does not find msvcr120.dll and msvcp120.dll that our targets need to be re-distributable. -# We use this macro to find them and manually install them beside the targets - -macro(manually_install_msvc) - if (WIN32) - # look for the msvcr DLLs required by this target - find_path(MSVC_DLL_PATH msvcr120.dll PATHS "C:/Windows/System32" NO_DEFAULT_PATH) - - if (MSVC_DLL_PATH-NOTFOUND) - # we didn't get the path to the DLLs - on production or PR build this is a fail - if (PRODUCTION_BUILD OR PR_BUILD) - message(FATAL_ERROR "Did not find MSVC_DLL_PATH for msvcr120.dll and msvcp120.dll.\ - Both are required to package re-distributable installer." - ) - endif () - else () - # manually install the two DLLs for this component - install( - FILES "${MSVC_DLL_PATH}/msvcr120.dll" "${MSVC_DLL_PATH}/msvcp120.dll" - DESTINATION ${TARGET_INSTALL_DIR} - COMPONENT ${TARGET_INSTALL_COMPONENT} - ) - endif () - - endif () -endmacro() diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 3ae01f3673..b4ce53b92a 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -267,7 +267,6 @@ if (WIN32) set(TARGET_INSTALL_DIR ${INTERFACE_INSTALL_DIR}) set(TARGET_INSTALL_COMPONENT ${CLIENT_COMPONENT}) manually_install_ssl_eay() - manually_install_msvc() package_libraries_for_deployment() endif() From 6951f1aed75abb74659d4b1a1ee971913f0e5611 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 15:31:01 -0800 Subject: [PATCH 09/11] tweak server console deletion requirements --- cmake/templates/NSIS.template.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index fd4358285f..0154d690b7 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -694,10 +694,6 @@ Section "-Core installation" Delete "$INSTDIR\build-info.json" Delete "$INSTDIR\content_resources_200_percent.pak" Delete "$INSTDIR\content_shell.pak" - Delete "$INSTDIR\d3dcompiler_47.dll" - Delete "$INSTDIR\icudtl.dat" - Delete "$INSTDIR\libEGL.dll" - Delete "$INSTDIR\libGLESv2.dll" Delete "$INSTDIR\LICENSE" Delete "$INSTDIR\LICENSES.chromium.html" Delete "$INSTDIR\natives_blob.bin" From 4e76f3ccc482e71fef9af2a8a58737c52bea193d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 15:39:53 -0800 Subject: [PATCH 10/11] use RMDir for removal of old SC dirs --- cmake/templates/NSIS.template.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 0154d690b7..bdf2b50b3c 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -688,8 +688,8 @@ Section "-Core installation" ;Delete any server-console files installed before it was placed in sub-folder ;This is temporary and can be removed once users who had the initial installer have updated Delete "$INSTDIR\server-console.exe" - Delete "$INSTDIR\locales" - Delete "$INSTDIR\resources\app" + RMDir /r "$INSTDIR\locales" + RMDir /r "$INSTDIR\resources\app" Delete "$INSTDIR\resources\atom.asar" Delete "$INSTDIR\build-info.json" Delete "$INSTDIR\content_resources_200_percent.pak" From 801cbf3faced021503ba3227eded81c937e31696 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 15:59:39 -0800 Subject: [PATCH 11/11] make sure CONSOLE_INSTALL_APP_PATH is defined before use --- cmake/macros/SetPackagingParameters.cmake | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 9aba143c03..b0f093977a 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -53,9 +53,15 @@ macro(SET_PACKAGING_PARAMETERS) set(CONSOLE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) set(INTERFACE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) + set(CONSOLE_EXEC_NAME "Server Console.app") + set(CONSOLE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${CONSOLE_EXEC_NAME}") + set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents") set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app") set(COMPONENT_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/MacOS") + + set(INTERFACE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app") + set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_PREFIX}.icns") else () if (WIN32) set(CONSOLE_INSTALL_DIR "server-console") @@ -98,15 +104,6 @@ macro(SET_PACKAGING_PARAMETERS) set(LAUNCH_NOW_REG_KEY "LaunchAfterInstall") endif () - if (APPLE) - - set(CONSOLE_EXEC_NAME "Server Console.app") - set(CONSOLE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${CONSOLE_EXEC_NAME}") - - set(INTERFACE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app") - set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_PREFIX}.icns") - endif() - # setup component categories for installer set(DDE_COMPONENT dde) set(CLIENT_COMPONENT client)