UWP .NET9 (#555)
* Ground work for NET9 UWP switch. * Add launch settings for Wino.Mail * Added new test WAP project * fix platforms in slnx solution * ManagePackageVersionsCentrally set default * Fixing assets and couple issues with the new packaging project. * Add back markdown * Fix nuget warnings * FIx error in WAP about build tools * Add build.props with default language preview * Some AOT compilation progress. * More AOT stuff. * Remove deprecated protocol auth activation handler. * Fix remaining protocol handler for google auth. * Even more AOT * More more AOT fixes * Fix a few more AOT warnings * Fix signature editor AOT * Fix composer and renderer AOT JSON * Outlook Sync AOT * Fixing bundle generation and package signing. --------- Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
This commit is contained in:
11
Wino.Core.Domain/BasicTypesJsonContext.cs
Normal file
11
Wino.Core.Domain/BasicTypesJsonContext.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Wino.Core.Domain;
|
||||
|
||||
[JsonSerializable(typeof(Dictionary<string, string>))]
|
||||
[JsonSerializable(typeof(string))]
|
||||
[JsonSerializable(typeof(int))]
|
||||
[JsonSerializable(typeof(List<string>))]
|
||||
[JsonSerializable(typeof(bool))]
|
||||
public partial class BasicTypesJsonContext : JsonSerializerContext;
|
||||
@@ -11,12 +11,6 @@ namespace Wino.Core.Domain.Interfaces
|
||||
Task LaunchFileAsync(string filePath);
|
||||
Task<bool> LaunchUriAsync(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes GetAuthorizationResponseUriAsync for current IAuthenticator.
|
||||
/// </summary>
|
||||
/// <param name="authorizationResponseUri"></param>
|
||||
void ContinueAuthorization(Uri authorizationResponseUri);
|
||||
|
||||
bool IsAppRunning();
|
||||
|
||||
string GetFullAppVersion();
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
{
|
||||
public interface IWinoSynchronizerFactory : IInitializeAsync
|
||||
{
|
||||
IBaseSynchronizer GetAccountSynchronizer(Guid accountId);
|
||||
IBaseSynchronizer CreateNewSynchronizer(MailAccount account);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace Wino.Core.Domain.Models.Accounts
|
||||
|
||||
public string Description { get; }
|
||||
|
||||
public string ProviderImage => $"ms-appx:///Wino.Core.UWP/Assets/Providers/{Type}.png";
|
||||
public string ProviderImage => $"/Wino.Core.UWP/Assets/Providers/{Type}.png";
|
||||
|
||||
public bool IsSupported => Type == MailProviderType.Outlook || Type == MailProviderType.Gmail || Type == MailProviderType.IMAP4;
|
||||
|
||||
|
||||
11
Wino.Core.Domain/Models/DomainModelsJsonContext.cs
Normal file
11
Wino.Core.Domain/Models/DomainModelsJsonContext.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
using Wino.Core.Domain.Models.Personalization;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Core.Domain.Models;
|
||||
|
||||
[JsonSerializable(typeof(AutoDiscoverySettings))]
|
||||
[JsonSerializable(typeof(CustomThemeMetadata))]
|
||||
[JsonSerializable(typeof(WebViewMessage))]
|
||||
public partial class DomainModelsJsonContext: JsonSerializerContext;
|
||||
@@ -10,12 +10,14 @@ namespace Wino.Core.Domain.Translations
|
||||
// Return the key itself in case of translation is not found.
|
||||
public string GetTranslatedString(string key) => TryGetValue(key, out string keyValue) ? keyValue : key;
|
||||
|
||||
public Stream GetLanguageStream(AppLanguage language)
|
||||
public static Stream GetLanguageStream(AppLanguage language)
|
||||
{
|
||||
var path = GetLanguageFileNameRelativePath(language);
|
||||
var executingAssembly = Assembly.GetExecutingAssembly();
|
||||
|
||||
string languageResourcePath = $"{executingAssembly.ManifestModule.Name.Replace(".dll", ".")}Translations.{path}.resources.json";
|
||||
// Use the assembly's name instead of the module name to construct the resource path
|
||||
string assemblyName = executingAssembly.GetName().Name;
|
||||
string languageResourcePath = $"{assemblyName}.Translations.{path}.resources.json";
|
||||
return executingAssembly.GetManifestResourceStream(languageResourcePath);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,88 +1,73 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Models\Communication\**" />
|
||||
<EmbeddedResource Remove="Models\Communication\**" />
|
||||
<None Remove="Models\Communication\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Interfaces\IWinoSynchronizerFactory.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Translations\ca_ES\resources.json" />
|
||||
<None Remove="Translations\cs_CZ\resources.json" />
|
||||
<None Remove="Translations\da_DK\resources.json" />
|
||||
<None Remove="Translations\el_GR\resources.json" />
|
||||
<None Remove="Translations\es_ES\resources.json" />
|
||||
<None Remove="Translations\fr_FR\resources.json" />
|
||||
<None Remove="Translations\id_ID\resources.json" />
|
||||
<None Remove="Translations\it_IT\resources.json" />
|
||||
<None Remove="Translations\ja_JP\resources.json" />
|
||||
<None Remove="Translations\nl_NL\resources.json" />
|
||||
<None Remove="Translations\pl_PL\resources.json" />
|
||||
<None Remove="Translations\pt_BR\resources.json" />
|
||||
<None Remove="Translations\ro_RO\resources.json" />
|
||||
<None Remove="Translations\ru_RU\resources.json" />
|
||||
<None Remove="Translations\uk_UA\resources.json" />
|
||||
<None Remove="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Translations\ca_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\cs_CZ\resources.json" />
|
||||
<EmbeddedResource Include="Translations\da_DK\resources.json" />
|
||||
<EmbeddedResource Include="Translations\el_GR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\en_US\resources.json" />
|
||||
<EmbeddedResource Include="Translations\de_DE\resources.json" />
|
||||
<EmbeddedResource Include="Translations\es_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\fr_FR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\id_ID\resources.json" />
|
||||
<EmbeddedResource Include="Translations\it_IT\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ja_JP\resources.json" />
|
||||
<EmbeddedResource Include="Translations\nl_NL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pl_PL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pt_BR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ro_RO\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ru_RU\resources.json" />
|
||||
<EmbeddedResource Include="Translations\tr_TR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\uk_UA\resources.json" />
|
||||
<EmbeddedResource Include="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.3.2" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
|
||||
<PackageReference Include="IsExternalInit" Version="1.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MimeKit" Version="4.9.0" />
|
||||
<PackageReference Include="MailKit" Version="4.9.0" />
|
||||
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.5" />
|
||||
<PackageReference Include="TimePeriodLibrary.NET" Version="2.1.5" />
|
||||
<Compile Remove="Models\Communication\**" />
|
||||
<EmbeddedResource Remove="Models\Communication\**" />
|
||||
<None Remove="Models\Communication\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
<None Remove="Translations\ca_ES\resources.json" />
|
||||
<None Remove="Translations\cs_CZ\resources.json" />
|
||||
<None Remove="Translations\da_DK\resources.json" />
|
||||
<None Remove="Translations\el_GR\resources.json" />
|
||||
<None Remove="Translations\es_ES\resources.json" />
|
||||
<None Remove="Translations\fr_FR\resources.json" />
|
||||
<None Remove="Translations\id_ID\resources.json" />
|
||||
<None Remove="Translations\it_IT\resources.json" />
|
||||
<None Remove="Translations\ja_JP\resources.json" />
|
||||
<None Remove="Translations\nl_NL\resources.json" />
|
||||
<None Remove="Translations\pl_PL\resources.json" />
|
||||
<None Remove="Translations\pt_BR\resources.json" />
|
||||
<None Remove="Translations\ro_RO\resources.json" />
|
||||
<None Remove="Translations\ru_RU\resources.json" />
|
||||
<None Remove="Translations\uk_UA\resources.json" />
|
||||
<None Remove="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Translations\ca_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\cs_CZ\resources.json" />
|
||||
<EmbeddedResource Include="Translations\da_DK\resources.json" />
|
||||
<EmbeddedResource Include="Translations\el_GR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\en_US\resources.json" />
|
||||
<EmbeddedResource Include="Translations\de_DE\resources.json" />
|
||||
<EmbeddedResource Include="Translations\es_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\fr_FR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\id_ID\resources.json" />
|
||||
<EmbeddedResource Include="Translations\it_IT\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ja_JP\resources.json" />
|
||||
<EmbeddedResource Include="Translations\nl_NL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pl_PL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pt_BR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ro_RO\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ru_RU\resources.json" />
|
||||
<EmbeddedResource Include="Translations\tr_TR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\uk_UA\resources.json" />
|
||||
<EmbeddedResource Include="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="MimeKit" />
|
||||
<PackageReference Include="MailKit" />
|
||||
<PackageReference Include="sqlite-net-pcl" />
|
||||
<PackageReference Include="System.Text.Json" />
|
||||
<PackageReference Include="TimePeriodLibrary.NET" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="Translations\en_US\resources.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Source Generators -->
|
||||
<ProjectReference Include="..\Wino.SourceGenerators\Wino.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user