Implement blank 'CoreWindow' startup

このコミットが含まれているのは:
Sergio Pedri committed 2024-09-26 18:14:50 -07:00
1 親 0d09333159
コミット 8978fb8299
5ファイル変更
+124 -11

検索条件に一致するファイルはありません

+2 -1
ファイルの表示
@@ -176,7 +176,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.D2D1.UI", "src
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.Uwp", "src\ComputeSharp.D2D1.Uwp\ComputeSharp.D2D1.Uwp.csproj", "{716DF19E-69BA-4A9C-9CA4-BFD196152F46}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.SwapChain.D2D1.CoreWindow", "samples\ComputeSharp.SwapChain.D2D1.CoreWindow\ComputeSharp.SwapChain.D2D1.CoreWindow.csproj", "{9FBE070E-A210-4CEF-9F04-61C2B269C600}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.SwapChain.D2D1.CoreWindow", "samples\ComputeSharp.SwapChain.D2D1.CoreWindow\ComputeSharp.SwapChain.D2D1.CoreWindow.csproj", "{9FBE070E-A210-4CEF-9F04-61C2B269C600}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -565,6 +565,7 @@ Global
src\ComputeSharp.CodeFixing\ComputeSharp.CodeFixing.projitems*{9b4448b1-200f-4966-8a13-a508691b3003}*SharedItemsImports = 5
src\ComputeSharp.Win32.D2D1\ComputeSharp.Win32.D2D1.projitems*{9da1da9f-f8b2-4b25-be80-c21f773029e3}*SharedItemsImports = 13
samples\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems*{9ea5ae9d-c39a-4f43-b03e-0a848ea2558a}*SharedItemsImports = 5
samples\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems*{9fbe070e-a210-4cef-9f04-61c2b269c600}*SharedItemsImports = 5
src\ComputeSharp.D2D1.UI\ComputeSharp.D2D1.UI.projitems*{a2a2171b-0baf-4a2a-bfb3-3357ef714bf0}*SharedItemsImports = 13
src\ComputeSharp.D2D1.UI\ComputeSharp.D2D1.UI.projitems*{bd9e6556-357e-4c20-bfcd-fb131f9372fa}*SharedItemsImports = 5
samples\ComputeSharp.SwapChain.Shaders\ComputeSharp.SwapChain.Shaders.projitems*{c12d7ace-98ed-4813-8118-6667c34f484f}*SharedItemsImports = 5
+63
ファイルの表示
@@ -0,0 +1,63 @@
using System.Diagnostics.CodeAnalysis;
using Windows.ApplicationModel.Core;
#pragma warning disable IDE0052
namespace ComputeSharp.SwapChain.D2D1.CoreWindow;
using Windows.UI.Core;
/// <summary>
/// A sample app rendering D2D shaders into a <see cref="CoreWindow"/> instance.
/// </summary>
public sealed partial class App : IFrameworkViewSource, IFrameworkView
{
private CoreApplicationView? applicationView;
private CoreWindow? window;
/// <summary>
/// The entry point for the application.
/// </summary>
public static void Main()
{
CoreApplication.Run(new App());
}
/// <inheritdoc/>
public IFrameworkView CreateView()
{
return this;
}
/// <inheritdoc/>
[MemberNotNull(nameof(applicationView))]
public void Initialize(CoreApplicationView applicationView)
{
this.applicationView = applicationView;
}
/// <inheritdoc/>
[MemberNotNull(nameof(window))]
public void SetWindow(CoreWindow window)
{
this.window = window;
}
/// <inheritdoc/>
public void Load(string entryPoint)
{
}
/// <inheritdoc/>
public void Run()
{
this.window!.Activate();
this.window.Dispatcher.ProcessEvents(CoreProcessEventsOption.ProcessUntilQuit);
}
/// <inheritdoc/>
public void Uninitialize()
{
}
}
@@ -1,10 +1,59 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<WindowsSdkPackageVersion>10.0.22621.37-preview</WindowsSdkPackageVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<UseUwp>true</UseUwp>
<UseUwpTools>true</UseUwpTools>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<EnableMsixTooling>true</EnableMsixTooling>
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
<AppxAddDefaultTargetDeviceFamilyItem>false</AppxAddDefaultTargetDeviceFamilyItem>
<TargetPlatformWinMDLocation>$(WinDir)\System32\WinMetadata</TargetPlatformWinMDLocation>
</PropertyGroup>
</Project>
<PropertyGroup>
<!--
Generate a .pdb file to avoid IIDOptimizer build errors.
See: https://github.com/microsoft/CsWinRT/issues/1478.
-->
<DebugType>full</DebugType>
<!-- Suppress warnings for using directives inside namespaces (needed to avoid CoreWindow conflicts) -->
<NoWarn>$(NoWarn);IDE0065</NoWarn>
</PropertyGroup>
<!-- NativeAOT settings, and size saving options for unnecessary features (optimize for speed otherwise) -->
<PropertyGroup>
<PublishAot>false</PublishAot>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<InvariantGlobalization>true</InvariantGlobalization>
<StackTraceSupport>false</StackTraceSupport>
<OptimizationPreference>Speed</OptimizationPreference>
</PropertyGroup>
<ItemGroup>
<ProjectCapability Include="Msix" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.0-prerelease.240722.1" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.240721001-experimentalpr" IncludeAssets="build" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
<ProjectReference Include="..\..\src\ComputeSharp.D2D1.Uwp\ComputeSharp.D2D1.Uwp.csproj" />
<ProjectReference Include="..\..\src\ComputeSharp.D2D1\ComputeSharp.D2D1.csproj" />
<ProjectReference Include="..\..\src\ComputeSharp.D2D1.SourceGenerators\ComputeSharp.D2D1.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
</ItemGroup>
<!-- Shared projects for the D2D1 shaders -->
<Import Project="..\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems" Label="Shared" />
</Project>
+2 -2
ファイルの表示
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
@@ -32,7 +32,7 @@
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="ComputeSharp.SwapChain.CoreWindow.App">
EntryPoint="ComputeSharp.SwapChain.D2D1.CoreWindow.App">
<uap:VisualElements
DisplayName="ComputeSharp Sample App (Core)"
Description="A sample app for ComputeSharp using CoreApplication and Win2D"
@@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Platform>x64</Platform>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<PublishAot>true</PublishAot>
<SelfContained>true</SelfContained>
<PublishAot>false</PublishAot>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>