hard code the matching app data path

This commit is contained in:
Stephen Birarda 2016-01-19 09:33:06 -08:00
parent 6ee0258251
commit 42a6f9daa1
2 changed files with 11 additions and 6 deletions

View file

@ -19,6 +19,8 @@ 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@")

View file

@ -977,15 +977,18 @@ Function HandlePostInstallOptions
${If} $CopyFromProductionState == ${BST_CHECKED}
; we need to copy whatever is in the data folder for production build to the data folder for this build
CreateDirectory "$APPDATA\@BUILD_ORGANIZATION@"
CreateDirectory "@APP_DATA_PATH@"
IfErrors CopyData
; copy the data from production build to this PR build
CopyFiles "@APP_DATA_ROOT@\High Fidelity\*" "@APP_DATA_PATH@"
; if we're here there was an error creating the data folder for this build
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Could not create directory $APPDATA\@BUILD_ORGANIZATION@, error $0"
; handle an error in copying files
IfError 0 NoError
CopyData:
CopyFiles "$APPDATA\High Fidelity\*" "$APPDATA\@BUILD_ORGANIZATION@"
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."
NoError:
${EndIf}
${EndIf}