From 492043b32802faa7c01fbbd506186edff57701ea Mon Sep 17 00:00:00 2001 From: webmaster442 Date: Fri, 22 Sep 2023 22:26:57 +0200 Subject: [PATCH 01/57] Set target framework to .NET 8 --- Libs/BookGen.Api/BookGen.Api.csproj | 2 +- .../BookGen.AssemblyDocumenter.csproj | 2 +- Libs/BookGen.Cli/BookGen.Cli.csproj | 2 +- Libs/BookGen.Contents/BookGen.Contents.csproj | 2 +- Libs/BookGen.Domain/BookGen.Domain.csproj | 2 +- Libs/BookGen.DomainServices/BookGen.DomainServices.csproj | 2 +- Libs/BookGen.Gui/BookGen.Gui.csproj | 2 +- Libs/BookGen.Interfaces/BookGen.Interfaces.csproj | 2 +- Libs/BookGen.Native/BookGen.Native.csproj | 2 +- Libs/BookGen.RakeEngine/BookGen.RakeEngine.csproj | 2 +- Libs/BookGen.Resources/BookGen.Resources.csproj | 2 +- .../Webmaster442.HttpServerFramework.csproj | 6 +++--- Prog/BookGen.Launcher/BookGen.Launcher.csproj | 2 +- Prog/BookGen.ShellHelper/BookGen.ShellHelper.csproj | 2 +- Prog/BookGen.Update/BookGen.Update.csproj | 2 +- Prog/BookGen/BookGen.csproj | 8 ++++---- Prog/Cdg/Cdg.csproj | 2 +- Test/BookGen.Tests/BookGen.Tests.csproj | 4 ++-- Test/BookGen.TestsSystem/BookGen.TestsSystem.csproj | 4 ++-- 19 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Libs/BookGen.Api/BookGen.Api.csproj b/Libs/BookGen.Api/BookGen.Api.csproj index 0e7bd8d9..07854d83 100644 --- a/Libs/BookGen.Api/BookGen.Api.csproj +++ b/Libs/BookGen.Api/BookGen.Api.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 ..\..\bin\$(Configuration)\ enable enable diff --git a/Libs/BookGen.AssemblyDocumenter/BookGen.AssemblyDocumenter.csproj b/Libs/BookGen.AssemblyDocumenter/BookGen.AssemblyDocumenter.csproj index b98e2a16..58ae3ddb 100644 --- a/Libs/BookGen.AssemblyDocumenter/BookGen.AssemblyDocumenter.csproj +++ b/Libs/BookGen.AssemblyDocumenter/BookGen.AssemblyDocumenter.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 Ruzsinszki Gábor enable enable diff --git a/Libs/BookGen.Cli/BookGen.Cli.csproj b/Libs/BookGen.Cli/BookGen.Cli.csproj index 3c839d92..db7d2ced 100644 --- a/Libs/BookGen.Cli/BookGen.Cli.csproj +++ b/Libs/BookGen.Cli/BookGen.Cli.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/Libs/BookGen.Contents/BookGen.Contents.csproj b/Libs/BookGen.Contents/BookGen.Contents.csproj index e33fdb9e..277388bf 100644 --- a/Libs/BookGen.Contents/BookGen.Contents.csproj +++ b/Libs/BookGen.Contents/BookGen.Contents.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable ..\..\bin\$(Configuration)\ diff --git a/Libs/BookGen.Domain/BookGen.Domain.csproj b/Libs/BookGen.Domain/BookGen.Domain.csproj index 437bdb0e..0cb70da5 100644 --- a/Libs/BookGen.Domain/BookGen.Domain.csproj +++ b/Libs/BookGen.Domain/BookGen.Domain.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable ..\..\bin\$(Configuration)\ diff --git a/Libs/BookGen.DomainServices/BookGen.DomainServices.csproj b/Libs/BookGen.DomainServices/BookGen.DomainServices.csproj index afc3b236..be7f4abb 100644 --- a/Libs/BookGen.DomainServices/BookGen.DomainServices.csproj +++ b/Libs/BookGen.DomainServices/BookGen.DomainServices.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable ..\..\bin\$(Configuration)\ diff --git a/Libs/BookGen.Gui/BookGen.Gui.csproj b/Libs/BookGen.Gui/BookGen.Gui.csproj index 6b9da2eb..409420b9 100644 --- a/Libs/BookGen.Gui/BookGen.Gui.csproj +++ b/Libs/BookGen.Gui/BookGen.Gui.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable ..\..\bin\$(Configuration)\ enable diff --git a/Libs/BookGen.Interfaces/BookGen.Interfaces.csproj b/Libs/BookGen.Interfaces/BookGen.Interfaces.csproj index 20f44a3a..e903c55f 100644 --- a/Libs/BookGen.Interfaces/BookGen.Interfaces.csproj +++ b/Libs/BookGen.Interfaces/BookGen.Interfaces.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable ..\..\bin\$(Configuration)\ diff --git a/Libs/BookGen.Native/BookGen.Native.csproj b/Libs/BookGen.Native/BookGen.Native.csproj index 322b69cd..51792905 100644 --- a/Libs/BookGen.Native/BookGen.Native.csproj +++ b/Libs/BookGen.Native/BookGen.Native.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable ..\..\bin\$(Configuration)\ diff --git a/Libs/BookGen.RakeEngine/BookGen.RakeEngine.csproj b/Libs/BookGen.RakeEngine/BookGen.RakeEngine.csproj index 7f5b561e..9b2a3b12 100644 --- a/Libs/BookGen.RakeEngine/BookGen.RakeEngine.csproj +++ b/Libs/BookGen.RakeEngine/BookGen.RakeEngine.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable ..\..\bin\$(Configuration)\ diff --git a/Libs/BookGen.Resources/BookGen.Resources.csproj b/Libs/BookGen.Resources/BookGen.Resources.csproj index cd2790e9..01bcec2d 100644 --- a/Libs/BookGen.Resources/BookGen.Resources.csproj +++ b/Libs/BookGen.Resources/BookGen.Resources.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 BookGen ..\..\bin\$(Configuration)\ enable diff --git a/Libs/Webmaster442.HttpServerFramework/Webmaster442.HttpServerFramework.csproj b/Libs/Webmaster442.HttpServerFramework/Webmaster442.HttpServerFramework.csproj index aeefeeb8..e2483a0c 100644 --- a/Libs/Webmaster442.HttpServerFramework/Webmaster442.HttpServerFramework.csproj +++ b/Libs/Webmaster442.HttpServerFramework/Webmaster442.HttpServerFramework.csproj @@ -1,15 +1,15 @@  - net7.0 + net8.0 enable enable ..\..\bin\$(Configuration)\ bin\$(Configuration)\Webmaster442.HttpServer.xml ;NU1605;CS1591 false - 7.0.0.0 - 7.0.0.0 + 8.0.0.0 + 8.0.0.0 diff --git a/Prog/BookGen.Launcher/BookGen.Launcher.csproj b/Prog/BookGen.Launcher/BookGen.Launcher.csproj index b1c678a8..b595cf9c 100644 --- a/Prog/BookGen.Launcher/BookGen.Launcher.csproj +++ b/Prog/BookGen.Launcher/BookGen.Launcher.csproj @@ -2,7 +2,7 @@ WinExe - net7.0-windows + net8.0-windows enable true ..\..\Icon.ico diff --git a/Prog/BookGen.ShellHelper/BookGen.ShellHelper.csproj b/Prog/BookGen.ShellHelper/BookGen.ShellHelper.csproj index 56507182..703a95cc 100644 --- a/Prog/BookGen.ShellHelper/BookGen.ShellHelper.csproj +++ b/Prog/BookGen.ShellHelper/BookGen.ShellHelper.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable ..\..\Icon.ico ..\..\bin\$(Configuration)\ diff --git a/Prog/BookGen.Update/BookGen.Update.csproj b/Prog/BookGen.Update/BookGen.Update.csproj index bacf7640..11433ef5 100644 --- a/Prog/BookGen.Update/BookGen.Update.csproj +++ b/Prog/BookGen.Update/BookGen.Update.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable ..\..\Icon.ico diff --git a/Prog/BookGen/BookGen.csproj b/Prog/BookGen/BookGen.csproj index 191bcb67..bbbf47a7 100644 --- a/Prog/BookGen/BookGen.csproj +++ b/Prog/BookGen/BookGen.csproj @@ -1,7 +1,7 @@ Exe - net7.0 + net8.0 enable Exe BookGen @@ -35,15 +35,15 @@ - + - + - + diff --git a/Prog/Cdg/Cdg.csproj b/Prog/Cdg/Cdg.csproj index 7d3ae1b0..7efd5976 100644 --- a/Prog/Cdg/Cdg.csproj +++ b/Prog/Cdg/Cdg.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable ..\..\Icon.ico diff --git a/Test/BookGen.Tests/BookGen.Tests.csproj b/Test/BookGen.Tests/BookGen.Tests.csproj index a1ffe375..04a6e03c 100644 --- a/Test/BookGen.Tests/BookGen.Tests.csproj +++ b/Test/BookGen.Tests/BookGen.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 True false ..\..\bin\Tests\UT\$(Configuration) @@ -16,7 +16,7 @@ - + all diff --git a/Test/BookGen.TestsSystem/BookGen.TestsSystem.csproj b/Test/BookGen.TestsSystem/BookGen.TestsSystem.csproj index eedd0f47..c3cd98a5 100644 --- a/Test/BookGen.TestsSystem/BookGen.TestsSystem.csproj +++ b/Test/BookGen.TestsSystem/BookGen.TestsSystem.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable false false @@ -19,7 +19,7 @@ - + From d261a4dcca9e6498da323a936dc7324f75c5757b Mon Sep 17 00:00:00 2001 From: webmaster442 Date: Fri, 22 Sep 2023 22:31:29 +0200 Subject: [PATCH 02/57] Launcher: Use .net 8 built-in open folder dialog --- Prog/BookGen.Launcher/BookGen.Launcher.csproj | 3 +-- .../Controls/BooleanToNegatedConverter.cs | 21 +++++++------------ Prog/BookGen.Launcher/Controls/Dialogs.cs | 12 +++++------ 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/Prog/BookGen.Launcher/BookGen.Launcher.csproj b/Prog/BookGen.Launcher/BookGen.Launcher.csproj index b595cf9c..f7d9b34a 100644 --- a/Prog/BookGen.Launcher/BookGen.Launcher.csproj +++ b/Prog/BookGen.Launcher/BookGen.Launcher.csproj @@ -1,4 +1,4 @@ - + WinExe @@ -37,7 +37,6 @@ - diff --git a/Prog/BookGen.Launcher/Controls/BooleanToNegatedConverter.cs b/Prog/BookGen.Launcher/Controls/BooleanToNegatedConverter.cs index fa8914da..1196e261 100644 --- a/Prog/BookGen.Launcher/Controls/BooleanToNegatedConverter.cs +++ b/Prog/BookGen.Launcher/Controls/BooleanToNegatedConverter.cs @@ -6,23 +6,18 @@ namespace BookGen.Launcher.Controls; internal sealed class BooleanToNegatedConverter : MarkupExtension, IValueConverter { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + private static object Negate(object value) { - if (value is bool b) - { - return !b; - } - return Binding.DoNothing; + return value is bool b + ? !b + : Binding.DoNothing; } + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + => Negate(value); + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is bool b) - { - return !b; - } - return Binding.DoNothing; - } + => Negate(value); public override object ProvideValue(IServiceProvider serviceProvider) { diff --git a/Prog/BookGen.Launcher/Controls/Dialogs.cs b/Prog/BookGen.Launcher/Controls/Dialogs.cs index 9ca035bc..420db939 100644 --- a/Prog/BookGen.Launcher/Controls/Dialogs.cs +++ b/Prog/BookGen.Launcher/Controls/Dialogs.cs @@ -1,23 +1,23 @@ //----------------------------------------------------------------------------- -// (c) 2021-2022 Ruzsinszki Gábor +// (c) 2021-2023 Ruzsinszki Gábor // This code is licensed under MIT license (see LICENSE for details) //----------------------------------------------------------------------------- +using Microsoft.Win32; + namespace BookGen.Launcher.Controls; internal static class Dialog { public static bool TryselectFolderDialog(out string folderPath) { - var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog + var dialog = new OpenFolderDialog { - Description = Properties.Resources.FolderselectDescription, - UseDescriptionForTitle = true, - ShowNewFolderButton = false, + Title = Properties.Resources.FolderselectDescription }; if (dialog.ShowDialog() == true) { - folderPath = dialog.SelectedPath; + folderPath = dialog.FolderName; return true; } else From 1f953ecf01385f59cc1a860544139af20e9de280 Mon Sep 17 00:00:00 2001 From: webmaster442 Date: Fri, 22 Sep 2023 22:33:31 +0200 Subject: [PATCH 03/57] GH action: Update to .NET 8 --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7c334eea..d2155a5e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build From 67f796236af881022866f409c13dd2ebb4b7bfe1 Mon Sep 17 00:00:00 2001 From: webmaster442 Date: Fri, 22 Sep 2023 23:24:34 +0200 Subject: [PATCH 04/57] Work on installer for iso release --- Bootstrappers/BookGen.Installer/App.xaml | 9 +++ Bootstrappers/BookGen.Installer/App.xaml.cs | 13 ++++ .../BookGen.Installer/AssemblyInfo.cs | 10 +++ .../BookGen.Installer.csproj | 9 +++ .../BookGen.Installer/MainWindow.xaml | 73 ++++++++++++++++++ .../BookGen.Installer/MainWindow.xaml.cs | 74 +++++++++++++++++++ Bootstrappers/Bootstrappers.sln | 21 ++++-- 7 files changed, 203 insertions(+), 6 deletions(-) create mode 100644 Bootstrappers/BookGen.Installer/App.xaml create mode 100644 Bootstrappers/BookGen.Installer/App.xaml.cs create mode 100644 Bootstrappers/BookGen.Installer/AssemblyInfo.cs create mode 100644 Bootstrappers/BookGen.Installer/BookGen.Installer.csproj create mode 100644 Bootstrappers/BookGen.Installer/MainWindow.xaml create mode 100644 Bootstrappers/BookGen.Installer/MainWindow.xaml.cs diff --git a/Bootstrappers/BookGen.Installer/App.xaml b/Bootstrappers/BookGen.Installer/App.xaml new file mode 100644 index 00000000..02fb1aea --- /dev/null +++ b/Bootstrappers/BookGen.Installer/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Bootstrappers/BookGen.Installer/App.xaml.cs b/Bootstrappers/BookGen.Installer/App.xaml.cs new file mode 100644 index 00000000..27c74271 --- /dev/null +++ b/Bootstrappers/BookGen.Installer/App.xaml.cs @@ -0,0 +1,13 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace BookGen.Installer +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} \ No newline at end of file diff --git a/Bootstrappers/BookGen.Installer/AssemblyInfo.cs b/Bootstrappers/BookGen.Installer/AssemblyInfo.cs new file mode 100644 index 00000000..cc29e7f7 --- /dev/null +++ b/Bootstrappers/BookGen.Installer/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Bootstrappers/BookGen.Installer/BookGen.Installer.csproj b/Bootstrappers/BookGen.Installer/BookGen.Installer.csproj new file mode 100644 index 00000000..a61fbaef --- /dev/null +++ b/Bootstrappers/BookGen.Installer/BookGen.Installer.csproj @@ -0,0 +1,9 @@ + + + + WinExe + net4.8 + true + + + diff --git a/Bootstrappers/BookGen.Installer/MainWindow.xaml b/Bootstrappers/BookGen.Installer/MainWindow.xaml new file mode 100644 index 00000000..377dfe31 --- /dev/null +++ b/Bootstrappers/BookGen.Installer/MainWindow.xaml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + +