diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-10-17 19:12:21 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-10-24 20:07:21 -0500 |
commit | 273c69f34311f4f4e5f6b5896e71d0788f12d96a (patch) | |
tree | 4cf8f42f3ecfa9341a41686b74aa5e48068ede87 /src/engine/elevation.cpp | |
parent | 3f8e35223216ebbe7f6683a5031a5a97bbc66d5a (diff) | |
download | wix-273c69f34311f4f4e5f6b5896e71d0788f12d96a.tar.gz wix-273c69f34311f4f4e5f6b5896e71d0788f12d96a.tar.bz2 wix-273c69f34311f4f4e5f6b5896e71d0788f12d96a.zip |
WIXFEAT:6210 Change data type of versions to strings.
Diffstat (limited to 'src/engine/elevation.cpp')
-rw-r--r-- | src/engine/elevation.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/engine/elevation.cpp b/src/engine/elevation.cpp index d0652270..9ce04630 100644 --- a/src/engine/elevation.cpp +++ b/src/engine/elevation.cpp | |||
@@ -1087,7 +1087,7 @@ extern "C" HRESULT ElevationLoadCompatiblePackageAction( | |||
1087 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->compatiblePackage.sczInstalledProductCode); | 1087 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->compatiblePackage.sczInstalledProductCode); |
1088 | ExitOnFailure(hr, "Failed to write installed ProductCode to message buffer."); | 1088 | ExitOnFailure(hr, "Failed to write installed ProductCode to message buffer."); |
1089 | 1089 | ||
1090 | hr = BuffWriteNumber64(&pbData, &cbData, pExecuteAction->compatiblePackage.qwInstalledVersion); | 1090 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->compatiblePackage.pInstalledVersion->sczVersion); |
1091 | ExitOnFailure(hr, "Failed to write installed version to message buffer."); | 1091 | ExitOnFailure(hr, "Failed to write installed version to message buffer."); |
1092 | 1092 | ||
1093 | // Send the message. | 1093 | // Send the message. |
@@ -2566,6 +2566,7 @@ static HRESULT OnLoadCompatiblePackage( | |||
2566 | HRESULT hr = S_OK; | 2566 | HRESULT hr = S_OK; |
2567 | SIZE_T iData = 0; | 2567 | SIZE_T iData = 0; |
2568 | LPWSTR sczPackage = NULL; | 2568 | LPWSTR sczPackage = NULL; |
2569 | LPWSTR sczVersion = NULL; | ||
2569 | BURN_EXECUTE_ACTION executeAction = { }; | 2570 | BURN_EXECUTE_ACTION executeAction = { }; |
2570 | 2571 | ||
2571 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_COMPATIBLE_PACKAGE; | 2572 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_COMPATIBLE_PACKAGE; |
@@ -2581,20 +2582,24 @@ static HRESULT OnLoadCompatiblePackage( | |||
2581 | hr = BuffReadString(pbData, cbData, &iData, &executeAction.compatiblePackage.sczInstalledProductCode); | 2582 | hr = BuffReadString(pbData, cbData, &iData, &executeAction.compatiblePackage.sczInstalledProductCode); |
2582 | ExitOnFailure(hr, "Failed to read installed ProductCode from message buffer."); | 2583 | ExitOnFailure(hr, "Failed to read installed ProductCode from message buffer."); |
2583 | 2584 | ||
2584 | hr = BuffReadNumber64(pbData, cbData, &iData, &executeAction.compatiblePackage.qwInstalledVersion); | 2585 | hr = BuffReadString(pbData, cbData, &iData, &sczVersion); |
2585 | ExitOnFailure(hr, "Failed to read installed version from message buffer."); | 2586 | ExitOnFailure(hr, "Failed to read installed version from message buffer."); |
2586 | 2587 | ||
2588 | hr = VerParseVersion(sczVersion, 0, FALSE, &executeAction.compatiblePackage.pInstalledVersion); | ||
2589 | ExitOnFailure(hr, "Failed to parse installed version from compatible package."); | ||
2590 | |||
2587 | // Copy the installed data to the reference package. | 2591 | // Copy the installed data to the reference package. |
2588 | hr = StrAllocString(&executeAction.compatiblePackage.pReferencePackage->Msi.sczInstalledProductCode, executeAction.compatiblePackage.sczInstalledProductCode, 0); | 2592 | hr = StrAllocString(&executeAction.compatiblePackage.pReferencePackage->Msi.sczInstalledProductCode, executeAction.compatiblePackage.sczInstalledProductCode, 0); |
2589 | ExitOnFailure(hr, "Failed to copy installed ProductCode."); | 2593 | ExitOnFailure(hr, "Failed to copy installed ProductCode."); |
2590 | 2594 | ||
2591 | executeAction.compatiblePackage.pReferencePackage->Msi.qwInstalledVersion = executeAction.compatiblePackage.qwInstalledVersion; | 2595 | executeAction.compatiblePackage.pReferencePackage->Msi.pInstalledVersion = executeAction.compatiblePackage.pInstalledVersion; |
2592 | 2596 | ||
2593 | // Load the compatible package and add it to the list. | 2597 | // Load the compatible package and add it to the list. |
2594 | hr = MsiEngineAddCompatiblePackage(pPackages, executeAction.compatiblePackage.pReferencePackage, NULL); | 2598 | hr = MsiEngineAddCompatiblePackage(pPackages, executeAction.compatiblePackage.pReferencePackage, NULL); |
2595 | ExitOnFailure(hr, "Failed to load compatible package."); | 2599 | ExitOnFailure(hr, "Failed to load compatible package."); |
2596 | 2600 | ||
2597 | LExit: | 2601 | LExit: |
2602 | ReleaseStr(sczVersion); | ||
2598 | ReleaseStr(sczPackage); | 2603 | ReleaseStr(sczPackage); |
2599 | PlanUninitializeExecuteAction(&executeAction); | 2604 | PlanUninitializeExecuteAction(&executeAction); |
2600 | 2605 | ||