diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-08-07 19:02:26 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-08-09 10:57:40 -0600 |
| commit | f407e08ed9695a59e5f41cfc7a41cd3c8138817a (patch) | |
| tree | d9d66d6e1e4b9610ac7cc7130d92128f73e6f925 /src/wixstdba/WixStandardBootstrapperApplication.cpp | |
| parent | d96ba4263bf243dedb62e9090072fba53bfe1316 (diff) | |
| download | wix-f407e08ed9695a59e5f41cfc7a41cd3c8138817a.tar.gz wix-f407e08ed9695a59e5f41cfc7a41cd3c8138817a.tar.bz2 wix-f407e08ed9695a59e5f41cfc7a41cd3c8138817a.zip | |
WIXFEAT:4863 Update to latest thmutil.
Diffstat (limited to 'src/wixstdba/WixStandardBootstrapperApplication.cpp')
| -rw-r--r-- | src/wixstdba/WixStandardBootstrapperApplication.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp index 8d07c760..c5ef59ec 100644 --- a/src/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp | |||
| @@ -183,6 +183,7 @@ static HRESULT DAPI GetVariableStringCallback( | |||
| 183 | static HRESULT DAPI SetVariableStringCallback( | 183 | static HRESULT DAPI SetVariableStringCallback( |
| 184 | __in_z LPCWSTR wzVariable, | 184 | __in_z LPCWSTR wzVariable, |
| 185 | __in_z_opt LPCWSTR wzValue, | 185 | __in_z_opt LPCWSTR wzValue, |
| 186 | __in BOOL fFormatted, | ||
| 186 | __in_opt LPVOID pvContext | 187 | __in_opt LPVOID pvContext |
| 187 | ); | 188 | ); |
| 188 | static LPCSTR LoggingRequestStateToString( | 189 | static LPCSTR LoggingRequestStateToString( |
| @@ -975,7 +976,7 @@ public: // IBootstrapperApplication | |||
| 975 | 976 | ||
| 976 | // If a restart was encountered and we are not suppressing restarts, then restart is required. | 977 | // If a restart was encountered and we are not suppressing restarts, then restart is required. |
| 977 | m_fRestartRequired = (BOOTSTRAPPER_APPLY_RESTART_NONE != restart && BOOTSTRAPPER_RESTART_NEVER < m_command.restart); | 978 | m_fRestartRequired = (BOOTSTRAPPER_APPLY_RESTART_NONE != restart && BOOTSTRAPPER_RESTART_NEVER < m_command.restart); |
| 978 | BalSetStringVariable(WIXSTDBA_VARIABLE_RESTART_REQUIRED, m_fRestartRequired ? L"1" : NULL); | 979 | BalSetStringVariable(WIXSTDBA_VARIABLE_RESTART_REQUIRED, m_fRestartRequired ? L"1" : NULL, FALSE); |
| 979 | 980 | ||
| 980 | // If a restart is required and we're not displaying a UI or we are not supposed to prompt for restart then allow the restart. | 981 | // If a restart is required and we're not displaying a UI or we are not supposed to prompt for restart then allow the restart. |
| 981 | m_fAllowRestart = m_fRestartRequired && (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BOOTSTRAPPER_RESTART_PROMPT < m_command.restart); | 982 | m_fAllowRestart = m_fRestartRequired && (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BOOTSTRAPPER_RESTART_PROMPT < m_command.restart); |
| @@ -1905,7 +1906,7 @@ private: // privates | |||
| 1905 | hr = StrAllocString(&sczVariableValue, ++pwc, 0); | 1906 | hr = StrAllocString(&sczVariableValue, ++pwc, 0); |
| 1906 | BalExitOnFailure(hr, "Failed to copy variable value."); | 1907 | BalExitOnFailure(hr, "Failed to copy variable value."); |
| 1907 | 1908 | ||
| 1908 | hr = m_pEngine->SetVariableString(sczVariableName, sczVariableValue); | 1909 | hr = m_pEngine->SetVariableString(sczVariableName, sczVariableValue, FALSE); |
| 1909 | BalExitOnFailure(hr, "Failed to set variable."); | 1910 | BalExitOnFailure(hr, "Failed to set variable."); |
| 1910 | } | 1911 | } |
| 1911 | else | 1912 | else |
| @@ -2891,7 +2892,7 @@ private: // privates | |||
| 2891 | } | 2892 | } |
| 2892 | else if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON)) | 2893 | else if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON)) |
| 2893 | { | 2894 | { |
| 2894 | fLaunchTargetExists = BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH); | 2895 | fLaunchTargetExists = BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH); |
| 2895 | } | 2896 | } |
| 2896 | 2897 | ||
| 2897 | ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON, fLaunchTargetExists && BOOTSTRAPPER_ACTION_UNINSTALL < m_plannedAction); | 2898 | ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON, fLaunchTargetExists && BOOTSTRAPPER_ACTION_UNINSTALL < m_plannedAction); |
| @@ -3192,24 +3193,24 @@ private: // privates | |||
| 3192 | hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget); | 3193 | hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget); |
| 3193 | BalExitOnFailure(hr, "Failed to format launch target variable: %ls", sczUnformattedLaunchTarget); | 3194 | BalExitOnFailure(hr, "Failed to format launch target variable: %ls", sczUnformattedLaunchTarget); |
| 3194 | 3195 | ||
| 3195 | if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID)) | 3196 | if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID)) |
| 3196 | { | 3197 | { |
| 3197 | hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID, &sczLaunchTargetElevatedId); | 3198 | hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID, &sczLaunchTargetElevatedId); |
| 3198 | BalExitOnFailure(hr, "Failed to get launch target elevated id '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID); | 3199 | BalExitOnFailure(hr, "Failed to get launch target elevated id '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID); |
| 3199 | } | 3200 | } |
| 3200 | 3201 | ||
| 3201 | if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS)) | 3202 | if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS)) |
| 3202 | { | 3203 | { |
| 3203 | hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS, &sczUnformattedArguments); | 3204 | hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS, &sczUnformattedArguments); |
| 3204 | BalExitOnFailure(hr, "Failed to get launch arguments '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS); | 3205 | BalExitOnFailure(hr, "Failed to get launch arguments '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS); |
| 3205 | } | 3206 | } |
| 3206 | 3207 | ||
| 3207 | if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_HIDDEN)) | 3208 | if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_HIDDEN)) |
| 3208 | { | 3209 | { |
| 3209 | nCmdShow = SW_HIDE; | 3210 | nCmdShow = SW_HIDE; |
| 3210 | } | 3211 | } |
| 3211 | 3212 | ||
| 3212 | if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER)) | 3213 | if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER)) |
| 3213 | { | 3214 | { |
| 3214 | hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER, &sczUnformattedLaunchFolder); | 3215 | hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER, &sczUnformattedLaunchFolder); |
| 3215 | BalExitOnFailure(hr, "Failed to get launch working directory variable '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER); | 3216 | BalExitOnFailure(hr, "Failed to get launch working directory variable '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER); |
| @@ -3879,10 +3880,11 @@ static HRESULT DAPI GetVariableStringCallback( | |||
| 3879 | static HRESULT DAPI SetVariableStringCallback( | 3880 | static HRESULT DAPI SetVariableStringCallback( |
| 3880 | __in_z LPCWSTR wzVariable, | 3881 | __in_z LPCWSTR wzVariable, |
| 3881 | __in_z_opt LPCWSTR wzValue, | 3882 | __in_z_opt LPCWSTR wzValue, |
| 3883 | __in BOOL fFormatted, | ||
| 3882 | __in_opt LPVOID /*pvContext*/ | 3884 | __in_opt LPVOID /*pvContext*/ |
| 3883 | ) | 3885 | ) |
| 3884 | { | 3886 | { |
| 3885 | return BalSetStringVariable(wzVariable, wzValue); | 3887 | return BalSetStringVariable(wzVariable, wzValue, fFormatted); |
| 3886 | } | 3888 | } |
| 3887 | 3889 | ||
| 3888 | static LPCSTR LoggingRequestStateToString( | 3890 | static LPCSTR LoggingRequestStateToString( |
