From c4ec02c4bfb556952987c7851e7f174884ddf102 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 24 Aug 2016 10:32:59 -0700 Subject: [PATCH 1/6] add removal of resources folder during install process --- cmake/templates/NSIS.template.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 4786b12743..e8d89ccad7 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -589,6 +589,9 @@ Section "-Core installation" Delete "$INSTDIR\version" Delete "$INSTDIR\xinput1_3.dll" + ; Remove the resources folder so we don't end up including removed QML files + RMDir /r "$INSTDIR\resources" + ; Delete old desktop shortcuts before they were renamed during Sandbox rename Delete "$DESKTOP\@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@.lnk" Delete "$DESKTOP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk" From 0e4fb51d0924ce5f7bf8632c556f41eae39c9c7d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 24 Aug 2016 11:36:36 -0700 Subject: [PATCH 2/6] force cleanup section to be first --- cmake/templates/NSIS.template.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index e8d89ccad7..abecf0fc62 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -243,6 +243,16 @@ FunctionEnd ;-------------------------------- ; Installation types + +Section "-Previous Install Cleanup" + + ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} + ; Remove the resources folder so we don't end up including removed QML files + RMDir /r "$INSTDIR\resources" + ${EndIf} + +SectionEnd + @CPACK_NSIS_INSTALLATION_TYPES@ ;-------------------------------- @@ -589,9 +599,6 @@ Section "-Core installation" Delete "$INSTDIR\version" Delete "$INSTDIR\xinput1_3.dll" - ; Remove the resources folder so we don't end up including removed QML files - RMDir /r "$INSTDIR\resources" - ; Delete old desktop shortcuts before they were renamed during Sandbox rename Delete "$DESKTOP\@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@.lnk" Delete "$DESKTOP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk" From fab25686245f57e1d39a3f07f10eb28081074a1e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 24 Aug 2016 16:16:16 -0700 Subject: [PATCH 3/6] always remove the resources dir, make client required --- cmake/macros/GenerateInstallers.cmake | 3 +++ cmake/templates/NSIS.template.in | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index 0def701739..d0da908554 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -24,6 +24,9 @@ macro(GENERATE_INSTALLERS) set(CPACK_NSIS_PACKAGE_NAME ${_DISPLAY_NAME}) set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_DISPLAY_NAME}) + # make the Interface client a required component + set(CPACK_COMPONENT_${CLIENT_COMPONENT}_REQUIRED TRUE) + if (WIN32) # include CMake module that will install compiler system libraries # so that we have msvcr120 and msvcp120 installed with targets diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index abecf0fc62..29e3869abe 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -245,12 +245,8 @@ FunctionEnd ; Installation types Section "-Previous Install Cleanup" - - ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} - ; Remove the resources folder so we don't end up including removed QML files - RMDir /r "$INSTDIR\resources" - ${EndIf} - + ; Remove the resources folder so we don't end up including removed QML files + RMDir /r "$INSTDIR\resources" SectionEnd @CPACK_NSIS_INSTALLATION_TYPES@ From 87ecc65dce05d301bdb186e77033cb2f437e0d0e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 24 Aug 2016 17:01:59 -0700 Subject: [PATCH 4/6] set component requirement in cpack add componeent command --- cmake/macros/GenerateInstallers.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index d0da908554..34997a21c8 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -24,9 +24,6 @@ macro(GENERATE_INSTALLERS) set(CPACK_NSIS_PACKAGE_NAME ${_DISPLAY_NAME}) set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_DISPLAY_NAME}) - # make the Interface client a required component - set(CPACK_COMPONENT_${CLIENT_COMPONENT}_REQUIRED TRUE) - if (WIN32) # include CMake module that will install compiler system libraries # so that we have msvcr120 and msvcp120 installed with targets @@ -88,7 +85,7 @@ macro(GENERATE_INSTALLERS) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") - cpack_add_component(${CLIENT_COMPONENT} DISPLAY_NAME "High Fidelity Interface") + cpack_add_component(${CLIENT_COMPONENT} DISPLAY_NAME "High Fidelity Interface" REQUIRED) cpack_add_component(${SERVER_COMPONENT} DISPLAY_NAME "High Fidelity Sandbox") include(CPack) From 20777bd19a11e99987da52e62469d479e27df819 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 25 Aug 2016 15:50:13 -0700 Subject: [PATCH 5/6] force default selection of client on install --- cmake/macros/GenerateInstallers.cmake | 2 +- cmake/templates/NSIS.template.in | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index 34997a21c8..0def701739 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -85,7 +85,7 @@ macro(GENERATE_INSTALLERS) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") - cpack_add_component(${CLIENT_COMPONENT} DISPLAY_NAME "High Fidelity Interface" REQUIRED) + cpack_add_component(${CLIENT_COMPONENT} DISPLAY_NAME "High Fidelity Interface") cpack_add_component(${SERVER_COMPONENT} DISPLAY_NAME "High Fidelity Sandbox") include(CPack) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 29e3869abe..94f77a35c0 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -129,6 +129,11 @@ Var AR_RegFlags ;Writing modified flags SectionSetFlags ${${SecName}} $AR_SecFlags + ; The client is always selected by default + ${If} ${SecName} == @CLIENT_COMPONENT_NAME@ + SectionSetFlags ${${SecName}} 17 + ${EndIf} + "default_${SecName}:" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected !macroend From a8272712bbb841a59eacf7a98ae85eded5492493 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 29 Aug 2016 15:40:45 -0700 Subject: [PATCH 6/6] move forced client selection to apply to all installs --- cmake/templates/NSIS.template.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 94f77a35c0..65e801d321 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -129,12 +129,12 @@ Var AR_RegFlags ;Writing modified flags SectionSetFlags ${${SecName}} $AR_SecFlags - ; The client is always selected by default - ${If} ${SecName} == @CLIENT_COMPONENT_NAME@ - SectionSetFlags ${${SecName}} 17 - ${EndIf} - "default_${SecName}:" + ; The client is always selected by default + ${If} ${SecName} == @CLIENT_COMPONENT_NAME@ + SectionSetFlags ${${SecName}} 17 + ${EndIf} + !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected !macroend