@joebigelow / wix-1 / commits / 60717700

Get the internal Burn version to be Major.Minor.Patch.BuildNumber.

Sean Hall committed Oct 18, 2020 at 14:10 UTC 60717700e175d38412559113c8a5388c954c7c91
3 files changed +11 -4
src/engine/EngineForApplication.cpp
+1 -1
@@ -369,7 +369,7 @@ static HRESULT BAEngineSetUpdate(
369 sczId = pContext->pEngineState->registration.sczId;
370 }
371
372 - hr = PseudoBundleInitialize(FILEMAKEVERSION(rmj, rmm, rup, 0), &pContext->pEngineState->update.package, FALSE, sczId, BOOTSTRAPPER_RELATION_UPDATE, BOOTSTRAPPER_PACKAGE_STATE_ABSENT, pContext->pEngineState->registration.sczExecutableName, sczLocalSource ? sczLocalSource : wzLocalSource, wzDownloadSource, qwSize, TRUE, sczCommandline, NULL, NULL, NULL, rgbHash, cbHash);
372 + hr = PseudoBundleInitialize(FILEMAKEVERSION(rmj, rmm, rup, rpr), &pContext->pEngineState->update.package, FALSE, sczId, BOOTSTRAPPER_RELATION_UPDATE, BOOTSTRAPPER_PACKAGE_STATE_ABSENT, pContext->pEngineState->registration.sczExecutableName, sczLocalSource ? sczLocalSource : wzLocalSource, wzDownloadSource, qwSize, TRUE, sczCommandline, NULL, NULL, NULL, rgbHash, cbHash);
373 ExitOnFailure(hr, "Failed to set update bundle.");
374
375 pContext->pEngineState->update.fUpdateAvailable = TRUE;
src/engine/engine.vcxproj
+9 -2
@@ -151,10 +151,17 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
151 <Target Name="SetWixVersion"
152 DependsOnTargets="GetBuildVersion"
153 BeforeTargets="ClCompile">
154 + <PropertyGroup>
155 + <rmj>$(MajorMinorVersion.Split(`.`)[0])</rmj>
156 + <rmm>$(MajorMinorVersion.Split(`.`)[1])</rmm>
157 + <rup>0</rup>
158 + <rpr>$(BuildNumber)</rpr>
159 + <szVerMajorMinorBuild>$(rmj).$(rmm).$(rup).$(rpr)</szVerMajorMinorBuild>
160 + <wixver>rmj=$(rmj);rmm=$(rmm);rup=$(rup);rpr=$(rpr);szVerMajorMinorBuild="$(szVerMajorMinorBuild)"</wixver>
161 + </PropertyGroup>
162 <ItemGroup>
163 <ClCompile>
156 - <!-- TODO: get rmj and rmm dynamically -->
157 - <PreprocessorDefinitions>rmj=4;rmm=0;rup=$(BuildNumber);szVerMajorMinorBuild="$(BuildVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
164 + <PreprocessorDefinitions>$(wixver);%(PreprocessorDefinitions)</PreprocessorDefinitions>
165 </ClCompile>
166 </ItemGroup>
167 </Target>
src/engine/pseudobundle.cpp
+1 -1
@@ -126,7 +126,7 @@ extern "C" HRESULT PseudoBundleInitialize(
126 }
127
128 // Only support progress from engines that are compatible (aka: version greater than or equal to last protocol breaking change *and* versions that are older or the same as this engine).
129 - pPackage->Exe.protocol = (FILEMAKEVERSION(3, 6, 2221, 0) <= qwEngineVersion && qwEngineVersion <= FILEMAKEVERSION(rmj, rmm, rup, 0)) ? BURN_EXE_PROTOCOL_TYPE_BURN : BURN_EXE_PROTOCOL_TYPE_NONE;
129 + pPackage->Exe.protocol = (FILEMAKEVERSION(3, 6, 2221, 0) <= qwEngineVersion && qwEngineVersion <= FILEMAKEVERSION(rmj, rmm, rup, rpr)) ? BURN_EXE_PROTOCOL_TYPE_BURN : BURN_EXE_PROTOCOL_TYPE_NONE;
130
131 // All versions of Burn past v3.9 RTM support suppressing ancestors.
132 pPackage->Exe.fSupportsAncestors = FILEMAKEVERSION(3, 9, 1006, 0) <= qwEngineVersion;