diff --git a/.gitignore b/.gitignore
index 377e8b38d..769557ef3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,4 +19,5 @@ changelog-news.txt
.vs/
/publish/
ReleaseBuilder/build-temp/
-ReleaseBuilder/Resources/Windows/binfiles.wxs
+ReleaseBuilder/Resources/Windows/TrayIcon/binfiles.wxs
+ReleaseBuilder/Resources/Windows/Agent/binfiles.wxs
diff --git a/Executables/net8/Duplicati.Agent/Duplicati.Agent.csproj b/Executables/net8/Duplicati.Agent/Duplicati.Agent.csproj
index e07476bba..a114f1cb4 100644
--- a/Executables/net8/Duplicati.Agent/Duplicati.Agent.csproj
+++ b/Executables/net8/Duplicati.Agent/Duplicati.Agent.csproj
@@ -5,6 +5,7 @@
net8.0
The Duplicati Agent implementation
Copyright © 2024 Team Duplicati, MIT license
+ ..\..\..\Duplicati\GUI\Duplicati.GUI.TrayIcon\Duplicati.ico
diff --git a/ReleaseBuilder/.vscode/launch.json b/ReleaseBuilder/.vscode/launch.json
index 1aa621df8..8c9c81e05 100644
--- a/ReleaseBuilder/.vscode/launch.json
+++ b/ReleaseBuilder/.vscode/launch.json
@@ -27,6 +27,8 @@
"--targets", "win-x86-gui.msi",
"--targets", "win-x64-gui.msi",
"--targets", "win-x64-gui.zip",
+ "--targets", "win-x64-agent.msi",
+ "--targets", "win-arm64-agent.msi",
"--targets", "linux-x64-gui.zip",
"--targets", "linux-arm64-gui.zip",
"--targets", "osx-x64-gui.dmg",
diff --git a/ReleaseBuilder/Build/Command.CreatePackage.cs b/ReleaseBuilder/Build/Command.CreatePackage.cs
index 8f1a274a2..25abfd5d9 100644
--- a/ReleaseBuilder/Build/Command.CreatePackage.cs
+++ b/ReleaseBuilder/Build/Command.CreatePackage.cs
@@ -242,6 +242,13 @@ public static partial class Command
static async Task BuildMsiPackage(string baseDir, string buildRoot, string msiFile, PackageTarget target, RuntimeConfig rtcfg)
{
var resourcesDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "Windows");
+ var resourcesSubDir = Path.Combine(resourcesDir,
+ target.Interface switch
+ {
+ InterfaceType.GUI => "TrayIcon",
+ InterfaceType.Agent => "Agent",
+ _ => throw new Exception($"Unsupported interface type: {target.Interface}")
+ });
var buildTmp = Path.Combine(buildRoot, "tmp-msi");
if (Directory.Exists(buildTmp))
@@ -254,7 +261,7 @@ public static partial class Command
if (!sourceFiles.EndsWith(Path.DirectorySeparatorChar))
sourceFiles += Path.DirectorySeparatorChar;
- var binFiles = Path.Combine(resourcesDir, "binfiles.wxs");
+ var binFiles = Path.Combine(resourcesSubDir, "binfiles.wxs");
if (File.Exists(binFiles))
File.Delete(binFiles);
@@ -275,9 +282,9 @@ public static partial class Command
"--define", $"HarvestPath={sourceFiles}",
"--arch", msiArch,
"--output", msiFile,
- Path.Combine(resourcesDir, "Shortcuts.wxs"),
+ Path.Combine(resourcesSubDir, "Shortcuts.wxs"),
binFiles,
- Path.Combine(resourcesDir, "Duplicati.wxs")
+ Path.Combine(resourcesSubDir, "Duplicati.wxs")
], workingDirectory: buildRoot);
if (rtcfg.UseAuthenticodeSigning)
diff --git a/ReleaseBuilder/Build/Command.cs b/ReleaseBuilder/Build/Command.cs
index f3609b198..c067539a6 100644
--- a/ReleaseBuilder/Build/Command.cs
+++ b/ReleaseBuilder/Build/Command.cs
@@ -676,17 +676,29 @@ public static partial class Command
regex.Replace(File.ReadAllText(file), $"?v={releaseInfo.Version}")
);
- var wixFile = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "Windows", "UpgradeData.wxi");
+ var wixFileGUI = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "Windows", "TrayIcon", "UpgradeData.wxi");
File.WriteAllText(
- wixFile,
+ wixFileGUI,
Regex.Replace(
- File.ReadAllText(wixFile),
+ File.ReadAllText(wixFileGUI),
@"\<\?define ProductVersion\=\""" + versionre + @"\"" \?\>",
$""
)
);
- targetfiles.Add(wixFile);
+ targetfiles.Add(wixFileGUI);
+
+ var wixFileAgent = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "Windows", "Agent", "UpgradeData.wxi");
+ File.WriteAllText(
+ wixFileAgent,
+ Regex.Replace(
+ File.ReadAllText(wixFileAgent),
+ @"\<\?define ProductVersion\=\""" + versionre + @"\"" \?\>",
+ $""
+ )
+ );
+
+ targetfiles.Add(wixFileAgent);
return targetfiles;
}
diff --git a/ReleaseBuilder/Program.cs b/ReleaseBuilder/Program.cs
index 7925bfbc3..4b54f5124 100644
--- a/ReleaseBuilder/Program.cs
+++ b/ReleaseBuilder/Program.cs
@@ -18,8 +18,8 @@ class Program
"win-x86-gui.msi",
"win-arm64-gui.zip",
"win-arm64-gui.msi",
- // "win-x64-agent.msi", // Need to add support for building without trayicon + window service support
- // "win-arm64-agent.msi", // Need to add support for building without trayicon + window service support
+ "win-x64-agent.msi", // Missing window service support
+ "win-arm64-agent.msi", // Missing window service support
"win-x64-agent.zip",
"win-arm64-agent.zip",
diff --git a/ReleaseBuilder/Resources/Windows/Agent/Duplicati.wxs b/ReleaseBuilder/Resources/Windows/Agent/Duplicati.wxs
new file mode 100644
index 000000000..649dda182
--- /dev/null
+++ b/ReleaseBuilder/Resources/Windows/Agent/Duplicati.wxs
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FORSERVICE = "true"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ReleaseBuilder/Resources/Windows/License.rtf b/ReleaseBuilder/Resources/Windows/Agent/License.rtf
similarity index 100%
rename from ReleaseBuilder/Resources/Windows/License.rtf
rename to ReleaseBuilder/Resources/Windows/Agent/License.rtf
diff --git a/ReleaseBuilder/Resources/Windows/Resources/InstallerLarge.bmp b/ReleaseBuilder/Resources/Windows/Agent/Resources/InstallerLarge.bmp
similarity index 100%
rename from ReleaseBuilder/Resources/Windows/Resources/InstallerLarge.bmp
rename to ReleaseBuilder/Resources/Windows/Agent/Resources/InstallerLarge.bmp
diff --git a/ReleaseBuilder/Resources/Windows/Resources/InstallerSmall.bmp b/ReleaseBuilder/Resources/Windows/Agent/Resources/InstallerSmall.bmp
similarity index 100%
rename from ReleaseBuilder/Resources/Windows/Resources/InstallerSmall.bmp
rename to ReleaseBuilder/Resources/Windows/Agent/Resources/InstallerSmall.bmp
diff --git a/ReleaseBuilder/Resources/Windows/Agent/Shortcuts.wxs b/ReleaseBuilder/Resources/Windows/Agent/Shortcuts.wxs
new file mode 100644
index 000000000..8204cb98a
--- /dev/null
+++ b/ReleaseBuilder/Resources/Windows/Agent/Shortcuts.wxs
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReleaseBuilder/Resources/Windows/Agent/UpgradeData.wxi b/ReleaseBuilder/Resources/Windows/Agent/UpgradeData.wxi
new file mode 100644
index 000000000..5cf2fc65a
--- /dev/null
+++ b/ReleaseBuilder/Resources/Windows/Agent/UpgradeData.wxi
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReleaseBuilder/Resources/Windows/Duplicati.wxs b/ReleaseBuilder/Resources/Windows/TrayIcon/Duplicati.wxs
similarity index 100%
rename from ReleaseBuilder/Resources/Windows/Duplicati.wxs
rename to ReleaseBuilder/Resources/Windows/TrayIcon/Duplicati.wxs
diff --git a/ReleaseBuilder/Resources/Windows/TrayIcon/License.rtf b/ReleaseBuilder/Resources/Windows/TrayIcon/License.rtf
new file mode 100644
index 000000000..9b2b7cff7
--- /dev/null
+++ b/ReleaseBuilder/Resources/Windows/TrayIcon/License.rtf
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf2761
+\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\froman\fcharset0 TimesNewRomanPSMT;}
+{\colortbl;\red255\green255\blue255;}
+{\*\expandedcolortbl;;}
+\paperw12240\paperh15840\margl1440\margr1440\margb1417\margt1417\vieww13140\viewh16360\viewkind1
+\deftab720
+\pard\pardeftab720\ri0\sl380\sa240\partightenfactor0
+
+\f0\fs25 \cf0 Copyright (c) 2024 Team Duplicati, https://duplicati.com, hello@duplicati.com
+\f1\fs24 \
+\pard\pardeftab720\ri0\sl380\sb240\sa240\partightenfactor0
+
+\f0\fs25 \cf0 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+\f1\fs24 \
+
+\f0\fs25 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+\f1\fs24 \
+
+\f0\fs25 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+\f1\fs24 \
+}
\ No newline at end of file
diff --git a/ReleaseBuilder/Resources/Windows/TrayIcon/Resources/InstallerLarge.bmp b/ReleaseBuilder/Resources/Windows/TrayIcon/Resources/InstallerLarge.bmp
new file mode 100644
index 000000000..e4833d4e0
Binary files /dev/null and b/ReleaseBuilder/Resources/Windows/TrayIcon/Resources/InstallerLarge.bmp differ
diff --git a/ReleaseBuilder/Resources/Windows/TrayIcon/Resources/InstallerSmall.bmp b/ReleaseBuilder/Resources/Windows/TrayIcon/Resources/InstallerSmall.bmp
new file mode 100644
index 000000000..7ab19a757
Binary files /dev/null and b/ReleaseBuilder/Resources/Windows/TrayIcon/Resources/InstallerSmall.bmp differ
diff --git a/ReleaseBuilder/Resources/Windows/Shortcuts.wxs b/ReleaseBuilder/Resources/Windows/TrayIcon/Shortcuts.wxs
similarity index 100%
rename from ReleaseBuilder/Resources/Windows/Shortcuts.wxs
rename to ReleaseBuilder/Resources/Windows/TrayIcon/Shortcuts.wxs
diff --git a/ReleaseBuilder/Resources/Windows/UpgradeData.wxi b/ReleaseBuilder/Resources/Windows/TrayIcon/UpgradeData.wxi
similarity index 87%
rename from ReleaseBuilder/Resources/Windows/UpgradeData.wxi
rename to ReleaseBuilder/Resources/Windows/TrayIcon/UpgradeData.wxi
index cdcc78720..714b792ea 100644
--- a/ReleaseBuilder/Resources/Windows/UpgradeData.wxi
+++ b/ReleaseBuilder/Resources/Windows/TrayIcon/UpgradeData.wxi
@@ -3,7 +3,7 @@
-
+
diff --git a/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/InstallDirDlg.wxs b/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/InstallDirDlg.wxs
new file mode 100644
index 000000000..2bc1bc9a9
--- /dev/null
+++ b/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/InstallDirDlg.wxs
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/InvalidDirDlg.wxs b/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/InvalidDirDlg.wxs
new file mode 100644
index 000000000..81c87beb9
--- /dev/null
+++ b/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/InvalidDirDlg.wxs
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/README.md b/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/README.md
index f1ffed102..f077fd7bb 100644
--- a/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/README.md
+++ b/ReleaseBuilder/Resources/Windows/WixUIExtension/ui/README.md
@@ -11,10 +11,13 @@ Also, the dialogs were modified to place the buttons as the first items in the d
The extra files are:
-- [`BrowseDlg.wxs`](./ui/BrowseDlg.wxs)
-- [`CustomizeDlg.wxs`](./ui/CustomizeDlg.wxs)
-- [`DiskCostDlg.wxs`](./ui/DiskCostDlg.wxs)
-- [`LicenseAgreementDlg.wxs`](./ui/LicenseAgreementDlg.wxs)
-- [`WixUI_FeatureTree.wxs`](./ui/WixUI_FeatureTree.wxs)
+- [`BrowseDlg.wxs`](./BrowseDlg.wxs)
+- [`CustomizeDlg.wxs`](./CustomizeDlg.wxs)
+- [`DiskCostDlg.wxs`](./DiskCostDlg.wxs)
+- [`LicenseAgreementDlg.wxs`](./LicenseAgreementDlg.wxs)
+- [`WixUI_FeatureTree.wxs`](./WixUI_FeatureTree.wxs)
+- [`WixUI_InstallDir.wxs`](./WixUI_InstallDir.wxs)
+- [`InstallDirDlg.wxs`](./InstallDirDlg.wxs)
+- [`InvalidDirDlg.wxs`](./InvalidDirDlg.wxs)
The files are all licensed under the [MS-RL](https://opensource.org/licenses/ms-rl) license.