diff --git a/App/App.csproj b/App/App.csproj index bd36f38..ca3d3c9 100644 --- a/App/App.csproj +++ b/App/App.csproj @@ -17,6 +17,8 @@ preview DISABLE_XAML_GENERATED_MAIN;DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION + + 0.1.0.0 Coder Desktop Coder Desktop @@ -24,6 +26,7 @@ Coder Desktop © Coder Technologies Inc. coder.ico + false diff --git a/App/Assets/coder_icon_32_dark.ico b/App/Assets/coder_icon_32_dark.ico index 4eaa1bb..dd68b83 100644 Binary files a/App/Assets/coder_icon_32_dark.ico and b/App/Assets/coder_icon_32_dark.ico differ diff --git a/App/Assets/coder_icon_32_light.ico b/App/Assets/coder_icon_32_light.ico index 1fc307f..f4dc2a8 100644 Binary files a/App/Assets/coder_icon_32_light.ico and b/App/Assets/coder_icon_32_light.ico differ diff --git a/App/ViewModels/UpdaterUpdateAvailableViewModel.cs b/App/ViewModels/UpdaterUpdateAvailableViewModel.cs index 9fd6dd9..4d3c692 100644 --- a/App/ViewModels/UpdaterUpdateAvailableViewModel.cs +++ b/App/ViewModels/UpdaterUpdateAvailableViewModel.cs @@ -4,10 +4,12 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using Coder.Desktop.App.Services; using CommunityToolkit.Mvvm.ComponentModel; using Microsoft.Extensions.Logging; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; +using Microsoft.Web.WebView2.Core; using NetSparkleUpdater; using NetSparkleUpdater.Enums; using NetSparkleUpdater.Events; @@ -174,8 +176,18 @@ public async Task Changelog_Loaded(object sender, RoutedEventArgs e) if (sender is not WebView2 webView) return; - // Start the engine. - await webView.EnsureCoreWebView2Async(); + // Start the engine with a custom user data folder. The default for + // unpackaged WinUI 3 apps is to write to a subfolder in the app's + // install directory, which is Program Files by default and not + // writeable by the user. + var userDataFolder = Path.Join(SettingsManagerUtils.AppSettingsDirectory(), "WebView2"); + _logger.LogDebug("Creating WebView2 user data folder at {UserDataFolder}", userDataFolder); + Directory.CreateDirectory(userDataFolder); + var env = await CoreWebView2Environment.CreateWithOptionsAsync( + null, + userDataFolder, + new CoreWebView2EnvironmentOptions()); + await webView.EnsureCoreWebView2Async(env); // Disable unwanted features. var settings = webView.CoreWebView2.Settings; diff --git a/App/coder.ico b/App/coder.ico index e13ad3b..b80bdc2 100644 Binary files a/App/coder.ico and b/App/coder.ico differ diff --git a/Vpn.Service/coder.ico b/Vpn.Service/coder.ico index e13ad3b..b80bdc2 100644 Binary files a/Vpn.Service/coder.ico and b/Vpn.Service/coder.ico differ diff --git a/scripts/files/logo.png b/scripts/files/logo.png index 7d87306..bdb8b9b 100644 Binary files a/scripts/files/logo.png and b/scripts/files/logo.png differ