mirror of
https://github.com/overte-org/overte.git
synced 2025-06-07 00:21:10 +02:00
set shell context to user prior to app data copy
This commit is contained in:
parent
42a6f9daa1
commit
04a5dbed7d
2 changed files with 7 additions and 5 deletions
|
@ -19,8 +19,6 @@ set(HIGH_FIDELITY_PROTOCOL "@HIGH_FIDELITY_PROTOCOL@")
|
||||||
set(PRODUCTION_BUILD "@PRODUCTION_BUILD@")
|
set(PRODUCTION_BUILD "@PRODUCTION_BUILD@")
|
||||||
set(PR_BUILD "@PR_BUILD@")
|
set(PR_BUILD "@PR_BUILD@")
|
||||||
set(BUILD_ORGANIZATION "@BUILD_ORGANIZATION@")
|
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(POST_INSTALL_OPTIONS_PATH "@POST_INSTALL_OPTIONS_PATH@")
|
||||||
set(CLIENT_COMPONENT_NAME "@CLIENT_COMPONENT@")
|
set(CLIENT_COMPONENT_NAME "@CLIENT_COMPONENT@")
|
||||||
set(SERVER_COMPONENT_NAME "@SERVER_COMPONENT@")
|
set(SERVER_COMPONENT_NAME "@SERVER_COMPONENT@")
|
||||||
|
|
|
@ -976,17 +976,21 @@ Function HandlePostInstallOptions
|
||||||
${NSD_GetState} $CopyFromProductionCheckbox $CopyFromProductionState
|
${NSD_GetState} $CopyFromProductionCheckbox $CopyFromProductionState
|
||||||
|
|
||||||
${If} $CopyFromProductionState == ${BST_CHECKED}
|
${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
|
; 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
|
; 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
|
; handle an error in copying files
|
||||||
IfError 0 NoError
|
IfError 0 NoError
|
||||||
|
|
||||||
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground \
|
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:
|
NoError:
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
Loading…
Reference in a new issue