diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 64b00cdb86..35ef0a3cf8 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -7,7 +7,7 @@ on: branches: [ net5 ] jobs: - Zip: + zip: runs-on: ${{ matrix.cfg.os }} strategy: fail-fast: false @@ -33,7 +33,7 @@ jobs: with: name: duplicati-${{ matrix.cfg.runtime }} path: publish - Deb: + deb: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -44,4 +44,42 @@ jobs: with: name: deb package path: duplicati*.deb - \ No newline at end of file + rpm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Package + run: Installer/fedora/build.sh + - name: Save Artifacts + uses: actions/upload-artifact@v2 + with: + name: rpm package + path: duplicati*.rpm + msi: + runs-on: windows-latest + needs: zip + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Download zip + uses: actions/download-artifact@v2 + with: + name: duplicati-win-x64 + path: bin + - name: Install go-msi + run: choco install -y "go-msi" + - name: Prepare PATH + shell: bash + run: | + echo "$WIX\\bin" >> $GITHUB_PATH + echo "C:\\Program Files\\go-msi" >> $GITHUB_PATH + - name: Build MSI + id: buildmsi + shell: bash + run: | + Installer/Windows/MSI/build.sh + - name: Save Artifacts + uses: actions/upload-artifact@v2 + with: + name: duplicati-win-x64-msi + path: duplicati-win-x64.msi diff --git a/.gitignore b/.gitignore index f2c3e652ef..359f8d818a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ changelog-news.txt binfiles.wxs .idea/ .vs/ +/publish/ Installer/debian/*.buildinfo /*.deb diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj index f190735654..093cd3726b 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj @@ -1,7 +1,7 @@  - Exe + WinExe net5.0 2.0.0.7 LGPL, Copyright ? Duplicati Team 2019 @@ -14,8 +14,6 @@ Duplicati.GUI.TrayIcon Duplicati.ico Duplicati.GUI.TrayIcon.Program - - diff --git a/Duplicati/Server/Program.cs b/Duplicati/Server/Program.cs index 1c3ed0b7e1..c2c731da20 100644 --- a/Duplicati/Server/Program.cs +++ b/Duplicati/Server/Program.cs @@ -177,7 +177,9 @@ public static int Main(string[] args) public static int RealMain(string[] _args) { +#if DEBUG System.Diagnostics.Debugger.Launch(); +#endif //If we are on Windows, append the bundled "win-tools" programs to the search path //We add it last, to allow the user to override with other versions diff --git a/Installer/Windows/MSI/build.sh b/Installer/Windows/MSI/build.sh new file mode 100644 index 0000000000..5265bf030d --- /dev/null +++ b/Installer/Windows/MSI/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash +#This is a helper to make the msi. It assumes a bin folder exists a the root of the project with an unzipped install + +SCRIPTDIR=$( cd "$(dirname "$0")" ; pwd -P ) + +VERSION=`grep '' < $SCRIPTDIR/../../../Duplicati/Server/Duplicati.Server.csproj | sed 's/.*\([^\.]*\.[^\.]*\.[^\.]*\).*<\/Version>.*/\1/'` +VERSION=${VERSION//$'\r\n'} +echo "Building version: ($VERSION)" + +cd $SCRIPTDIR/../../../ + +go-msi make --msi `pwd`/duplicati-win-x64.msi --out `pwd`/build --version $VERSION --path Installer/Windows/MSI/wix.json --src Installer/Windows/MSI/templates \ No newline at end of file diff --git a/Installer/Windows/MSI/templates/LicenseAgreementDlg_HK.wxs b/Installer/Windows/MSI/templates/LicenseAgreementDlg_HK.wxs new file mode 100644 index 0000000000..6fa2469ca8 --- /dev/null +++ b/Installer/Windows/MSI/templates/LicenseAgreementDlg_HK.wxs @@ -0,0 +1,36 @@ + + + + + + + + + + CostingComplete = 1 + "1"]]> + LicenseAccepted = "1" + + + 1 + + + + + {{if gt (.License | len) 0}} + + {{end}} + + + + 1 + + + + + + + + + diff --git a/Installer/Windows/MSI/templates/WixUI_HK.wxs b/Installer/Windows/MSI/templates/WixUI_HK.wxs new file mode 100644 index 0000000000..cda1b3df9c --- /dev/null +++ b/Installer/Windows/MSI/templates/WixUI_HK.wxs @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + "1"]]> + + 1 + + NOT Installed + Installed AND PATCH + + 1 + LicenseAccepted = "1" + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + + 1 + 1 + + Installed + + 1 + + 1 + 1 + 1 + + + + + diff --git a/Installer/Windows/MSI/templates/choco/LICENSE.txt b/Installer/Windows/MSI/templates/choco/LICENSE.txt new file mode 100644 index 0000000000..c10af6d11b --- /dev/null +++ b/Installer/Windows/MSI/templates/choco/LICENSE.txt @@ -0,0 +1,9 @@ +From: {{.Choco.LicenseURL}} + +LICENSE + +{{if gt (.License | len) 0}} +{{.License | cat}} +{{else if gt (.Choco.LicenseURL | len) 0}} +{{.Choco.LicenseURL | download}} +{{end}} diff --git a/Installer/Windows/MSI/templates/choco/VERIFICATION.txt b/Installer/Windows/MSI/templates/choco/VERIFICATION.txt new file mode 100644 index 0000000000..7c399c93fa --- /dev/null +++ b/Installer/Windows/MSI/templates/choco/VERIFICATION.txt @@ -0,0 +1,10 @@ +VERIFICATION + +To check the checksum of this package, extract the msi file contained into it, +then run + + checksum.exe {{.Choco.MsiFile}} -t=sha256 + +The result must match + + {{.Choco.MsiSum | upper}} diff --git a/Installer/Windows/MSI/templates/choco/chocolateyInstall.ps1 b/Installer/Windows/MSI/templates/choco/chocolateyInstall.ps1 new file mode 100644 index 0000000000..de61669cc2 --- /dev/null +++ b/Installer/Windows/MSI/templates/choco/chocolateyInstall.ps1 @@ -0,0 +1,7 @@ +$packageName = '{{.Choco.ID}}' +$fileType = 'msi' +$silentArgs = '/quiet'; +$scriptPath = $(Split-Path $MyInvocation.MyCommand.Path); +$fileFullPath = Join-Path $scriptPath '{{.Choco.MsiFile}}'; + +Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $fileFullPath -checksum '{{.Choco.MsiSum}}' -checksumType = 'sha256' diff --git a/Installer/Windows/MSI/templates/choco/chocolateyUninstall.ps1 b/Installer/Windows/MSI/templates/choco/chocolateyUninstall.ps1 new file mode 100644 index 0000000000..d4b26d054c --- /dev/null +++ b/Installer/Windows/MSI/templates/choco/chocolateyUninstall.ps1 @@ -0,0 +1,6 @@ +$packageName = "{{.Choco.ID}}"; +$fileType = 'msi'; +$scriptPath = $(Split-Path $MyInvocation.MyCommand.Path); +$fileFullPath = Join-Path $scriptPath '{{.Choco.MsiFile}}'; + +Uninstall-ChocolateyPackage $packageName $fileType "$fileFullPath /q" diff --git a/Installer/Windows/MSI/templates/choco/pkg.nuspec b/Installer/Windows/MSI/templates/choco/pkg.nuspec new file mode 100644 index 0000000000..f1ed73102f --- /dev/null +++ b/Installer/Windows/MSI/templates/choco/pkg.nuspec @@ -0,0 +1,38 @@ + + + + {{.Choco.ID}} + {{.Choco.Title}} + {{.VersionOk}} + {{.Choco.Authors}} + {{.Choco.Owners}} + {{.Choco.Description}} + {{if gt (.Choco.ProjectURL | len) 0}} + {{.Choco.ProjectURL}} + {{end}} + {{if gt (.Choco.Tags | len) 0}} + {{.Choco.Tags}} + {{end}} + {{if gt (.Choco.LicenseURL | len) 0}} + {{.Choco.LicenseURL}} + {{end}} + {{if gt (.Choco.IconURL | len) 0}} + {{.Choco.IconURL}} + {{end}} + {{if gt (.Choco.ChangeLog | len) 0}} + {{.Choco.ChangeLog}} + {{end}} + {{if .Choco.RequireLicense}} + true + {{else}} + false + {{end}} + + + + + + + + + diff --git a/Installer/Windows/MSI/templates/product.wxs b/Installer/Windows/MSI/templates/product.wxs new file mode 100644 index 0000000000..d035d42d06 --- /dev/null +++ b/Installer/Windows/MSI/templates/product.wxs @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + NOT NEWERVERSIONDETECTED + + + + + + {{if gt (.Files.Items | len) 0}} + + {{range $i, $e := .Files.Items}} + + {{end}} + + {{end}} + {{if gt (.Directories | len) 0}} + {{range $i, $e := .Directories}} + + {{end}} + {{end}} + + + + {{if gt (.Env.Vars | len) 0}} + + {{range $i, $e := .Env.Vars}} + + {{end}} + + {{end}} + + {{if gt (.Shortcuts.Items | len) 0}} + + + + {{range $i, $e := .Shortcuts.Items}} + + {{if gt ($e.Icon | len) 0}} + + {{end}} + + + {{end}} + + + + + {{end}} + + + + {{range $i, $e := .InstallHooks}} + + + {{end}} + {{range $i, $e := .UninstallHooks}} + + + {{end}} + + + {{range $i, $e := .InstallHooks}} + NOT Installed AND NOT REMOVE + {{end}} + {{range $i, $e := .UninstallHooks}} + REMOVE ~= "ALL" + {{end}} + + + + {{if gt (.Env.Vars | len) 0}} + + {{end}} + {{if gt (.Files.Items | len) 0}} + + {{end}} + {{if gt (.Shortcuts.Items | len) 0}} + + {{end}} + {{range $i, $e := .Directories}} + + {{end}} + + + + + + + + + + + + + + + + + + diff --git a/Installer/Windows/MSI/wix.json b/Installer/Windows/MSI/wix.json new file mode 100644 index 0000000000..786fa3701a --- /dev/null +++ b/Installer/Windows/MSI/wix.json @@ -0,0 +1,33 @@ +{ + "product": "Duplicati", + "company": "duplicati", + "license": "LICENSE.txt", + "upgrade-code": "69163125-be0b-407e-b65d-80f7023524db", + "files": { + "guid": "95dd9d6c-89e7-4fc7-bfdc-708ffa99c68d", + "items": [ + ] + }, + "directories": [ + "bin" + ], + "shortcuts": { + "guid": "19455e18-67ec-4ace-9c70-0aa48be5b815", + "items": [ + { + "name": "Duplicati", + "description": "Launch Duplicati", + "target": "[INSTALLDIR]\\bin\\Duplicati.GUI.TrayIcon.exe", + "wdir": "INSTALLDIR", + "arguments": "", + "icon": "Assets/application icon/application_icon.ico" + } + ] + }, + "choco": { + "description": "Free backup software to store encrypted backups online", + "project-url": "https://www.duplicati.com/", + "tags": "backup", + "license-url": "https://github.com/duplicati/duplicati/blob/master/LICENSE.txt" + } +} \ No newline at end of file diff --git a/Installer/fedora/build.sh b/Installer/fedora/build.sh old mode 100644 new mode 100755 diff --git a/Installer/fedora/docker/Dockerfile b/Installer/fedora/docker/Dockerfile index 01bfb6c19e..e94c922085 100644 --- a/Installer/fedora/docker/Dockerfile +++ b/Installer/fedora/docker/Dockerfile @@ -4,8 +4,9 @@ FROM fedora:33 RUN dnf -y install deltarpm RUN dnf -y upgrade -RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc -RUN curl --output /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/33/prod.repo +#No Longer needed +#RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc +#RUN curl --output /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/33/prod.repo RUN dnf check-update RUN dnf -y --allowerasing install @"Minimal Install" @buildsys-build yum-utils rpm-sign gnupg rpmdevtools desktop-file-utils dos2unix dotnet-sdk-5.0 diff --git a/Installer/fedora/docker/runner.sh b/Installer/fedora/docker/runner.sh old mode 100644 new mode 100755