Implement blank 'CoreWindow' startup
このコミットが含まれているのは:
1 親
0d09333159
コミット
8978fb8299
5ファイル変更
+124
-11
検索条件に一致するファイルはありません
@@ -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()
|
||||
{
|
||||
}
|
||||
}
|
||||
+55
-6
@@ -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>
|
||||
@@ -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"
|
||||
|
||||
+2
-2
@@ -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>
|
||||
新しいイシューから参照
ユーザーをブロックする