diff --git a/cmake/templates/CPackProperties.cmake.in b/cmake/templates/CPackProperties.cmake.in index 08b23f4657..7b3d0ae53e 100644 --- a/cmake/templates/CPackProperties.cmake.in +++ b/cmake/templates/CPackProperties.cmake.in @@ -19,8 +19,6 @@ set(HIGH_FIDELITY_PROTOCOL "@HIGH_FIDELITY_PROTOCOL@") set(PRODUCTION_BUILD "@PRODUCTION_BUILD@") set(PR_BUILD "@PR_BUILD@") set(BUILD_ORGANIZATION "@BUILD_ORGANIZATION@") -set(APP_DATA_ROOT "@APP_DATA_ROOT@") -set(APP_DATA_PATH "@APP_DATA_ROOT@/@BUILD_ORGANIZATION@") set(POST_INSTALL_OPTIONS_PATH "@POST_INSTALL_OPTIONS_PATH@") set(CLIENT_COMPONENT_NAME "@CLIENT_COMPONENT@") set(SERVER_COMPONENT_NAME "@SERVER_COMPONENT@") diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index d7cc3f715c..74cbdcd36f 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -976,17 +976,21 @@ Function HandlePostInstallOptions ${NSD_GetState} $CopyFromProductionCheckbox $CopyFromProductionState ${If} $CopyFromProductionState == ${BST_CHECKED} + SetShellVarContext current + + StrCopy $0 "$APPDATA\@BUILD_ORGANIZATION@" + ; we need to copy whatever is in the data folder for production build to the data folder for this build - CreateDirectory "@APP_DATA_PATH@" + CreateDirectory $0 ; copy the data from production build to this PR build - CopyFiles "@APP_DATA_ROOT@\High Fidelity\*" "@APP_DATA_PATH@" + CopyFiles "$APPDATA\High Fidelity\*" $0 ; handle an error in copying files IfError 0 NoError MessageBox mb_IconStop|mb_TopMost|mb_SetForeground \ - "There was a problem copying your production content and settings to @APP_DATA_PATH@ for this PR build.$\r$\nPlease try to copy them manually." + "There was a problem copying your production content and settings to $0 for this PR build.$\r$\nPlease copy them manually." NoError: ${EndIf}