From fda2cde0067cb6bd9e6e99c3fab8dfd5e0819f5f Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Tue, 15 Nov 2016 14:16:54 -0800 Subject: [PATCH 1/6] Fix buffer leak in line entity --- .../entities-renderer/src/RenderableLineEntityItem.cpp | 7 +++++++ libraries/entities-renderer/src/RenderableLineEntityItem.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libraries/entities-renderer/src/RenderableLineEntityItem.cpp b/libraries/entities-renderer/src/RenderableLineEntityItem.cpp index b8815aab7c..4da9efe883 100644 --- a/libraries/entities-renderer/src/RenderableLineEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableLineEntityItem.cpp @@ -24,6 +24,13 @@ EntityItemPointer RenderableLineEntityItem::factory(const EntityItemID& entityID return entity; } +RenderableLineEntityItem::~RenderableLineEntityItem() { + auto geometryCache = DependencyManager::get(); + if (geometryCache) { + geometryCache->releaseID(_lineVerticesID); + } +} + void RenderableLineEntityItem::updateGeometry() { auto geometryCache = DependencyManager::get(); if (_lineVerticesID == GeometryCache::UNKNOWN_ID) { diff --git a/libraries/entities-renderer/src/RenderableLineEntityItem.h b/libraries/entities-renderer/src/RenderableLineEntityItem.h index 1227c6e63d..6282bbbfc0 100644 --- a/libraries/entities-renderer/src/RenderableLineEntityItem.h +++ b/libraries/entities-renderer/src/RenderableLineEntityItem.h @@ -23,6 +23,7 @@ public: LineEntityItem(entityItemID), _lineVerticesID(GeometryCache::UNKNOWN_ID) { } + ~RenderableLineEntityItem(); virtual void render(RenderArgs* args) override; From d7d54dd82f81472c1dc2ef4d6b4df45837c5ebf0 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 7 Nov 2016 13:59:14 -0800 Subject: [PATCH 2/6] Only launch interface if selected --- cmake/macros/SetPackagingParameters.cmake | 3 +- cmake/templates/CPackProperties.cmake.in | 3 +- cmake/templates/NSIS.template.in | 56 ++++++++++++++++------- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 6ce3c95cdd..82a4a7d080 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -139,7 +139,8 @@ macro(SET_PACKAGING_PARAMETERS) set(CLIENT_DESKTOP_SHORTCUT_REG_KEY "ClientDesktopShortcut") set(CONSOLE_DESKTOP_SHORTCUT_REG_KEY "ConsoleDesktopShortcut") set(CONSOLE_STARTUP_REG_KEY "ConsoleStartupShortcut") - set(LAUNCH_NOW_REG_KEY "LaunchAfterInstall") + set(CLIENT_LAUNCH_NOW_REG_KEY "ClientLaunchAfterInstall") + set(SERVER_LAUNCH_NOW_REG_KEY "ServerLaunchAfterInstall") endif () # setup component categories for installer diff --git a/cmake/templates/CPackProperties.cmake.in b/cmake/templates/CPackProperties.cmake.in index d7a1278e99..c1e3d9d773 100644 --- a/cmake/templates/CPackProperties.cmake.in +++ b/cmake/templates/CPackProperties.cmake.in @@ -38,7 +38,8 @@ set(POST_INSTALL_OPTIONS_REG_GROUP "@POST_INSTALL_OPTIONS_REG_GROUP@") set(CLIENT_DESKTOP_SHORTCUT_REG_KEY "@CLIENT_DESKTOP_SHORTCUT_REG_KEY@") set(CONSOLE_DESKTOP_SHORTCUT_REG_KEY "@CONSOLE_DESKTOP_SHORTCUT_REG_KEY@") set(CONSOLE_STARTUP_REG_KEY "@CONSOLE_STARTUP_REG_KEY@") -set(LAUNCH_NOW_REG_KEY "@LAUNCH_NOW_REG_KEY@") +set(SERVER_LAUNCH_NOW_REG_KEY "@SERVER_LAUNCH_NOW_REG_KEY@") +set(CLIENT_LAUNCH_NOW_REG_KEY "@CLIENT_LAUNCH_NOW_REG_KEY@") set(INSTALLER_HEADER_IMAGE "@INSTALLER_HEADER_IMAGE@") set(UNINSTALLER_HEADER_IMAGE "@UNINSTALLER_HEADER_IMAGE@") set(ADD_REMOVE_ICON_PATH "@ADD_REMOVE_ICON_PATH@") diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index d65612351c..2d7f756315 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -368,7 +368,8 @@ Var PostInstallDialog Var DesktopClientCheckbox Var DesktopServerCheckbox Var ServerStartupCheckbox -Var LaunchNowCheckbox +Var LaunchServerNowCheckbox +Var LaunchClientNowCheckbox Var CurrentOffset Var OffsetUnits Var CopyFromProductionCheckbox @@ -431,17 +432,22 @@ Function PostInstallOptionsPage ${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@} ${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @CONSOLE_HF_SHORTCUT_NAME@ after install" - ${Else} - ${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @INTERFACE_HF_SHORTCUT_NAME@ after install" + Pop $LaunchServerNowCheckbox + + ; set the checkbox state depending on what is present in the registry + !insertmacro SetPostInstallOption $LaunchServerNowCheckbox @SERVER_LAUNCH_NOW_REG_KEY@ ${BST_UNCHECKED} + + IntOp $CurrentOffset $CurrentOffset + 15 ${EndIf} - Pop $LaunchNowCheckbox + ${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @INTERFACE_HF_SHORTCUT_NAME@ after install" + Pop $LaunchClientNowCheckbox ; set the checkbox state depending on what is present in the registry - !insertmacro SetPostInstallOption $LaunchNowCheckbox @LAUNCH_NOW_REG_KEY@ ${BST_CHECKED} + !insertmacro SetPostInstallOption $LaunchClientNowCheckbox @CLIENT_LAUNCH_NOW_REG_KEY@ ${BST_CHECKED} ${If} @PR_BUILD@ == 1 - ; a PR build defaults all install options expect LaunchNowCheckbox and the settings copy to unchecked + ; a PR build defaults all install options expect LaunchServerNowCheckbox, LaunchClientNowCheckbox and the settings copy to unchecked ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} ${NSD_SetState} $DesktopClientCheckbox ${BST_UNCHECKED} ${EndIf} @@ -471,7 +477,8 @@ FunctionEnd Var DesktopClientState Var DesktopServerState Var ServerStartupState -Var LaunchNowState +Var LaunchServerNowState +Var LaunchClientNowState Var CopyFromProductionState Function ReadPostInstallOptions @@ -494,7 +501,8 @@ Function ReadPostInstallOptions ${EndIf} ; check if we need to launch an application post-install - ${NSD_GetState} $LaunchNowCheckbox $LaunchNowState + ${NSD_GetState} $LaunchServerNowCheckbox $LaunchServerNowState + ${NSD_GetState} $LaunchClientNowCheckbox $LaunchClientNowState FunctionEnd Function HandlePostInstallOptions @@ -565,20 +573,34 @@ Function HandlePostInstallOptions ${EndIf} ${EndIf} - ${If} $LaunchNowState == ${BST_CHECKED} - !insertmacro WritePostInstallOption @LAUNCH_NOW_REG_KEY@ YES + ${If} $LaunchServerNowState == ${BST_CHECKED} + !insertmacro WritePostInstallOption @SERVER_LAUNCH_NOW_REG_KEY@ YES - ; 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@} ; create shortcut with ARGUMENTS - CreateShortCut "$TEMP\SandboxShortcut.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" "-- --launchInterface" - Exec '"$WINDIR\explorer.exe" "$TEMP\SandboxShortcut.lnk"' - ${Else} - Exec '"$WINDIR\explorer.exe" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"' + + ; both launches use the explorer trick in case the user has elevated permissions for the installer + ${If} $LaunchClientNowState == ${BST_CHECKED} + !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ YES + CreateShortCut "$TEMP\SandboxShortcut.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" "-- --launchInterface" + Exec '"$WINDIR\explorer.exe" "$TEMP\SandboxShortcut.lnk"' + ${Else} + !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ NO + Exec '"$WINDIR\explorer.exe" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"' + ${EndIf} + ${EndIf} ${Else} - !insertmacro WritePostInstallOption @LAUNCH_NOW_REG_KEY@ NO + !insertmacro WritePostInstallOption @SERVER_LAUNCH_NOW_REG_KEY@ NO + + ; launch uses the explorer trick in case the user has elevated permissions for the installer + ${If} $LaunchClientNowState == ${BST_CHECKED} + !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ YES + Exec '"$WINDIR\explorer.exe" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"' + ${Else} + !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ NO + ${EndIf} + ${EndIf} FunctionEnd From 9e0230980bff8020f8d2bcf5fa4439c0803b7a6a Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Wed, 16 Nov 2016 10:44:25 -0800 Subject: [PATCH 3/6] Enable Server Only install --- cmake/templates/NSIS.template.in | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 2d7f756315..ed2b0c76ec 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -135,10 +135,6 @@ Var AR_RegFlags SectionSetFlags ${${SecName}} $AR_SecFlags "default_${SecName}:" - ; The client is always selected by default - ${If} ${SecName} == @CLIENT_COMPONENT_NAME@ - SectionSetFlags ${${SecName}} 17 - ${EndIf} !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected !macroend @@ -435,16 +431,18 @@ Function PostInstallOptionsPage Pop $LaunchServerNowCheckbox ; set the checkbox state depending on what is present in the registry - !insertmacro SetPostInstallOption $LaunchServerNowCheckbox @SERVER_LAUNCH_NOW_REG_KEY@ ${BST_UNCHECKED} + !insertmacro SetPostInstallOption $LaunchServerNowCheckbox @SERVER_LAUNCH_NOW_REG_KEY@ ${BST_CHECKED} IntOp $CurrentOffset $CurrentOffset + 15 ${EndIf} - ${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @INTERFACE_HF_SHORTCUT_NAME@ after install" - Pop $LaunchClientNowCheckbox + ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} + ${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @INTERFACE_HF_SHORTCUT_NAME@ after install" + Pop $LaunchClientNowCheckbox - ; set the checkbox state depending on what is present in the registry - !insertmacro SetPostInstallOption $LaunchClientNowCheckbox @CLIENT_LAUNCH_NOW_REG_KEY@ ${BST_CHECKED} + ; set the checkbox state depending on what is present in the registry + !insertmacro SetPostInstallOption $LaunchClientNowCheckbox @CLIENT_LAUNCH_NOW_REG_KEY@ ${BST_CHECKED} + ${EndIf} ${If} @PR_BUILD@ == 1 ; a PR build defaults all install options expect LaunchServerNowCheckbox, LaunchClientNowCheckbox and the settings copy to unchecked @@ -500,9 +498,15 @@ Function ReadPostInstallOptions ${NSD_GetState} $CopyFromProductionCheckbox $CopyFromProductionState ${EndIf} - ; check if we need to launch an application post-install - ${NSD_GetState} $LaunchServerNowCheckbox $LaunchServerNowState - ${NSD_GetState} $LaunchClientNowCheckbox $LaunchClientNowState + ${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@} + ; check if we need to launch the server post-install + ${NSD_GetState} $LaunchServerNowCheckbox $LaunchServerNowState + ${EndIf} + + ${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@} + ; check if we need to launch the client post-install + ${NSD_GetState} $LaunchClientNowCheckbox $LaunchClientNowState + ${EndIf} FunctionEnd Function HandlePostInstallOptions From 722032080afa02673d16a0474328c32989932f43 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Wed, 16 Nov 2016 11:03:15 -0800 Subject: [PATCH 4/6] Make clear popup is from the Sandbox --- server-console/src/content-update.html | 2 +- server-console/src/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server-console/src/content-update.html b/server-console/src/content-update.html index 279b72fbc0..9298cd53e6 100644 --- a/server-console/src/content-update.html +++ b/server-console/src/content-update.html @@ -1,7 +1,7 @@ - Server Backup + High Fidelity Sandbox diff --git a/server-console/src/main.js b/server-console/src/main.js index be5a5cc107..c99e39faf8 100644 --- a/server-console/src/main.js +++ b/server-console/src/main.js @@ -606,7 +606,7 @@ function checkNewContent() { buttons: ['Yes', 'No'], defaultId: 1, cancelId: 1, - title: 'New home content', + title: 'High Fidelity Sandbox', message: 'A newer version of the home content set is available.\nDo you wish to update?', noLink: true, }, function(idx) { From fa841620ab6c9bf0ba1f1871349d8654cd465221 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 16 Nov 2016 12:49:25 -0800 Subject: [PATCH 5/6] Disable glow line temporarily while fixing implementation --- libraries/render-utils/src/GeometryCache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/render-utils/src/GeometryCache.cpp b/libraries/render-utils/src/GeometryCache.cpp index dcd4961c32..3f5dc26db2 100644 --- a/libraries/render-utils/src/GeometryCache.cpp +++ b/libraries/render-utils/src/GeometryCache.cpp @@ -1593,7 +1593,10 @@ void GeometryCache::renderGlowLine(gpu::Batch& batch, const glm::vec3& p1, const glowIntensity = 0.0f; #endif + glowIntensity = 0.0f; + if (glowIntensity <= 0) { + bindSimpleProgram(batch, false, false, false, true, false); renderLine(batch, p1, p2, color, id); return; } From 2f2da8ccd38e40338b3f2b44ef66a619025a40f3 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Wed, 16 Nov 2016 13:15:10 -0800 Subject: [PATCH 6/6] Do not read launchClientNowState if client disabled --- cmake/templates/NSIS.template.in | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index ed2b0c76ec..ab5e48350c 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -503,7 +503,7 @@ Function ReadPostInstallOptions ${NSD_GetState} $LaunchServerNowCheckbox $LaunchServerNowState ${EndIf} - ${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@} + ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} ; check if we need to launch the client post-install ${NSD_GetState} $LaunchClientNowCheckbox $LaunchClientNowState ${EndIf} @@ -580,20 +580,17 @@ Function HandlePostInstallOptions ${If} $LaunchServerNowState == ${BST_CHECKED} !insertmacro WritePostInstallOption @SERVER_LAUNCH_NOW_REG_KEY@ YES - ${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@} + ; both launches use the explorer trick in case the user has elevated permissions for the installer + ${If} $LaunchClientNowState == ${BST_CHECKED} + !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ YES ; create shortcut with ARGUMENTS - - ; both launches use the explorer trick in case the user has elevated permissions for the installer - ${If} $LaunchClientNowState == ${BST_CHECKED} - !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ YES - CreateShortCut "$TEMP\SandboxShortcut.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" "-- --launchInterface" - Exec '"$WINDIR\explorer.exe" "$TEMP\SandboxShortcut.lnk"' - ${Else} - !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ NO - Exec '"$WINDIR\explorer.exe" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"' - ${EndIf} - + CreateShortCut "$TEMP\SandboxShortcut.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" "-- --launchInterface" + Exec '"$WINDIR\explorer.exe" "$TEMP\SandboxShortcut.lnk"' + ${Else} + !insertmacro WritePostInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ NO + Exec '"$WINDIR\explorer.exe" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"' ${EndIf} + ${Else} !insertmacro WritePostInstallOption @SERVER_LAUNCH_NOW_REG_KEY@ NO