diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/burn/engine/apply.cpp | 4 | ||||
| -rw-r--r-- | src/burn/engine/bundlepackageengine.cpp | 24 | ||||
| -rw-r--r-- | src/burn/engine/bundlepackageengine.h | 2 | ||||
| -rw-r--r-- | src/burn/engine/elevation.cpp | 4 | ||||
| -rw-r--r-- | src/test/burn/TestBA/TestBA.cs | 2 | ||||
| -rw-r--r-- | src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.props (renamed from src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj) | 4 | ||||
| -rw-r--r-- | src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs | 11 | ||||
| -rw-r--r-- | src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj | 7 | ||||
| -rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs | 34 |
9 files changed, 81 insertions, 11 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 68aded71..b7a54246 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
| @@ -2761,7 +2761,7 @@ static HRESULT ExecuteRelatedBundle( | |||
| 2761 | } | 2761 | } |
| 2762 | else | 2762 | else |
| 2763 | { | 2763 | { |
| 2764 | hrExecute = BundlePackageEngineExecuteRelatedBundle(pExecuteAction, pContext->pCache, &pEngineState->variables, fRollback, GenericExecuteMessageHandler, pContext, pRestart); | 2764 | hrExecute = BundlePackageEngineExecuteRelatedBundle(pExecuteAction, pContext->pCache, &pEngineState->variables, fRollback, FALSE/*fPerMachine*/, GenericExecuteMessageHandler, pContext, pRestart); |
| 2765 | ExitOnFailure(hrExecute, "Failed to configure per-user related bundle."); | 2765 | ExitOnFailure(hrExecute, "Failed to configure per-user related bundle."); |
| 2766 | } | 2766 | } |
| 2767 | 2767 | ||
| @@ -2888,7 +2888,7 @@ static HRESULT ExecuteBundlePackage( | |||
| 2888 | } | 2888 | } |
| 2889 | else | 2889 | else |
| 2890 | { | 2890 | { |
| 2891 | hrExecute = BundlePackageEngineExecutePackage(pExecuteAction, pContext->pCache, &pEngineState->variables, fRollback, SUCCEEDED(pExecuteAction->bundlePackage.pPackage->hrCacheResult), GenericExecuteMessageHandler, pContext, pRestart); | 2891 | hrExecute = BundlePackageEngineExecutePackage(pExecuteAction, pContext->pCache, &pEngineState->variables, fRollback, SUCCEEDED(pExecuteAction->bundlePackage.pPackage->hrCacheResult), pEngineState->registration.fPerMachine, GenericExecuteMessageHandler, pContext, pRestart); |
| 2892 | ExitOnFailure(hrExecute, "Failed to configure per-user BUNDLE package."); | 2892 | ExitOnFailure(hrExecute, "Failed to configure per-user BUNDLE package."); |
| 2893 | } | 2893 | } |
| 2894 | 2894 | ||
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp index 7ada5f6a..ac884830 100644 --- a/src/burn/engine/bundlepackageengine.cpp +++ b/src/burn/engine/bundlepackageengine.cpp | |||
| @@ -25,6 +25,7 @@ static HRESULT ExecuteBundle( | |||
| 25 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 25 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
| 26 | __in BURN_PACKAGE* pPackage, | 26 | __in BURN_PACKAGE* pPackage, |
| 27 | __in BOOL fPseudoPackage, | 27 | __in BOOL fPseudoPackage, |
| 28 | __in BOOL fPerMachine, | ||
| 28 | __in_z_opt LPCWSTR wzParent, | 29 | __in_z_opt LPCWSTR wzParent, |
| 29 | __in_z_opt LPCWSTR wzIgnoreDependencies, | 30 | __in_z_opt LPCWSTR wzIgnoreDependencies, |
| 30 | __in_z_opt LPCWSTR wzAncestors, | 31 | __in_z_opt LPCWSTR wzAncestors, |
| @@ -51,7 +52,7 @@ extern "C" HRESULT BundlePackageEngineParsePackageFromXml( | |||
| 51 | BOOL fFoundXml = FALSE; | 52 | BOOL fFoundXml = FALSE; |
| 52 | LPWSTR scz = NULL; | 53 | LPWSTR scz = NULL; |
| 53 | 54 | ||
| 54 | // @DetectCondition | 55 | // @BundleCode |
| 55 | hr = XmlGetAttributeEx(pixnBundlePackage, L"BundleCode", &pPackage->Bundle.sczBundleCode); | 56 | hr = XmlGetAttributeEx(pixnBundlePackage, L"BundleCode", &pPackage->Bundle.sczBundleCode); |
| 56 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @BundleCode."); | 57 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @BundleCode."); |
| 57 | 58 | ||
| @@ -91,6 +92,10 @@ extern "C" HRESULT BundlePackageEngineParsePackageFromXml( | |||
| 91 | hr = XmlGetYesNoAttribute(pixnBundlePackage, L"Win64", &pPackage->Bundle.fWin64); | 92 | hr = XmlGetYesNoAttribute(pixnBundlePackage, L"Win64", &pPackage->Bundle.fWin64); |
| 92 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Win64."); | 93 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Win64."); |
| 93 | 94 | ||
| 95 | // @Scope | ||
| 96 | hr = PackageParseScopeFromXml(pixnBundlePackage, &pPackage->scope); | ||
| 97 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Scope."); | ||
| 98 | |||
| 94 | hr = BundlePackageEngineParseRelatedCodes(pixnBundlePackage, &pPackage->Bundle.rgsczDetectCodes, &pPackage->Bundle.cDetectCodes, &pPackage->Bundle.rgsczUpgradeCodes, &pPackage->Bundle.cUpgradeCodes, &pPackage->Bundle.rgsczAddonCodes, &pPackage->Bundle.cAddonCodes, &pPackage->Bundle.rgsczPatchCodes, &pPackage->Bundle.cPatchCodes); | 99 | hr = BundlePackageEngineParseRelatedCodes(pixnBundlePackage, &pPackage->Bundle.rgsczDetectCodes, &pPackage->Bundle.cDetectCodes, &pPackage->Bundle.rgsczUpgradeCodes, &pPackage->Bundle.cUpgradeCodes, &pPackage->Bundle.rgsczAddonCodes, &pPackage->Bundle.cAddonCodes, &pPackage->Bundle.rgsczPatchCodes, &pPackage->Bundle.cPatchCodes); |
| 95 | ExitOnFailure(hr, "Failed to parse related codes."); | 100 | ExitOnFailure(hr, "Failed to parse related codes."); |
| 96 | 101 | ||
| @@ -608,6 +613,7 @@ extern "C" HRESULT BundlePackageEngineExecutePackage( | |||
| 608 | __in BURN_VARIABLES* pVariables, | 613 | __in BURN_VARIABLES* pVariables, |
| 609 | __in BOOL fRollback, | 614 | __in BOOL fRollback, |
| 610 | __in BOOL fCacheAvailable, | 615 | __in BOOL fCacheAvailable, |
| 616 | __in BOOL fPerMachine, | ||
| 611 | __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler, | 617 | __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler, |
| 612 | __in LPVOID pvContext, | 618 | __in LPVOID pvContext, |
| 613 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart | 619 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart |
| @@ -621,7 +627,7 @@ extern "C" HRESULT BundlePackageEngineExecutePackage( | |||
| 621 | BOOTSTRAPPER_RELATION_TYPE relationType = BOOTSTRAPPER_RELATION_CHAIN_PACKAGE; | 627 | BOOTSTRAPPER_RELATION_TYPE relationType = BOOTSTRAPPER_RELATION_CHAIN_PACKAGE; |
| 622 | BURN_PACKAGE* pPackage = pExecuteAction->bundlePackage.pPackage; | 628 | BURN_PACKAGE* pPackage = pExecuteAction->bundlePackage.pPackage; |
| 623 | 629 | ||
| 624 | return ExecuteBundle(pCache, pVariables, fRollback, fCacheAvailable, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, FALSE, wzParent, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart); | 630 | return ExecuteBundle(pCache, pVariables, fRollback, fCacheAvailable, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, FALSE, fPerMachine, wzParent, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart); |
| 625 | } | 631 | } |
| 626 | 632 | ||
| 627 | extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle( | 633 | extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle( |
| @@ -629,6 +635,7 @@ extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle( | |||
| 629 | __in BURN_CACHE* pCache, | 635 | __in BURN_CACHE* pCache, |
| 630 | __in BURN_VARIABLES* pVariables, | 636 | __in BURN_VARIABLES* pVariables, |
| 631 | __in BOOL fRollback, | 637 | __in BOOL fRollback, |
| 638 | __in BOOL fPerMachine, | ||
| 632 | __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler, | 639 | __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler, |
| 633 | __in LPVOID pvContext, | 640 | __in LPVOID pvContext, |
| 634 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart | 641 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart |
| @@ -643,7 +650,7 @@ extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle( | |||
| 643 | BOOTSTRAPPER_RELATION_TYPE relationType = ConvertRelationType(pRelatedBundle->planRelationType); | 650 | BOOTSTRAPPER_RELATION_TYPE relationType = ConvertRelationType(pRelatedBundle->planRelationType); |
| 644 | BURN_PACKAGE* pPackage = &pRelatedBundle->package; | 651 | BURN_PACKAGE* pPackage = &pRelatedBundle->package; |
| 645 | 652 | ||
| 646 | return ExecuteBundle(pCache, pVariables, fRollback, TRUE, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, TRUE, wzParent, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart); | 653 | return ExecuteBundle(pCache, pVariables, fRollback, TRUE, pfnGenericMessageHandler, pvContext, action, relationType, pPackage, TRUE, fPerMachine, wzParent, wzIgnoreDependencies, wzAncestors, wzEngineWorkingDirectory, pRestart); |
| 647 | } | 654 | } |
| 648 | 655 | ||
| 649 | extern "C" void BundlePackageEngineUpdateInstallRegistrationState( | 656 | extern "C" void BundlePackageEngineUpdateInstallRegistrationState( |
| @@ -742,6 +749,7 @@ static HRESULT ExecuteBundle( | |||
| 742 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 749 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
| 743 | __in BURN_PACKAGE* pPackage, | 750 | __in BURN_PACKAGE* pPackage, |
| 744 | __in BOOL fPseudoPackage, | 751 | __in BOOL fPseudoPackage, |
| 752 | __in BOOL fPerMachine, | ||
| 745 | __in_z_opt LPCWSTR wzParent, | 753 | __in_z_opt LPCWSTR wzParent, |
| 746 | __in_z_opt LPCWSTR wzIgnoreDependencies, | 754 | __in_z_opt LPCWSTR wzIgnoreDependencies, |
| 747 | __in_z_opt LPCWSTR wzAncestors, | 755 | __in_z_opt LPCWSTR wzAncestors, |
| @@ -987,6 +995,16 @@ static HRESULT ExecuteBundle( | |||
| 987 | hr = CoreAppendFileHandleSelfToCommandLine(sczExecutablePath, &hExecutableFile, &sczBaseCommand, NULL); | 995 | hr = CoreAppendFileHandleSelfToCommandLine(sczExecutablePath, &hExecutableFile, &sczBaseCommand, NULL); |
| 988 | ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); | 996 | ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); |
| 989 | 997 | ||
| 998 | // Configurable-scope bundle packages get the scope of the parent bundle. | ||
| 999 | // Note that the command-line switch takes effect only if the BA does a | ||
| 1000 | // default plan. | ||
| 1001 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == pPackage->scope | ||
| 1002 | || BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == pPackage->scope) | ||
| 1003 | { | ||
| 1004 | hr = StrAllocConcat(&sczBaseCommand, fPerMachine ? L" -permachine" : L" -peruser", 0); | ||
| 1005 | ExitOnFailure(hr, "Failed to append scope switch to the command line."); | ||
| 1006 | } | ||
| 1007 | |||
| 990 | // build user args | 1008 | // build user args |
| 991 | if (sczUnformattedUserArgs && *sczUnformattedUserArgs) | 1009 | if (sczUnformattedUserArgs && *sczUnformattedUserArgs) |
| 992 | { | 1010 | { |
diff --git a/src/burn/engine/bundlepackageengine.h b/src/burn/engine/bundlepackageengine.h index 60854a07..3912bfce 100644 --- a/src/burn/engine/bundlepackageengine.h +++ b/src/burn/engine/bundlepackageengine.h | |||
| @@ -54,6 +54,7 @@ HRESULT BundlePackageEngineExecutePackage( | |||
| 54 | __in BURN_VARIABLES* pVariables, | 54 | __in BURN_VARIABLES* pVariables, |
| 55 | __in BOOL fRollback, | 55 | __in BOOL fRollback, |
| 56 | __in BOOL fCacheAvailable, | 56 | __in BOOL fCacheAvailable, |
| 57 | __in BOOL fPerMachine, | ||
| 57 | __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler, | 58 | __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler, |
| 58 | __in LPVOID pvContext, | 59 | __in LPVOID pvContext, |
| 59 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart | 60 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart |
| @@ -63,6 +64,7 @@ HRESULT BundlePackageEngineExecuteRelatedBundle( | |||
| 63 | __in BURN_CACHE* pCache, | 64 | __in BURN_CACHE* pCache, |
| 64 | __in BURN_VARIABLES* pVariables, | 65 | __in BURN_VARIABLES* pVariables, |
| 65 | __in BOOL fRollback, | 66 | __in BOOL fRollback, |
| 67 | __in BOOL fPerMachine, | ||
| 66 | __in PFN_GENERICMESSAGEHANDLER pfnGenericExecuteProgress, | 68 | __in PFN_GENERICMESSAGEHANDLER pfnGenericExecuteProgress, |
| 67 | __in LPVOID pvContext, | 69 | __in LPVOID pvContext, |
| 68 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart | 70 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart |
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index 711ce4af..b13a5916 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
| @@ -2913,7 +2913,7 @@ static HRESULT OnExecuteRelatedBundle( | |||
| 2913 | } | 2913 | } |
| 2914 | 2914 | ||
| 2915 | // Execute related bundle. | 2915 | // Execute related bundle. |
| 2916 | hr = BundlePackageEngineExecuteRelatedBundle(&executeAction, pCache, pVariables, static_cast<BOOL>(dwRollback), GenericExecuteMessageHandler, hPipe, pRestart); | 2916 | hr = BundlePackageEngineExecuteRelatedBundle(&executeAction, pCache, pVariables, static_cast<BOOL>(dwRollback), TRUE/*fPerMachine*/, GenericExecuteMessageHandler, hPipe, pRestart); |
| 2917 | ExitOnFailure(hr, "Failed to execute related bundle."); | 2917 | ExitOnFailure(hr, "Failed to execute related bundle."); |
| 2918 | 2918 | ||
| 2919 | LExit: | 2919 | LExit: |
| @@ -3008,7 +3008,7 @@ static HRESULT OnExecuteBundlePackage( | |||
| 3008 | } | 3008 | } |
| 3009 | 3009 | ||
| 3010 | // Execute BUNDLE package. | 3010 | // Execute BUNDLE package. |
| 3011 | hr = BundlePackageEngineExecutePackage(&executeAction, pCache, pVariables, fRollback, fCacheAvailable, GenericExecuteMessageHandler, hPipe, pRestart); | 3011 | hr = BundlePackageEngineExecutePackage(&executeAction, pCache, pVariables, fRollback, fCacheAvailable, TRUE/*fPerMachine*/, GenericExecuteMessageHandler, hPipe, pRestart); |
| 3012 | ExitOnFailure(hr, "Failed to execute BUNDLE package."); | 3012 | ExitOnFailure(hr, "Failed to execute BUNDLE package."); |
| 3013 | 3013 | ||
| 3014 | LExit: | 3014 | LExit: |
diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs index abab863a..31dbeb9d 100644 --- a/src/test/burn/TestBA/TestBA.cs +++ b/src/test/burn/TestBA/TestBA.cs | |||
| @@ -227,7 +227,7 @@ namespace WixToolset.Test.BA | |||
| 227 | 227 | ||
| 228 | protected override void OnDetectBegin(DetectBeginEventArgs args) | 228 | protected override void OnDetectBegin(DetectBeginEventArgs args) |
| 229 | { | 229 | { |
| 230 | this.Log("OnDetectBegin"); | 230 | this.Log($"OnDetectBegin: Cached={args.Cached}, RegistrationType={args.RegistrationType}, PackageCount={args.PackageCount}"); |
| 231 | 231 | ||
| 232 | this.forceUpdateSource = this.ReadPackageAction(null, "ForceUpdateSource"); | 232 | this.forceUpdateSource = this.ReadPackageAction(null, "ForceUpdateSource"); |
| 233 | if (!String.IsNullOrEmpty(this.forceUpdateSource)) | 233 | if (!String.IsNullOrEmpty(this.forceUpdateSource)) |
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.props index 55edd282..37cc5bd5 100644 --- a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.props | |||
| @@ -1,11 +1,13 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | 1 | <Project> |
| 2 | <PropertyGroup> | 2 | <PropertyGroup> |
| 3 | <OutputType>Bundle</OutputType> | 3 | <OutputType>Bundle</OutputType> |
| 4 | </PropertyGroup> | 4 | </PropertyGroup> |
| 5 | <ItemGroup> | 5 | <ItemGroup> |
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> |
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 7 | </ItemGroup> | 8 | </ItemGroup> |
| 8 | <ItemGroup> | 9 | <ItemGroup> |
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 9 | <ProjectReference Include="..\AllPuomBundle\AllPuomBundleTestBA.wixproj" /> | 11 | <ProjectReference Include="..\AllPuomBundle\AllPuomBundleTestBA.wixproj" /> |
| 10 | </ItemGroup> | 12 | </ItemGroup> |
| 11 | </Project> \ No newline at end of file | 13 | </Project> \ No newline at end of file |
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs index 8b585e18..de256ccf 100644 --- a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs | |||
| @@ -1,11 +1,18 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
| 2 | <Bundle Id="AllPuomBundle" Name="AllPuomBundle" Manufacturer="Acme" Version="1.0.0.0"> | 2 | <Bundle Id="PuomBundlePackage$(BA)" Name="PuomBundlePackage$(BA)" Manufacturer="Acme" Version="1.0.0.0"> |
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 3 | <BootstrapperApplication> | 4 | <BootstrapperApplication> |
| 4 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> |
| 5 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 6 | 10 | ||
| 7 | <Chain> | 11 | <Chain> |
| 8 | <BundlePackage SourceFile="AllPuomBundleTestBA.exe" /> | 12 | <?if $(BA) = "TestBA"?> |
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <BundlePackage SourceFile="AllPuomBundle$(BA).exe" /> | ||
| 9 | </Chain> | 16 | </Chain> |
| 10 | </Bundle> | 17 | </Bundle> |
| 11 | </Wix> | 18 | </Wix> |
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs index bb1381b3..049cefc3 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs | |||
| @@ -685,6 +685,40 @@ namespace WixToolsetTest.BurnE2E | |||
| 685 | pkg2.VerifyInstalled(false); | 685 | pkg2.VerifyInstalled(false); |
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | [RuntimeFact] | ||
| 689 | public void ConfigurableScopeBundlePackage_Follows_PerUser_Scope() | ||
| 690 | { | ||
| 691 | var testBAController = this.CreateTestBAController(); | ||
| 692 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 693 | |||
| 694 | var bundle = this.CreateBundleInstaller("PuomBundlePackageTestBA"); | ||
| 695 | var log = bundle.Install(); | ||
| 696 | |||
| 697 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 698 | |||
| 699 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 2 packages, action: Install, planned scope: PerUser")); | ||
| 700 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: AllPuomBundleTestBA.exe, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 701 | |||
| 702 | bundle.Uninstall(); | ||
| 703 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 704 | } | ||
| 688 | 705 | ||
| 706 | [RuntimeFact] | ||
| 707 | public void ConfigurableScopeBundlePackage_Follows_PerMachine_Scope() | ||
| 708 | { | ||
| 709 | var testBAController = this.CreateTestBAController(); | ||
| 710 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 711 | |||
| 712 | var bundle = this.CreateBundleInstaller("PuomBundlePackageTestBA"); | ||
| 713 | var log = bundle.Install(); | ||
| 714 | |||
| 715 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 716 | |||
| 717 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 2 packages, action: Install, planned scope: PerMachine")); | ||
| 718 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: AllPuomBundleTestBA.exe, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 719 | |||
| 720 | bundle.Uninstall(); | ||
| 721 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 722 | } | ||
| 689 | } | 723 | } |
| 690 | } | 724 | } |
