mirror of
https://github.com/lin-ycv/EverythingPowerToys.git
synced 2025-01-08 11:57:59 +08:00
3841365af3
- Updated `Community.PowerToys.Run.Plugin.Everything.csproj` for better `x64` and `ARM64` support, including platform-specific constants and simplified resource management. - Improved `ARM64` build process in `PostBuild` event, including automatic replacement of `Everything64.dll` with `EverythingARM64.dll`. - Streamlined result processing in `Everything.cs` for efficiency and readability, using direct paths and filenames from the Everything SDK. - Reverted to `[DllImport]` in `NativeMethods.cs` for P/Invoke, updating method signatures accordingly. - Cleaned up `Main.cs` by removing unused `using` directives, handling a new `Prefix` setting, and removing obsolete ARM DLL logic. - Extended plugin configuration options in `Settings.cs` with a new property for the query prefix and differentiated update logic in `Update.cs` for `x64` and `ARM64` executables. - Closes #115 #112
143 lines
6.5 KiB
XML
143 lines
6.5 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<Import Project="..\..\..\..\Version.props" />
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net8.0-windows</TargetFramework>
|
|
<LangVersion>12</LangVersion>
|
|
<ProjectGuid>{64467D32-4786-4ADD-9B77-FBF3C965D3D1}</ProjectGuid>
|
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
<RootNamespace>Community.PowerToys.Run.Plugin.Everything</RootNamespace>
|
|
<AssemblyName>Community.PowerToys.Run.Plugin.Everything</AssemblyName>
|
|
<Version>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)plugin.json').Split(',')[5].Split(':')[1].Trim().Trim('"'))</Version>
|
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
|
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
|
<Company>lin-ycv</Company>
|
|
<Copyright>Copyright (C) lin-ycv</Copyright>
|
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
|
<useWPF>true</useWPF>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
|
<DebugSymbols>true</DebugSymbols>
|
|
<OutputPath>bin\$(Platform)\$(Configuration)\Everything\</OutputPath>
|
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
<DebugType>full</DebugType>
|
|
<Optimize>false</Optimize>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
|
<DefineConstants>TRACE</DefineConstants>
|
|
<OutputPath>bin\$(Platform)\$(Configuration)\Everything\</OutputPath>
|
|
<Optimize>true</Optimize>
|
|
<DebugType>none</DebugType>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
|
<DefineConstants>$(DefineConstants);X64</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
|
<DefineConstants>$(DefineConstants);ARM64</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<Compile Remove="NativeMethods.cs" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Include="plugin.json">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj">
|
|
<Private>False</Private>
|
|
</ProjectReference>
|
|
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
|
<Private>False</Private>
|
|
</ProjectReference>
|
|
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Compile Update="Properties\Resources.Designer.cs">
|
|
<DesignTime>True</DesignTime>
|
|
<AutoGen>True</AutoGen>
|
|
<DependentUpon>Resources.resx</DependentUpon>
|
|
</Compile>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<EmbeddedResource Update="Properties\Resources.es-es.resx">
|
|
</EmbeddedResource>
|
|
<EmbeddedResource Update="Properties\Resources.de-de.resx">
|
|
</EmbeddedResource>
|
|
<EmbeddedResource Update="Properties\Resources.zh-cn.resx">
|
|
</EmbeddedResource>
|
|
<EmbeddedResource Update="Properties\Resources.resx">
|
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
</EmbeddedResource>
|
|
<EmbeddedResource Update="Properties\Resources.zh-tw.resx">
|
|
</EmbeddedResource>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Update="Everything64.dll">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="EverythingARM64.dll">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\Everything.dark.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\Everything.ico.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\Everything.light.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
<Pack>True</Pack>
|
|
<PackagePath>\</PackagePath>
|
|
</None>
|
|
<None Update="Images\file.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\find.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\folder.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\NoIcon.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\Warning.dark.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\Warning.light.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Images\warning.png">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="MIT.txt">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="README.md">
|
|
<Pack>True</Pack>
|
|
<PackagePath>\</PackagePath>
|
|
</None>
|
|
<None Update="settings.toml">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
|
<Exec Command="if $(Platform) == ARM64 (
del /Q "$(TargetDir)Everything64.dll"
copy /y "$(TargetDir)EverythingARM64.dll" "$(TargetDir)Everything64.dll"
)
del /Q "$(TargetDir)EverythingARM64.dll"
del /Q "$(TargetDir)*.pdb"
del /Q "$(TargetDir)PowerToys*.dll"
del /Q "$(TargetDir)Wox*.dll"
del /Q "$(TargetDir)Ijwhost.dll"
del /Q "$(TargetDir)*.xml"
del/ Q "$(TargetDir)backup_restore_settings.json"
del /Q ".\bin\CHECKSUM.txt"
copy /y ".\NSIS\MIT.txt" "$(TargetDir)LICENSE.txt"
powershell Compress-Archive -Path $(TargetDir) -DestinationPath .\bin\EverythingPT-$(Version)-$(Platform).zip -Force
"C:\Program Files (x86)\NSIS\makensis" /Dver=$(Version) /Ddirect=$(TargetDir) /Dplatform=$(Platform) .\NSIS\exeCreator.nsi
certUtil -hashfile .\bin\EverythingPT-$(Version)-$(Platform).zip SHA256 >> .\bin\CHECKSUM.txt
certUtil -hashfile .\bin\EverythingPT-$(Version)-$(Platform).exe SHA256 >> .\bin\CHECKSUM.txt
rd /Q /S "$(TargetDir)"
rd /Q /S "$(ProjectDir)obj"" />
|
|
</Target>
|
|
|
|
</Project>
|