mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
Improves the following: - Consolidates different code paths for easier maintenance. - Removes the dependency on Windows Forms and creates the system tray icon and handling through native Win32 APIs (massive thank you to @BrianPeek for helping write the window creation logic and diagnosing threading issues). - Changing modes in Awake now triggers icon changes in the tray (#11996). Massive thank you to @niels9001 for creating the icons. Fixes the following: - When in the UI and you select `0` as hours and `0` as minutes in `TIMED` awake mode, the UI becomes non-responsive whenever you try to get back to timed after it rolls back to `PASSIVE`. (#33630) - Adds the option to keep track of Awake state through tray tooltip. (#12714) --------- Co-authored-by: Clint Rutkas <clint@rutkas.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
133 lines
5.4 KiB
XML
133 lines
5.4 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<Import Project="..\..\..\Version.props" />
|
|
<PropertyGroup>
|
|
<OutputType>WinExe</OutputType>
|
|
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
|
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
|
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
|
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
|
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)</OutputPath>
|
|
<Nullable>enable</Nullable>
|
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
|
<UseWindowsForms>False</UseWindowsForms>
|
|
<!--Per documentation: https://learn.microsoft.com/dotnet/core/compatibility/windows-forms/5.0/automatically-infer-winexe-output-type#outputtype-set-to-winexe-for-wpf-and-winforms-apps -->
|
|
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
|
|
<AssemblyName>PowerToys.Awake</AssemblyName>
|
|
<Version>$(Version).0</Version>
|
|
<ApplicationIcon>Assets\Awake\Awake.ico</ApplicationIcon>
|
|
<PackageProjectUrl>https://awake.den.dev</PackageProjectUrl>
|
|
<RepositoryUrl>https://github.com/microsoft/powertoys</RepositoryUrl>
|
|
<SelfContained>true</SelfContained>
|
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
|
</PropertyGroup>
|
|
|
|
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
|
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
|
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
|
</PropertyGroup>
|
|
|
|
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
|
|
<PropertyGroup>
|
|
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
|
|
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
|
|
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
<DebugType>full</DebugType>
|
|
<ErrorReport>prompt</ErrorReport>
|
|
<WarningLevel>4</WarningLevel>
|
|
<Optimize>false</Optimize>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
|
<DefineConstants>TRACE;RELEASE</DefineConstants>
|
|
<Optimize>true</Optimize>
|
|
<DebugType>pdbonly</DebugType>
|
|
<ErrorReport>prompt</ErrorReport>
|
|
<WarningLevel>4</WarningLevel>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
|
|
|
|
<ItemGroup>
|
|
<None Remove="Assets\Awake\Awake.ico" />
|
|
<None Remove="Assets\Awake\disabled.ico" />
|
|
<None Remove="Assets\Awake\expirable.ico" />
|
|
<None Remove="Assets\Awake\indefinite.ico" />
|
|
<None Remove="Assets\Awake\normal.ico" />
|
|
<None Remove="Assets\Awake\scheduled.ico" />
|
|
<None Remove="Assets\Awake\timed.ico" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Windows.CsWinRT" />
|
|
<PackageReference Include="System.CommandLine" />
|
|
<PackageReference Include="System.Reactive" />
|
|
<PackageReference Include="System.Runtime.Caching" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
|
|
<ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />
|
|
<ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
|
|
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Compile Update="Program.cs">
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
</Compile>
|
|
<Compile Update="Properties\Resources.Designer.cs">
|
|
<DesignTime>True</DesignTime>
|
|
<AutoGen>True</AutoGen>
|
|
<DependentUpon>Resources.resx</DependentUpon>
|
|
</Compile>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Content Include="Assets\Awake\Awake.ico">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
<Content Include="Assets\Awake\disabled.ico">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
<Content Include="Assets\Awake\expirable.ico">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
<Content Include="Assets\Awake\indefinite.ico">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
<Content Include="Assets\Awake\normal.ico">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
<Content Include="Assets\Awake\scheduled.ico">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
<Content Include="Assets\Awake\timed.ico">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<EmbeddedResource Update="Properties\Resources.resx">
|
|
<Generator>ResXFileCodeGenerator</Generator>
|
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
</EmbeddedResource>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
</ItemGroup>
|
|
</Project>
|