diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Program.cs b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Program.cs index 8ee24dd66..75b07c0e6 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Program.cs +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Program.cs @@ -25,7 +25,6 @@ using System.IO; using System.Net; using Duplicati.Library.Interface; using Duplicati.Server; -using Microsoft.CodeAnalysis.CSharp.Syntax; namespace Duplicati.GUI.TrayIcon { @@ -118,7 +117,7 @@ namespace Duplicati.GUI.TrayIcon else throw; } - + // We have a hosted server, if this is the first run, // we should open the main page openui = Server.Program.IsFirstRun || Server.Program.ServerPortChanged; diff --git a/Duplicati/Server/webroot/ngclient/package-lock.json b/Duplicati/Server/webroot/ngclient/package-lock.json index 620acf21d..d3a4c45bc 100644 --- a/Duplicati/Server/webroot/ngclient/package-lock.json +++ b/Duplicati/Server/webroot/ngclient/package-lock.json @@ -15,7 +15,7 @@ "node_modules/@duplicati/ngclient": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/@duplicati/ngclient/-/ngclient-0.0.11.tgz", - "integrity": "sha512-J1Oy5IZ20i3vV6lAzON2FTouU3gancBpurRubtyb/gt9dEWmN5niqvfAuupiO2lb5gQxcifV9DuarAXQKrPNRA==", + "integrity": "sha512-9VXT6iZSE/T2kPzFgcpm81bpOw+51FqOjHRKyLNRjOBzmIktg0ccJ9K1x9YCUKQJrcvwo5DyAaMtbnD/L/XfcA==", "license": "MIT" } } diff --git a/ReleaseBuilder/Build/Command.Compile.Post.cs b/ReleaseBuilder/Build/Command.Compile.Post.cs index 1417c91ac..5d3234a7b 100644 --- a/ReleaseBuilder/Build/Command.Compile.Post.cs +++ b/ReleaseBuilder/Build/Command.Compile.Post.cs @@ -234,7 +234,8 @@ public static partial class Command // Executables cannot be signed before their dependencies are signed // So they are placed last in the list - var executables = ExecutableRenames.Values.Select(x => Path.Combine(binDir, x)); + var executables = ExecutableRenames.Values.Select(x => Path.Combine(binDir, x)) + .Where(File.Exists); var signtargets = Directory.EnumerateFiles(binDir, "*", SearchOption.AllDirectories) .Except(executables) diff --git a/ReleaseBuilder/Build/Command.Compile.cs b/ReleaseBuilder/Build/Command.Compile.cs index 22e4ee19f..5b279b8a3 100644 --- a/ReleaseBuilder/Build/Command.Compile.cs +++ b/ReleaseBuilder/Build/Command.Compile.cs @@ -75,7 +75,15 @@ public static partial class Command "--self-contained", useHostedBuilds ? "false" : "true" }; - await ProcessHelper.ExecuteWithLog(command, workingDirectory: tmpfolder, logFolder: logFolder, logFilename: (pid, isStdOut) => $"{Path.GetFileNameWithoutExtension(proj)}.{target.BuildTargetString}.{pid}.{(isStdOut ? "stdout" : "stderr")}.log"); + try + { + await ProcessHelper.ExecuteWithLog(command, workingDirectory: tmpfolder, logFolder: logFolder, logFilename: (pid, isStdOut) => $"{Path.GetFileNameWithoutExtension(proj)}.{target.BuildTargetString}.{pid}.{(isStdOut ? "stdout" : "stderr")}.log"); + } + catch (Exception ex) + { + Console.WriteLine($"Error building {proj} for {target.BuildTargetString}: {ex.Message}"); + throw; + } } // Perform any post-build steps, cleaning and signing as needed diff --git a/ReleaseBuilder/Build/Command.CreatePackage.cs b/ReleaseBuilder/Build/Command.CreatePackage.cs index c12b84a3d..8f1a274a2 100644 --- a/ReleaseBuilder/Build/Command.CreatePackage.cs +++ b/ReleaseBuilder/Build/Command.CreatePackage.cs @@ -303,7 +303,10 @@ public static partial class Command { var entitlementFile = Path.Combine(installerDir, "Entitlements.plist"); var updates = new[] { Path.Combine(appFolder, "Contents", "MacOS", "package_type_id.txt") } - .Concat(ExecutableRenames.Values.Select(x => Path.Combine(appFolder, "Contents", "MacOS", x))) + .Concat( + ExecutableRenames.Values.Select(x => Path.Combine(appFolder, "Contents", "MacOS", x)) + .Where(File.Exists) + ) .Append(appFolder); foreach (var x in updates) diff --git a/ReleaseBuilder/Build/Command.cs b/ReleaseBuilder/Build/Command.cs index 090fca864..1aa319604 100644 --- a/ReleaseBuilder/Build/Command.cs +++ b/ReleaseBuilder/Build/Command.cs @@ -778,7 +778,8 @@ public static partial class Command var deleted = new List(); // Find all webroot folders with a package.json and package-lock.json - var targets = Directory.EnumerateDirectories(Path.Combine(baseDir, "Duplicati", "Server", "webroot"), "*", SearchOption.TopDirectoryOnly) + var webroot = Path.Combine(baseDir, "Duplicati", "Server", "webroot"); + var targets = Directory.EnumerateDirectories(webroot, "*", SearchOption.TopDirectoryOnly) .Where(x => File.Exists(Path.Combine(x, "package.json")) && File.Exists(Path.Combine(x, "package-lock.json"))) .ToList(); @@ -815,6 +816,15 @@ public static partial class Command Directory.Move(basefolder, target); Directory.Delete(tmp, true); foldersToRemove.Add(target); + + var indexfile = Path.Combine(target, "index.html"); + if (File.Exists(indexfile)) + { + var content = File.ReadAllText(indexfile); + var prefix = target.Substring(webroot.Length).Replace(Path.DirectorySeparatorChar, '/').Trim('/'); + content = content.Replace("", $""); + File.WriteAllText(indexfile, content); + } } return deleted.Where(x => !Path.GetFileName(x).StartsWith(".")) diff --git a/ReleaseBuilder/build_version.txt b/ReleaseBuilder/build_version.txt index c8a4bfb48..62a0ba5fc 100644 --- a/ReleaseBuilder/build_version.txt +++ b/ReleaseBuilder/build_version.txt @@ -1 +1 @@ -2.0.9.107 \ No newline at end of file +2.0.9.108 \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 8b4aacb1e..5f7815149 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,45 @@ +2024-10-03 - 2.0.9.108_canary_2024-10-03 +========== +This release is a canary release intended to be used for testing in preparation of a later stable release. + +**Unlike regular canary builds, this one has a major change in the build system, so it now runs on .NET8.** + +For that reason, the updater in previous canary builds does not detect this update yet, but this can be activated at a later time. + +The builds are self-contained so Mono or .NET installations are not required to install. + +**Important changes from last Beta** +- Updated to .NET8 with OS specific builds +- Using Kestrel as the API/UI server +- Mandatory password and new authentication scheme for server +- Settings database version updated to v8 + +Please see list of known issues related to .NET8/Kestrel upgrade: +https://github.com/orgs/duplicati/projects/2 + +# New tool to manage a running server +Due to incompatibility with `duplicati_client` a new tool is included, named `Duplicati.CommandLine.ServerUtil.exe`/`duplicati-server-util`. + +# Upgrade from `v2.0.9.105` +If you are upgrading from 2.0.9.105 please see the release notes from 2.0.9.106 for how to prepare the database. +Upgrades from other versions do not need special steps. + +# New experimental UI +This version features a new more modern UI based on Angular18 :tada: +Not all features are implemented just yet, so the new UI is not yet default. +The curious ones can try it by visiting `http://localhost:8200/theme.html` (or similar). + +## Detailed list of changes: +- Added export feature to server-util +- Default to using .NET built-in Zip code for performance improvements +- Added `/health` healthcheck API to server + server-util +- Removed unuspported use of `Thread.CurrentCulture` +- Removed unsupported use of `Environment.OSVersion` +- Removed support for piped download as it was slow and caused hangs +- Fixed an issue with multi-instance detection that caused crashes +- Added a new experimental UI +- Added support for enabling remote control + 2024-09-11 - 2.0.9.107_canary_2024-09-11 ========== This release is a canary release intended to be used for testing in preparation of a later stable release.