diff options
Diffstat (limited to 'src/ext')
-rw-r--r-- | src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp index ec3c268a..7b70d772 100644 --- a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp | |||
@@ -246,12 +246,12 @@ public: // IBootstrapperApplication | |||
246 | __in LPCWSTR wzBundleTag, | 246 | __in LPCWSTR wzBundleTag, |
247 | __in BOOL fPerMachine, | 247 | __in BOOL fPerMachine, |
248 | __in LPCWSTR wzVersion, | 248 | __in LPCWSTR wzVersion, |
249 | __in BOOTSTRAPPER_RELATED_OPERATION operation, | ||
250 | __in BOOL fMissingFromCache, | 249 | __in BOOL fMissingFromCache, |
251 | __inout BOOL* pfCancel | 250 | __inout BOOL* pfCancel |
252 | ) | 251 | ) |
253 | { | 252 | { |
254 | BAL_INFO_PACKAGE* pPackage = NULL; | 253 | BAL_INFO_PACKAGE* pPackage = NULL; |
254 | int nCompare = 0; | ||
255 | 255 | ||
256 | if (!fMissingFromCache) | 256 | if (!fMissingFromCache) |
257 | { | 257 | { |
@@ -261,14 +261,15 @@ public: // IBootstrapperApplication | |||
261 | } | 261 | } |
262 | 262 | ||
263 | // If we're not doing a prerequisite install, remember when our bundle would cause a downgrade. | 263 | // If we're not doing a prerequisite install, remember when our bundle would cause a downgrade. |
264 | if (!m_fPrereq && BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE == operation) | 264 | if (!m_fPrereq && BOOTSTRAPPER_RELATION_UPGRADE == relationType && |
265 | SUCCEEDED(m_pEngine->CompareVersions(m_sczBundleVersion, wzVersion, &nCompare)) && 0 > nCompare) | ||
265 | { | 266 | { |
266 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "A newer version (v%ls) of this product is installed.", wzVersion); | 267 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "A newer version (v%ls) of this product is installed.", wzVersion); |
267 | m_fDowngrading = TRUE; | 268 | m_fDowngrading = TRUE; |
268 | } | 269 | } |
269 | } | 270 | } |
270 | 271 | ||
271 | return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, operation, fMissingFromCache, pfCancel); | 272 | return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel); |
272 | } | 273 | } |
273 | 274 | ||
274 | 275 | ||
@@ -2091,7 +2092,8 @@ public: //CBalBaseBootstrapperApplication | |||
2091 | } | 2092 | } |
2092 | } | 2093 | } |
2093 | 2094 | ||
2094 | hr = S_OK; | 2095 | hr = BalGetStringVariable(L"WixBundleVersion", &m_sczBundleVersion); |
2096 | BalExitOnFailure(hr, "CWixStandardBootstrapperApplication initialization failed."); | ||
2095 | 2097 | ||
2096 | LExit: | 2098 | LExit: |
2097 | return hr; | 2099 | return hr; |
@@ -4129,6 +4131,7 @@ public: | |||
4129 | m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN; | 4131 | m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN; |
4130 | 4132 | ||
4131 | m_sczAfterForcedRestartPackage = NULL; | 4133 | m_sczAfterForcedRestartPackage = NULL; |
4134 | m_sczBundleVersion = NULL; | ||
4132 | 4135 | ||
4133 | m_pWixLoc = NULL; | 4136 | m_pWixLoc = NULL; |
4134 | m_Bundle = { }; | 4137 | m_Bundle = { }; |
@@ -4367,6 +4370,7 @@ public: | |||
4367 | ReleaseStr(m_sczLanguage); | 4370 | ReleaseStr(m_sczLanguage); |
4368 | ReleaseStr(m_sczLicenseFile); | 4371 | ReleaseStr(m_sczLicenseFile); |
4369 | ReleaseStr(m_sczLicenseUrl); | 4372 | ReleaseStr(m_sczLicenseUrl); |
4373 | ReleaseStr(m_sczBundleVersion); | ||
4370 | ReleaseStr(m_sczAfterForcedRestartPackage); | 4374 | ReleaseStr(m_sczAfterForcedRestartPackage); |
4371 | ReleaseNullObject(m_pEngine); | 4375 | ReleaseNullObject(m_pEngine); |
4372 | 4376 | ||
@@ -4391,6 +4395,7 @@ private: | |||
4391 | BOOTSTRAPPER_ACTION m_plannedAction; | 4395 | BOOTSTRAPPER_ACTION m_plannedAction; |
4392 | 4396 | ||
4393 | LPWSTR m_sczAfterForcedRestartPackage; | 4397 | LPWSTR m_sczAfterForcedRestartPackage; |
4398 | LPWSTR m_sczBundleVersion; | ||
4394 | 4399 | ||
4395 | WIX_LOCALIZATION* m_pWixLoc; | 4400 | WIX_LOCALIZATION* m_pWixLoc; |
4396 | BAL_INFO_BUNDLE m_Bundle; | 4401 | BAL_INFO_BUNDLE m_Bundle; |