Skip to content

A Swiss Army knife for developers.

Dropped UWP support

Etienne Baudoux5d2d5afa544c
diff --git a/src/DevToys-Windows.sln b/src/DevToys-Windows.sln
index 8402465bd..45b73208e 100644
--- a/src/DevToys-Windows.sln
+++ b/src/DevToys-Windows.sln
@@ -39,10 +39,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows", "windows", "{AFE3
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "web", "web", "{04F9E03E-B519-49C5-BC6A-2131ED9BADC0}"
EndProject
-Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "DevToys.UWP", "app\dev\platforms\desktop\windows\DevToys.UWP\DevToys.UWP.wapproj", "{34D966D5-5756-4192-B4AB-44AD6FF07CC5}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevToys.UWP.Core", "app\dev\platforms\desktop\windows\DevToys.UWP.Core\DevToys.UWP.Core.csproj", "{97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.CLI", "app\dev\platforms\desktop\DevToys.CLI\DevToys.CLI.csproj", "{8C72D38A-658D-4C9D-B0AD-2DA975BE7826}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{745FD4CA-84CC-45D8-A3E2-814A0B9C16C4}"
@@ -59,8 +55,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.UI.Framework", "app
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.UI", "app\dev\DevToys.UI\DevToys.UI.csproj", "{104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A}"
EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "DevToys.UI.EntryPoint", "app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.shproj", "{93E31B7F-903D-4F24-B30D-220489242866}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.MonacoEditor", "app\dev\DevToys.MonacoEditor\DevToys.MonacoEditor.csproj", "{CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.Wasm", "app\dev\platforms\web\DevToys.Wasm\DevToys.Wasm.csproj", "{9E59352A-836D-47DE-AB02-F404A8345242}"
@@ -83,57 +77,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|Any CPU.ActiveCfg = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|Any CPU.Build.0 = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|Any CPU.Deploy.0 = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|AnyCPU.ActiveCfg = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|AnyCPU.Build.0 = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|AnyCPU.Deploy.0 = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|ARM64.Build.0 = Debug|ARM64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|ARM64.Deploy.0 = Debug|ARM64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|x64.ActiveCfg = Debug|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|x64.Build.0 = Debug|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|x64.Deploy.0 = Debug|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|x86.ActiveCfg = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|x86.Build.0 = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Debug|x86.Deploy.0 = Debug|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|Any CPU.ActiveCfg = Release|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|Any CPU.Build.0 = Release|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|Any CPU.Deploy.0 = Release|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|AnyCPU.ActiveCfg = Release|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|AnyCPU.Build.0 = Release|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|AnyCPU.Deploy.0 = Release|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|ARM64.ActiveCfg = Release|ARM64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|ARM64.Build.0 = Release|ARM64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|ARM64.Deploy.0 = Release|ARM64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|x64.ActiveCfg = Release|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|x64.Build.0 = Release|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|x64.Deploy.0 = Release|x64
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|x86.ActiveCfg = Release|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|x86.Build.0 = Release|x86
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5}.Release|x86.Deploy.0 = Release|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|Any CPU.ActiveCfg = Debug|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|Any CPU.Build.0 = Debug|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|AnyCPU.ActiveCfg = Debug|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|AnyCPU.Build.0 = Debug|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|ARM64.ActiveCfg = Debug|arm64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|ARM64.Build.0 = Debug|arm64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|x64.ActiveCfg = Debug|x64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|x64.Build.0 = Debug|x64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|x86.ActiveCfg = Debug|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Debug|x86.Build.0 = Debug|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|Any CPU.Build.0 = Release|Any CPU
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|AnyCPU.ActiveCfg = Release|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|AnyCPU.Build.0 = Release|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|ARM64.ActiveCfg = Release|arm64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|ARM64.Build.0 = Release|arm64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|x64.ActiveCfg = Release|x64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|x64.Build.0 = Release|x64
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|x86.ActiveCfg = Release|x86
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}.Release|x86.Build.0 = Release|x86
{8C72D38A-658D-4C9D-B0AD-2DA975BE7826}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C72D38A-658D-4C9D-B0AD-2DA975BE7826}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C72D38A-658D-4C9D-B0AD-2DA975BE7826}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
@@ -405,8 +348,6 @@ Global
{22EE9386-CEFA-47D8-97B2-09A63EDF7F2E} = {3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7}
{AFE37797-0A43-4838-8C1E-4D2D1446499C} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}
{04F9E03E-B519-49C5-BC6A-2131ED9BADC0} = {3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7}
- {34D966D5-5756-4192-B4AB-44AD6FF07CC5} = {AFE37797-0A43-4838-8C1E-4D2D1446499C}
- {97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE} = {AFE37797-0A43-4838-8C1E-4D2D1446499C}
{8C72D38A-658D-4C9D-B0AD-2DA975BE7826} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}
{745FD4CA-84CC-45D8-A3E2-814A0B9C16C4} = {0AC87D9B-BBEC-4DCE-A9D4-82A159E5E7C1}
{89A4D88F-5AC0-436A-8EC5-8E98728CA89E} = {B20E4027-0777-4A75-A848-609594E9A6B0}
@@ -415,7 +356,6 @@ Global
{A730FA8A-3713-4F7A-915D-79098CA12DF0} = {B20E4027-0777-4A75-A848-609594E9A6B0}
{723A3D71-2425-49EE-B669-1A0DF3A8B486} = {B20E4027-0777-4A75-A848-609594E9A6B0}
{104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A} = {B20E4027-0777-4A75-A848-609594E9A6B0}
- {93E31B7F-903D-4F24-B30D-220489242866} = {B20E4027-0777-4A75-A848-609594E9A6B0}
{CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8} = {B20E4027-0777-4A75-A848-609594E9A6B0}
{9E59352A-836D-47DE-AB02-F404A8345242} = {04F9E03E-B519-49C5-BC6A-2131ED9BADC0}
{64B8DB6D-3168-48DE-95BD-BBE7BAB3A262} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}
@@ -424,10 +364,4 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C2C953F5-F97F-4198-B15C-4947A886050F}
EndGlobalSection
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems*{804dbc7b-fbf4-4b2e-aae9-d74c32985d3f}*SharedItemsImports = 5
- app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems*{93e31b7f-903d-4f24-b30d-220489242866}*SharedItemsImports = 13
- app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems*{97aa45f4-41e2-4fda-b5b7-f4579df2c7ee}*SharedItemsImports = 4
- app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems*{9e59352a-836d-47de-ab02-f404a8345242}*SharedItemsImports = 5
- EndGlobalSection
EndGlobal
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index f3faaf6ae..f94e2c271 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -15,7 +15,6 @@
<NetCoreWindows>$(NetCore)-windows$(Windows10MinSDKVersionTrimmed)</NetCoreWindows>
<NetMacCatalyst>$(NetCore)-maccatalyst</NetMacCatalyst>
<NetMacOS>$(NetCore)-macos</NetMacOS>
- <UAP>uap$(Windows10MinSDKVersionTrimmed)</UAP>
<!-- Define default build configuration -->
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
diff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.cs
index 2efafd5c8..04142b869 100644
--- a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.cs
+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.cs
@@ -9,16 +9,9 @@ using DevToys.UI.Framework.Threading;
using Microsoft.Web.WebView2.Core;
using Windows.Foundation;
using Range = DevToys.MonacoEditor.Monaco.Range;
-
-#if WINDOWS_UWP
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using DispatcherQueue = Windows.UI.Core.CoreDispatcher;
-#else
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
-#endif
namespace DevToys.MonacoEditor;
@@ -39,11 +32,7 @@ public sealed partial class CodeEditor : Control, IParentAccessorAcceptor, IDisp
internal const string FocusedState = "Focused";
internal const string DisabledState = "Disabled";
-#if WINDOWS_UWP
- private DispatcherQueue UIAccess => DispatcherQueueExtensions.DispatcherQueue;
-#else
private DispatcherQueue UIAccess => this.DispatcherQueue;
-#endif
private readonly DebugLogger _debugLogger = new();
private readonly ThemeListener _themeListener;
diff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.MacOS.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.MacOS.cs
index 95ada6565..4d544308a 100644
--- a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.MacOS.cs
+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.MacOS.cs
@@ -1,4 +1,4 @@
-#if __MAC__
+#if __MACCATALYST__
//using DevToys.HighlightRBindingLibrary;
using System.Reflection;
diff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.cs
index 9c129381f..516e15b32 100644
--- a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.cs
+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.cs
@@ -1,4 +1,4 @@
-#if WINDOWS_UWP || __WINDOWS__
+#if __WINDOWS__
using System.Reflection;
using System.Text;
@@ -10,17 +10,8 @@ using Newtonsoft.Json;
using Uno.Extensions;
using Uno.Logging;
using Windows.Foundation;
-
-#if WINDOWS_UWP
-using Windows.Storage;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using DispatcherQueue = Windows.UI.Core.CoreDispatcher;
-using DispatcherQueuePriority = Windows.UI.Core.CoreDispatcherPriority;
-#elif __WINDOWS__
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
-#endif
namespace DevToys.MonacoEditor;
@@ -72,9 +63,6 @@ public sealed partial class CodeEditorPresenter : UserControl, ICodeEditorPresen
this.Visibility = Visibility.Collapsed;
_webView.AllowFocusOnInteraction = true;
-#if WINDOWS_UWP
- _webView.IsFocusEngagementEnabled = true;
-#endif
_webView.CoreWebView2Initialized += WebView_CoreWebView2Initialized;
ILogger logger = this.Log();
@@ -83,11 +71,6 @@ public sealed partial class CodeEditorPresenter : UserControl, ICodeEditorPresen
_errorLogger = logger.IsEnabled(LogLevel.Error) ? logger : null;
}
-#if WINDOWS_UWP
- /// <inheritdoc />
- public DispatcherQueue DispatcherQueue => DispatcherQueueExtensions.DispatcherQueue;
-#endif
-
/// <inheritdoc />
public event TypedEventHandler<ICodeEditorPresenter, CoreWebView2NewWindowRequestedEventArgs>? NewWindowRequested;
@@ -113,19 +96,12 @@ public sealed partial class CodeEditorPresenter : UserControl, ICodeEditorPresen
{
await _webView.EnsureCoreWebView2Async();
-#if WINDOWS_UWP
- StorageFile storageFile
- = await StorageFile.GetFileFromApplicationUriAsync(
- new Uri("ms-appx:///DevToys.MonacoEditor/CodeEditor/CodeEditor.Windows.html"));
- string path = storageFile.Path;
-#elif __WINDOWS__
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, "DevToys.MonacoEditor", "CodeEditor", "CodeEditor.Windows.html");
if (!File.Exists(path))
{
path = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, "CodeEditor", "CodeEditor.Windows.html");
Debug.Assert(File.Exists(path));
}
-#endif
string rootDirectory = Directory.GetParent(path)!.Parent!.FullName;
diff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/ICodeEditorPresenter.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/ICodeEditorPresenter.cs
index 743ad7b6f..d14b1023e 100644
--- a/src/app/dev/DevToys.MonacoEditor/CodeEditor/ICodeEditorPresenter.cs
+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/ICodeEditorPresenter.cs
@@ -1,14 +1,8 @@
using DevToys.UI.Framework.Threading;
using Microsoft.Web.WebView2.Core;
using Windows.Foundation;
-
-#if WINDOWS_UWP
-using Windows.UI.Xaml;
-using DispatcherQueue = Windows.UI.Core.CoreDispatcher;
-#else
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
-#endif
namespace DevToys.MonacoEditor;
diff --git a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj
index ca8b2f11f..4040747f0 100644
--- a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj
+++ b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj
@@ -6,7 +6,7 @@
<PropertyGroup>
<TargetFrameworks>$(NetCore)</TargetFrameworks>
<TargetFrameworks Condition="$(IsMac)">$(TargetFrameworks);$(NetMacCatalyst)</TargetFrameworks>
- <TargetFrameworks Condition="$(IsWindows)">$(UAP);$(NetCoreWindows);$(TargetFrameworks)</TargetFrameworks>
+ <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(NetCoreWindows)</TargetFrameworks>
<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
@@ -53,38 +53,6 @@
</ItemGroup>
<Choose>
- <When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">
- <PropertyGroup>
- <IsMacCatalyst>true</IsMacCatalyst>
- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <PackageReference Include="Microsoft.Windows.Compatibility" />
- <PackageReference Include="Uno.WinUI" />
- <PackageReference Include="Uno.WinUI.Lottie" />
- <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />
- <PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Assets\**" />
- <Compile Update="**\*.xaml.cs">
- <DependentUpon>%(Filename)</DependentUpon>
- </Compile>
- <None Remove="ts-helpermethods\**\*.js" />
- <Content Remove="ts-helpermethods\**\*.js" />
- <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-UWP\**\*.js" />
- <Content Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json">
- <CopyToOutputDirectory>Never</CopyToOutputDirectory>
- </Content>
- <ConfigFiles Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" />
- <Content Include="highlightjs\highlight.min.js" />
- <Content Include="highlightjs\styles\**" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="WasmScripts\WASM\uno-monaco-helpers.g.js" />
- </ItemGroup>
- </When>
-
<When Condition="'$(TargetFramework)' == '$(NetCore)'">
<PropertyGroup>
<IsWasm>true</IsWasm>
@@ -172,35 +140,35 @@
</ItemGroup>
</When>
- <When Condition="'$(TargetFramework)' == '$(UAP)'">
+ <When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">
<PropertyGroup>
- <IsUWP>true</IsUWP>
- <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>
- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
- <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
- <Platforms>AnyCPU;x86;x64;arm64</Platforms>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)' == 'Release'">
- <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Platform)' == 'AnyCPU'">
- <PlatformTarget>x86</PlatformTarget>
+ <IsMacCatalyst>true</IsMacCatalyst>
+ <DefineConstants>$(DefineConstants);__MACCATALYST__</DefineConstants>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.UI.Xaml" />
+ <PackageReference Include="Microsoft.Windows.Compatibility" />
+ <PackageReference Include="Uno.WinUI" />
+ <PackageReference Include="Uno.WinUI.Lottie" />
+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />
+ <PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" />
</ItemGroup>
<ItemGroup>
- <Content Include="CodeEditor\CodeEditor.Windows.html" />
- <None Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />
- <Content Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />
- <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.*" />
- <Content Include="ts-helpermethods\ts-helpermethods-UWP\tsconfig.json">
+ <Content Include="Assets\**" />
+ <Compile Update="**\*.xaml.cs">
+ <DependentUpon>%(Filename)</DependentUpon>
+ </Compile>
+ <None Remove="ts-helpermethods\**\*.js" />
+ <Content Remove="ts-helpermethods\**\*.js" />
+ <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-UWP\**\*.js" />
+ <Content Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
- <ConfigFiles Include="ts-helpermethods\ts-helpermethods-UWP\tsconfig.json" />
- <None Include="highlightjs\**" />
+ <ConfigFiles Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" />
+ <Content Include="highlightjs\highlight.min.js" />
+ <Content Include="highlightjs\styles\**" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="WasmScripts\WASM\uno-monaco-helpers.g.js" />
</ItemGroup>
</When>
</Choose>
diff --git a/src/app/dev/DevToys.MonacoEditor/WebInterop/Theme/ThemeListener.cs b/src/app/dev/DevToys.MonacoEditor/WebInterop/Theme/ThemeListener.cs
index 892acfe63..0d3cc0db6 100644
--- a/src/app/dev/DevToys.MonacoEditor/WebInterop/Theme/ThemeListener.cs
+++ b/src/app/dev/DevToys.MonacoEditor/WebInterop/Theme/ThemeListener.cs
@@ -2,16 +2,9 @@
using Windows.UI.ViewManagement;
using Newtonsoft.Json;
using Windows.UI;
-
-#if WINDOWS_UWP
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Media;
-using DispatcherQueue = Windows.UI.Core.CoreDispatcher;
-#else
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
-#endif
namespace DevToys.MonacoEditor.WebInterop;
diff --git a/src/app/dev/DevToys.MonacoEditor/highlightjs/CodeAttributedString.cs b/src/app/dev/DevToys.MonacoEditor/highlightjs/CodeAttributedString.cs
index 367727dff..157b5affd 100644
--- a/src/app/dev/DevToys.MonacoEditor/highlightjs/CodeAttributedString.cs
+++ b/src/app/dev/DevToys.MonacoEditor/highlightjs/CodeAttributedString.cs
@@ -1,4 +1,4 @@
-#if __MAC__
+#if __MACCATALYST__
using DevToys.UI.Framework.Threading;
using Microsoft.UI.Dispatching;
diff --git a/src/app/dev/DevToys.MonacoEditor/highlightjs/HTMLUtils.cs b/src/app/dev/DevToys.MonacoEditor/highlightjs/HTMLUtils.cs
index aae6d0f66..2c65673ed 100644
--- a/src/app/dev/DevToys.MonacoEditor/highlightjs/HTMLUtils.cs
+++ b/src/app/dev/DevToys.MonacoEditor/highlightjs/HTMLUtils.cs
@@ -1,4 +1,4 @@
-#if __MAC__
+#if __MACCATALYST__
namespace DevToys.MonacoEditor.HighlightJs;
diff --git a/src/app/dev/DevToys.MonacoEditor/highlightjs/Highlighter.cs b/src/app/dev/DevToys.MonacoEditor/highlightjs/Highlighter.cs
index 8ba5ba39a..63d864ac5 100644
--- a/src/app/dev/DevToys.MonacoEditor/highlightjs/Highlighter.cs
+++ b/src/app/dev/DevToys.MonacoEditor/highlightjs/Highlighter.cs
@@ -1,4 +1,4 @@
-#if __MAC__
+#if __MACCATALYST__
using JavaScriptCore;
using Windows.Storage;
diff --git a/src/app/dev/DevToys.MonacoEditor/highlightjs/Scanner.cs b/src/app/dev/DevToys.MonacoEditor/highlightjs/Scanner.cs
index 5fc28536d..ea4b885dd 100644
--- a/src/app/dev/DevToys.MonacoEditor/highlightjs/Scanner.cs
+++ b/src/app/dev/DevToys.MonacoEditor/highlightjs/Scanner.cs
@@ -1,4 +1,4 @@
-#if __MAC__
+#if __MACCATALYST__
namespace Foundation;
diff --git a/src/app/dev/DevToys.MonacoEditor/highlightjs/Theme.cs b/src/app/dev/DevToys.MonacoEditor/highlightjs/Theme.cs
index 859dd0560..9c6938a95 100644
--- a/src/app/dev/DevToys.MonacoEditor/highlightjs/Theme.cs
+++ b/src/app/dev/DevToys.MonacoEditor/highlightjs/Theme.cs
@@ -1,4 +1,4 @@
-#if __MAC__
+#if __MACCATALYST__
using System.Text;
diff --git a/src/app/dev/DevToys.UI.EntryPoint/DevToys.UI.EntryPoint.projitems b/src/app/dev/DevToys.UI.EntryPoint/DevToys.UI.EntryPoint.projitems
deleted file mode 100644
index de03aec61..000000000
--- a/src/app/dev/DevToys.UI.EntryPoint/DevToys.UI.EntryPoint.projitems
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
- <HasSharedItems>true</HasSharedItems>
- <SharedGUID>6279c845-92f8-4333-ab99-3d213163593c</SharedGUID>
- </PropertyGroup>
- <PropertyGroup Label="Configuration">
- <Import_RootNamespace>DevToys</Import_RootNamespace>
- </PropertyGroup>
- <ItemGroup>
- <ApplicationDefinition Include="$(MSBuildThisFileDirectory)App.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="$(MSBuildThisFileDirectory)App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <!--
- Add files present in the shared project folder, excluding the ones
- explicitly included in the projitem, so files can be added from vscode
- without manipulating the projitem file.
- -->
- <_Globbled_Page Include="$(MSBuildThisFileDirectory)**/*.xaml" Exclude="@(Page);@(ApplicationDefinition)">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </_Globbled_Page>
- <Page Include="@(_Globbled_Page)" />
- <_Globbed_Compile Include="$(MSBuildThisFileDirectory)**/*.xaml.cs" Exclude="@(Compile)">
- <DependentUpon>%(Filename)</DependentUpon>
- </_Globbed_Compile>
- <_Globbed_Compile Include="$(MSBuildThisFileDirectory)**/*.cs" Exclude="@(Compile);@(_Globbed_Compile)" />
- <Compile Include="@(_Globbed_Compile)" />
- <_Globbed_PRIResource Include="$(MSBuildThisFileDirectory)**/*.resw" Exclude="@(PRIResource)" />
- <PRIResource Include="@(_Globbed_PRIResource)" />
- <_Globbed_Content Include="$(MSBuildThisFileDirectory)Assets/**/*.*" Exclude="@(Content)" />
- <Content Include="@(_Globbed_Content)" />
- <!-- Mark the files from this folder as being part of WinUI -->
- <Page Update="$(MSBuildThisFileDirectory)**/*.xaml" XamlRuntime="WinUI" />
- <ApplicationDefinition Update="$(MSBuildThisFileDirectory)**/*.xaml" XamlRuntime="WinUI" />
- <!-- Make sure XAML files force reevaluation of up-to-date checks -->
- <UpToDateCheckInput Include="$(MSBuildThisFileDirectory)**/*.xaml" />
- <_Globbed_Embedded_Resource Include="$(MSBuildThisFileDirectory)*.json" Exclude="@(EmbeddedResource)" />
- <EmbeddedResource Include="@(_Globbed_Embedded_Resource)" />
- </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/src/app/dev/DevToys.UI.EntryPoint/DevToys.UI.EntryPoint.shproj b/src/app/dev/DevToys.UI.EntryPoint/DevToys.UI.EntryPoint.shproj
deleted file mode 100644
index ccc13dbcd..000000000
--- a/src/app/dev/DevToys.UI.EntryPoint/DevToys.UI.EntryPoint.shproj
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="Globals">
- <ProjectGuid>93e31b7f-903d-4f24-b30d-220489242866</ProjectGuid>
- <MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
- <PropertyGroup />
- <Import Project="DevToys.UI.EntryPoint.projitems" Label="Shared" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
-</Project>
diff --git a/src/app/dev/DevToys.UI.Framework/Converters/BooleanToVisibilityConverters.cs b/src/app/dev/DevToys.UI.Framework/Converters/BooleanToVisibilityConverters.cs
index f6cab72e3..9b2ef82b4 100644
--- a/src/app/dev/DevToys.UI.Framework/Converters/BooleanToVisibilityConverters.cs
+++ b/src/app/dev/DevToys.UI.Framework/Converters/BooleanToVisibilityConverters.cs
@@ -1,11 +1,5 @@
-#if WINDOWS_UWP
-#nullable enable
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Data;
-#else
-using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;
-#endif
namespace DevToys.UI.Framework.Converters;
diff --git a/src/app/dev/DevToys.UI.Framework/Converters/NegateBooleanConverter.cs b/src/app/dev/DevToys.UI.Framework/Converters/NegateBooleanConverter.cs
index dcda2bb78..3a64836f2 100644
--- a/src/app/dev/DevToys.UI.Framework/Converters/NegateBooleanConverter.cs
+++ b/src/app/dev/DevToys.UI.Framework/Converters/NegateBooleanConverter.cs
@@ -1,9 +1,4 @@
-#if WINDOWS_UWP
-#nullable enable
-using Windows.UI.Xaml.Data;
-#else
-using Microsoft.UI.Xaml.Data;
-#endif
+using Microsoft.UI.Xaml.Data;
namespace DevToys.UI.Framework.Converters;
diff --git a/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj b/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj
index 1923f9351..601561fa0 100644
--- a/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj
+++ b/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj
@@ -6,7 +6,7 @@
<PropertyGroup>
<TargetFrameworks>$(NetCore)</TargetFrameworks>
<TargetFrameworks Condition="$(IsMac)">$(TargetFrameworks);$(NetMacCatalyst)</TargetFrameworks>
- <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(UAP);$(NetCoreWindows)</TargetFrameworks>
+ <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(NetCoreWindows)</TargetFrameworks>
<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
@@ -19,7 +19,7 @@
<When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">
<PropertyGroup>
<IsMacCatalyst>true</IsMacCatalyst>
- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>
+ <DefineConstants>$(DefineConstants);__MACCATALYST__</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" />
@@ -65,27 +65,6 @@
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
</ItemGroup>
</When>
-
- <When Condition="'$(TargetFramework)' == '$(UAP)'">
- <PropertyGroup>
- <IsUWP>true</IsUWP>
- <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>
- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
- <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
- <Platforms>AnyCPU;x86;x64;arm64</Platforms>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)' == 'Release'">
- <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Platform)' == 'AnyCPU'">
- <PlatformTarget>x86</PlatformTarget>
- </PropertyGroup>
- <ItemGroup>
- <PackageReference Include="Microsoft.UI.Xaml" />
- </ItemGroup>
- </When>
</Choose>
<ItemGroup>
diff --git a/src/app/dev/DevToys.UI.Framework/Threading/DispatcherQueueExtensions.cs b/src/app/dev/DevToys.UI.Framework/Threading/DispatcherQueueExtensions.cs
index 9115994af..519c510ee 100644
--- a/src/app/dev/DevToys.UI.Framework/Threading/DispatcherQueueExtensions.cs
+++ b/src/app/dev/DevToys.UI.Framework/Threading/DispatcherQueueExtensions.cs
@@ -1,21 +1,9 @@
-#if WINDOWS_UWP
-#nullable enable
-using Windows.ApplicationModel.Core;
-using Windows.UI.Core;
-using DispatcherQueue = Windows.UI.Core.CoreDispatcher;
-using DispatcherQueuePriority = Windows.UI.Core.CoreDispatcherPriority;
-#else
-using Microsoft.UI.Dispatching;
-#endif
+using Microsoft.UI.Dispatching;
namespace DevToys.UI.Framework.Threading;
public static class DispatcherQueueExtensions
{
-#if WINDOWS_UWP
- public static readonly DispatcherQueue DispatcherQueue = CoreApplication.MainView.CoreWindow.Dispatcher;
-#endif
-
public static void ThrowIfNotOnUIThread(this DispatcherQueue dispatcherQueue)
{
if (!dispatcherQueue.HasThreadAccess)
@@ -52,11 +40,7 @@ public static class DispatcherQueueExtensions
else
{
var tcs = new TaskCompletionSource<int>(0);
-#if WINDOWS_UWP
- _ = dispatcherQueue.RunAsync(
-#else
dispatcherQueue.TryEnqueue(
-#endif
priority,
() =>
{
@@ -96,11 +80,7 @@ public static class DispatcherQueueExtensions
else
{
var tcs = new TaskCompletionSource<T>();
-#if WINDOWS_UWP
- _ = dispatcherQueue.RunAsync(
-#else
dispatcherQueue.TryEnqueue(
-#endif
priority,
() =>
{
@@ -141,11 +121,7 @@ public static class DispatcherQueueExtensions
else
{
var tcs = new TaskCompletionSource<int>(0);
-#if WINDOWS_UWP
- _ = dispatcherQueue.RunAsync(
-#else
dispatcherQueue.TryEnqueue(
-#endif
priority,
async () =>
{
@@ -185,11 +161,7 @@ public static class DispatcherQueueExtensions
{
T result = default!;
var tcs = new TaskCompletionSource<int>(0);
-#if WINDOWS_UWP
- _ = dispatcherQueue.RunAsync(
-#else
dispatcherQueue.TryEnqueue(
-#endif
priority,
async () =>
{
diff --git a/src/app/dev/DevToys.UI/DevToys.UI.csproj b/src/app/dev/DevToys.UI/DevToys.UI.csproj
index bf67ccfaf..e64eb60a4 100644
--- a/src/app/dev/DevToys.UI/DevToys.UI.csproj
+++ b/src/app/dev/DevToys.UI/DevToys.UI.csproj
@@ -6,7 +6,7 @@
<PropertyGroup>
<TargetFrameworks>$(NetCore)</TargetFrameworks>
<TargetFrameworks Condition="$(IsMac)">$(TargetFrameworks);$(NetMacCatalyst)</TargetFrameworks>
- <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(UAP);$(NetCoreWindows)</TargetFrameworks>
+ <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(NetCoreWindows)</TargetFrameworks>
<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
@@ -19,7 +19,7 @@
<When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">
<PropertyGroup>
<IsMacCatalyst>true</IsMacCatalyst>
- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>
+ <DefineConstants>$(DefineConstants);__MACCATALYST__</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" />
@@ -65,27 +65,6 @@
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
</ItemGroup>
</When>
-
- <When Condition="'$(TargetFramework)' == '$(UAP)'">
- <PropertyGroup>
- <IsUWP>true</IsUWP>
- <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>
- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
- <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
- <Platforms>AnyCPU;x86;x64;arm64</Platforms>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)' == 'Release'">
- <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Platform)' == 'AnyCPU'">
- <PlatformTarget>x86</PlatformTarget>
- </PropertyGroup>
- <ItemGroup>
- <PackageReference Include="Microsoft.UI.Xaml" />
- </ItemGroup>
- </When>
</Choose>
<ItemGroup>
@@ -108,6 +87,7 @@
</Page>
<PRIResource Include="**\*.resw" />
<Content Include="Assets\**" />
+ <None Remove="Strings\ja-JP\Languages.resw" />
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
diff --git a/src/app/dev/DevToys.UI/LanguageManager.cs b/src/app/dev/DevToys.UI/LanguageManager.cs
index 32ec4498a..a002f5a39 100644
--- a/src/app/dev/DevToys.UI/LanguageManager.cs
+++ b/src/app/dev/DevToys.UI/LanguageManager.cs
@@ -1,11 +1,9 @@
using System.Globalization;
using Windows.Globalization;
-
-#if WINDOWS_UWP
-using Windows.UI.Xaml;
-#else
using Microsoft.UI.Xaml;
-#endif
+using System.Resources;
+using DevToys.UI.Strings;
+using Windows.ApplicationModel.Resources;
namespace DevToys.UI;
@@ -34,11 +32,27 @@ public sealed class LanguageManager
{
new LanguageDefinition() // default language
};
+
+#if HAS_UNO
IReadOnlyList<string> supportedLanguageIdentifiers = ApplicationLanguages.ManifestLanguages;
for (int i = 0; i < supportedLanguageIdentifiers.Count; i++)
{
- AvailableLanguages.Add(new LanguageDefinition(supportedLanguageIdentifiers[i]));
+ AvailableLanguages.Add(
+ new LanguageDefinition(
+ supportedLanguageIdentifiers[i]));
}
+#else
+ IReadOnlyList<Windows.ApplicationModel.Resources.Core.ResourceCandidate> candidates
+ = Windows.ApplicationModel.Resources.Core.ResourceManager.Current
+ .MainResourceMap[$"DevToys.UI/{nameof(Languages)}/{nameof(Languages.DefaultLanguage)}"]
+ .Candidates;
+ for (int i = 0; i < candidates.Count; i++)
+ {
+ AvailableLanguages.Add(
+ new LanguageDefinition(
+ candidates[i].GetQualifierValue("Language")));
+ }
+#endif
}
/// <summary>
@@ -48,7 +62,9 @@ public sealed class LanguageManager
{
CultureInfo.DefaultThreadCurrentCulture = language.Culture;
CultureInfo.DefaultThreadCurrentUICulture = language.Culture;
+#if HAS_UNO
ApplicationLanguages.PrimaryLanguageOverride = language.Identifier;
+#endif
if (language.Culture.TextInfo.IsRightToLeft)
{
diff --git a/src/app/dev/DevToys.UI/Strings/ja-JP/Languages.resw b/src/app/dev/DevToys.UI/Strings/ja-JP/Languages.resw
new file mode 100644
index 000000000..d8ec3b95e
--- /dev/null
+++ b/src/app/dev/DevToys.UI/Strings/ja-JP/Languages.resw
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="DefaultLanguage" xml:space="preserve">
+ <value>Same as Microsoft Windows</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/app/dev/DevToys.UI/Views/MainPage.xaml.cs b/src/app/dev/DevToys.UI/Views/MainPage.xaml.cs
index 4c6d9aa75..2bf45ad0e 100644
--- a/src/app/dev/DevToys.UI/Views/MainPage.xaml.cs
+++ b/src/app/dev/DevToys.UI/Views/MainPage.xaml.cs
@@ -1,9 +1,4 @@
-#if WINDOWS_UWP
-using Microsoft.UI.Xaml.Controls;
-using Windows.UI.Xaml.Controls;
-#else
-using Microsoft.UI.Xaml.Controls;
-#endif
+using Microsoft.UI.Xaml.Controls;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
@@ -22,10 +17,5 @@ public sealed partial class MainPage : Page
public MainPage()
{
this.InitializeComponent();
-
-#if WINDOWS_UWP
- // Enable Mica effect.
- BackdropMaterial.SetApplyToRootOrPageBackground(this, true);
-#endif
}
}
diff --git a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj
index c4ae0d138..c3ce2bfb7 100644
--- a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj
+++ b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj
@@ -28,7 +28,7 @@
<Choose>
<When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">
<PropertyGroup>
- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>
+ <DefineConstants>$(DefineConstants);__MACCATALYST__</DefineConstants>
<RuntimeIdentifiers>maccatalyst-arm64;maccatalyst-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)'==''">
diff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj
index 06f5fc661..8f4e85a61 100644
--- a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj
+++ b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj
@@ -20,11 +20,11 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<CreatePackage>false</CreatePackage>
- <DefineConstants>DEBUG;TRACE;__MAC__</DefineConstants>
+ <DefineConstants>DEBUG;TRACE;__MACCATALYST__</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<CreatePackage>false</CreatePackage>
- <DefineConstants>TRACE;__MAC__</DefineConstants>
+ <DefineConstants>TRACE;__MACCATALYST__</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.WinUI"/>
@@ -62,5 +62,6 @@
<ProjectReference Include="..\..\..\..\DevToys.UI.Framework\DevToys.UI.Framework.csproj"/>
<ProjectReference Include="..\..\..\..\DevToys.UI\DevToys.UI.csproj"/>
</ItemGroup>
- <Import Project="..\..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems" Label="Shared" Condition="Exists('..\..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems')"/>
+
+ <Import Project="$(RepoRoot)\src\app\dev\shared\App.props" />
</Project>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/LockScreenLogo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/LockScreenLogo.scale-200.png
deleted file mode 100644
index 735f57adb..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/LockScreenLogo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/SplashScreen.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/SplashScreen.scale-200.png
deleted file mode 100644
index 023e7f1fe..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/SplashScreen.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square150x150Logo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square150x150Logo.scale-200.png
deleted file mode 100644
index af49fec1a..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square150x150Logo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square44x44Logo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square44x44Logo.scale-200.png
deleted file mode 100644
index ce342a2ec..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square44x44Logo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
deleted file mode 100644
index f6c02ce97..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/StoreLogo.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/StoreLogo.png
deleted file mode 100644
index 7385b56c0..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/StoreLogo.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Wide310x150Logo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Wide310x150Logo.scale-200.png
deleted file mode 100644
index 288995b39..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Assets/Wide310x150Logo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/DevToys.UWP.Core.csproj b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/DevToys.UWP.Core.csproj
deleted file mode 100644
index 99e48333d..000000000
--- a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/DevToys.UWP.Core.csproj
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|x86">
- <Configuration>Debug</Configuration>
- <Platform>x86</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x86">
- <Configuration>Release</Configuration>
- <Platform>x86</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|arm64">
- <Configuration>Debug</Configuration>
- <Platform>arm64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|arm64">
- <Configuration>Release</Configuration>
- <Platform>arm64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup>
- <ProjectGuid>{97AA45F4-41E2-4FDA-B5B7-F4579DF2C7EE}</ProjectGuid>
- <OutputType>AppContainerExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>DevToys.UWP.Core</RootNamespace>
- <AssemblyName>DevToys.UWP.Core</AssemblyName>
- <DefaultLanguage>en-US</DefaultLanguage>
- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>
- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
- <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
- <AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
- <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
- <!-- Disable Central Package Management -->
- <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
- <DebugSymbols>true</DebugSymbols>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
- <DebugType>full</DebugType>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)' == 'Release'">
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Platform)' == 'x86'">
- <PlatformTarget>x86</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Platform)' == 'x64'">
- <PlatformTarget>x64</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Platform)' == 'arm64'">
- <PlatformTarget>arm64</PlatformTarget>
- <DefineConstants>$(DefineConstants);ARM</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <AppxManifest Include="Package.appxmanifest">
- <SubType>Designer</SubType>
- </AppxManifest>
- </ItemGroup>
- <ItemGroup>
- <Content Include="Properties\Default.rd.xml" />
- <Content Include="Assets\LockScreenLogo.scale-200.png" />
- <Content Include="Assets\SplashScreen.scale-200.png" />
- <Content Include="Assets\Square150x150Logo.scale-200.png" />
- <Content Include="Assets\Square44x44Logo.scale-200.png" />
- <Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
- <Content Include="Assets\StoreLogo.png" />
- <Content Include="Assets\Wide310x150Logo.scale-200.png" />
- </ItemGroup>
- <ItemGroup>
- <!-- Explicitely set Version because Central Package Management isn't supported by UWP projects -->
- <PackageReference Include="CommunityToolkit.Common" Version="$(CommunityToolkitVersion)" />
- <PackageReference Include="CommunityToolkit.Diagnostics" Version="$(CommunityToolkitVersion)" />
- <PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)" />
- <PackageReference Include="System.ComponentModel.Composition" Version="$(DotNetVersion)" />
- <PackageReference Include="Microsoft.Web.WebView2" Version="$(WebView2Version)" />
- <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(DotNetVersion)" />
- <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(MicrosoftNETCoreUniversalWindowsPlatformVersion)" />
- <PackageReference Include="PolySharp" Version="$(PolySharpVersion)">
- <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
- <PrivateAssets>all</PrivateAssets>
- </PackageReference>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\..\DevToys.Api\DevToys.Api.csproj">
- <Project>{89a4d88f-5ac0-436a-8ec5-8e98728ca89e}</Project>
- <Name>DevToys.Api</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\DevToys.Core\DevToys.Core.csproj">
- <Project>{a730fa8a-3713-4f7a-915d-79098ca12df0}</Project>
- <Name>DevToys.Core</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\DevToys.MonacoEditor\DevToys.MonacoEditor.csproj">
- <Project>{cdd8b469-aca6-4a7d-91a0-66adb0563ae8}</Project>
- <Name>DevToys.MonacoEditor</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\DevToys.Tools\DevToys.Tools.csproj">
- <Project>{b6d48157-5257-4b60-b065-3b231b610a54}</Project>
- <Name>DevToys.Tools</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\DevToys.UI.Framework\DevToys.UI.Framework.csproj">
- <Project>{723a3d71-2425-49ee-b669-1a0df3a8b486}</Project>
- <Name>DevToys.UI.Framework</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\DevToys.UI\DevToys.UI.csproj">
- <Project>{104f1e4b-e0d3-4d87-9da0-3fe82fe2573a}</Project>
- <Name>DevToys.UI</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="..\..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems" Label="Shared" />
- <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
- <VisualStudioVersion>14.0</VisualStudioVersion>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Package.appxmanifest b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Package.appxmanifest
deleted file mode 100644
index f99b49916..000000000
--- a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Package.appxmanifest
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
- xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
- xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
- xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
- IgnorableNamespaces="uap uap5 mp">
-
- <!-- Please DO NOT commit changes on the version number below unless you're about to release a new version of the app on the Store. -->
- <Identity Name="f668c062-a3c9-41d6-a9f7-c06fad5f1049"
- Publisher="CN=etiennebaudoux"
- Version="0.0.0.0" />
-
- <mp:PhoneIdentity PhoneProductId="f668c062-a3c9-41d6-a9f7-c06fad5f1049"
- PhonePublisherId="00000000-0000-0000-0000-000000000000" />
-
- <Properties>
- <DisplayName>DevToys</DisplayName>
- <PublisherDisplayName>etiennebaudoux</PublisherDisplayName>
- <Logo>Assets\StoreLogo.png</Logo>
- </Properties>
-
- <Dependencies>
- <TargetDeviceFamily Name="Windows.Universal"
- MinVersion="10.0.0.0"
- MaxVersionTested="10.0.0.0" />
- </Dependencies>
-
- <Resources>
- <Resource Language="x-generate" />
- </Resources>
-
- <Applications>
- <Application Id="App"
- Executable="$targetnametoken$.exe"
- EntryPoint="DevToys.App">
- <uap:VisualElements DisplayName="DevToys.UWP.Core"
- Square150x150Logo="Assets\Square150x150Logo.png"
- Square44x44Logo="Assets\Square44x44Logo.png"
- Description="DevToys.UWP.Core"
- BackgroundColor="transparent">
- <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
- <uap:SplashScreen Image="Assets\SplashScreen.png" />
- </uap:VisualElements>
- </Application>
- </Applications>
-</Package>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Properties/Default.rd.xml b/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Properties/Default.rd.xml
deleted file mode 100644
index 773ff1aaa..000000000
--- a/src/app/dev/platforms/desktop/windows/DevToys.UWP.Core/Properties/Default.rd.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
- developers. However, you can modify these parameters to modify the behavior of the .NET Native
- optimizer.
-
- Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
-
- To fully enable reflection for App1.MyClass and all of its public/private members
- <Type Name="App1.MyClass" Dynamic="Required All"/>
-
- To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
- <TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
-
- Using the Namespace directive to apply reflection policy to all the types in a particular namespace
- <Namespace Name="DataClasses.ViewModels" Serialize="All" />
--->
-
-<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
- <Application>
- <!--
- An Assembly element with Name="*Application*" applies to all assemblies in
- the application package. The asterisks are not wildcards.
- -->
- <!-- <Assembly Name="*Application*" Dynamic="Required All" /> -->
-
- <!-- Add your application specific runtime directives here. -->
- <Namespace Name="DevToys" Dynamic="Required All" />
- <Namespace Name="System.IdentityModel.Tokens.Jwt" Dynamic="Required All"/>
- </Application>
-</Directives>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/DevToys.UWP.wapproj b/src/app/dev/platforms/desktop/windows/DevToys.UWP/DevToys.UWP.wapproj
deleted file mode 100644
index 9a907eeaf..000000000
--- a/src/app/dev/platforms/desktop/windows/DevToys.UWP/DevToys.UWP.wapproj
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|x86">
- <Configuration>Debug</Configuration>
- <Platform>x86</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x86">
- <Configuration>Release</Configuration>
- <Platform>x86</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|arm64">
- <Configuration>Debug</Configuration>
- <Platform>arm64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|arm64">
- <Configuration>Release</Configuration>
- <Platform>arm64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup>
- <WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
- </PropertyGroup>
- <Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
- <PropertyGroup>
- <ProjectGuid>34d966d5-5756-4192-b4ab-44ad6ff07cc5</ProjectGuid>
- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>
- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
- <DefaultLanguage>en-US</DefaultLanguage>
- <GenerateAppInstallerFile>False</GenerateAppInstallerFile>
- <AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
- <AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
- <DisableXbfLineInfo>False</DisableXbfLineInfo>
- <GenerateTestArtifacts>True</GenerateTestArtifacts>
- <AppxBundlePlatforms>x86|x64|arm64</AppxBundlePlatforms>
- <HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
- <AppxPackageDir>..\..\..\..\..\..\..\publish\MSIX\</AppxPackageDir>
- <AppxBundle>Always</AppxBundle>
- <UapAppxPackageBuildMode>StoreAndSideload</UapAppxPackageBuildMode>
- <AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
- <AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
- <EntryPointProjectUniqueName>..\DevToys.UWP.Core\DevToys.UWP.Core.csproj</EntryPointProjectUniqueName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
- <!-- Workaround to https://github.com/microsoft/microsoft-ui-xaml/issues/6195 -->
- <AppxUseHardlinksIfPossible>false</AppxUseHardlinksIfPossible>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="..\DevToys.UWP.Core\DevToys.UWP.Core.csproj" />
- </ItemGroup>
- <ItemGroup>
- <None Include="DevToys.Windows_TemporaryKey.pfx" />
- <Content Include="Images\SplashScreen.scale-200.png" />
- <Content Include="Images\LockScreenLogo.scale-200.png" />
- <Content Include="Images\Square150x150Logo.scale-200.png" />
- <Content Include="Images\Square44x44Logo.scale-200.png" />
- <Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
- <Content Include="Images\StoreLogo.png" />
- <Content Include="Images\Wide310x150Logo.scale-200.png" />
- </ItemGroup>
- <Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
- <ItemGroup>
- <AppxManifest Include="Package.appxmanifest">
- <SubType>Designer</SubType>
- </AppxManifest>
- </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/LockScreenLogo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/LockScreenLogo.scale-200.png
deleted file mode 100644
index 735f57adb..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/LockScreenLogo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/SplashScreen.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/SplashScreen.scale-200.png
deleted file mode 100644
index 023e7f1fe..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/SplashScreen.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square150x150Logo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square150x150Logo.scale-200.png
deleted file mode 100644
index af49fec1a..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square150x150Logo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square44x44Logo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square44x44Logo.scale-200.png
deleted file mode 100644
index ce342a2ec..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square44x44Logo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square44x44Logo.targetsize-24_altform-unplated.png
deleted file mode 100644
index f6c02ce97..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/StoreLogo.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/StoreLogo.png
deleted file mode 100644
index 7385b56c0..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/StoreLogo.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Wide310x150Logo.scale-200.png b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Wide310x150Logo.scale-200.png
deleted file mode 100644
index 288995b39..000000000
Binary files a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Images/Wide310x150Logo.scale-200.png and /dev/null differ
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Package.appxmanifest b/src/app/dev/platforms/desktop/windows/DevToys.UWP/Package.appxmanifest
deleted file mode 100644
index 4de8ec79a..000000000
--- a/src/app/dev/platforms/desktop/windows/DevToys.UWP/Package.appxmanifest
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-
-<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
- xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
- xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
- xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4"
- xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
- xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
- xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
- xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
- IgnorableNamespaces="uap uap4 uap5 mp rescap desktop desktop4">
-
- <!-- Please DO NOT commit changes on the version number below unless you're about to release a new version of the app on the Store. -->
- <Identity Name="DevToysPreview"
- Publisher="CN=ebaud"
- Version="0.0.0.0" />
-
- <Properties>
- <DisplayName>DevToys - Preview</DisplayName>
- <PublisherDisplayName>etiennebaudoux</PublisherDisplayName>
- <Logo>Images\StoreLogo.png</Logo>
- </Properties>
-
- <Dependencies>
- <TargetDeviceFamily Name="Windows.Universal"
- MinVersion="10.0.0.0"
- MaxVersionTested="10.0.0.0" />
- <TargetDeviceFamily Name="Windows.Desktop"
- MinVersion="10.0.14393.0"
- MaxVersionTested="10.0.14393.0" />
- </Dependencies>
-
- <Resources>
- <Resource Language="x-generate" />
- </Resources>
-
- <Applications>
- <Application Id="App"
- Executable="$targetnametoken$.exe"
- EntryPoint="$targetentrypoint$">
- <uap:VisualElements DisplayName="DevToys.UWP"
- Description="DevToys.UWP"
- BackgroundColor="transparent"
- Square150x150Logo="Images\Square150x150Logo.png"
- Square44x44Logo="Images\Square44x44Logo.png">
- <uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" />
- <uap:SplashScreen Image="Images\SplashScreen.png" />
- </uap:VisualElements>
- </Application>
- </Applications>
-
- <Capabilities>
- <rescap:Capability Name="runFullTrust" />
- </Capabilities>
-</Package>
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/DevToys.Wasdk.csproj b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/DevToys.Wasdk.csproj
index 5aea52cf3..7894ba3c1 100644
--- a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/DevToys.Wasdk.csproj
+++ b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/DevToys.Wasdk.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(NetCoreWindows)</TargetFramework>
- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
+ <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>DevToys.Wasdk</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<UseWinUI>true</UseWinUI>
@@ -10,13 +10,35 @@
<DefineConstants>$(DefineConstants);__WINDOWS__</DefineConstants>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-arm64;win10-x64;win10-x86</RuntimeIdentifiers>
+ <PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<WinUISDKReferences>false</WinUISDKReferences>
- <WindowsPackageType>None</WindowsPackageType>
<SelfContained>true</SelfContained>
+ <AppxPackage>true</AppxPackage>
+
+ <!-- Uncomment this line temporarily if you want to debug the Unpackaged build. -->
+ <!-- <Unpackaged>true</Unpackaged> -->
+ </PropertyGroup>
+
+ <!-- Only for Unpackaged deployment -->
+ <PropertyGroup Condition="'$(Unpackaged)' == 'true'">
+ <WindowsPackageType>None</WindowsPackageType>
<AppxPackage>false</AppxPackage>
</PropertyGroup>
+ <!-- Only for Packaged deployment -->
+ <PropertyGroup Condition="'$(Unpackaged)' != 'true'">
+ <GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
+ <PublishAppxPackage>True</PublishAppxPackage>
+ <AppxBundlePlatforms>x86|x64|arm64</AppxBundlePlatforms>
+ <UapAppxPackageBuildMode>SideloadOnly</UapAppxPackageBuildMode>
+ <AppxBundle>Always</AppxBundle>
+ <AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
+ <GenerateTestArtifacts>True</GenerateTestArtifacts>
+ <GenerateAppInstallerFile>False</GenerateAppInstallerFile>
+ <AppxPackageDir>$(RepoRoot)publish\AppPackages\$(Platform)</AppxPackageDir>
+ </PropertyGroup>
+
<PropertyGroup Condition="'$(RuntimeIdentifierOverride)' != ''">
<RuntimeIdentifier>$(RuntimeIdentifierOverride)</RuntimeIdentifier>
</PropertyGroup>
@@ -66,5 +88,5 @@
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
</PropertyGroup>
- <Import Project="..\..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems" Label="Shared" />
+ <Import Project="$(RepoRoot)\src\app\dev\shared\App.props" />
</Project>
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Package.appxmanifest b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Package.appxmanifest
index 290552df9..429c2d890 100644
--- a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Package.appxmanifest
+++ b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Package.appxmanifest
@@ -7,7 +7,7 @@
IgnorableNamespaces="uap rescap">
<!-- Please DO NOT commit changes on the version number below unless you're about to release a new version of the app on the Store. -->
- <Identity Name="DevToysWasdk"
+ <Identity Name="DevToysPreview"
Publisher="CN=ebaud"
Version="0.0.0.0" />
@@ -18,8 +18,8 @@
</Properties>
<Dependencies>
- <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
- <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
+ <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.18362.0" MaxVersionTested="10.0.19041.0" />
+ <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.18362.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-arm64.pubxml b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-arm64.pubxml
new file mode 100644
index 000000000..a7fdd16b6
--- /dev/null
+++ b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-arm64.pubxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121.
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <PublishProtocol>FileSystem</PublishProtocol>
+ <Platform>ARM64</Platform>
+ <RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
+ <PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
+ <SelfContained>true</SelfContained>
+ <PublishSingleFile>False</PublishSingleFile>
+ <PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
+ <PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
+ <!--
+ See https://github.com/microsoft/CsWinRT/issues/373
+ <PublishTrimmed>True</PublishTrimmed>
+ -->
+ </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-x64.pubxml b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-x64.pubxml
new file mode 100644
index 000000000..26ea7e55c
--- /dev/null
+++ b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-x64.pubxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121.
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <PublishProtocol>FileSystem</PublishProtocol>
+ <Platform>x64</Platform>
+ <RuntimeIdentifier>win10-x64</RuntimeIdentifier>
+ <PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
+ <SelfContained>true</SelfContained>
+ <PublishSingleFile>False</PublishSingleFile>
+ <PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
+ <PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
+ <!--
+ See https://github.com/microsoft/CsWinRT/issues/373
+ <PublishTrimmed>True</PublishTrimmed>
+ -->
+ </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-x86.pubxml b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-x86.pubxml
new file mode 100644
index 000000000..34d14d4d4
--- /dev/null
+++ b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/PublishProfiles/win10-x86.pubxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121.
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <PublishProtocol>FileSystem</PublishProtocol>
+ <Platform>x86</Platform>
+ <RuntimeIdentifier>win10-x86</RuntimeIdentifier>
+ <PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
+ <SelfContained>true</SelfContained>
+ <PublishSingleFile>False</PublishSingleFile>
+ <PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
+ <PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
+ <!--
+ See https://github.com/microsoft/CsWinRT/issues/373
+ <PublishTrimmed>True</PublishTrimmed>
+ -->
+ </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/launchSettings.json b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/launchSettings.json
index 846e935fd..75fc71509 100644
--- a/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/launchSettings.json
+++ b/src/app/dev/platforms/desktop/windows/DevToys.Wasdk/Properties/launchSettings.json
@@ -1,10 +1,11 @@
{
"profiles": {
- //"DevToys.Wasdk (Package)": {
- // "commandName": "MsixPackage"
- //},
- "DevToys.Wasdk (Unpackaged)": {
- "commandName": "Project"
- }
+ "DevToys.Wasdk (Package)": {
+ "commandName": "MsixPackage"
+ },
+ // If you want to run an Unpackaged build from your IDE, make sure to also set Unpackage to True in the CSPROJ.
+ //"DevToys.Wasdk (Unpackaged)": {
+ // "commandName": "Project"
+ //}
}
}
\ No newline at end of file
diff --git a/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj b/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj
index b3743d7ff..b8997f519 100644
--- a/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj
+++ b/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj
@@ -62,5 +62,6 @@
<ProjectReference Include="..\..\..\DevToys.UI.Framework\DevToys.UI.Framework.csproj" />
<ProjectReference Include="..\..\..\DevToys.UI\DevToys.UI.csproj" />
</ItemGroup>
- <Import Project="..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems" Label="Shared" Condition="Exists('..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems')" />
+
+ <Import Project="$(RepoRoot)\src\app\dev\shared\App.props" />
</Project>
\ No newline at end of file
diff --git a/src/app/dev/shared/App.props b/src/app/dev/shared/App.props
new file mode 100644
index 000000000..2f0815a2f
--- /dev/null
+++ b/src/app/dev/shared/App.props
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+ <ItemGroup>
+ <None Include="$(MSBuildThisFileDirectory)App.xaml" />
+ <ApplicationDefinition
+ Include="$(MSBuildThisFileDirectory)App.xaml"
+ SubType="Designer"
+ XamlRuntime="WinUI"
+ Generator="MSBuild:Compile"
+ Link="App.xaml" />
+ <Compile
+ Include="$(MSBuildThisFileDirectory)App.xaml.cs"
+ XamlRuntime="WinUI"
+ DependentUpon="App.xaml"
+ Link="App.xaml.cs" />
+ </ItemGroup>
+</Project>
diff --git a/src/app/dev/DevToys.UI.EntryPoint/App.xaml b/src/app/dev/shared/App.xaml
similarity index 100%
rename from src/app/dev/DevToys.UI.EntryPoint/App.xaml
rename to src/app/dev/shared/App.xaml
diff --git a/src/app/dev/DevToys.UI.EntryPoint/App.xaml.cs b/src/app/dev/shared/App.xaml.cs
similarity index 94%
rename from src/app/dev/DevToys.UI.EntryPoint/App.xaml.cs
rename to src/app/dev/shared/App.xaml.cs
index e8a041c88..0b69cfc69 100644
--- a/src/app/dev/DevToys.UI.EntryPoint/App.xaml.cs
+++ b/src/app/dev/shared/App.xaml.cs
@@ -4,19 +4,10 @@ using Microsoft.Extensions.Logging;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.ApplicationModel.Core;
-
-#if WINDOWS_UWP
-#nullable enable
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Navigation;
-using LaunchActivatedEventArgs = Windows.ApplicationModel.Activation.LaunchActivatedEventArgs;
-#else
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Navigation;
using LaunchActivatedEventArgs = Microsoft.UI.Xaml.LaunchActivatedEventArgs;
-#endif
namespace DevToys;
@@ -35,10 +26,6 @@ public sealed partial class App : Application
{
InitializeLogging();
- // Set the language of the app for startup. By default, it's the same than Windows, or english.
- // The language defined by the user will be applied later, once MEF is loaded, but before the UI shows up.
- LanguageManager.Instance.SetCurrentCulture(LanguageManager.Instance.AvailableLanguages[0]);
-
this.InitializeComponent();
#if HAS_UNO || NETFX_CORE
@@ -59,11 +46,14 @@ public sealed partial class App : Application
// this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
+ // Set the language of the app for startup. By default, it's the same than Windows, or english.
+ // The language defined by the user will be applied later, once MEF is loaded, but before the UI shows up.
+ LanguageManager.Instance.SetCurrentCulture(LanguageManager.Instance.AvailableLanguages[0]);
#if NET6_0_OR_GREATER && WINDOWS && !HAS_UNO
_window = new Window();
_window.Activate();
-#elif __MAC__
+#elif __MACCATALYST__
// Important! Keep the full name `Microsoft.UI.Xaml.Window.Current` otherwise the Mac app won't build.
// See https://blog.mzikmund.com/2020/04/resolving-uno-platform-uiwindow-does-not-contain-a-definition-for-current-issue/
_window = Microsoft.UI.Xaml.Window.Current;
@@ -71,11 +61,7 @@ public sealed partial class App : Application
_window = Window.Current;
#endif
-#if WINDOWS_UWP
- LaunchActivatedEventArgs uwpArgs = args;
-#else
Windows.ApplicationModel.Activation.LaunchActivatedEventArgs uwpArgs = args.UWPLaunchActivatedEventArgs;
-#endif
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
@@ -95,15 +81,15 @@ public sealed partial class App : Application
_window.Content = rootFrame;
}
+#if __WINDOWS__
+ // On Windows 10 version 1607 or later, this code signals that this app wants to participate in prelaunch
+ CoreApplication.EnablePrelaunch(true);
+#endif
+
#if !(NET6_0_OR_GREATER && WINDOWS)
if (uwpArgs.PrelaunchActivated == false)
#endif
{
-#if WINDOWS_UWP
- // On Windows 10 version 1607 or later, this code signals that this app wants to participate in prelaunch
- CoreApplication.EnablePrelaunch(true);
-#endif
-
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
diff --git a/src/app/dev/shared/GlobalUsings.cs b/src/app/dev/shared/GlobalUsings.cs
index b4dc6b866..e6b5503da 100644
--- a/src/app/dev/shared/GlobalUsings.cs
+++ b/src/app/dev/shared/GlobalUsings.cs
@@ -9,7 +9,7 @@ global using global::System.Threading;
global using global::System.Threading.Tasks;
global using ExportAttribute = global::System.ComponentModel.Composition.ExportAttribute;
-#if __MAC__
+#if __MACCATALYST__
[assembly: System.Runtime.Versioning.SupportedOSPlatform("ios14.0")] // MacCatalyst is a superset of iOS, therefore it's also supported.
#elif __WINDOWS__
[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows10.0.19041.0")]
diff --git a/src/build/Build.cs b/src/build/Build.cs
index 45c9b521d..d487be4bd 100644
--- a/src/build/Build.cs
+++ b/src/build/Build.cs
@@ -125,34 +125,10 @@ class Build : NukeBuild
{
if (PlatformTargets!.Contains(PlatformTarget.Windows))
{
- // DevToys UWP
- RootDirectory
- .GlobFiles("**/*.wapproj")
- .ForEach(f =>
- {
- Log.Information($"Building {f}...");
- MSBuild(s => s
- .SetTargetPath(f)
- .SetConfiguration(Configuration)
- .SetTargets("Build")
- .AddProperty("AppxBundlePlatforms", "x86|x64|arm64")
- .AddProperty("AppxPackageDir", RootDirectory / "publish" / "MSIX")
- .AddProperty("AppxPackageSigningEnabled", false)
- .AddProperty("AppxSymbolPackageEnabled", true)
- .AddProperty("AppxBundle", "Always")
- .AddProperty("UapAppxPackageBuildMode", "StoreUpload")
- .SetProcessArgumentConfigurator(_ => _.Add($"/bl:\"{RootDirectory / "bin" / "msbuild.binlog"}\""))
- .SetVerbosity(MSBuildVerbosity.Quiet)
- .SetMaxCpuCount(1)
- .EnableRestore()
- // This is dummy but necessary otherwise MSBuild tries to use Any CPU, which doesn't work for UWP.
- .SetTargetPlatform(MSBuildTargetPlatform.x86));
- });
-
// DevToys MAUI Blazor
foreach (DotnetParameters dotnetParameters in GetDotnetParametersForMauiBlazorApp())
{
- Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + "-" + dotnetParameters.TargetFramework + "-" + dotnetParameters.RuntimeIdentifier}...");
+ Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + " - " + dotnetParameters.TargetFramework + " - " + dotnetParameters.RuntimeIdentifier} ...");
DotNetPublish(s => s
.SetProject(dotnetParameters.ProjectOrSolutionPath)
.SetConfiguration(Configuration)
@@ -171,7 +147,7 @@ class Build : NukeBuild
// DevToys WASDK
foreach (DotnetParameters dotnetParameters in GetDotnetParametersForWasdkApp())
{
- Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + "-" + dotnetParameters.TargetFramework + "-" + dotnetParameters.RuntimeIdentifier}...");
+ Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + " - " + dotnetParameters.TargetFramework + " - " + dotnetParameters.RuntimeIdentifier + (dotnetParameters.Portable ? "-Portable" : string.Empty)} ...");
DotNetPublish(s => s
.SetProject(dotnetParameters.ProjectOrSolutionPath)
.SetConfiguration(Configuration)
@@ -184,7 +160,8 @@ class Build : NukeBuild
.SetPublishTrimmed(false) // TODO?
.SetVerbosity(DotNetVerbosity.Quiet)
.SetProcessArgumentConfigurator(_ => _
- .Add("/p:RuntimeIdentifierOverride=" + dotnetParameters.RuntimeIdentifier))
+ .Add("/p:RuntimeIdentifierOverride=" + dotnetParameters.RuntimeIdentifier)
+ .Add("/p:Unpackaged=" + dotnetParameters.Portable))
.SetOutput(RootDirectory / "publish" / dotnetParameters.OutputPath));
}
}
@@ -201,7 +178,7 @@ class Build : NukeBuild
{
foreach (DotnetParameters dotnetParameters in GetDotnetParametersForMauiBlazorApp())
{
- Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + "-" + dotnetParameters.TargetFramework + "-" + dotnetParameters.RuntimeIdentifier}...");
+ Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + " - " + dotnetParameters.TargetFramework + " - " + dotnetParameters.RuntimeIdentifier} ...");
DotNetBuild(s => s
.SetProjectFile(dotnetParameters.ProjectOrSolutionPath)
.SetConfiguration(Configuration)
@@ -223,7 +200,7 @@ class Build : NukeBuild
// DevToys CLI
foreach (DotnetParameters dotnetParameters in GetDotnetParametersForCliApp())
{
- Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + "-" + dotnetParameters.TargetFramework + "-" + dotnetParameters.RuntimeIdentifier}...");
+ Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + " - " + dotnetParameters.TargetFramework + " - " + dotnetParameters.RuntimeIdentifier} ...");
DotNetPublish(s => s
.SetProject(dotnetParameters.ProjectOrSolutionPath)
.SetConfiguration(Configuration)
@@ -287,6 +264,10 @@ class Build : NukeBuild
project = WindowsSolution!.GetProject(publishProject);
foreach (string targetFramework in project.GetTargetFrameworks())
{
+ yield return new DotnetParameters(project.Path, "win10-arm64", targetFramework, portable: false, platform: "arm64");
+ yield return new DotnetParameters(project.Path, "win10-x64", targetFramework, portable: false, platform: "x64");
+ yield return new DotnetParameters(project.Path, "win10-x86", targetFramework, portable: false, platform: "x86");
+
yield return new DotnetParameters(project.Path, "win10-arm64", targetFramework, portable: true, platform: "arm64");
yield return new DotnetParameters(project.Path, "win10-x64", targetFramework, portable: true, platform: "x64");
yield return new DotnetParameters(project.Path, "win10-x86", targetFramework, portable: true, platform: "x86");