mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Move OS detection to common and PowerToysInterop (#5120)
* Remove os-detection project * Removed os-detection project from sln * Added os-detection to PowerToysInterop * Removed references to os-detection and added PowerToysInterop.dll to the ImageResizer folder
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <interface/powertoy_module_interface.h>
|
||||
#include "trace.h"
|
||||
#include <common\settings_objects.h>
|
||||
#include <common\os-detection\os-detect.h>
|
||||
#include <common\os-detect.h>
|
||||
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
|
||||
@@ -225,6 +225,12 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\common\interop\interop.vcxproj">
|
||||
<Project>{f055103b-f80b-4d0c-bf48-057c55620033}</Project>
|
||||
<Name>interop</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworkSDKToolsDirectory Condition=" '$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory>
|
||||
|
||||
@@ -7,7 +7,9 @@ namespace ImageResizer.Models
|
||||
{
|
||||
public class AdvancedSettings
|
||||
{
|
||||
[DllImport("../../os-detection.dll", EntryPoint = "UseNewSettings", ExactSpelling = false)]
|
||||
public static extern bool UseNewSettings();
|
||||
public static bool UseNewSettings()
|
||||
{
|
||||
return interop.CommonManaged.ShouldNewSettingsBeUsed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <common/common.h>
|
||||
#include "trace.h"
|
||||
#include "resource.h"
|
||||
#include <common/os-detection/os-detect.h>
|
||||
#include <common/os-detect.h>
|
||||
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user