Skip to content

Commit

Permalink
Detecting available processor features. See https://learn.microsoft.c…
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Nov 30, 2023
1 parent a4d3a25 commit 84db7e1
Show file tree
Hide file tree
Showing 13 changed files with 364 additions and 3 deletions.
166 changes: 166 additions & 0 deletions PanelSwCustomActions/ListProcessorFeatures.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
#include "stdafx.h"

#ifndef PF_ARM_64BIT_LOADSTORE_ATOMIC
#define PF_ARM_64BIT_LOADSTORE_ATOMIC 25
#endif
#ifndef PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE
#define PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE 24
#endif
#ifndef PF_ARM_EXTERNAL_CACHE_AVAILABLE
#define PF_ARM_EXTERNAL_CACHE_AVAILABLE 26
#endif
#ifndef PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE
#define PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE 27
#endif
#ifndef PF_ARM_VFP_32_REGISTERS_AVAILABLE
#define PF_ARM_VFP_32_REGISTERS_AVAILABLE 18
#endif
#ifndef PF_3DNOW_INSTRUCTIONS_AVAILABLE
#define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7
#endif
#ifndef PF_CHANNELS_ENABLED
#define PF_CHANNELS_ENABLED 16
#endif
#ifndef PF_COMPARE_EXCHANGE_DOUBLE
#define PF_COMPARE_EXCHANGE_DOUBLE 2
#endif
#ifndef PF_COMPARE_EXCHANGE128
#define PF_COMPARE_EXCHANGE128 14
#endif
#ifndef PF_COMPARE64_EXCHANGE128
#define PF_COMPARE64_EXCHANGE128 15
#endif
#ifndef PF_FASTFAIL_AVAILABLE
#define PF_FASTFAIL_AVAILABLE 23
#endif
#ifndef PF_FLOATING_POINT_EMULATED
#define PF_FLOATING_POINT_EMULATED 1
#endif
#ifndef PF_FLOATING_POINT_PRECISION_ERRATA
#define PF_FLOATING_POINT_PRECISION_ERRATA 0
#endif
#ifndef PF_MMX_INSTRUCTIONS_AVAILABLE
#define PF_MMX_INSTRUCTIONS_AVAILABLE 3
#endif
#ifndef PF_NX_ENABLED
#define PF_NX_ENABLED 12
#endif
#ifndef PF_PAE_ENABLED
#define PF_PAE_ENABLED 9
#endif
#ifndef PF_RDTSC_INSTRUCTION_AVAILABLE
#define PF_RDTSC_INSTRUCTION_AVAILABLE 8
#endif
#ifndef PF_RDWRFSGSBASE_AVAILABLE
#define PF_RDWRFSGSBASE_AVAILABLE 22
#endif
#ifndef PF_SECOND_LEVEL_ADDRESS_TRANSLATION
#define PF_SECOND_LEVEL_ADDRESS_TRANSLATION 20
#endif
#ifndef PF_SSE3_INSTRUCTIONS_AVAILABLE
#define PF_SSE3_INSTRUCTIONS_AVAILABLE 13
#endif
#ifndef PF_SSSE3_INSTRUCTIONS_AVAILABLE
#define PF_SSSE3_INSTRUCTIONS_AVAILABLE 36
#endif
#ifndef PF_SSE4_1_INSTRUCTIONS_AVAILABLE
#define PF_SSE4_1_INSTRUCTIONS_AVAILABLE 37
#endif
#ifndef PF_SSE4_2_INSTRUCTIONS_AVAILABLE
#define PF_SSE4_2_INSTRUCTIONS_AVAILABLE 38
#endif
#ifndef PF_AVX_INSTRUCTIONS_AVAILABLE
#define PF_AVX_INSTRUCTIONS_AVAILABLE 39
#endif
#ifndef PF_AVX2_INSTRUCTIONS_AVAILABLE
#define PF_AVX2_INSTRUCTIONS_AVAILABLE 40
#endif
#ifndef PF_AVX512F_INSTRUCTIONS_AVAILABLE
#define PF_AVX512F_INSTRUCTIONS_AVAILABLE 41
#endif
#ifndef PF_VIRT_FIRMWARE_ENABLED
#define PF_VIRT_FIRMWARE_ENABLED 21
#endif
#ifndef PF_XMMI_INSTRUCTIONS_AVAILABLE
#define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
#endif
#ifndef PF_XMMI64_INSTRUCTIONS_AVAILABLE
#define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
#endif
#ifndef PF_XSAVE_ENABLED
#define PF_XSAVE_ENABLED 17
#endif
#ifndef PF_ARM_V8_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V8_INSTRUCTIONS_AVAILABLE 29
#endif
#ifndef PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE 30
#endif
#ifndef PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE 31
#endif
#ifndef PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE 34
#endif
#ifndef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE 43
#endif
#ifndef PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE 44
#endif
#ifndef PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE 45
#endif

extern "C" UINT __stdcall ListProcessorFeatures(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
BOOL bRes = TRUE;

hr = WcaInitialize(hInstall, __FUNCTION__);
ExitOnFailure(hr, "Failed to initialize");
WcaLog(LOGMSG_STANDARD, "Initialized from PanelSwCustomActions " FullVersion);

WcaSetIntProperty(L"PF_ARM_64BIT_LOADSTORE_ATOMIC", ::IsProcessorFeaturePresent(PF_ARM_64BIT_LOADSTORE_ATOMIC) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_EXTERNAL_CACHE_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_EXTERNAL_CACHE_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_VFP_32_REGISTERS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_3DNOW_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_3DNOW_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_CHANNELS_ENABLED", ::IsProcessorFeaturePresent(PF_CHANNELS_ENABLED) ? 1 : 0);
WcaSetIntProperty(L"PF_COMPARE_EXCHANGE_DOUBLE", ::IsProcessorFeaturePresent(PF_COMPARE_EXCHANGE_DOUBLE) ? 1 : 0);
WcaSetIntProperty(L"PF_COMPARE_EXCHANGE128", ::IsProcessorFeaturePresent(PF_COMPARE_EXCHANGE128) ? 1 : 0);
WcaSetIntProperty(L"PF_COMPARE64_EXCHANGE128", ::IsProcessorFeaturePresent(PF_COMPARE64_EXCHANGE128) ? 1 : 0);
WcaSetIntProperty(L"PF_FASTFAIL_AVAILABLE", ::IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_FLOATING_POINT_EMULATED", ::IsProcessorFeaturePresent(PF_FLOATING_POINT_EMULATED) ? 1 : 0);
WcaSetIntProperty(L"PF_FLOATING_POINT_PRECISION_ERRATA", ::IsProcessorFeaturePresent(PF_FLOATING_POINT_PRECISION_ERRATA) ? 1 : 0);
WcaSetIntProperty(L"PF_MMX_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_NX_ENABLED", ::IsProcessorFeaturePresent(PF_NX_ENABLED) ? 1 : 0);
WcaSetIntProperty(L"PF_PAE_ENABLED", ::IsProcessorFeaturePresent(PF_PAE_ENABLED) ? 1 : 0);
WcaSetIntProperty(L"PF_RDTSC_INSTRUCTION_AVAILABLE", ::IsProcessorFeaturePresent(PF_RDTSC_INSTRUCTION_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_RDWRFSGSBASE_AVAILABLE", ::IsProcessorFeaturePresent(PF_RDWRFSGSBASE_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_SECOND_LEVEL_ADDRESS_TRANSLATION", ::IsProcessorFeaturePresent(PF_SECOND_LEVEL_ADDRESS_TRANSLATION) ? 1 : 0);
WcaSetIntProperty(L"PF_SSE3_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_SSSE3_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_SSSE3_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_SSE4_1_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_SSE4_1_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_SSE4_2_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_SSE4_2_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_AVX_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_AVX_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_AVX2_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_AVX512F_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_AVX512F_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_VIRT_FIRMWARE_ENABLED", ::IsProcessorFeaturePresent(PF_VIRT_FIRMWARE_ENABLED) ? 1 : 0);
WcaSetIntProperty(L"PF_XMMI_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_XMMI64_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_XSAVE_ENABLED", ::IsProcessorFeaturePresent(PF_XSAVE_ENABLED) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_V8_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_V8_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE) ? 1 : 0);
WcaSetIntProperty(L"PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE", ::IsProcessorFeaturePresent(PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE) ? 1 : 0);

LExit:
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
return WcaFinalize(er);
}
1 change: 1 addition & 0 deletions PanelSwCustomActions/PanelSwCustomActions.def
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ EXPORTS
FolderPaths
PromptFileDowngrades
IsWindowsVersionOrGreater
ListProcessorFeatures
3 changes: 2 additions & 1 deletion PanelSwCustomActions/PanelSwCustomActions.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<ClCompile Include="ExecOnComponent.cpp" />
<ClCompile Include="FileOperations.cpp" />
<ClCompile Include="FileRegex.cpp" />
<ClCompile Include="ListProcessorFeatures.cpp" />
<ClCompile Include="IsWindowsVersionOrGreater.cpp" />
<ClCompile Include="Md5Hash.cpp" />
<ClCompile Include="ExtractPayload.cpp" />
Expand Down Expand Up @@ -205,4 +206,4 @@
<Error Condition="!Exists('..\packages\TidyBuild.1.4.1\build\TidyBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\TidyBuild.1.4.1\build\TidyBuild.props'))" />
<Error Condition="!Exists('..\packages\TidyBuild.1.4.1\build\TidyBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\TidyBuild.1.4.1\build\TidyBuild.targets'))" />
</Target>
</Project>
</Project>
3 changes: 3 additions & 0 deletions PanelSwCustomActions/PanelSwCustomActions.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@
<ClCompile Include="IsWindowsVersionOrGreater.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ListProcessorFeatures.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\build\obj\$(Configuration)\Protobuf\*.pb.*">
Expand Down
11 changes: 10 additions & 1 deletion PanelSwWixExtension.sln
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "PayloadUT", "UnitTests\Payl
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "PromptFileDowngradesUT", "UnitTests\PromptFileDowngradesUT\PromptFileDowngradesUT.wixproj", "{4A036455-6D14-4783-8F34-B03EE5A04146}"
EndProject
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "IsWindowsVersionOrGreaterUT", "UnitTests\IsWindowsVersionOrGreaterUT\IsWindowsVersionOrGreaterUT.wixproj", "{E4D1FCE8-9273-47DE-A672-209F010F74B7}"
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "IsWindowsVersionOrGreaterUT", "UnitTests\IsWindowsVersionOrGreaterUT\IsWindowsVersionOrGreaterUT.wixproj", "{E4D1FCE8-9273-47DE-A672-209F010F74B7}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "ListProcessorFeaturesUT", "UnitTests\ListProcessorFeaturesUT\ListProcessorFeaturesUT.wixproj", "{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -360,6 +362,12 @@ Global
{E4D1FCE8-9273-47DE-A672-209F010F74B7}.Release|x64.Build.0 = Release|x64
{E4D1FCE8-9273-47DE-A672-209F010F74B7}.Release|x86.ActiveCfg = Release|x86
{E4D1FCE8-9273-47DE-A672-209F010F74B7}.Release|x86.Build.0 = Release|x86
{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A}.Debug|x64.ActiveCfg = Debug|x86
{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A}.Debug|x86.ActiveCfg = Debug|x86
{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A}.Debug|x86.Build.0 = Debug|x86
{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A}.Release|x64.ActiveCfg = Release|x86
{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A}.Release|x86.ActiveCfg = Release|x86
{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -407,6 +415,7 @@ Global
{D3F4B72D-4C8D-4CED-91B6-33AB2A926A49} = {B533D9FC-4927-4A05-892D-B90E8BEDCF5D}
{4A036455-6D14-4783-8F34-B03EE5A04146} = {B533D9FC-4927-4A05-892D-B90E8BEDCF5D}
{E4D1FCE8-9273-47DE-A672-209F010F74B7} = {B533D9FC-4927-4A05-892D-B90E8BEDCF5D}
{DE2A15B5-B20E-47C3-87FB-7881D4D7E15A} = {B533D9FC-4927-4A05-892D-B90E8BEDCF5D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5B6389D-77ED-4938-A322-8DFCA4D9FEF5}
Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,46 @@ The following properties hold localized CSIDL folders. To use them, add a [Prope

- UserDesktopFolder: CSIDL_DESKTOPDIRECTORY

The following [properties](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent) denote available processor features. 1 means that the feature is available, 0 means that it is not available.

- PF_ARM_64BIT_LOADSTORE_ATOMIC
- PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE
- PF_ARM_EXTERNAL_CACHE_AVAILABLE
- PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE
- PF_ARM_VFP_32_REGISTERS_AVAILABLE
- PF_3DNOW_INSTRUCTIONS_AVAILABLE
- PF_CHANNELS_ENABLED
- PF_COMPARE_EXCHANGE_DOUBLE
- PF_COMPARE_EXCHANGE128
- PF_COMPARE64_EXCHANGE128
- PF_FASTFAIL_AVAILABLE
- PF_FLOATING_POINT_EMULATED
- PF_FLOATING_POINT_PRECISION_ERRATA
- PF_MMX_INSTRUCTIONS_AVAILABLE
- PF_NX_ENABLED
- PF_PAE_ENABLED
- PF_RDTSC_INSTRUCTION_AVAILABLE
- PF_RDWRFSGSBASE_AVAILABLE
- PF_SECOND_LEVEL_ADDRESS_TRANSLATION
- PF_SSE3_INSTRUCTIONS_AVAILABLE
- PF_SSSE3_INSTRUCTIONS_AVAILABLE
- PF_SSE4_1_INSTRUCTIONS_AVAILABLE
- PF_SSE4_2_INSTRUCTIONS_AVAILABLE
- PF_AVX_INSTRUCTIONS_AVAILABLE
- PF_AVX2_INSTRUCTIONS_AVAILABLE
- PF_AVX512F_INSTRUCTIONS_AVAILABLE
- PF_VIRT_FIRMWARE_ENABLED
- PF_XMMI_INSTRUCTIONS_AVAILABLE
- PF_XMMI64_INSTRUCTIONS_AVAILABLE
- PF_XSAVE_ENABLED
- PF_ARM_V8_INSTRUCTIONS_AVAILABLE
- PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE
- PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE
- PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE
- PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE
- PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE
- PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE

## Building

PanelSwWixExtension require the following prerequisites to build:
Expand Down
2 changes: 1 addition & 1 deletion TidyBuild.custom.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildThisFileDirectory)TidyBuild.user.props" Condition="Exists('$(MSBuildThisFileDirectory)TidyBuild.user.props')"/>
<PropertyGroup>
<FullVersion>3.7.0</FullVersion>
<FullVersion>3.8.0</FullVersion>
<FullVersion Condition=" '$(GITHUB_RUN_NUMBER)'!='' ">$(FullVersion).$(GITHUB_RUN_NUMBER)</FullVersion>
<ProductName>PanelSwWixExtension</ProductName>
<Manufacturer>Panel::Software</Manufacturer>
Expand Down
55 changes: 55 additions & 0 deletions UnitTests/ListProcessorFeaturesUT/ListProcessorFeaturesUT.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\TidyBuild.1.4.1\build\TidyBuild.props" Condition="Exists('..\..\packages\TidyBuild.1.4.1\build\TidyBuild.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.8</ProductVersion>
<ProjectGuid>{de2a15b5-b20e-47c3-87fb-7881d4d7e15a}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>ListProcessorFeaturesUT</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<DefineSolutionProperties>false</DefineSolutionProperties>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
</PropertyGroup>
<ItemGroup>
<Compile Include="ListProcessorFeaturesUT.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="PanelSwWixExtension">
<HintPath>$(BuildFolder)\bin\$(Configuration)\PanelSwWixExtension\PanelSwWixExtension.dll</HintPath>
<Name>PanelSwWixExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixToolPath)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<Import Project="..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets" Condition="Exists('..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets'))" />
<Error Condition="!Exists('..\..\packages\TidyBuild.1.4.1\build\TidyBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\TidyBuild.1.4.1\build\TidyBuild.props'))" />
<Error Condition="!Exists('..\..\packages\TidyBuild.1.4.1\build\TidyBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\TidyBuild.1.4.1\build\TidyBuild.targets'))" />
</Target>
<Import Project="..\..\packages\TidyBuild.1.4.1\build\TidyBuild.targets" Condition="Exists('..\..\packages\TidyBuild.1.4.1\build\TidyBuild.targets')" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
28 changes: 28 additions & 0 deletions UnitTests/ListProcessorFeaturesUT/ListProcessorFeaturesUT.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:PanelSW="http://schemas.panel-sw.co.il/wix/WixExtension"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.panel-sw.co.il/wix/WixExtension ../../PanelSwWixExtension/XSD/PanelSwWixExtension.xsd">
<Product Id="{B7318C42-2252-44B9-A1E5-47CCD5163D9D}" Name="ListProcessorFeaturesUT" Language="1033" Version="$(var.JetVersion)" Manufacturer="$(var.JetManufacturer)" UpgradeCode="{B997AF76-8F98-40D1-B123-552C82C40B37}">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />

<Feature Id="ProductFeature" Title="UnitTestSetup" Level="1">
<Component Directory="INSTALLFOLDER">
<File Source="$(sys.SOURCEFILEPATH)"/>
</Component>
</Feature>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="UnitTestSetup" />
</Directory>
</Directory>

<Property Id="MSIFASTINSTALL" Value="1"></Property>
<PropertyRef Id="PF_ARM_64BIT_LOADSTORE_ATOMIC"/>

<Condition Message="Surely 'Data execution prevention' processor feature is enabled."><![CDATA[Installed Or PF_NX_ENABLED=1]]></Condition>
<CustomActionRef Id="TerminateSuccessfully_Immediate"/>
</Product>
</Wix>
5 changes: 5 additions & 0 deletions UnitTests/ListProcessorFeaturesUT/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSBuildTasks" version="1.5.0.235" developmentDependency="true" />
<package id="TidyBuild" version="1.4.1" developmentDependency="true" />
</packages>
Loading

0 comments on commit 84db7e1

Please sign in to comment.