From 3aa4f95a7ac23567efbaebdae57007636e7f6058 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 25 May 2020 21:49:38 -0400 Subject: Support platform-specific CAs (including ARM64). --- appveyor.cmd | 3 + src/ca/XmlConfig.cpp | 19 +- src/ca/XmlFile.cpp | 23 +- src/ca/qtexecca.cpp | 4 + src/ca/scaperfexec.cpp | 6 +- src/ca/utilca.vcxproj | 26 +- .../WixToolsetTest.Util/UtilExtensionFixture.cs | 64 +-- src/wixext/UtilCompiler.cs | 42 +- src/wixlib/UtilExtension.wxs | 93 ---- src/wixlib/UtilExtension_Platform.wxi | 516 ++++++++++++--------- src/wixlib/UtilExtension_arm.wxs | 8 + src/wixlib/UtilExtension_arm64.wxs | 8 + src/wixlib/util.wixproj | 40 ++ 13 files changed, 477 insertions(+), 375 deletions(-) create mode 100644 src/wixlib/UtilExtension_arm.wxs create mode 100644 src/wixlib/UtilExtension_arm64.wxs diff --git a/appveyor.cmd b/appveyor.cmd index 3493d585..0dc63d47 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -9,5 +9,8 @@ msbuild -p:Configuration=Release src\test\WixToolsetTest.Util\WixToolsetTest.Uti msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Util.wixext.csproj +msbuild -p:Configuration=Release src\test\WixToolsetTest.Util\WixToolsetTest.Util.csproj +dotnet test -c Release --no-build src\test\WixToolsetTest.Util + @popd @endlocal \ No newline at end of file diff --git a/src/ca/XmlConfig.cpp b/src/ca/XmlConfig.cpp index 8c60979d..afd3dafb 100644 --- a/src/ca/XmlConfig.cpp +++ b/src/ca/XmlConfig.cpp @@ -588,8 +588,9 @@ extern "C" UINT __stdcall ExecXmlConfig( HRESULT hrOpenFailure = S_OK; UINT er = ERROR_SUCCESS; - BOOL fIsWow64Process = FALSE; +#ifndef _WIN64 BOOL fIsFSRedirectDisabled = FALSE; +#endif BOOL fPreserveDate = FALSE; LPWSTR pwzCustomActionData = NULL; @@ -635,10 +636,12 @@ extern "C" UINT __stdcall ExecXmlConfig( hr = WcaReadIntegerFromCaData(&pwz, (int*) &xa); ExitOnFailure(hr, "failed to process CustomActionData"); +#ifndef _WIN64 // Initialize the Wow64 API - store the result in fWow64APIPresent // If it fails, this doesn't warrant an error yet, because we only need the Wow64 API in some cases WcaInitializeWow64(); - fIsWow64Process = WcaIsWow64Process(); + BOOL fIsWow64Process = WcaIsWow64Process(); +#endif if (xaOpenFile != xa && xaOpenFilex64 != xa) { @@ -657,6 +660,7 @@ extern "C" UINT __stdcall ExecXmlConfig( // Open the file ReleaseNullObject(pixd); +#ifndef _WIN64 if (xaOpenFilex64 == xa) { if (!fIsWow64Process) @@ -670,6 +674,7 @@ extern "C" UINT __stdcall ExecXmlConfig( fIsFSRedirectDisabled = TRUE; } +#endif hr = XmlLoadDocumentFromFileEx(pwzFile, XML_LOAD_PRESERVE_WHITESPACE, &pixd); if (FAILED(hr)) @@ -945,15 +950,18 @@ extern "C" UINT __stdcall ExecXmlConfig( ExitOnFailure(hr, "failed to set modified time of file : %ls", pwzFile); } +#ifndef _WIN64 if (fIsFSRedirectDisabled) { fIsFSRedirectDisabled = FALSE; WcaRevertWow64FSRedirection(); } +#endif } } LExit: +#ifndef _WIN64 // Make sure we revert FS Redirection if necessary before exiting if (fIsFSRedirectDisabled) { @@ -961,6 +969,7 @@ LExit: WcaRevertWow64FSRedirection(); } WcaFinalizeWow64(); +#endif ReleaseStr(pwzCustomActionData); ReleaseStr(pwzData); @@ -1001,7 +1010,9 @@ extern "C" UINT __stdcall ExecXmlConfigRollback( UINT er = ERROR_SUCCESS; int iIs64Bit; +#ifndef _WIN64 BOOL fIs64Bit = FALSE; +#endif LPWSTR pwzCustomActionData = NULL; LPWSTR pwz = NULL; @@ -1035,6 +1046,7 @@ extern "C" UINT __stdcall ExecXmlConfigRollback( hr = WcaReadStreamFromCaData(&pwz, &pbData, &cbData); ExitOnFailure(hr, "failed to read file contents from custom action data"); +#ifndef _WIN64 fIs64Bit = (BOOL)iIs64Bit; if (fIs64Bit) @@ -1055,6 +1067,7 @@ extern "C" UINT __stdcall ExecXmlConfigRollback( hr = WcaDisableWow64FSRedirection(); ExitOnFailure(hr, "Custom action was told to rollback a 64-bit component, but was unable to Disable Filesystem Redirection through the Wow64 API."); } +#endif hr = FileGetTime(pwzFileName, NULL, NULL, &ft); ExitOnFailure(hr, "Failed to get modified date of file %ls.", pwzFileName); @@ -1082,11 +1095,13 @@ LExit: ReleaseFile(hFile); +#ifndef _WIN64 if (fIs64Bit) { WcaRevertWow64FSRedirection(); WcaFinalizeWow64(); } +#endif ReleaseMem(pbData); diff --git a/src/ca/XmlFile.cpp b/src/ca/XmlFile.cpp index 95449126..71c9a390 100644 --- a/src/ca/XmlFile.cpp +++ b/src/ca/XmlFile.cpp @@ -464,9 +464,7 @@ LExit: ReleaseStr(pwzCurrentFile); ReleaseStr(pwzCustomActionData); - if (FAILED(hr)) - er = ERROR_INSTALL_FAILURE; - return WcaFinalize(er); + return WcaFinalize(FAILED(hr) ? ERROR_INSTALL_FAILURE : er); } @@ -483,7 +481,6 @@ extern "C" UINT __stdcall ExecXmlFile( HRESULT hrOpenFailure = S_OK; UINT er = ERROR_SUCCESS; - BOOL fIsWow64Process = FALSE; BOOL fIsFSRedirectDisabled = FALSE; BOOL fPreserveDate = FALSE; @@ -533,10 +530,12 @@ extern "C" UINT __stdcall ExecXmlFile( hr = WcaReadIntegerFromCaData(&pwz, (int*) &xa); ExitOnFailure(hr, "failed to process CustomActionData"); +#ifndef _WIN64 // Initialize the Wow64 API - store the result in fWow64APIPresent // If it fails, this doesn't warrant an error yet, because we only need the Wow64 API in some cases WcaInitializeWow64(); - fIsWow64Process = WcaIsWow64Process(); + BOOL fIsWow64Process = WcaIsWow64Process(); +#endif if (xaOpenFile != xa && xaOpenFilex64 != xa) ExitOnFailure(hr = E_INVALIDARG, "invalid custom action data"); @@ -558,6 +557,7 @@ extern "C" UINT __stdcall ExecXmlFile( if (xaOpenFilex64 == xa) { +#ifndef _WIN64 if (!fIsWow64Process) { hr = E_NOTIMPL; @@ -568,6 +568,7 @@ extern "C" UINT __stdcall ExecXmlFile( ExitOnFailure(hr, "Custom action was told to act on a 64-bit component, but was unable to disable filesystem redirection through the Wow64 API."); fIsFSRedirectDisabled = TRUE; +#endif } hr = XmlLoadDocumentFromFileEx(pwzFile, XML_LOAD_PRESERVE_WHITESPACE, &pixd); @@ -810,7 +811,9 @@ LExit: fIsFSRedirectDisabled = FALSE; WcaRevertWow64FSRedirection(); } +#ifndef _WIN64 WcaFinalizeWow64(); +#endif ReleaseStr(pwzCustomActionData); ReleaseStr(pwzData); @@ -829,9 +832,7 @@ LExit: XmlUninitialize(); - if (FAILED(hr)) - er = ERROR_INSTALL_FAILURE; - return WcaFinalize(er); + return WcaFinalize(FAILED(hr) ? ERROR_INSTALL_FAILURE : er); } @@ -882,6 +883,7 @@ extern "C" UINT __stdcall ExecXmlFileRollback( hr = WcaReadStreamFromCaData(&pwz, &pbData, &cbData); ExitOnFailure(hr, "failed to read file contents from custom action data"); +#ifndef _WIN64 fIs64Bit = (BOOL)iIs64Bit; if (fIs64Bit) @@ -902,6 +904,7 @@ extern "C" UINT __stdcall ExecXmlFileRollback( hr = WcaDisableWow64FSRedirection(); ExitOnFailure(hr, "Custom action was told to rollback a 64-bit component, but was unable to Disable Filesystem Redirection through the Wow64 API."); } +#endif // Always preserve the modified date on rollback hr = FileGetTime(pwzFileName, NULL, NULL, &ft); @@ -937,8 +940,6 @@ LExit: ReleaseMem(pbData); - if (FAILED(hr)) - er = ERROR_INSTALL_FAILURE; - return WcaFinalize(er); + return WcaFinalize(FAILED(hr) ? ERROR_INSTALL_FAILURE : er); } diff --git a/src/ca/qtexecca.cpp b/src/ca/qtexecca.cpp index 6acad0bb..ddcc812f 100644 --- a/src/ca/qtexecca.cpp +++ b/src/ca/qtexecca.cpp @@ -131,6 +131,7 @@ HRESULT ExecCommon64( HRESULT hr = S_OK; LPWSTR pwzCommand = NULL; DWORD dwTimeout = 0; +#ifndef _WIN64 BOOL fIsWow64Initialized = FALSE; BOOL fRedirected = FALSE; @@ -145,6 +146,7 @@ HRESULT ExecCommon64( hr = WcaDisableWow64FSRedirection(); ExitOnFailure(hr, "Failed to enable filesystem redirection."); fRedirected = TRUE; +#endif hr = BuildCommandLine(wzArgumentsProperty, &pwzCommand); ExitOnFailure(hr, "Failed to get Command Line"); @@ -157,6 +159,7 @@ HRESULT ExecCommon64( LExit: ReleaseStr(pwzCommand); +#ifndef _WIN64 if (fRedirected) { WcaRevertWow64FSRedirection(); @@ -166,6 +169,7 @@ LExit: { WcaFinalizeWow64(); } +#endif return hr; } diff --git a/src/ca/scaperfexec.cpp b/src/ca/scaperfexec.cpp index 04c0648a..c5425754 100644 --- a/src/ca/scaperfexec.cpp +++ b/src/ca/scaperfexec.cpp @@ -87,10 +87,10 @@ extern "C" UINT __stdcall RegisterPerfmon( HMODULE hMod = NULL; PFNPERFCOUNTERTEXTSTRINGS pfnPerfCounterTextString; - DWORD_PTR dwRet; + DWORD dwRet; LPWSTR pwzShortPath = NULL; - DWORD_PTR cchShortPath = MAX_PATH; - DWORD_PTR cchShortPathLength = 0; + DWORD cchShortPath = MAX_PATH; + DWORD cchShortPathLength = 0; LPWSTR pwzCommand = NULL; diff --git a/src/ca/utilca.vcxproj b/src/ca/utilca.vcxproj index a2391880..38d209b2 100644 --- a/src/ca/utilca.vcxproj +++ b/src/ca/utilca.vcxproj @@ -6,6 +6,30 @@ + + Debug + ARM + + + Release + ARM + + + Debug + ARM64 + + + Release + ARM64 + + + Debug + X64 + + + Release + X64 + Debug Win32 @@ -20,7 +44,7 @@ {076018F7-19BD-423A-ABBF-229273DA08D8} DynamicLibrary utilca - v141 + v142 Unicode utilca.def WiX Toolset Util CustomAction diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs index eb4588ec..75e0b14f 100644 --- a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs @@ -43,13 +43,13 @@ namespace WixToolsetTest.Util var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions"); Assert.Equal(new[] { - "Binary:Wix4UtilCA_X86\t[Binary data]", - "CustomAction:Wix4ConfigureSmbInstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbInstall\t", - "CustomAction:Wix4ConfigureSmbUninstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbUninstall\t", - "CustomAction:Wix4CreateSmb_X86\t11265\tWix4UtilCA_X86\tCreateSmb\t", - "CustomAction:Wix4CreateSmbRollback_X86\t11585\tWix4UtilCA_X86\tDropSmb\t", - "CustomAction:Wix4DropSmb_X86\t11265\tWix4UtilCA_X86\tDropSmb\t", - "CustomAction:Wix4DropSmbRollback_X86\t11585\tWix4UtilCA_X86\tCreateSmb\t", + "Binary:Wix4UtilCA_X64\t[Binary data]", + "CustomAction:Wix4ConfigureSmbInstall_X64\t1\tWix4UtilCA_X64\tConfigureSmbInstall\t", + "CustomAction:Wix4ConfigureSmbUninstall_X64\t1\tWix4UtilCA_X64\tConfigureSmbUninstall\t", + "CustomAction:Wix4CreateSmb_X64\t11265\tWix4UtilCA_X64\tCreateSmb\t", + "CustomAction:Wix4CreateSmbRollback_X64\t11585\tWix4UtilCA_X64\tDropSmb\t", + "CustomAction:Wix4DropSmb_X64\t11265\tWix4UtilCA_X64\tDropSmb\t", + "CustomAction:Wix4DropSmbRollback_X64\t11585\tWix4UtilCA_X64\tCreateSmb\t", "Wix4FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER", "Wix4FileSharePermissions:ExampleFileShare\tEveryone\t1", }, results.OrderBy(s => s).ToArray()); @@ -61,13 +61,13 @@ namespace WixToolsetTest.Util var folder = TestData.Get(@"TestData\CloseApplication"); var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4CloseApplication"); + var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4CloseApplication"); Assert.Equal(new[] { - "Binary:Wix4UtilCA_X86\t[Binary data]", - "CustomAction:Wix4CheckRebootRequired_X86\t65\tWix4UtilCA_X86\tWixCheckRebootRequired\t", - "CustomAction:Wix4CloseApplications_X86\t1\tWix4UtilCA_X86\tWixCloseApplications\t", - "CustomAction:Wix4CloseApplicationsDeferred_X86\t3073\tWix4UtilCA_X86\tWixCloseApplicationsDeferred\t", + "Binary:Wix4UtilCA_A64\t[Binary data]", + "CustomAction:Wix4CheckRebootRequired_A64\t65\tWix4UtilCA_A64\tWixCheckRebootRequired\t", + "CustomAction:Wix4CloseApplications_A64\t1\tWix4UtilCA_A64\tWixCloseApplications\t", + "CustomAction:Wix4CloseApplicationsDeferred_A64\t3073\tWix4UtilCA_A64\tWixCloseApplicationsDeferred\t", "Wix4CloseApplication:CloseMyApp\texplorer.exe\t\t\t3\t\tMYAPPISRUNNING\t\t", }, results.OrderBy(s => s).ToArray()); } @@ -81,10 +81,10 @@ namespace WixToolsetTest.Util var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4InternetShortcut"); Assert.Equal(new[] { - "Binary:Wix4UtilCA_X86\t[Binary data]", - "CustomAction:Wix4CreateInternetShortcuts_X86\t3073\tWix4UtilCA_X86\tWixCreateInternetShortcuts\t", - "CustomAction:Wix4RollbackInternetShortcuts_X86\t3329\tWix4UtilCA_X86\tWixRollbackInternetShortcuts\t", - "CustomAction:Wix4SchedInternetShortcuts_X86\t1\tWix4UtilCA_X86\tWixSchedInternetShortcuts\t", + "Binary:Wix4UtilCA_X64\t[Binary data]", + "CustomAction:Wix4CreateInternetShortcuts_X64\t3073\tWix4UtilCA_X64\tWixCreateInternetShortcuts\t", + "CustomAction:Wix4RollbackInternetShortcuts_X64\t3329\tWix4UtilCA_X64\tWixRollbackInternetShortcuts\t", + "CustomAction:Wix4SchedInternetShortcuts_X64\t1\tWix4UtilCA_X64\tWixSchedInternetShortcuts\t", "RemoveFile:wixshortcut\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tvtpzs3bw.lnk|WiX Toolset.lnk\tINSTALLFOLDER\t2", "Wix4InternetShortcut:wixshortcut\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tINSTALLFOLDER\tWiX Toolset.lnk\thttps://wixtoolset.org\t0\t\t0", }, results.OrderBy(s => s).ToArray()); @@ -113,19 +113,19 @@ namespace WixToolsetTest.Util var folder = TestData.Get(@"TestData\EventManifest"); var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4EventManifest", "Wix4XmlFile"); + var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4EventManifest", "Wix4XmlFile"); Assert.Equal(new[] { - "Binary:Wix4UtilCA_X86\t[Binary data]", - "CustomAction:Wix4ConfigureEventManifestRegister_X86\t1\tWix4UtilCA_X86\tConfigureEventManifestRegister\t", - "CustomAction:Wix4ConfigureEventManifestUnregister_X86\t1\tWix4UtilCA_X86\tConfigureEventManifestUnregister\t", - "CustomAction:Wix4ExecXmlFile_X86\t11265\tWix4UtilCA_X86\tExecXmlFile\t", - "CustomAction:Wix4ExecXmlFileRollback_X86\t11521\tWix4UtilCA_X86\tExecXmlFileRollback\t", - "CustomAction:Wix4RegisterEventManifest_X86\t3073\tWix4UtilCA_X86\tCAQuietExec\t", - "CustomAction:Wix4RollbackRegisterEventManifest_X86\t3393\tWix4UtilCA_X86\tCAQuietExec\t", - "CustomAction:Wix4RollbackUnregisterEventManifest_X86\t3329\tWix4UtilCA_X86\tCAQuietExec\t", - "CustomAction:Wix4SchedXmlFile_X86\t1\tWix4UtilCA_X86\tSchedXmlFile\t", - "CustomAction:Wix4UnregisterEventManifest_X86\t3137\tWix4UtilCA_X86\tCAQuietExec\t", + "Binary:Wix4UtilCA_A64\t[Binary data]", + "CustomAction:Wix4ConfigureEventManifestRegister_A64\t1\tWix4UtilCA_A64\tConfigureEventManifestRegister\t", + "CustomAction:Wix4ConfigureEventManifestUnregister_A64\t1\tWix4UtilCA_A64\tConfigureEventManifestUnregister\t", + "CustomAction:Wix4ExecXmlFile_A64\t11265\tWix4UtilCA_A64\tExecXmlFile\t", + "CustomAction:Wix4ExecXmlFileRollback_A64\t11521\tWix4UtilCA_A64\tExecXmlFileRollback\t", + "CustomAction:Wix4RegisterEventManifest_A64\t3073\tWix4UtilCA_A64\tCAQuietExec\t", + "CustomAction:Wix4RollbackRegisterEventManifest_A64\t3393\tWix4UtilCA_A64\tCAQuietExec\t", + "CustomAction:Wix4RollbackUnregisterEventManifest_A64\t3329\tWix4UtilCA_A64\tCAQuietExec\t", + "CustomAction:Wix4SchedXmlFile_A64\t1\tWix4UtilCA_A64\tSchedXmlFile\t", + "CustomAction:Wix4UnregisterEventManifest_A64\t3137\tWix4UtilCA_A64\tCAQuietExec\t", "Wix4EventManifest:Manifest.dll\t[#Manifest.dll]", "Wix4XmlFile:Config_Manifest.dllMessageFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@messageFileName[\\]]\tmessageFileName\t[Manifest.dll]\t4100\tManifest.dll\t", "Wix4XmlFile:Config_Manifest.dllResourceFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@resourceFileName[\\]]\tresourceFileName\t[Manifest.dll]\t4100\tManifest.dll\t", @@ -203,5 +203,15 @@ namespace WixToolsetTest.Util var result = WixRunner.Execute(newArgs.ToArray()); result.AssertSuccess(); } + + private static void BuildARM64(string[] args) + { + var newArgs = args.ToList(); + newArgs.Add("-platform"); + newArgs.Add("arm64"); + + var result = WixRunner.Execute(newArgs.ToArray()); + result.AssertSuccess(); + } } } diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs index 672c3f68..273a03c7 100644 --- a/src/wixext/UtilCompiler.cs +++ b/src/wixext/UtilCompiler.cs @@ -875,7 +875,7 @@ namespace WixToolset.Util this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "CloseApplications", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "CloseApplications", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); if (!this.Messaging.EncounteredError) { @@ -1181,8 +1181,8 @@ namespace WixToolset.Util } } - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureSmbInstall", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureSmbUninstall", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureSmbInstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureSmbUninstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); if (!this.Messaging.EncounteredError) { @@ -1489,7 +1489,7 @@ namespace WixToolset.Util IconIndex = iconIndex, }); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedInternetShortcuts", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedInternetShortcuts", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); // make sure we have a CreateFolder table so that the immediate CA can add temporary rows to handle installation and uninstallation this.ParseHelper.EnsureTable(section, sourceLineNumbers, "CreateFolder"); @@ -1677,8 +1677,8 @@ namespace WixToolset.Util this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "Counter Types", sbCounterTypes.ToString(), componentId, false); } - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "InstallPerfCounterData", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "UninstallPerfCounterData", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "InstallPerfCounterData", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "UninstallPerfCounterData", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); } /// @@ -2156,8 +2156,8 @@ namespace WixToolset.Util }); } - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonInstall", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonUninstall", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonInstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonUninstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); } @@ -2204,8 +2204,8 @@ namespace WixToolset.Util }); } - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonManifestRegister", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonManifestUnregister", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonManifestRegister", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigurePerfmonManifestUnregister", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); } /// @@ -2248,7 +2248,7 @@ namespace WixToolset.Util if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedFormatFiles", this.Context.Platform, CustomActionPlatforms.X64 | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedFormatFiles", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); section.AddTuple(new WixFormatFilesTuple(sourceLineNumbers) { @@ -2348,8 +2348,8 @@ namespace WixToolset.Util } - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureEventManifestRegister", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureEventManifestUnregister", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureEventManifestRegister", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureEventManifestUnregister", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); if (null != messageFile || null != parameterFile || null != resourceFile) { @@ -2460,7 +2460,7 @@ namespace WixToolset.Util if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedSecureObjects", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedSecureObjects", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); var id = this.ParseHelper.CreateIdentifier("sec", objectId, tableName, domain, user); section.AddTuple(new SecureObjectsTuple(sourceLineNumbers, id) @@ -2809,7 +2809,7 @@ namespace WixToolset.Util if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "RemoveFoldersEx", this.Context.Platform, CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "RemoveFoldersEx", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); section.AddTuple(new WixRemoveFolderExTuple(sourceLineNumbers, id) { @@ -2885,7 +2885,7 @@ namespace WixToolset.Util if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "RegisterRestartResources", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "RegisterRestartResources", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); section.AddTuple(new WixRestartResourceTuple(sourceLineNumbers, id) { @@ -2977,7 +2977,7 @@ namespace WixToolset.Util if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedServiceConfig", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedServiceConfig", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); section.AddTuple(new ServiceConfigTuple(sourceLineNumbers) { @@ -3081,7 +3081,7 @@ namespace WixToolset.Util Attributes = attributes, }); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "TouchFileDuringInstall", this.Context.Platform, CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "TouchFileDuringInstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); } } @@ -3285,7 +3285,7 @@ namespace WixToolset.Util if (null != componentId) { - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureUsers", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "ConfigureUsers", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); } if (!this.Messaging.EncounteredError) @@ -3669,7 +3669,7 @@ namespace WixToolset.Util } } - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedXmlConfig", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedXmlConfig", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); } /// @@ -3720,7 +3720,7 @@ namespace WixToolset.Util private void AddReferenceToSchedXmlFile(SourceLineNumber sourceLineNumbers, IntermediateSection section) { - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedXmlFile", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "SchedXmlFile", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64); } /// diff --git a/src/wixlib/UtilExtension.wxs b/src/wixlib/UtilExtension.wxs index 50828416..62d9e37a 100644 --- a/src/wixlib/UtilExtension.wxs +++ b/src/wixlib/UtilExtension.wxs @@ -63,62 +63,6 @@ - - - - - WIXFAILWHENDEFERRED=1 AND VersionNT > 400 - - - - - - - - - - - - - - - - - - - - - - - - NEWERVERSIONDETECTED AND VersionNT > 400 - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -382,43 +326,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/UtilExtension_Platform.wxi b/src/wixlib/UtilExtension_Platform.wxi index 0d7fed09..c557e04b 100644 --- a/src/wixlib/UtilExtension_Platform.wxi +++ b/src/wixlib/UtilExtension_Platform.wxi @@ -3,221 +3,303 @@ - - - - - - - - - - - NOT REMOVE~="ALL" AND VersionNT > 400 - - - - - - - - - - VersionNT > 400 - - - - - - - - - - - - - - - - - - - - - - VersionNT > 400 - - - - - - - - - - - - - - - VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - - - - - VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - - - - - VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - - - VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - - - VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - NOT REMOVE~="ALL" AND VersionNT > 400 - - - - - - - - - - - - - - - - - - - - - - - - VersionNT > 400 - - - - - - - - - - - - VersionNT > 400 - - - - - - - - - - VersionNT > 400 - VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - - - - - - - - NOT REMOVE~="ALL" AND VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - - - - - - + + + + + + + WIXFAILWHENDEFERRED=1 AND VersionNT > 400 + + + + + + + + + + + + + + + + + + + + + + + + NEWERVERSIONDETECTED AND VersionNT > 400 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT REMOVE~="ALL" AND VersionNT > 400 + + + + + + + + + + VersionNT > 400 + + + + + + + + + + + + + + + + + + + + + + VersionNT > 400 + + + + + + + + + + + + + + + VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + + + + + VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + + + + + VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + + + VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + + + VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + NOT REMOVE~="ALL" AND VersionNT > 400 + + + + + + + + + + + + + + + + + + + + + + + + VersionNT > 400 + + + + + + + + + + + + VersionNT > 400 + + + + + + + + + + VersionNT > 400 + VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + + + + NOT REMOVE~="ALL" AND VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + + + + + + diff --git a/src/wixlib/UtilExtension_arm.wxs b/src/wixlib/UtilExtension_arm.wxs new file mode 100644 index 00000000..c3ec27f7 --- /dev/null +++ b/src/wixlib/UtilExtension_arm.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/UtilExtension_arm64.wxs b/src/wixlib/UtilExtension_arm64.wxs new file mode 100644 index 00000000..1d552acf --- /dev/null +++ b/src/wixlib/UtilExtension_arm64.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/util.wixproj b/src/wixlib/util.wixproj index e3688adf..720b184b 100644 --- a/src/wixlib/util.wixproj +++ b/src/wixlib/util.wixproj @@ -14,6 +14,8 @@ + + @@ -22,9 +24,26 @@ + + + + + x86 + + + x64 + + + arm + + + arm64 + + + utilbe @@ -33,18 +52,38 @@ utilca {076018F7-19BD-423A-ABBF-229273DA08D8} + Platform=ARM + + + utilca + {076018F7-19BD-423A-ABBF-229273DA08D8} + Platform=ARM64 + + + utilca + {076018F7-19BD-423A-ABBF-229273DA08D8} + Platform=x86 + + + utilca + {076018F7-19BD-423A-ABBF-229273DA08D8} + Platform=x64 + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. @@ -52,5 +91,6 @@ + -- cgit v1.2.3-55-g6feb