From b73e94de7ee24c5261e14f29bcceecb39b519aa8 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Tue, 23 Apr 2024 14:24:38 +0200 Subject: [PATCH] Removed unused files. Moved installer files into the ReleaseBuilder --- .github/workflows/artifacts.yml | 105 ----- .github/workflows/buildsrelease.yml | 105 ----- .github/workflows/buildsreleasefrompr.yml | 108 ----- .gitignore | 16 +- .../DependencyFinder/DependencyFinder.csproj | 19 - .../DependencyFinder/DependencyFinder.sln | 17 - BuildTools/DependencyFinder/Program.cs | 85 ---- .../GnupgSigningTool/GnupgSigningTool.csproj | 21 - .../GnupgSigningTool/GnupgSigningTool.sln | 42 -- BuildTools/GnupgSigningTool/Program.cs | 128 ------ BuildTools/UpdateVersionStamp/Program.cs | 130 ------ .../UpdateVersionStamp.csproj | 19 - .../UpdateVersionStamp/UpdateVersionStamp.sln | 35 -- ReleaseBuilder/Build/Command.Compile.Post.cs | 12 +- ReleaseBuilder/Build/Command.CreatePackage.cs | 57 +-- ReleaseBuilder/Build/Command.GitPush.cs | 2 +- ReleaseBuilder/Build/Command.cs | 4 +- .../Resources}/Docker/Dockerfile | 0 .../Resources}/Docker/README.md | 0 .../Resources}/MacOS/Distribution.xml | 0 .../Resources}/MacOS/Entitlements.plist | 0 .../Resources}/MacOS/LICENSE.html | 0 .../MacOS/app-resources/Duplicati.icns | Bin .../Resources}/MacOS/app-resources/Info.plist | 0 .../Resources}/MacOS/app-scripts/postinstall | 0 .../Resources}/MacOS/app-scripts/preinstall | 0 .../MacOS/daemon-scripts/postinstall | 0 .../MacOS/daemon-scripts/preinstall | 0 .../com.duplicati.app.launchagent.plist | 0 .../Resources}/MacOS/template.dmg.bz2 | Bin .../Resources}/MacOS/uninstall.sh | 0 .../Resources}/Windows/Duplicati.wxs | 0 .../Windows/Resources/InstallerLarge.bmp | Bin .../Windows/Resources/InstallerSmall.bmp | Bin .../Windows/Resources/MITLicense.rtf | 0 .../Resources}/Windows/Shortcuts.wxs | 0 .../Resources}/Windows/UpgradeData.wxi | 2 +- ReleaseBuilder/Resources/Windows/binfiles.wxs | 1 + .../Resources}/debian/Dockerfile.build | 0 .../Resources}/debian/changelog.template.txt | 0 .../Resources}/debian/control.template.txt | 0 .../Resources}/debian/init-script-example.sh | 0 .../debian/systemd/duplicati.default | 0 .../debian/systemd/duplicati.service | 0 .../Resources}/fedora/Dockerfile.build | 0 .../fedora/duplicati-install-binaries.sh | 0 .../fedora/duplicati-install-recursive.sh | 0 .../fedora/duplicati.spec.template.txt | 0 .../Resources}/fedora/inside-docker.sh | 0 .../fedora/systemd/duplicati.default | 0 .../fedora/systemd/duplicati.service | 0 .../shared/desktop/duplicati.desktop | 0 .../Resources}/shared/pixmaps/duplicati.png | Bin .../Resources}/shared/pixmaps/duplicati.svg | 0 .../Resources}/shared/pixmaps/duplicati.xpm | 0 {Updates => ReleaseBuilder}/build_version.txt | 0 build-debug-update.sh | 76 ---- build-installers.sh | 357 --------------- build-release.sh | 424 ------------------ deploy-debug.sh | 25 -- fix-sln.py | 23 - make.sh | 2 - tabs-to-spaces.sh | 7 - unix2dos.py | 14 - 64 files changed, 43 insertions(+), 1793 deletions(-) delete mode 100644 .github/workflows/artifacts.yml delete mode 100644 .github/workflows/buildsrelease.yml delete mode 100644 .github/workflows/buildsreleasefrompr.yml delete mode 100644 BuildTools/DependencyFinder/DependencyFinder.csproj delete mode 100644 BuildTools/DependencyFinder/DependencyFinder.sln delete mode 100644 BuildTools/DependencyFinder/Program.cs delete mode 100644 BuildTools/GnupgSigningTool/GnupgSigningTool.csproj delete mode 100644 BuildTools/GnupgSigningTool/GnupgSigningTool.sln delete mode 100644 BuildTools/GnupgSigningTool/Program.cs delete mode 100644 BuildTools/UpdateVersionStamp/Program.cs delete mode 100644 BuildTools/UpdateVersionStamp/UpdateVersionStamp.csproj delete mode 100644 BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln rename {Installer => ReleaseBuilder/Resources}/Docker/Dockerfile (100%) rename {Installer => ReleaseBuilder/Resources}/Docker/README.md (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/Distribution.xml (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/Entitlements.plist (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/LICENSE.html (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/app-resources/Duplicati.icns (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/app-resources/Info.plist (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/app-scripts/postinstall (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/app-scripts/preinstall (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/daemon-scripts/postinstall (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/daemon-scripts/preinstall (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/daemon/com.duplicati.app.launchagent.plist (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/template.dmg.bz2 (100%) rename {Installer => ReleaseBuilder/Resources}/MacOS/uninstall.sh (100%) rename {Installer => ReleaseBuilder/Resources}/Windows/Duplicati.wxs (100%) rename {Installer => ReleaseBuilder/Resources}/Windows/Resources/InstallerLarge.bmp (100%) rename {Installer => ReleaseBuilder/Resources}/Windows/Resources/InstallerSmall.bmp (100%) rename {Installer => ReleaseBuilder/Resources}/Windows/Resources/MITLicense.rtf (100%) rename {Installer => ReleaseBuilder/Resources}/Windows/Shortcuts.wxs (100%) rename {Installer => ReleaseBuilder/Resources}/Windows/UpgradeData.wxi (87%) create mode 100755 ReleaseBuilder/Resources/Windows/binfiles.wxs rename {Installer => ReleaseBuilder/Resources}/debian/Dockerfile.build (100%) rename {Installer => ReleaseBuilder/Resources}/debian/changelog.template.txt (100%) rename {Installer => ReleaseBuilder/Resources}/debian/control.template.txt (100%) rename {Installer => ReleaseBuilder/Resources}/debian/init-script-example.sh (100%) rename {Installer => ReleaseBuilder/Resources}/debian/systemd/duplicati.default (100%) rename {Installer => ReleaseBuilder/Resources}/debian/systemd/duplicati.service (100%) rename {Installer => ReleaseBuilder/Resources}/fedora/Dockerfile.build (100%) rename {Installer => ReleaseBuilder/Resources}/fedora/duplicati-install-binaries.sh (100%) rename {Installer => ReleaseBuilder/Resources}/fedora/duplicati-install-recursive.sh (100%) rename {Installer => ReleaseBuilder/Resources}/fedora/duplicati.spec.template.txt (100%) rename {Installer => ReleaseBuilder/Resources}/fedora/inside-docker.sh (100%) rename {Installer => ReleaseBuilder/Resources}/fedora/systemd/duplicati.default (100%) rename {Installer => ReleaseBuilder/Resources}/fedora/systemd/duplicati.service (100%) rename {Installer => ReleaseBuilder/Resources}/shared/desktop/duplicati.desktop (100%) rename {Installer => ReleaseBuilder/Resources}/shared/pixmaps/duplicati.png (100%) rename {Installer => ReleaseBuilder/Resources}/shared/pixmaps/duplicati.svg (100%) rename {Installer => ReleaseBuilder/Resources}/shared/pixmaps/duplicati.xpm (100%) rename {Updates => ReleaseBuilder}/build_version.txt (100%) delete mode 100755 build-debug-update.sh delete mode 100755 build-installers.sh delete mode 100755 build-release.sh delete mode 100755 deploy-debug.sh delete mode 100644 fix-sln.py delete mode 100755 make.sh delete mode 100755 tabs-to-spaces.sh delete mode 100644 unix2dos.py diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml deleted file mode 100644 index cdfce5be6..000000000 --- a/.github/workflows/artifacts.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Artifacts - -on: - push: - branches: "**net5**" - pull_request: - branches: "**net5**" - -jobs: - zip: - runs-on: ${{ matrix.cfg.os }} - strategy: - fail-fast: false - matrix: - cfg: - - { os: ubuntu-latest, runtime: linux-x64 } - - { os: windows-latest, runtime: win-x64 } - - { os: macos-latest, runtime: osx-x64 } - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 6.0.x - - name: Restore dependencies - run: dotnet restore --runtime=${{ matrix.cfg.runtime }} Duplicati.sln - - name: Package - #TODO: investigate #if __WindowsGTK__ || ENABLE_GTK via -p:DefineConstants=ENABLE_GTK Maybe needed for GUI? - run: dotnet publish -c Release --runtime=${{ matrix.cfg.runtime }} -o publish Duplicati.sln - - name: Save Artifacts - uses: actions/upload-artifact@v2 - with: - name: duplicati-${{ matrix.cfg.runtime }} - path: publish - deb: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Package - run: Installer/debian/build.sh - - name: Save Artifacts - uses: actions/upload-artifact@v2 - with: - name: deb package - path: duplicati*.deb - 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 - dmg: - runs-on: macos-latest - needs: zip - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Download zip - uses: actions/download-artifact@v2 - with: - name: duplicati-osx-x64 - path: bin - - name: Build DMG - shell: bash - run: | - Installer/OSX/dmg/build.sh - - name: Save Artifacts - uses: actions/upload-artifact@v2 - with: - name: Duplicati.dmg - path: Duplicati.dmg diff --git a/.github/workflows/buildsrelease.yml b/.github/workflows/buildsrelease.yml deleted file mode 100644 index e3a22c463..000000000 --- a/.github/workflows/buildsrelease.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Build release installers - -on: - workflow_dispatch - -env: - build_directory: "Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release" - -jobs: - macbuild: - name: mac build and installers - runs-on: macos-latest - strategy: - fail-fast: false - - steps: - - name: Install NuGet - uses: nuget/setup-nuget@v1.1.1 - - - name: Checkout Source - uses: actions/checkout@v3 - - - name: Restore NuGet Packages - run: | - nuget restore Duplicati.sln - nuget restore "BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln" - - - name: Build Duplicati (macOS) - run: | - msbuild /property:Configuration=Release "BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln" - RELEASE_TIMESTAMP=$(date +%Y-%m-%d) - RELEASE_TYPE="canary" - RELEASE_INC_VERSION=$(cat Updates/build_version.txt) - RELEASE_INC_VERSION=$((RELEASE_INC_VERSION+1)) - RELEASE_VERSION="2.0.7.${RELEASE_INC_VERSION}" - RELEASE_NAME="${RELEASE_VERSION}_${RELEASE_TYPE}_${RELEASE_TIMESTAMP}" - echo "${RELEASE_NAME}" > "Duplicati/License/VersionTag.txt" - echo "${RELEASE_TYPE}" > "Duplicati/Library/AutoUpdater/AutoUpdateBuildChannel.txt" - mono "BuildTools/UpdateVersionStamp/bin/Release/UpdateVersionStamp.exe" --version="${RELEASE_VERSION}" - msbuild -p:DefineConstants=\"ENABLE_GTK\;XAMARIN_MAC\" -p:Configuration=Release Duplicati.sln - - - name: Build installers (OSX) - run: | - Installer/OSX/artifact_mac.sh - - - name: Upload build results - uses: actions/upload-artifact@v3 - with: - retention-days: 5 - name: build-results-mac - path: ~/artifacts/**/* - - windowsbuild: - name: windows installer - runs-on: windows-latest - needs: macbuild - steps: - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.3 - - name: Install NuGet - uses: nuget/setup-nuget@v1.1.1 - - uses: actions/checkout@v3 - - name: Retrieve mac build - uses: actions/download-artifact@v3 - with: - name: build-results-mac - path: ~/macartifacts - - name: set env - run: echo "ZIPBUILDFILE=$(resolve-path ~ | select-object -expandproperty path)\macartifacts\$(get-childitem ~\macartifacts\*.zip | select-object -first 1 -expandproperty name )" >> $env:GITHUB_ENV - - name: Build installers (Windows) - run: | - echo ${{ env.ZIPBUILDFILE }} - .\\Installer\\Windows\\artifact_win.bat ${{ env.ZIPBUILDFILE }} - - name: Upload build results - uses: actions/upload-artifact@v3 - with: - retention-days: 5 - name: build-results-windows - path: ~/artifacts/**/* - - debianbuild: - name: debian like installer - runs-on: ubuntu-latest - needs: macbuild - steps: - - uses: actions/checkout@v3 - - name: Retrieve mac build - uses: actions/download-artifact@v3 - with: - name: build-results-mac - path: ~/macartifacts - - name: set env - run: echo "ZIPBUILDFILE=$(ls ~/macartifacts/*.zip | tail -1)" >> $GITHUB_ENV - - name: Build installers (Deb) - run: | - echo ${{ env.ZIPBUILDFILE }} - sudo apt install debhelper - Installer/debian/artifact_deb.sh ${{ env.ZIPBUILDFILE }} - - name: Upload build results - uses: actions/upload-artifact@v3 - with: - retention-days: 5 - name: build-results-linux - path: ~/artifacts/**/* - diff --git a/.github/workflows/buildsreleasefrompr.yml b/.github/workflows/buildsreleasefrompr.yml deleted file mode 100644 index 165b3ecab..000000000 --- a/.github/workflows/buildsreleasefrompr.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Build release installers from PR - -on: - pull_request: - types: [ labeled ] - -env: - build_directory: "Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release" - -jobs: - macbuild: - if: ${{ github.event.label.name == 'testbuild' }} - name: mac build and installers - runs-on: macos-latest - strategy: - fail-fast: false - - - steps: - - name: Install NuGet - uses: nuget/setup-nuget@v1.1.1 - - - name: Checkout Source - uses: actions/checkout@v3 - - - name: Restore NuGet Packages - run: | - nuget restore Duplicati.sln - nuget restore "BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln" - - - name: Build Duplicati (macOS) - run: | - msbuild /property:Configuration=Release "BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln" - RELEASE_TIMESTAMP=$(date +%Y-%m-%d) - RELEASE_TYPE="canary" - RELEASE_INC_VERSION=$(cat Updates/build_version.txt) - RELEASE_INC_VERSION=$((RELEASE_INC_VERSION+1)) - RELEASE_VERSION="2.0.7.${RELEASE_INC_VERSION}" - RELEASE_NAME="${RELEASE_VERSION}_${RELEASE_TYPE}_${RELEASE_TIMESTAMP}" - echo "${RELEASE_NAME}" > "Duplicati/License/VersionTag.txt" - echo "${RELEASE_TYPE}" > "Duplicati/Library/AutoUpdater/AutoUpdateBuildChannel.txt" - mono "BuildTools/UpdateVersionStamp/bin/Release/UpdateVersionStamp.exe" --version="${RELEASE_VERSION}" - msbuild -p:DefineConstants=\"ENABLE_GTK\;XAMARIN_MAC\" -p:Configuration=Release Duplicati.sln - - - name: Build installers (OSX) - run: | - Installer/OSX/artifact_mac.sh - - - name: Upload build results - uses: actions/upload-artifact@v3 - with: - retention-days: 5 - name: build-results-mac - path: ~/artifacts/**/* - - windowsbuild: - name: windows installer - runs-on: windows-latest - needs: macbuild - steps: - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.3 - - name: Install NuGet - uses: nuget/setup-nuget@v1.1.1 - - uses: actions/checkout@v3 - - name: Retrieve mac build - uses: actions/download-artifact@v3 - with: - name: build-results-mac - path: ~/macartifacts - - name: set env - run: echo "ZIPBUILDFILE=$(resolve-path ~ | select-object -expandproperty path)\macartifacts\$(get-childitem ~\macartifacts\*.zip | select-object -first 1 -expandproperty name )" >> $env:GITHUB_ENV - - name: Build installers (Windows) - run: | - echo ${{ env.ZIPBUILDFILE }} - .\\Installer\\Windows\\artifact_win.bat ${{ env.ZIPBUILDFILE }} - - name: Upload build results - uses: actions/upload-artifact@v3 - with: - retention-days: 5 - name: build-results-windows - path: ~/artifacts/**/* - - debianbuild: - name: debian like installer - runs-on: ubuntu-latest - needs: macbuild - steps: - - uses: actions/checkout@v3 - - name: Retrieve mac build - uses: actions/download-artifact@v3 - with: - name: build-results-mac - path: ~/macartifacts - - name: set env - run: echo "ZIPBUILDFILE=$(ls ~/macartifacts/*.zip | tail -1)" >> $GITHUB_ENV - - name: Build installers (Deb) - run: | - echo ${{ env.ZIPBUILDFILE }} - sudo apt install debhelper - Installer/debian/artifact_deb.sh ${{ env.ZIPBUILDFILE }} - - name: Upload build results - uses: actions/upload-artifact@v3 - with: - retention-days: 5 - name: build-results-linux - path: ~/artifacts/**/* - diff --git a/.gitignore b/.gitignore index 20f24ea49..2e3ba0263 100644 --- a/.gitignore +++ b/.gitignore @@ -4,29 +4,17 @@ obj/ *.userprefs *.user *.suo -Installer/Paraffin.exe -Installer/account_info Duplicati/Localization/compiled Duplicati/Localization/*/ Duplicati/Localization/*.diff.csv Duplicati/Localization/*.new.csv Duplicati/Localization/*.updated.csv Duplicati/Localization/report.*.xml -Installer/incLocFiles.*.wxs Duplicati/Server/webroot/extjs-* -Installer/binfiles.wxs -Installer/generated-keys.xml -Installer/oem -Updates/build packages changelog-news.txt -binfiles.wxs .idea/ .vs/ /publish/ - -Installer/debian/*.buildinfo -/*.deb -/*.rpm - -ReleaseBuilder/build-temp/ \ No newline at end of file +ReleaseBuilder/build-temp/ +ReleaseBuilder/Resources/Windows/binfiles.wxs \ No newline at end of file diff --git a/BuildTools/DependencyFinder/DependencyFinder.csproj b/BuildTools/DependencyFinder/DependencyFinder.csproj deleted file mode 100644 index ef79e3a56..000000000 --- a/BuildTools/DependencyFinder/DependencyFinder.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - net8.0 - Exe - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - \ No newline at end of file diff --git a/BuildTools/DependencyFinder/DependencyFinder.sln b/BuildTools/DependencyFinder/DependencyFinder.sln deleted file mode 100644 index 85448817a..000000000 --- a/BuildTools/DependencyFinder/DependencyFinder.sln +++ /dev/null @@ -1,17 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyFinder", "DependencyFinder.csproj", "{3E891818-579A-4C06-8066-4C702BFA5921}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E891818-579A-4C06-8066-4C702BFA5921}.Debug|x86.ActiveCfg = Debug|x86 - {3E891818-579A-4C06-8066-4C702BFA5921}.Debug|x86.Build.0 = Debug|x86 - {3E891818-579A-4C06-8066-4C702BFA5921}.Release|x86.ActiveCfg = Release|x86 - {3E891818-579A-4C06-8066-4C702BFA5921}.Release|x86.Build.0 = Release|x86 - EndGlobalSection -EndGlobal diff --git a/BuildTools/DependencyFinder/Program.cs b/BuildTools/DependencyFinder/Program.cs deleted file mode 100644 index a11daf0bd..000000000 --- a/BuildTools/DependencyFinder/Program.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2024, The Duplicati Team -// https://duplicati.com, hello@duplicati.com -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -using System; -using System.Collections.Generic; -using Mono.Cecil; -using System.IO; -using System.Linq; - -namespace DependencyFinder -{ - class MainClass - { - public static void Main(string[] args) - { - var lst = - Directory.EnumerateFiles(args[0], "*.exe", SearchOption.AllDirectories).Union( - Directory.EnumerateFiles(args[0], "*.dll", SearchOption.AllDirectories)) - .Select(x => { - try { return AssemblyDefinition.ReadAssembly(x); } - catch { return null; } - }).Where(x => x != null) - .Distinct(); - - PoC(lst, Console.Out, new [] { args[0] }); - - } - - //Adapted from: https://stackoverflow.com/questions/9262464/tool-to-show-assembly-dependencies - public static void PoC(IEnumerable assemblies, TextWriter writer, IEnumerable searchfolders) - { - var resolver = new DefaultAssemblyResolver(); - searchfolders.ToList().ForEach(x => resolver.AddSearchDirectory(x)); - - //writer.WriteLine("digraph Dependencies {"); - var loaded = assemblies - .SelectMany(a => a.Modules.Cast()) - .SelectMany(m => m.AssemblyReferences.Cast()) - .Distinct() - .Select(asm => { - var dllname = asm.Name + ".dll"; - //Console.WriteLine("Probing for {0}", dllname); - try { return AssemblyDefinition.ReadAssembly(dllname); } - catch { } - try { return resolver.Resolve(asm); } - catch { } - - return null; - }) - .Where(assembly => assembly != null) - .ToList(); - - //loaded.ForEach(a => a.MainModule.ReadSymbols()); - - loaded.Select(x => x.FullName).Distinct().OrderBy(x => x).ToList().ForEach(x => writer.WriteLine("{0}", x)); - /*loaded.ForEach(a => - { - foreach (var r in a.MainModule.AssemblyReferences.Cast()) - writer.WriteLine(@"""{0}"" -> ""{1}"";", r.Name, a.Name.Name); - } );*/ - - //writer.WriteLine("}"); - } - - - } -} diff --git a/BuildTools/GnupgSigningTool/GnupgSigningTool.csproj b/BuildTools/GnupgSigningTool/GnupgSigningTool.csproj deleted file mode 100644 index 0e7751830..000000000 --- a/BuildTools/GnupgSigningTool/GnupgSigningTool.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net8.0 - Exe - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - \ No newline at end of file diff --git a/BuildTools/GnupgSigningTool/GnupgSigningTool.sln b/BuildTools/GnupgSigningTool/GnupgSigningTool.sln deleted file mode 100644 index 4f560baea..000000000 --- a/BuildTools/GnupgSigningTool/GnupgSigningTool.sln +++ /dev/null @@ -1,42 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29123.88 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GnupgSigningTool", "GnupgSigningTool.csproj", "{72B910F2-8E80-4955-A0D6-ED4C35CEE665}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Utility", "..\..\Duplicati\Library\Utility\Duplicati.Library.Utility.csproj", "{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Encryption", "..\..\Duplicati\Library\Encryption\Duplicati.Library.Encryption.csproj", "{2CF2D90E-C25B-47AD-91E0-98451BAB8058}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Interface", "..\..\Duplicati\Library\Interface\Duplicati.Library.Interface.csproj", "{C5899F45-B0FF-483C-9D38-24A9FCAAB237}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {72B910F2-8E80-4955-A0D6-ED4C35CEE665}.Debug|x86.ActiveCfg = Debug|x86 - {72B910F2-8E80-4955-A0D6-ED4C35CEE665}.Debug|x86.Build.0 = Debug|x86 - {72B910F2-8E80-4955-A0D6-ED4C35CEE665}.Release|x86.ActiveCfg = Release|x86 - {72B910F2-8E80-4955-A0D6-ED4C35CEE665}.Release|x86.Build.0 = Release|x86 - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Debug|x86.ActiveCfg = Debug|Any CPU - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Debug|x86.Build.0 = Debug|Any CPU - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Release|x86.ActiveCfg = Release|Any CPU - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Release|x86.Build.0 = Release|Any CPU - {2CF2D90E-C25B-47AD-91E0-98451BAB8058}.Debug|x86.ActiveCfg = Debug|Any CPU - {2CF2D90E-C25B-47AD-91E0-98451BAB8058}.Debug|x86.Build.0 = Debug|Any CPU - {2CF2D90E-C25B-47AD-91E0-98451BAB8058}.Release|x86.ActiveCfg = Release|Any CPU - {2CF2D90E-C25B-47AD-91E0-98451BAB8058}.Release|x86.Build.0 = Release|Any CPU - {C5899F45-B0FF-483C-9D38-24A9FCAAB237}.Debug|x86.ActiveCfg = Debug|Any CPU - {C5899F45-B0FF-483C-9D38-24A9FCAAB237}.Debug|x86.Build.0 = Debug|Any CPU - {C5899F45-B0FF-483C-9D38-24A9FCAAB237}.Release|x86.ActiveCfg = Release|Any CPU - {C5899F45-B0FF-483C-9D38-24A9FCAAB237}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {71CC6B1F-7F52-4059-8761-30B3D0501ECC} - EndGlobalSection -EndGlobal diff --git a/BuildTools/GnupgSigningTool/Program.cs b/BuildTools/GnupgSigningTool/Program.cs deleted file mode 100644 index a53c68453..000000000 --- a/BuildTools/GnupgSigningTool/Program.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2024, The Duplicati Team -// https://duplicati.com, hello@duplicati.com -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -using System; -using System.Collections.Generic; - -namespace GnupgSigningTool -{ - public static class Program - { - - private static string keyfilepassword; - - private static string gpgkeypassphrase; - private static string gpgkeyfile; - private static string gpgpath; - private static string gpgkeyid; - private static bool useArmor; - - private static string inputFile; - private static string signatureFile; - - private static void SpawnGPG() - { - - var armorOption = useArmor ? "--armor" : ""; - - var gpgArgument = string.Format("--pinentry-mode loopback --passphrase-fd 0 --batch --yes {0} -u \"{1}\" --output \"{2}\" --detach-sig \"{3}\"", - armorOption, - gpgkeyid, - signatureFile, - inputFile); - - var proc = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo - { - FileName = gpgpath, - Arguments = gpgArgument, - RedirectStandardInput = true, - UseShellExecute = false - }); - - proc.StandardInput.WriteLine(gpgkeypassphrase); - - proc.WaitForExit(); - } - - private static void LoadGPGKeyIdAndPassphrase() - { - using (var enc = new Duplicati.Library.Encryption.AESEncryption(keyfilepassword, new Dictionary())) - using (var ms = new System.IO.MemoryStream()) - using (var fs = System.IO.File.OpenRead(gpgkeyfile)) - { - try - { - enc.Decrypt(fs, ms); - } - catch (System.Security.Cryptography.CryptographicException e) - { - throw new ArgumentException("Failed to decrypt gpg secret credentials file: {0}\n", e.Message); - } - - ms.Position = 0; - - using (var sr = new System.IO.StreamReader(ms)) - { - var lines = sr.ReadToEnd().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); - gpgkeyid = lines[0]; - gpgkeypassphrase = lines[1]; - } - } - } - - - public static void Main(string[] _args) - { - var args = new List(_args); - var opts = Duplicati.Library.Utility.CommandLineParser.ExtractOptions(args); - - opts.TryGetValue("inputfile", out inputFile); - opts.TryGetValue("signaturefile", out signatureFile); - opts.TryGetValue("keyfile-password", out keyfilepassword); - opts.TryGetValue("gpgkeyfile", out gpgkeyfile); - opts.TryGetValue("gpgpath", out gpgpath); - opts.TryGetValue("armor", out string armor); - - useArmor = Boolean.TryParse(armor, out useArmor) && useArmor; - - if (string.IsNullOrWhiteSpace(gpgkeyfile)) - { - throw new ArgumentException("No gpgfile with encrypted credentials specified."); - } - - if (!System.IO.File.Exists(gpgkeyfile)) - { - throw new ArgumentException("Specified file with encrypted gpg credentials not found."); - } - - LoadGPGKeyIdAndPassphrase(); - - if (gpgkeyid is null || gpgkeypassphrase is null) - { - throw new ArgumentException("Could not fetch gpg key id or gpg passphrase."); - } - - gpgpath = gpgpath ?? Duplicati.Library.Encryption.GPGEncryption.GetGpgProgramPath(); - - SpawnGPG(); - } - } -} diff --git a/BuildTools/UpdateVersionStamp/Program.cs b/BuildTools/UpdateVersionStamp/Program.cs deleted file mode 100644 index b6a4033ea..000000000 --- a/BuildTools/UpdateVersionStamp/Program.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (C) 2024, The Duplicati Team -// https://duplicati.com, hello@duplicati.com -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -using System; -using System.IO; -using System.Text.RegularExpressions; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace UpdateVersionStamp -{ - public static class Program - { - private static readonly string DIR_SEP = Path.DirectorySeparatorChar.ToString(); - private static readonly Dictionary FILEMAP; - - static Program() - { - var versionre = @"(?\d+\.\d+\.(\*|(\d+(\.(\*|\d+)))?))"; - FILEMAP = new Dictionary(StringComparer.InvariantCultureIgnoreCase); - FILEMAP.Add("UpgradeData.wxi", new Regex(@"\<\?define ProductVersion\=\""" + versionre + @"\"" \?\>")); - FILEMAP.Add("AssemblyRedirects.xml", new Regex(@"newVersion\=\""" + versionre + @"\""")); - FILEMAP.Add("index.html", new Regex(@"\?v\=" + versionre)); - FILEMAP.Add("login.html", new Regex(@"\?v\=" + versionre)); - FILEMAP.Add("app.js", new Regex(@"\?v\=" + versionre)); - } - - private class Options - { - public string sourcefolder = Path.GetFullPath(Environment.CurrentDirectory); - public string ignorefilter = null; - public string version = null; - public string versiontag = null; - - public void Fixup() - { - sourcefolder = Duplicati.Library.Common.IO.Util.AppendDirSeparator(System.IO.Path.GetFullPath(sourcefolder.Replace("/", DIR_SEP))); - if (ignorefilter != null) - ignorefilter =ignorefilter.Replace("/", DIR_SEP); - } - } - - public static void Main(string[] _args) - { - List args = new List(_args); - Dictionary options = Duplicati.Library.Utility.CommandLineParser.ExtractOptions(args); - Options opt = new Options(); - - foreach (FieldInfo fi in opt.GetType().GetFields()) - if (options.ContainsKey(fi.Name)) - fi.SetValue(opt, options[fi.Name]); - - opt.Fixup(); - - Duplicati.Library.Utility.IFilter filter = null; - if (!string.IsNullOrEmpty(opt.ignorefilter)) - filter = new Duplicati.Library.Utility.FilterExpression(opt.ignorefilter, false); - - Func isFile = (string x) => !x.EndsWith(DIR_SEP); - - var paths = Duplicati.Library.Utility.Utility.EnumerateFileSystemEntries(opt.sourcefolder) - .Where(x => Duplicati.Library.Utility.FilterExpression.Matches(filter, x)) - .Where(x => isFile(x) && FILEMAP.ContainsKey(Path.GetFileName(x))) - .Select(x => - { - var m = FILEMAP[Path.GetFileName(x)].Match(File.ReadAllText(x)); - return m.Success ? - new { File = x, Version = new Version(m.Groups["version"].Value.Replace("*", "0")), Display = m.Groups["version"].Value } - : null; - }) - .Where(x => x != null) - .ToArray(); //No need to re-eval - - if (paths.Count() == 0) - { - Console.WriteLine("No files found to update..."); - return; - } - - foreach (var p in paths) - Console.WriteLine("{0}\t:{1}", p.Display, p.File); - - if (string.IsNullOrWhiteSpace(opt.version)) - { - var maxv = paths.Select(x => x.Version).Max(); - opt.version = new Version( - maxv.Major, - maxv.Minor, - maxv.Build, - maxv.Revision).ToString(); - } - - //Sanity check - var nv = new Version(opt.version).ToString(4); - - foreach (var p in paths) - { - var re = FILEMAP[Path.GetFileName(p.File)]; - var txt = File.ReadAllText(p.File); - //var m = re.Match(txt).Groups["version"]; - txt = re.Replace(txt, (m) => { - var t = m.Groups["version"]; - return m.Value.Replace(t.Value, nv); - }); - File.WriteAllText(p.File, txt); - } - - Console.WriteLine("Updated {0} files to version {1}", paths.Count(), opt.version); - } - } -} diff --git a/BuildTools/UpdateVersionStamp/UpdateVersionStamp.csproj b/BuildTools/UpdateVersionStamp/UpdateVersionStamp.csproj deleted file mode 100644 index e7bd3a791..000000000 --- a/BuildTools/UpdateVersionStamp/UpdateVersionStamp.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - net8.0 - Exe - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - \ No newline at end of file diff --git a/BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln b/BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln deleted file mode 100644 index 512028baa..000000000 --- a/BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln +++ /dev/null @@ -1,35 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UpdateVersionStamp", "UpdateVersionStamp.csproj", "{1920C3B0-98A0-410F-8972-9C19FA616FE5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Utility", "..\..\Duplicati\Library\Utility\Duplicati.Library.Utility.csproj", "{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Common", "..\..\Duplicati\Library\Common\Duplicati.Library.Common.csproj", "{D63E53E4-A458-4C2F-914D-92F715F58ACF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1920C3B0-98A0-410F-8972-9C19FA616FE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1920C3B0-98A0-410F-8972-9C19FA616FE5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1920C3B0-98A0-410F-8972-9C19FA616FE5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1920C3B0-98A0-410F-8972-9C19FA616FE5}.Release|Any CPU.Build.0 = Release|Any CPU - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Release|Any CPU.Build.0 = Release|Any CPU - {D63E53E4-A458-4C2F-914D-92F715F58ACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D63E53E4-A458-4C2F-914D-92F715F58ACF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D63E53E4-A458-4C2F-914D-92F715F58ACF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D63E53E4-A458-4C2F-914D-92F715F58ACF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = UpdateVersionStamp.csproj - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ReleaseBuilder/Build/Command.Compile.Post.cs b/ReleaseBuilder/Build/Command.Compile.Post.cs index e5cffc05e..8b3905171 100644 --- a/ReleaseBuilder/Build/Command.Compile.Post.cs +++ b/ReleaseBuilder/Build/Command.Compile.Post.cs @@ -186,9 +186,9 @@ public static partial class Command EnvHelper.CopyDirectory(buildDir, binDir, recursive: true); // Patch the plist and place the icon from the resources - var installerDir = Path.Combine(baseDir, "Installer", "MacOS"); + var resourcesDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "MacOS"); - var plist = File.ReadAllText(Path.Combine(installerDir, "app-resources", "Info.plist")) + var plist = File.ReadAllText(Path.Combine(resourcesDir, "app-resources", "Info.plist")) .Replace("!LONG_VERSION!", rtcfg.ReleaseInfo.ReleaseName) .Replace("!SHORT_VERSION!", rtcfg.ReleaseInfo.Version.ToString()); @@ -198,21 +198,21 @@ public static partial class Command ); File.Copy( - Path.Combine(installerDir, "app-resources", "Duplicati.icns"), + Path.Combine(resourcesDir, "app-resources", "Duplicati.icns"), Path.Combine(tmpApp, "Contents", "Resources", "Duplicati.icns"), overwrite: true ); // Inject the launch agent EnvHelper.CopyDirectory( - Path.Combine(installerDir, "daemon"), + Path.Combine(resourcesDir, "daemon"), Path.Combine(tmpApp, "Contents", "Resources"), recursive: true ); // Inject the uninstall.sh script File.Copy( - Path.Combine(installerDir, "uninstall.sh"), + Path.Combine(resourcesDir, "uninstall.sh"), Path.Combine(tmpApp, "Contents", "MacOS", "uninstall.sh"), overwrite: true ); @@ -239,7 +239,7 @@ public static partial class Command .Distinct() .ToList(); - var entitlementFile = Path.Combine(installerDir, "Entitlements.plist"); + var entitlementFile = Path.Combine(resourcesDir, "Entitlements.plist"); foreach (var f in signtargets) await rtcfg.Codesign(f, entitlementFile); diff --git a/ReleaseBuilder/Build/Command.CreatePackage.cs b/ReleaseBuilder/Build/Command.CreatePackage.cs index a683f4795..b66553c38 100644 --- a/ReleaseBuilder/Build/Command.CreatePackage.cs +++ b/ReleaseBuilder/Build/Command.CreatePackage.cs @@ -240,8 +240,7 @@ public static partial class Command /// A task representing the asynchronous operation. static async Task BuildMsiPackage(string baseDir, string buildRoot, string msiFile, PackageTarget target, RuntimeConfig rtcfg) { - var installerDir = Path.Combine(baseDir, "Installer", "Windows"); - var binFiles = Path.Combine(installerDir, "binfiles.wxs"); + var resourcesDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "Windows"); var buildTmp = Path.Combine(buildRoot, "tmp-msi"); if (Directory.Exists(buildTmp)) @@ -254,6 +253,10 @@ public static partial class Command if (!sourceFiles.EndsWith(Path.DirectorySeparatorChar)) sourceFiles += Path.DirectorySeparatorChar; + var binFiles = Path.Combine(resourcesDir, "binfiles.txt"); + if (File.Exists(binFiles)) + File.Delete(binFiles); + File.WriteAllText(binFiles, WixHeatBuilder.CreateWixFilelist(sourceFiles)); await ProcessHelper.Execute([ @@ -261,9 +264,9 @@ public static partial class Command "--define", $"HarvestPath={sourceFiles}", "--arch", target.ArchString, "--output", msiFile, - Path.Combine(installerDir, "Shortcuts.wxs"), + Path.Combine(resourcesDir, "Shortcuts.wxs"), binFiles, - Path.Combine(installerDir, "Duplicati.wxs") + Path.Combine(resourcesDir, "Duplicati.wxs") ], workingDirectory: buildRoot); if (rtcfg.UseAuthenticodeSigning) @@ -320,8 +323,8 @@ public static partial class Command } Directory.CreateDirectory(mountDir); - var installerDir = Path.Combine(baseDir, "Installer", "MacOS"); - var compressedDmg = Path.Combine(installerDir, "template.dmg.bz2"); + var resourcesDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "MacOS"); + var compressedDmg = Path.Combine(resourcesDir, "template.dmg.bz2"); if (!File.Exists(compressedDmg)) throw new FileNotFoundException($"Compressed dmg template file not found: {compressedDmg}"); @@ -358,7 +361,7 @@ public static partial class Command // Place the prepared folder EnvHelper.CopyDirectory(Path.Combine(buildRoot, $"{target.BuildTargetString}-{rtcfg.MacOSAppName}"), appFolder, recursive: true); - await PrepareAndReSignAppBundle(appFolder, installerDir, target, rtcfg); + await PrepareAndReSignAppBundle(appFolder, resourcesDir, target, rtcfg); // Set permissions inside DMG file if (!OperatingSystem.IsWindows()) @@ -375,7 +378,7 @@ public static partial class Command Directory.Delete(mountDir, false); if (rtcfg.UseCodeSignSigning) - await rtcfg.Codesign(dmgFile, Path.Combine(installerDir, "Entitlements.plist")); + await rtcfg.Codesign(dmgFile, Path.Combine(resourcesDir, "Entitlements.plist")); } /// @@ -394,7 +397,7 @@ public static partial class Command Directory.Delete(tmpFolder, true); Directory.CreateDirectory(tmpFolder); - var installerDir = Path.Combine(baseDir, "Installer", "MacOS"); + var installerDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "MacOS"); var appFolder = Path.Combine(tmpFolder, rtcfg.MacOSAppName); if (Directory.Exists(appFolder)) @@ -527,7 +530,7 @@ public static partial class Command } // Copy debian files - var installerDir = Path.Combine(baseDir, "Installer", "debian"); + var resourcesDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "debian"); // Write in the release notes if (!string.IsNullOrEmpty(rtcfg.ChangelogNews)) @@ -536,7 +539,7 @@ public static partial class Command // Write a custom changelog file File.WriteAllText( Path.Combine(pkgroot, "DEBIAN", "changelog"), - File.ReadAllText(Path.Combine(installerDir, "changelog.template.txt")) + File.ReadAllText(Path.Combine(resourcesDir, "changelog.template.txt")) .Replace("%VERSION%", rtcfg.ReleaseInfo.Version.ToString()) .Replace("%DATE%", DateTime.UtcNow.ToString("ddd, dd MMM yyyy HH:mm:ss +0000", CultureInfo.InvariantCulture)) ); @@ -554,7 +557,7 @@ public static partial class Command // Write a custom control file File.WriteAllText( Path.Combine(pkgroot, "DEBIAN", "control"), - File.ReadAllText(Path.Combine(installerDir, "control.template.txt")) + File.ReadAllText(Path.Combine(resourcesDir, "control.template.txt")) .Replace("%VERSION%", rtcfg.ReleaseInfo.Version.ToString()) .Replace("%ARCH%", debArchString) .Replace("%DEPENDS%", string.Join(", ", target.Interface == InterfaceType.GUI @@ -563,14 +566,14 @@ public static partial class Command ); // Install various helper files - var sharedDir = Path.Combine(baseDir, "Installer", "shared"); + var sharedDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "shared"); var supportFiles = new List<(string Source, string Destination)>{ ( - Path.Combine(installerDir, "systemd", "duplicati.default"), + Path.Combine(resourcesDir, "systemd", "duplicati.default"), Path.Combine(pkgroot, "etc", "default", "duplicati") ), ( - Path.Combine(installerDir, "systemd", "duplicati.service"), + Path.Combine(resourcesDir, "systemd", "duplicati.service"), Path.Combine(pkgroot, "lib", "systemd", "system", "duplicati.service") ), ( @@ -600,7 +603,7 @@ public static partial class Command // Copy the Docker build file File.Copy( - Path.Combine(installerDir, "Dockerfile.build"), + Path.Combine(resourcesDir, "Dockerfile.build"), Path.Combine(debroot, "Dockerfile"), true ); @@ -641,7 +644,7 @@ public static partial class Command /// A task representing the asynchronous operation. static async Task BuildRpmPackage(string baseDir, string buildRoot, string rpmFile, PackageTarget target, RuntimeConfig rtcfg) { - var installerDir = Path.Combine(baseDir, "Installer", "fedora"); + var resourcesDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "fedora"); var tmpbuild = Path.Combine(buildRoot, "tmp-fedora"); if (Directory.Exists(tmpbuild)) Directory.Delete(tmpbuild, true); @@ -667,13 +670,13 @@ public static partial class Command File.Move(tarfile, Path.Combine(sources, Path.GetFileName(tarfile))); // Move in extra files for building - var sharedDir = Path.Combine(baseDir, "Installer", "shared"); + var sharedDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "shared"); File.Copy(Path.Combine(sharedDir, "pixmaps", "duplicati.xpm"), Path.Combine(sources, "duplicati.xpm")); File.Copy(Path.Combine(sharedDir, "pixmaps", "duplicati.png"), Path.Combine(sources, "duplicati.png")); File.Copy(Path.Combine(sharedDir, "desktop", "duplicati.desktop"), Path.Combine(sources, "duplicati.desktop")); - File.Copy(Path.Combine(installerDir, "systemd", "duplicati.service"), Path.Combine(sources, "duplicati.service")); - File.Copy(Path.Combine(installerDir, "systemd", "duplicati.default"), Path.Combine(sources, "duplicati.default")); - File.Copy(Path.Combine(installerDir, "duplicati-install-recursive.sh"), Path.Combine(sources, "duplicati-install-recursive.sh")); + File.Copy(Path.Combine(resourcesDir, "systemd", "duplicati.service"), Path.Combine(sources, "duplicati.service")); + File.Copy(Path.Combine(resourcesDir, "systemd", "duplicati.default"), Path.Combine(sources, "duplicati.default")); + File.Copy(Path.Combine(resourcesDir, "duplicati-install-recursive.sh"), Path.Combine(sources, "duplicati-install-recursive.sh")); var executables = ExecutableRenames.AsEnumerable(); if (target.Interface == InterfaceType.Cli) @@ -682,7 +685,7 @@ public static partial class Command // Write custom script to install executable files File.WriteAllLines( Path.Combine(sources, "duplicati-install-binaries.sh"), - File.ReadAllLines(Path.Combine(installerDir, "duplicati-install-binaries.sh")) + File.ReadAllLines(Path.Combine(resourcesDir, "duplicati-install-binaries.sh")) .SelectMany(line => { if (line.StartsWith("REPL: ")) @@ -701,7 +704,7 @@ public static partial class Command File.WriteAllText( Path.Combine(sources, "duplicati.spec"), - File.ReadAllText(Path.Combine(installerDir, "duplicati.spec.template.txt")) + File.ReadAllText(Path.Combine(resourcesDir, "duplicati.spec.template.txt")) .Replace("%BUILDDATE%", DateTime.UtcNow.ToString("yyyyMMdd")) .Replace("%BUILDVERSION%", rtcfg.ReleaseInfo.Version.ToString()) .Replace("%BUILDTAG%", rtcfg.ReleaseInfo.Channel.ToString().ToLowerInvariant()) @@ -715,7 +718,7 @@ public static partial class Command // Install the Docker build file File.Copy( - Path.Combine(installerDir, "Dockerfile.build"), + Path.Combine(resourcesDir, "Dockerfile.build"), Path.Combine(tmpbuild, "Dockerfile"), true ); @@ -731,7 +734,7 @@ public static partial class Command // This is required because rpmbuild reads file mode // in a way that is not compatible with Docker desktop bind mounts File.Copy( - Path.Combine(installerDir, "inside-docker.sh"), + Path.Combine(resourcesDir, "inside-docker.sh"), Path.Combine(tmpbuild, "inside-docker.sh"), true ); @@ -768,7 +771,7 @@ public static partial class Command /// A task representing the asynchronous operation. private static async Task BuildDockerImages(string baseDir, string buildRoot, IEnumerable targets, RuntimeConfig rtcfg) { - var installerDir = Path.Combine(baseDir, "Installer", "Docker"); + var resourcesDir = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "Docker"); var dockerArchs = targets.Select(target => target switch { PackageTarget { Arch: ArchType.x64, OS: OSType.Linux, Interface: InterfaceType.Cli } => "linux/amd64", @@ -820,7 +823,7 @@ public static partial class Command "--platform", string.Join(",", dockerArchs), "--build-arg", $"VERSION={rtcfg.ReleaseInfo.Version}", "--build-arg", $"CHANNEL={rtcfg.ReleaseInfo.Channel.ToString().ToLowerInvariant()}", - "--file", Path.Combine(installerDir, "Dockerfile"), + "--file", Path.Combine(resourcesDir, "Dockerfile"), "--output", $"type=image,push={rtcfg.PushToDocker.ToString().ToLowerInvariant()}", "." ]); diff --git a/ReleaseBuilder/Build/Command.GitPush.cs b/ReleaseBuilder/Build/Command.GitPush.cs index 38a39b3a5..73df34282 100644 --- a/ReleaseBuilder/Build/Command.GitPush.cs +++ b/ReleaseBuilder/Build/Command.GitPush.cs @@ -18,7 +18,7 @@ public static partial class Command // Add modified files await ProcessHelper.Execute(new[] { "git", "add", - "Updates/build_version.txt", + "ReleaseBuilder/build_version.txt", "changelog.txt" }, workingDirectory: baseDir); diff --git a/ReleaseBuilder/Build/Command.cs b/ReleaseBuilder/Build/Command.cs index d208fb8da..73bc0ee0a 100644 --- a/ReleaseBuilder/Build/Command.cs +++ b/ReleaseBuilder/Build/Command.cs @@ -345,7 +345,7 @@ public static partial class Command } var baseDir = Path.GetDirectoryName(input.SolutionFile.FullName) ?? throw new Exception("Path to solution file was invalid"); - var versionFilePath = Path.Combine(baseDir, "Updates", "build_version.txt"); + var versionFilePath = Path.Combine(baseDir, "ReleaseBuilder", "build_version.txt"); if (!File.Exists(versionFilePath)) throw new FileNotFoundException($"Version file not found: {versionFilePath}"); @@ -596,7 +596,7 @@ public static partial class Command regex.Replace(File.ReadAllText(file), $"?v={releaseInfo.Version}") ); - var wixFile = Path.Combine(baseDir, "Installer", "Windows", "UpgradeData.wxi"); + var wixFile = Path.Combine(baseDir, "ReleaseBuilder", "Resources", "Windows", "UpgradeData.wxi"); File.WriteAllText( wixFile, Regex.Replace( diff --git a/Installer/Docker/Dockerfile b/ReleaseBuilder/Resources/Docker/Dockerfile similarity index 100% rename from Installer/Docker/Dockerfile rename to ReleaseBuilder/Resources/Docker/Dockerfile diff --git a/Installer/Docker/README.md b/ReleaseBuilder/Resources/Docker/README.md similarity index 100% rename from Installer/Docker/README.md rename to ReleaseBuilder/Resources/Docker/README.md diff --git a/Installer/MacOS/Distribution.xml b/ReleaseBuilder/Resources/MacOS/Distribution.xml similarity index 100% rename from Installer/MacOS/Distribution.xml rename to ReleaseBuilder/Resources/MacOS/Distribution.xml diff --git a/Installer/MacOS/Entitlements.plist b/ReleaseBuilder/Resources/MacOS/Entitlements.plist similarity index 100% rename from Installer/MacOS/Entitlements.plist rename to ReleaseBuilder/Resources/MacOS/Entitlements.plist diff --git a/Installer/MacOS/LICENSE.html b/ReleaseBuilder/Resources/MacOS/LICENSE.html similarity index 100% rename from Installer/MacOS/LICENSE.html rename to ReleaseBuilder/Resources/MacOS/LICENSE.html diff --git a/Installer/MacOS/app-resources/Duplicati.icns b/ReleaseBuilder/Resources/MacOS/app-resources/Duplicati.icns similarity index 100% rename from Installer/MacOS/app-resources/Duplicati.icns rename to ReleaseBuilder/Resources/MacOS/app-resources/Duplicati.icns diff --git a/Installer/MacOS/app-resources/Info.plist b/ReleaseBuilder/Resources/MacOS/app-resources/Info.plist similarity index 100% rename from Installer/MacOS/app-resources/Info.plist rename to ReleaseBuilder/Resources/MacOS/app-resources/Info.plist diff --git a/Installer/MacOS/app-scripts/postinstall b/ReleaseBuilder/Resources/MacOS/app-scripts/postinstall similarity index 100% rename from Installer/MacOS/app-scripts/postinstall rename to ReleaseBuilder/Resources/MacOS/app-scripts/postinstall diff --git a/Installer/MacOS/app-scripts/preinstall b/ReleaseBuilder/Resources/MacOS/app-scripts/preinstall similarity index 100% rename from Installer/MacOS/app-scripts/preinstall rename to ReleaseBuilder/Resources/MacOS/app-scripts/preinstall diff --git a/Installer/MacOS/daemon-scripts/postinstall b/ReleaseBuilder/Resources/MacOS/daemon-scripts/postinstall similarity index 100% rename from Installer/MacOS/daemon-scripts/postinstall rename to ReleaseBuilder/Resources/MacOS/daemon-scripts/postinstall diff --git a/Installer/MacOS/daemon-scripts/preinstall b/ReleaseBuilder/Resources/MacOS/daemon-scripts/preinstall similarity index 100% rename from Installer/MacOS/daemon-scripts/preinstall rename to ReleaseBuilder/Resources/MacOS/daemon-scripts/preinstall diff --git a/Installer/MacOS/daemon/com.duplicati.app.launchagent.plist b/ReleaseBuilder/Resources/MacOS/daemon/com.duplicati.app.launchagent.plist similarity index 100% rename from Installer/MacOS/daemon/com.duplicati.app.launchagent.plist rename to ReleaseBuilder/Resources/MacOS/daemon/com.duplicati.app.launchagent.plist diff --git a/Installer/MacOS/template.dmg.bz2 b/ReleaseBuilder/Resources/MacOS/template.dmg.bz2 similarity index 100% rename from Installer/MacOS/template.dmg.bz2 rename to ReleaseBuilder/Resources/MacOS/template.dmg.bz2 diff --git a/Installer/MacOS/uninstall.sh b/ReleaseBuilder/Resources/MacOS/uninstall.sh similarity index 100% rename from Installer/MacOS/uninstall.sh rename to ReleaseBuilder/Resources/MacOS/uninstall.sh diff --git a/Installer/Windows/Duplicati.wxs b/ReleaseBuilder/Resources/Windows/Duplicati.wxs similarity index 100% rename from Installer/Windows/Duplicati.wxs rename to ReleaseBuilder/Resources/Windows/Duplicati.wxs diff --git a/Installer/Windows/Resources/InstallerLarge.bmp b/ReleaseBuilder/Resources/Windows/Resources/InstallerLarge.bmp similarity index 100% rename from Installer/Windows/Resources/InstallerLarge.bmp rename to ReleaseBuilder/Resources/Windows/Resources/InstallerLarge.bmp diff --git a/Installer/Windows/Resources/InstallerSmall.bmp b/ReleaseBuilder/Resources/Windows/Resources/InstallerSmall.bmp similarity index 100% rename from Installer/Windows/Resources/InstallerSmall.bmp rename to ReleaseBuilder/Resources/Windows/Resources/InstallerSmall.bmp diff --git a/Installer/Windows/Resources/MITLicense.rtf b/ReleaseBuilder/Resources/Windows/Resources/MITLicense.rtf similarity index 100% rename from Installer/Windows/Resources/MITLicense.rtf rename to ReleaseBuilder/Resources/Windows/Resources/MITLicense.rtf diff --git a/Installer/Windows/Shortcuts.wxs b/ReleaseBuilder/Resources/Windows/Shortcuts.wxs similarity index 100% rename from Installer/Windows/Shortcuts.wxs rename to ReleaseBuilder/Resources/Windows/Shortcuts.wxs diff --git a/Installer/Windows/UpgradeData.wxi b/ReleaseBuilder/Resources/Windows/UpgradeData.wxi similarity index 87% rename from Installer/Windows/UpgradeData.wxi rename to ReleaseBuilder/Resources/Windows/UpgradeData.wxi index 8f7d4d449..cdcc78720 100644 --- a/Installer/Windows/UpgradeData.wxi +++ b/ReleaseBuilder/Resources/Windows/UpgradeData.wxi @@ -3,7 +3,7 @@ - + diff --git a/ReleaseBuilder/Resources/Windows/binfiles.wxs b/ReleaseBuilder/Resources/Windows/binfiles.wxs new file mode 100755 index 000000000..f29900798 --- /dev/null +++ b/ReleaseBuilder/Resources/Windows/binfiles.wxs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Installer/debian/Dockerfile.build b/ReleaseBuilder/Resources/debian/Dockerfile.build similarity index 100% rename from Installer/debian/Dockerfile.build rename to ReleaseBuilder/Resources/debian/Dockerfile.build diff --git a/Installer/debian/changelog.template.txt b/ReleaseBuilder/Resources/debian/changelog.template.txt similarity index 100% rename from Installer/debian/changelog.template.txt rename to ReleaseBuilder/Resources/debian/changelog.template.txt diff --git a/Installer/debian/control.template.txt b/ReleaseBuilder/Resources/debian/control.template.txt similarity index 100% rename from Installer/debian/control.template.txt rename to ReleaseBuilder/Resources/debian/control.template.txt diff --git a/Installer/debian/init-script-example.sh b/ReleaseBuilder/Resources/debian/init-script-example.sh similarity index 100% rename from Installer/debian/init-script-example.sh rename to ReleaseBuilder/Resources/debian/init-script-example.sh diff --git a/Installer/debian/systemd/duplicati.default b/ReleaseBuilder/Resources/debian/systemd/duplicati.default similarity index 100% rename from Installer/debian/systemd/duplicati.default rename to ReleaseBuilder/Resources/debian/systemd/duplicati.default diff --git a/Installer/debian/systemd/duplicati.service b/ReleaseBuilder/Resources/debian/systemd/duplicati.service similarity index 100% rename from Installer/debian/systemd/duplicati.service rename to ReleaseBuilder/Resources/debian/systemd/duplicati.service diff --git a/Installer/fedora/Dockerfile.build b/ReleaseBuilder/Resources/fedora/Dockerfile.build similarity index 100% rename from Installer/fedora/Dockerfile.build rename to ReleaseBuilder/Resources/fedora/Dockerfile.build diff --git a/Installer/fedora/duplicati-install-binaries.sh b/ReleaseBuilder/Resources/fedora/duplicati-install-binaries.sh similarity index 100% rename from Installer/fedora/duplicati-install-binaries.sh rename to ReleaseBuilder/Resources/fedora/duplicati-install-binaries.sh diff --git a/Installer/fedora/duplicati-install-recursive.sh b/ReleaseBuilder/Resources/fedora/duplicati-install-recursive.sh similarity index 100% rename from Installer/fedora/duplicati-install-recursive.sh rename to ReleaseBuilder/Resources/fedora/duplicati-install-recursive.sh diff --git a/Installer/fedora/duplicati.spec.template.txt b/ReleaseBuilder/Resources/fedora/duplicati.spec.template.txt similarity index 100% rename from Installer/fedora/duplicati.spec.template.txt rename to ReleaseBuilder/Resources/fedora/duplicati.spec.template.txt diff --git a/Installer/fedora/inside-docker.sh b/ReleaseBuilder/Resources/fedora/inside-docker.sh similarity index 100% rename from Installer/fedora/inside-docker.sh rename to ReleaseBuilder/Resources/fedora/inside-docker.sh diff --git a/Installer/fedora/systemd/duplicati.default b/ReleaseBuilder/Resources/fedora/systemd/duplicati.default similarity index 100% rename from Installer/fedora/systemd/duplicati.default rename to ReleaseBuilder/Resources/fedora/systemd/duplicati.default diff --git a/Installer/fedora/systemd/duplicati.service b/ReleaseBuilder/Resources/fedora/systemd/duplicati.service similarity index 100% rename from Installer/fedora/systemd/duplicati.service rename to ReleaseBuilder/Resources/fedora/systemd/duplicati.service diff --git a/Installer/shared/desktop/duplicati.desktop b/ReleaseBuilder/Resources/shared/desktop/duplicati.desktop similarity index 100% rename from Installer/shared/desktop/duplicati.desktop rename to ReleaseBuilder/Resources/shared/desktop/duplicati.desktop diff --git a/Installer/shared/pixmaps/duplicati.png b/ReleaseBuilder/Resources/shared/pixmaps/duplicati.png similarity index 100% rename from Installer/shared/pixmaps/duplicati.png rename to ReleaseBuilder/Resources/shared/pixmaps/duplicati.png diff --git a/Installer/shared/pixmaps/duplicati.svg b/ReleaseBuilder/Resources/shared/pixmaps/duplicati.svg similarity index 100% rename from Installer/shared/pixmaps/duplicati.svg rename to ReleaseBuilder/Resources/shared/pixmaps/duplicati.svg diff --git a/Installer/shared/pixmaps/duplicati.xpm b/ReleaseBuilder/Resources/shared/pixmaps/duplicati.xpm similarity index 100% rename from Installer/shared/pixmaps/duplicati.xpm rename to ReleaseBuilder/Resources/shared/pixmaps/duplicati.xpm diff --git a/Updates/build_version.txt b/ReleaseBuilder/build_version.txt similarity index 100% rename from Updates/build_version.txt rename to ReleaseBuilder/build_version.txt diff --git a/build-debug-update.sh b/build-debug-update.sh deleted file mode 100755 index d4c9bbb0c..000000000 --- a/build-debug-update.sh +++ /dev/null @@ -1,76 +0,0 @@ -RELEASE_TIMESTAMP=$(date +%Y-%m-%d) - -RELEASE_INC_VERSION=$(cat Updates/build_version.txt) -RELEASE_INC_VERSION=$((RELEASE_INC_VERSION+1)) - -RELEASE_NAME=2.0_CLI_experimental_${RELEASE_TIMESTAMP} -RELEASE_CHANGEINFO=$(cat Updates/debug_changeinfo.txt) -RELEASE_VERSION="2.0.0.${RELEASE_INC_VERSION}" - -UPDATE_ZIP_URLS=http://updates.duplicati.com/debug/duplicati.zip\;http://alt.updates.duplicati.com/debug/duplicati.zip -UPDATE_MANIFEST_URLS=http://updates.duplicati.com/debug/latest.manifest\;http://alt.updates.duplicati.com/debug/latest.manifest -UPDATER_KEYFILE=/Users/kenneth/Dropbox/Privat/Duplicati-updater-debug.key - -if [ "x${RELEASE_CHANGEINFO}" == "x" ]; then - echo "No information in changeinfo file" - exit 0 -fi - -echo -n "Enter keyfile password: " -read -s KEYFILE_PASSWORD -echo - -echo "${RELEASE_NAME}" > Duplicati/License/VersionTag.txt -echo "${UPDATE_MANIFEST_URLS}" > Duplicati/Library/AutoUpdater/AutoUpdateURL.txt -cp "Updates/debug_key.txt" Duplicati/Library/AutoUpdater/AutoUpdateSignKeys.txt - -rm -rf Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug - -mono BuildTools/UpdateVersionStamp/bin/Debug/UpdateVersionStamp.exe --version="${RELEASE_VERSION}" -xbuild /p:Configuration=Debug BuildTools/AutoUpdateBuilder/AutoUpdateBuilder.sln -xbuild /p:Configuration=Debug Duplicati.sln -BUILD_STATUS=$? - -if [ "${BUILD_STATUS}" -ne 0 ]; then - echo "Failed to build, xbuild gave ${BUILD_STATUS}, exiting" - exit 4 -fi - -if [ ! -d "Updates/build" ]; then mkdir "Updates/build"; fi - -UPDATE_SOURCE=Updates/build/debug_source-${RELEASE_VERSION} -UPDATE_TARGET=Updates/build/debug_target-${RELEASE_VERSION} - -if [ -e "${UPDATE_SOURCE}" ]; then rm -rf "${UPDATE_SOURCE}"; fi -if [ -e "${UPDATE_TARGET}" ]; then rm -rf "${UPDATE_TARGET}"; fi - -mkdir "${UPDATE_SOURCE}" -mkdir "${UPDATE_TARGET}" - -cp -R Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug/* "${UPDATE_SOURCE}" -cp -R Duplicati/Server/webroot "${UPDATE_SOURCE}" - -if [ -e "${UPDATE_SOURCE}/control_dir" ]; then rm -rf "${UPDATE_SOURCE}/control_dir"; fi -if [ -e "${UPDATE_SOURCE}/Duplicati-server.sqlite" ]; then rm "${UPDATE_SOURCE}/Duplicati-server.sqlite"; fi -if [ -e "${UPDATE_SOURCE}/Duplicati.debug.log" ]; then rm "${UPDATE_SOURCE}/Duplicati.debug.log"; fi -if [ -e "${UPDATE_SOURCE}/updates" ]; then rm -rf "${UPDATE_SOURCE}/updates"; fi -rm -rf "${UPDATE_SOURCE}/"*.mdb; -rm -rf "${UPDATE_SOURCE}/"*.pdb; - -echo -echo "Building signed package ..." - -mono BuildTools/AutoUpdateBuilder/bin/Debug/AutoUpdateBuilder.exe --input="${UPDATE_SOURCE}" --output="${UPDATE_TARGET}" --keyfile="${UPDATER_KEYFILE}" --manifest=Updates/debug.manifest --changeinfo="${RELEASE_CHANGEINFO}" --displayname="${RELEASE_NAME}" --remoteurls="${UPDATE_ZIP_URLS}" --version="${RELEASE_VERSION}" --keyfile-password="$KEYFILE_PASSWORD" - -echo "${RELEASE_INC_VERSION}" > "Updates/build_version.txt" - -mv "${UPDATE_TARGET}/package.zip" "${UPDATE_TARGET}/duplicati.zip" -mv "${UPDATE_TARGET}/autoupdate.manifest" "${UPDATE_TARGET}/latest.manifest" - -mono BuildTools/UpdateVersionStamp/bin/Debug/UpdateVersionStamp.exe --version="2.0.0.7" - -echo -echo "Built DEBUG version: ${RELEASE_VERSION} - ${RELEASE_NAME}" -echo " in folder: ${UPDATE_TARGET}" - - diff --git a/build-installers.sh b/build-installers.sh deleted file mode 100755 index 282a235e9..000000000 --- a/build-installers.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/bin/bash - -if [ ! -f "$1" ] -then - echo "Please supply the path to an existing zip binary as the first argument" - exit 1 -fi - -while true -do - DOCKER_RESULT=$(docker ps) - if [ "$?" != "0" ] - then - echo "It appears the Docker daemon is not running, make sure you started it" - read -p "Press [Enter] key to AFTER you started Docker" - continue - fi - break -done - -GITHUB_TOKEN_FILE="${HOME}/.config/github-api-token" -GPG_KEYFILE="${HOME}/.config/signkeys/Duplicati/updater-gpgkey.key" -AUTHENTICODE_PFXFILE="${HOME}/.config/signkeys/Duplicati/authenticode.pfx" -AUTHENTICODE_PASSWORD="${HOME}/.config/signkeys/Duplicati/authenticode.key" -MONO=/Library/Frameworks/Mono.framework/Commands/mono -VBOX_USER=IEUser@192.168.56.102 - -S3_BUCKET_NAME="updates.duplicati.com" - -GPG=/usr/local/bin/gpg2 - -# Newer GPG needs this to allow input from a non-terminal -export GPG_TTY=$(tty) - -ZIPFILE=$(basename "$1") -VERSION=$(echo "${ZIPFILE}" | cut -d "-" -f 2 | cut -d "_" -f 1) -BUILDTYPE=$(echo "${ZIPFILE}" | cut -d "-" -f 2 | cut -d "_" -f 2) -BUILDTAG_RAW=$(echo "${ZIPFILE}" | cut -d "." -f 1-4 | cut -d "-" -f 2-4) -BUILDTAG="${BUILDTAG_RAW//-}" - -RPMNAME="duplicati-${VERSION}-${BUILDTAG}.noarch.rpm" -DEBNAME="duplicati_${VERSION}-1_all.deb" -MSI64NAME="duplicati-${BUILDTAG_RAW}-x64.msi" -MSI32NAME="duplicati-${BUILDTAG_RAW}-x86.msi" -DMGNAME="duplicati-${BUILDTAG_RAW}.dmg" -PKGNAME="duplicati-${BUILDTAG_RAW}.pkg" -SPKNAME="duplicati-${BUILDTAG_RAW}.spk" -SIGNAME="duplicati-${BUILDTAG_RAW}-signatures.zip" - -UPDATE_TARGET="Updates/build/${BUILDTYPE}_target-${VERSION}" - -echo "Filename: ${ZIPFILE}" -echo "Version: ${VERSION}" -echo "Buildtype: ${BUILDTYPE}" -echo "Buildtag: ${BUILDTAG}" -echo "RPMName: ${RPMNAME}" -echo "DEBName: ${DEBNAME}" -echo "SPKName: ${SPKNAME}" - -build_file_signatures() { - if [ -f "${GPG_KEYFILE}" ]; then - "${MONO}" "BuildTools/GnupgSigningTool/bin/Debug/GnupgSigningTool.exe" \ - --inputfile=\"$1\" \ - --signaturefile=\"$2.sig\" \ - --armor=false --gpgkeyfile="${GPG_KEYFILE}" --gpgpath="${GPG}" \ - --keyfile-password="${KEYFILE_PASSWORD}" - - "${MONO}" "BuildTools/GnupgSigningTool/bin/Debug/GnupgSigningTool.exe" \ - --inputfile=\"$1\" \ - --signaturefile=\"$2.sig.asc\" \ - --armor=true --gpgkeyfile="${GPG_KEYFILE}" --gpgpath="${GPG}" \ - --keyfile-password="${KEYFILE_PASSWORD}" - fi - - md5 "$1" | awk -F ' ' '{print $NF}' > "$2.md5" - shasum -a 1 "$1" | awk -F ' ' '{print $1}' > "$2.sha1" - shasum -a 256 "$1" | awk -F ' ' '{print $1}' > "$2.sha256" -} - -if [ -f "${GPG_KEYFILE}" ]; then - if [ "z${KEYFILE_PASSWORD}" == "z" ]; then - echo -n "Enter keyfile password: " - read -s KEYFILE_PASSWORD - echo - fi - - GPGDATA=$("${MONO}" "BuildTools/AutoUpdateBuilder/bin/Debug/SharpAESCrypt.exe" d "${KEYFILE_PASSWORD}" "${GPG_KEYFILE}") - if [ ! $? -eq 0 ]; then - echo "Decrypting GPG keyfile failed" - exit 1 - fi - GPGID=$(echo "${GPGDATA}" | head -n 1) - GPGKEY=$(echo "${GPGDATA}" | head -n 2 | tail -n 1) -else - echo "No GPG keyfile found, skipping gpg signatures" -fi - -# Pre-boot virtual machine -echo "Booting Win10 build instance" -VBoxHeadless --startvm Duplicati-Win10-Build & - - -# Then do the local build to mask the waiting a little more - -echo "" -echo "" -echo "Building OSX package locally ..." -echo "" -echo "Enter local sudo password..." - -cd "Installer/OSX" -bash "make-dmg.sh" "../../$1" -mv "Duplicati.dmg" "../../${UPDATE_TARGET}/${DMGNAME}" -mv "Duplicati.pkg" "../../${UPDATE_TARGET}/${PKGNAME}" - - -cd "../.." - -echo "" -echo "" -echo "Building Synology package locally ..." - -cd Installer/Synology -bash "make-binary-package.sh" "../../$1" -mv "${SPKNAME}" "../../${UPDATE_TARGET}/" -cd ../.. - - -echo "" -echo "" -echo "Building Debian deb with Docker ..." - -cd "Installer/debian" -bash "docker-build-binary.sh" "../../$1" -cd "../.." - -mv "Installer/debian/${DEBNAME}" "${UPDATE_TARGET}" - -echo "Done building deb package" - - - -echo "" -echo "" -echo "Building Fedora RPM with Docker ..." - -cd "Installer/fedora" -bash "docker-build-binary.sh" "../../$1" -cd "../.." - -mv "Installer/fedora/${RPMNAME}" "${UPDATE_TARGET}" - -echo "Done building rpm package" - - -echo "" -echo "" -echo "Building Docker images ..." - -cd Installer/Docker -bash build-images.sh ../../$1 -cd ../.. - -echo "Done building Docker images" - - -echo "" -echo "" -echo "Building Windows instance in virtual machine" - -while true -do - ssh -o ConnectTimeout=5 ${VBOX_USER} "dir" - if [ $? -eq 255 ]; then - echo "Windows Build machine is not responding, try restarting it" - read -p "Press [Enter] key to try again" - continue - fi - break -done - -cat > "tmp-windows-commands.bat" < "./tmp/latest-installers.json" - -process_installer() { - if [ "$2" != "zip" ]; then - aws --profile=duplicati-upload s3 cp "${UPDATE_TARGET}/$1" "s3://${S3_BUCKET_NAME}/${BUILDTYPE}/$1" - fi - - local MD5=$(md5 ${UPDATE_TARGET}/$1 | awk -F ' ' '{print $NF}') - local SHA1=$(shasum -a 1 ${UPDATE_TARGET}/$1 | awk -F ' ' '{print $1}') - local SHA256=$(shasum -a 256 ${UPDATE_TARGET}/$1 | awk -F ' ' '{print $1}') - -cat >> "./tmp/latest-installers.json" <> "./tmp/latest-installers.json" <> "./tmp/latest-installers.js" -echo ";" >> "./tmp/latest-installers.js" - -aws --profile=duplicati-upload s3 cp "./tmp/latest-installers.json" "s3://${S3_BUCKET_NAME}/${BUILDTYPE}/latest-installers.json" -aws --profile=duplicati-upload s3 cp "./tmp/latest-installers.js" "s3://${S3_BUCKET_NAME}/${BUILDTYPE}/latest-installers.js" - -if [ -d "./tmp" ]; then - rm -rf "./tmp" -fi - -SIG_FOLDER="duplicati-${BUILDTAG_RAW}-signatures" -mkdir tmp -mkdir "./tmp/${SIG_FOLDER}" - -for FILE in "${SPKNAME}" "${RPMNAME}" "${DEBNAME}" "${DMGNAME}" "${PKGNAME}" "${MSI32NAME}" "${MSI64NAME}" "${ZIPFILE}"; do - build_file_signatures "${UPDATE_TARGET}/${FILE}" "./tmp/${SIG_FOLDER}/${FILE}" -done - -if [ "z${GPGID}" != "z" ]; then - echo "${GPGID}" > "./tmp/${SIG_FOLDER}/sign-key.txt" - echo "https://pgp.mit.edu/pks/lookup?op=get&search=${GPGID}" >> "./tmp/${SIG_FOLDER}/sign-key.txt" -fi - -if [ -f "${UPDATE_TARGET}/${SIGNAME}" ]; then - rm "${UPDATE_TARGET}/${SIGNAME}" -fi - -cd tmp -zip -r9 "./${SIGNAME}" "./${SIG_FOLDER}/" -cd .. - -mv "./tmp/${SIGNAME}" "${UPDATE_TARGET}/${SIGNAME}" -rm -rf "./tmp/${SIG_FOLDER}" - -aws --profile=duplicati-upload s3 cp "${UPDATE_TARGET}/${SIGNAME}" "s3://${S3_BUCKET_NAME}/${BUILDTYPE}/${SIGNAME}" - -GITHUB_TOKEN=$(cat "${GITHUB_TOKEN_FILE}") - -if [ "x${GITHUB_TOKEN}" == "x" ]; then - echo "No GITHUB_TOKEN found in environment, you can manually upload the binaries" -else - echo "Uploading files to Github release" - for FILE in "${SPKNAME}" "${RPMNAME}" "${DEBNAME}" "${DMGNAME}" "${PKGNAME}" "${MSI32NAME}" "${MSI64NAME}" "${SIGNAME}" "${ZIPFILE}"; do - github-release upload \ - --tag "v${VERSION}-${BUILDTAG_RAW}" \ - --name "${FILE}" \ - --repo "duplicati" \ - --user "duplicati" \ - --security-token "${GITHUB_TOKEN}" \ - --file "${UPDATE_TARGET}/${FILE}" - done -fi - -rm -rf "./tmp" - -if [ -f ~/.config/duplicati-mirror-sync.sh ]; then - bash ~/.config/duplicati-mirror-sync.sh -else - echo "Skipping CDN update" -fi - -VBoxManage controlvm "Duplicati-Win10-Build" poweroff - diff --git a/build-release.sh b/build-release.sh deleted file mode 100755 index 84b6f8796..000000000 --- a/build-release.sh +++ /dev/null @@ -1,424 +0,0 @@ -RELEASE_TIMESTAMP=$(date +%Y-%m-%d) - -RELEASE_INC_VERSION=$(cat Updates/build_version.txt) -RELEASE_INC_VERSION=$((RELEASE_INC_VERSION+1)) - -if [ "x$1" == "x" ]; then - RELEASE_TYPE="canary" - echo "No release type specified, using ${RELEASE_TYPE}" -else - RELEASE_TYPE=$1 -fi - -RELEASE_VERSION="2.0.8.${RELEASE_INC_VERSION}" -RELEASE_NAME="${RELEASE_VERSION}_${RELEASE_TYPE}_${RELEASE_TIMESTAMP}" - -RELEASE_CHANGELOG_FILE="changelog.txt" -RELEASE_CHANGELOG_NEWS_FILE="changelog-news.txt" - -RELEASE_FILE_NAME="duplicati-${RELEASE_NAME}" - -GIT_STASH_NAME="auto-build-${RELEASE_TIMESTAMP}" - -S3_BUCKET_NAME="updates.duplicati.com" - -UPDATE_ZIP_URLS="https://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip;https://alt.updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip" -UPDATE_MANIFEST_URLS="https://updates.duplicati.com/${RELEASE_TYPE}/latest.manifest;https://alt.updates.duplicati.com/${RELEASE_TYPE}/latest.manifest" -UPDATER_KEYFILE="${HOME}/.config/signkeys/Duplicati/updater-release.key" -GPG_KEYFILE="${HOME}/.config/signkeys/Duplicati/updater-gpgkey.key" -AUTHENTICODE_PFXFILE="${HOME}/.config/signkeys/Duplicati/authenticode.pfx" -AUTHENTICODE_PASSWORD="${HOME}/.config/signkeys/Duplicati/authenticode.key" - -GITHUB_TOKEN_FILE="${HOME}/.config/github-api-token" -DISCOURSE_TOKEN_FILE="${HOME}/.config/discourse-api-token" -XBUILD=/Library/Frameworks/Mono.framework/Commands/msbuild -NUGET=/Library/Frameworks/Mono.framework/Commands/nuget -MONO=/Library/Frameworks/Mono.framework/Commands/mono -XAMARIN=/Library/Frameworks/Xamarin.Mac.framework -GPG=/usr/local/bin/gpg2 -AWS=/usr/local/bin/aws -GITHUB_RELEASE=/usr/local/bin/github-release - -# Newer GPG needs this to allow input from a non-terminal -export GPG_TTY=$(tty) - -if [ ! -f "$GPG" ]; then - echo "gpg executable not found: $GPG" - exit 1 -fi - -if [ ! -f "$XBUILD" ]; then - echo "xbuild/msbuild executable not found: $XBUILD" - exit 1 -fi - -if [ ! -f "$MONO" ]; then - echo "mono executable not found: $MONO" - exit 1 -fi - -if [ ! -f "$NUGET" ]; then - echo "NuGet executable not found: $NUGET" - exit 1 -fi - -if [ ! -f "$AWS" ]; then - echo "aws-cli not found: $AWS" - exit 1 -fi - -if [ ! -f "$GITHUB_RELEASE" ]; then - echo "github-release executable not found: $GITHUB_RELEASE" - echo "Grab it from: https://github.com/aktau/github-release" - exit 1 -fi - - -# The "OTHER_UPLOADS" setting is no longer used -if [ "${RELEASE_TYPE}" == "nightly" ]; then - OTHER_UPLOADS="" -elif [ "${RELEASE_TYPE}" == "canary" ]; then - OTHER_UPLOADS="nightly" -elif [ "${RELEASE_TYPE}" == "experimental" ]; then - OTHER_UPLOADS="nightly canary" -elif [ "${RELEASE_TYPE}" == "beta" ]; then - OTHER_UPLOADS="experimental canary nightly" -elif [ "${RELEASE_TYPE}" == "stable" ]; then - OTHER_UPLOADS="beta experimental canary nightly" -else - echo "Unsupported release type: ${RELEASE_TYPE}, supported types are: nightly, canary, experimental, beta, stable" - exit 0 -fi - - -if [ ! -f "${RELEASE_CHANGELOG_FILE}" ]; then - echo "Changelog file is missing..." - exit 0 -fi - -if [ ! -f "${RELEASE_CHANGELOG_NEWS_FILE}" ]; then - echo "No updates to changelog file found" - echo - echo "To make a build without changelog news, run:" - echo " touch ""${RELEASE_CHANGELOG_NEWS_FILE}"" " - exit 0 -fi - -echo -n "Enter keyfile password: " -read -s KEYFILE_PASSWORD -echo - -if [ "z${KEYFILE_PASSWORD}" == "z" ]; then - echo "No password entered, quitting" - exit 0 -fi - -echo "Activating sudo rights for building the installers later, please enter sudo password:" -sudo echo "Sudo activated" - -RELEASE_CHANGEINFO_NEWS=$(cat "${RELEASE_CHANGELOG_NEWS_FILE}") - -git stash save "${GIT_STASH_NAME}" -git pull - -if [ ! "x${RELEASE_CHANGEINFO_NEWS}" == "x" ]; then - - echo "${RELEASE_TIMESTAMP} - ${RELEASE_NAME}" > "tmp_changelog.txt" - echo "==========" >> "tmp_changelog.txt" - echo "${RELEASE_CHANGEINFO_NEWS}" >> "tmp_changelog.txt" - echo >> "tmp_changelog.txt" - cat "${RELEASE_CHANGELOG_FILE}" >> "tmp_changelog.txt" - cp "tmp_changelog.txt" "${RELEASE_CHANGELOG_FILE}" - rm "tmp_changelog.txt" -fi - -echo "${RELEASE_NAME}" > "Duplicati/License/VersionTag.txt" -echo "${RELEASE_TYPE}" > "Duplicati/Library/AutoUpdater/AutoUpdateBuildChannel.txt" -echo "${UPDATE_MANIFEST_URLS}" > "Duplicati/Library/AutoUpdater/AutoUpdateURL.txt" -cp "Updates/release_key.txt" "Duplicati/Library/AutoUpdater/AutoUpdateSignKeys.txt" - -RELEASE_CHANGEINFO=$(cat ${RELEASE_CHANGELOG_FILE}) -if [ "x${RELEASE_CHANGEINFO}" == "x" ]; then - echo "No information in changeinfo file" - exit 0 -fi - -rm -rf "Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release" - -"${NUGET}" restore "BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln" -"${XBUILD}" /property:Configuration=Release "BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln" -"${MONO}" "BuildTools/UpdateVersionStamp/bin/Release/UpdateVersionStamp.exe" --version="${RELEASE_VERSION}" - -"${NUGET}" restore "BuildTools/AutoUpdateBuilder/AutoUpdateBuilder.sln" -"${NUGET}" restore "BuildTools/GnupgSigningTool/GnupgSigningTool.sln" -"${NUGET}" restore "Duplicati.sln" - -"${XBUILD}" /p:Configuration=Debug "BuildTools/AutoUpdateBuilder/AutoUpdateBuilder.sln" - -"${XBUILD}" /p:Configuration=Debug "BuildTools/GnupgSigningTool/GnupgSigningTool.sln" - -"${XBUILD}" /p:Configuration=Release /p:Version=${RELEASE_VERSION} /target:Clean "Duplicati.sln" -find "Duplicati" -type d -name "Release" | xargs rm -rf -if [ ! -d "$XAMARIN" ]; then - read -p"Warning, this build will not enable tray icon on Mac, hit any key to continue." - "${XBUILD}" /p:DefineConstants=ENABLE_GTK /p:Configuration=Release /p:Version=${RELEASE_VERSION} "Duplicati.sln" -else - "${XBUILD}" -p:DefineConstants=\"ENABLE_GTK\;XAMARIN_MAC\" /p:Configuration=Release /p:Version=${RELEASE_VERSION} "Duplicati.sln" -fi -BUILD_STATUS=$? - -if [ "${BUILD_STATUS}" -ne 0 ]; then - echo "Failed to build, xbuild gave ${BUILD_STATUS}, exiting" - exit 4 -fi - -if [ ! -d "Updates/build" ]; then mkdir "Updates/build"; fi - -UPDATE_SOURCE=Updates/build/${RELEASE_TYPE}_source-${RELEASE_VERSION} -UPDATE_TARGET=Updates/build/${RELEASE_TYPE}_target-${RELEASE_VERSION} - -if [ -e "${UPDATE_SOURCE}" ]; then rm -rf "${UPDATE_SOURCE}"; fi -if [ -e "${UPDATE_TARGET}" ]; then rm -rf "${UPDATE_TARGET}"; fi - -mkdir "${UPDATE_SOURCE}" -mkdir "${UPDATE_TARGET}" - -cp -R Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release/* "${UPDATE_SOURCE}" -cp -R Duplicati/Server/webroot "${UPDATE_SOURCE}" - -# We copy some files for alphavss manually as they are not picked up by xbuild -mkdir "${UPDATE_SOURCE}/alphavss" -for FN in Duplicati/Library/Snapshots/bin/Release/AlphaVSS.*.dll; do - cp "${FN}" "${UPDATE_SOURCE}/alphavss/" -done - -# Fix for some support libraries not being picked up -for BACKEND in Duplicati/Library/Backend/*; do - if [ -d "${BACKEND}/bin/Release/" ]; then - cp "${BACKEND}/bin/Release/"*.dll "${UPDATE_SOURCE}" - fi -done - -# Install the assembly redirects for all Duplicati .exe files -find "${UPDATE_SOURCE}" -type f -name Duplicati.*.exe -maxdepth 1 -exec cp Installer/AssemblyRedirects.xml {}.config \; - -# Clean some unwanted build files -for FILE in "control_dir" "Duplicati-server.sqlite" "Duplicati.debug.log" "updates"; do - if [ -e "${UPDATE_SOURCE}/${FILE}" ]; then rm -rf "${UPDATE_SOURCE}/${FILE}"; fi -done - -# Clean the localization spam from Azure -for FILE in "de" "es" "fr" "it" "ja" "ko" "ru" "zh-Hans" "zh-Hant"; do - if [ -e "${UPDATE_SOURCE}/${FILE}" ]; then rm -rf "${UPDATE_SOURCE}/${FILE}"; fi -done - -# Clean debug files, if any -rm -rf "${UPDATE_SOURCE}/"*.mdb; -rm -rf "${UPDATE_SOURCE}/"*.pdb; - -# Remove all library docs files -rm -rf "${UPDATE_SOURCE}/"*.xml; - -# Remove all .DS_Store and Thumbs.db files -find . -type f -name ".DS_Store" | xargs rm -rf -find . -type f -name "Thumbs.db" | xargs rm -rf - -# Sign all files with Authenticode -if [ -f "${AUTHENTICODE_PFXFILE}" ] && [ -f "${AUTHENTICODE_PASSWORD}" ]; then - echo "Performing authenticode signing of executables and libraries" - - authenticode_sign() { - NEST="" - for hashalg in sha1 sha256; do - SIGN_MSG=$(osslsigncode sign -pkcs12 "${AUTHENTICODE_PFXFILE}" -pass "${PFX_PASS}" -n "Duplicati" -i "http://www.duplicati.com" -h "${hashalg}" ${NEST} -t "http://timestamp.digicert.com?alg=${hashalg}" -in "$1" -out tmpfile) - if [ "${SIGN_MSG}" != "Succeeded" ]; then echo "${SIGN_MSG}"; fi - mv tmpfile "$1" - NEST="-nest" - done - } - - PFX_PASS=$("${MONO}" "BuildTools/AutoUpdateBuilder/bin/Debug/SharpAESCrypt.exe" d "${KEYFILE_PASSWORD}" "${AUTHENTICODE_PASSWORD}") - - DECRYPT_STATUS=$? - if [ "${DECRYPT_STATUS}" -ne 0 ]; then - echo "Failed to decrypt, SharpAESCrypt gave status ${DECRYPT_STATUS}, exiting" - exit 4 - fi - - if [ "x${PFX_PASS}" == "x" ]; then - echo "Failed to decrypt, SharpAESCrypt gave empty password, exiting" - exit 4 - fi - - for exec in "${UPDATE_SOURCE}/Duplicati."*.exe; do - authenticode_sign "${exec}" - done - for exec in "${UPDATE_SOURCE}/Duplicati."*.dll; do - authenticode_sign "${exec}" - done - -else - echo "Skipped authenticode signing as files are missing" -fi - -echo -echo "Building signed package ..." - -"${MONO}" "BuildTools/AutoUpdateBuilder/bin/Debug/AutoUpdateBuilder.exe" --input="${UPDATE_SOURCE}" \ ---output="${UPDATE_TARGET}" --keyfile="${UPDATER_KEYFILE}" \ ---manifest=Updates/${RELEASE_TYPE}.manifest --changeinfo="${RELEASE_CHANGEINFO}" \ ---displayname="${RELEASE_NAME}" --remoteurls="${UPDATE_ZIP_URLS}" \ ---version="${RELEASE_VERSION}" --keyfile-password="${KEYFILE_PASSWORD}" - -if [ ! -f "${UPDATE_TARGET}/package.zip" ]; then - "${MONO}" "BuildTools/UpdateVersionStamp/bin/Release/UpdateVersionStamp.exe" --version="${RELEASE_VERSION}" - - echo "Something went wrong while building the package, no output found" - exit 5 -fi - -"${MONO}" "BuildTools/GnupgSigningTool/bin/Debug/GnupgSigningTool.exe" \ ---inputfile=\"${UPDATE_TARGET}/package.zip\" \ ---signaturefile=\"${UPDATE_TARGET}/package.zip.sig\" \ ---armor=false --gpgkeyfile="${GPG_KEYFILE}" --gpgpath="${GPG}" \ ---keyfile-password="${KEYFILE_PASSWORD}" - -"${MONO}" "BuildTools/GnupgSigningTool/bin/Debug/GnupgSigningTool.exe" \ ---inputfile=\"${UPDATE_TARGET}/package.zip\" \ ---signaturefile=\"${UPDATE_TARGET}/package.zip.sig.asc\" \ ---armor=true --gpgkeyfile="${GPG_KEYFILE}" --gpgpath="${GPG}" \ ---keyfile-password="${KEYFILE_PASSWORD}" - -echo "${RELEASE_INC_VERSION}" > "Updates/build_version.txt" - -mv "${UPDATE_TARGET}/package.zip" "${UPDATE_TARGET}/latest.zip" -mv "${UPDATE_TARGET}/autoupdate.manifest" "${UPDATE_TARGET}/latest.manifest" -mv "${UPDATE_TARGET}/package.zip.sig" "${UPDATE_TARGET}/latest.zip.sig" -mv "${UPDATE_TARGET}/package.zip.sig.asc" "${UPDATE_TARGET}/latest.zip.sig.asc" -cp "${UPDATE_TARGET}/latest.zip" "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip" -cp "${UPDATE_TARGET}/latest.manifest" "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.manifest" -cp "${UPDATE_TARGET}/latest.zip.sig" "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip.sig" -cp "${UPDATE_TARGET}/latest.zip.sig.asc" "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip.sig.asc" - -"${MONO}" "BuildTools/UpdateVersionStamp/bin/Release/UpdateVersionStamp.exe" --version="${RELEASE_VERSION}" - -echo "Uploading binaries" -"${AWS}" --profile=duplicati-upload s3 cp "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip" "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip" -"${AWS}" --profile=duplicati-upload s3 cp "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip.sig" "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig" -"${AWS}" --profile=duplicati-upload s3 cp "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip.sig.asc" "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig.asc" -"${AWS}" --profile=duplicati-upload s3 cp "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.manifest" "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.manifest" - -"${AWS}" --profile=duplicati-upload s3 cp "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.manifest" "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/latest.manifest" - -ZIP_MD5=$(md5 ${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip | awk -F ' ' '{print $NF}') -ZIP_SHA1=$(shasum -a 1 ${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip | awk -F ' ' '{print $1}') -ZIP_SHA256=$(shasum -a 256 ${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip | awk -F ' ' '{print $1}') - -cat > "latest.json" <> "latest.js" -echo ";" >> "latest.js" - -"${AWS}" --profile=duplicati-upload s3 cp "latest.json" "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/latest.json" -"${AWS}" --profile=duplicati-upload s3 cp "latest.js" "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/latest.js" - -# echo "Propagating to other build types" -# for OTHER in ${OTHER_UPLOADS}; do -# aws --profile=duplicati-upload s3 cp "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.manifest" "s3://${S3_BUCKET_NAME}/${OTHER}/latest.manifest" -# aws --profile=duplicati-upload s3 cp "s3://${S3_BUCKET_NAME}/${RELEASE_TYPE}/latest.json" "s3://${S3_BUCKET_NAME}/${OTHER}/latest.json" -# done - -rm "${RELEASE_CHANGELOG_NEWS_FILE}" - -git checkout "Duplicati/License/VersionTag.txt" -git checkout "Duplicati/Library/AutoUpdater/AutoUpdateURL.txt" -git checkout "Duplicati/Library/AutoUpdater/AutoUpdateBuildChannel.txt" -git add "Updates/build_version.txt" -git add "${RELEASE_CHANGELOG_FILE}" -git commit -m "Version bump to v${RELEASE_VERSION}-${RELEASE_NAME}" -m "You can download this build from: " -m "Binaries: https://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip" -m "Signature file: https://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig" -m "ASCII signature file: https://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig.asc" -m "MD5: ${ZIP_MD5}" -m "SHA1: ${ZIP_SHA1}" -m "SHA256: ${ZIP_SHA256}" -git tag "v${RELEASE_VERSION}-${RELEASE_NAME}" -m "You can download this build from: " -m "Binaries: https://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip" -m "Signature file: https://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig" -m "ASCII signature file: https://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig.asc" -m "MD5: ${ZIP_MD5}" -m "SHA1: ${ZIP_SHA1}" -m "SHA256: ${ZIP_SHA256}" -git push --tags - -PRE_RELEASE_LABEL="--pre-release" -if [ "${RELEASE_TYPE}" == "stable" ]; then - PRE_RELEASE_LABEL="" -fi - -RELEASE_MESSAGE=$(printf "Changes in this version:\n${RELEASE_CHANGEINFO_NEWS}") - -GITHUB_TOKEN=$(cat "${GITHUB_TOKEN_FILE}") - -if [ "x${GITHUB_TOKEN}" == "x" ]; then - echo "No GITHUB_TOKEN found in environment, you can manually upload the binaries" -else - "${GITHUB_RELEASE}" release ${PRE_RELEASE_LABEL} \ - --tag "v${RELEASE_VERSION}-${RELEASE_NAME}" \ - --name "v${RELEASE_VERSION}-${RELEASE_NAME}" \ - --repo "duplicati" \ - --user "duplicati" \ - --security-token "${GITHUB_TOKEN}" \ - --description "${RELEASE_MESSAGE}" \ - - "${GITHUB_RELEASE}" upload \ - --tag "v${RELEASE_VERSION}-${RELEASE_NAME}" \ - --name "${RELEASE_FILE_NAME}.zip" \ - --repo "duplicati" \ - --user "duplicati" \ - --security-token "${GITHUB_TOKEN}" \ - --file "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip" -fi - - -DISCOURSE_TOKEN=$(cat "${DISCOURSE_TOKEN_FILE}") - -if [ "x${DISCOURSE_TOKEN}" == "x" ]; then - echo "No DISCOURSE_TOKEN found in environment, you can manually create the post on the forum" -else - - body="# [${RELEASE_VERSION}-${RELEASE_NAME}](https://github.com/duplicati/duplicati/releases/tag/v${RELEASE_VERSION}-${RELEASE_NAME}) - -${RELEASE_CHANGEINFO_NEWS} -" - - DISCOURSE_USERNAME=$(echo "${DISCOURSE_TOKEN}" | cut -d ":" -f 1) - DISCOURSE_APIKEY=$(echo "${DISCOURSE_TOKEN}" | cut -d ":" -f 2) - - curl -X POST "https://forum.duplicati.com/posts" \ - -H "Content-Type: multipart/form-data" \ - -H "Accept: application/json" \ - -H "Api-Key: ${DISCOURSE_APIKEY}" \ - -H "Api-Username: ${DISCOURSE_USERNAME}" \ - -F "category=10" \ - -F "title=Release: ${RELEASE_VERSION} (${RELEASE_TYPE}) ${RELEASE_TIMESTAMP}" \ - -F "raw=${body}" -fi - -git push - -echo -echo "Built ${RELEASE_TYPE} version: ${RELEASE_VERSION} - ${RELEASE_NAME}" -echo " in folder: ${UPDATE_TARGET}" -echo -echo -echo "Building installers ..." - -# Send the password along to avoid typing it again -export KEYFILE_PASSWORD - -bash "build-installers.sh" "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip" - - diff --git a/deploy-debug.sh b/deploy-debug.sh deleted file mode 100755 index d793c0b76..000000000 --- a/deploy-debug.sh +++ /dev/null @@ -1,25 +0,0 @@ -RELEASE_TIMESTAMP=`date +%Y-%m-%d` - -RELEASE_INC_VERSION=`cat Updates/debug_version.txt` -RELEASE_INC_VERSION=$((RELEASE_INC_VERSION+0)) - -RELEASE_NAME=2.0_CLI_experimental_${RELEASE_TIMESTAMP} -RELEASE_CHANGEINFO=`cat Updates/debug_changeinfo.txt` -RELEASE_VERSION="2.0.0.${RELEASE_INC_VERSION}" - -echo "${RELEASE_NAME}" > Duplicati/License/VersionTag.txt -cp "Updates/debug_urls.txt" Duplicati/Library/AutoUpdater/AutoUpdateURL.txt -cp "Updates/debug_key.txt" Duplicati/Library/AutoUpdater/AutoUpdateSignKeys.txt - -mono BuildTools/UpdateVersionStamp/bin/Debug/UpdateVersionStamp.exe --version="${RELEASE_VERSION}" -xbuild /p:Configuration=Debug Duplicati.sln - -rm Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug/*.mdb -rm -rf Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug/control_dir -rm Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug/Duplicati-server.sqlite -rm Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug/Duplicati.debug.log -rm -rf Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug/updates -cp -R Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Debug/* ~/Dropbox/Duplicati/2.0/2.0_snapshot/ -cp -R Duplicati/Server/webroot ~/Dropbox/Duplicati/2.0/2.0_snapshot/ - -mono BuildTools/UpdateVersionStamp/bin/Debug/UpdateVersionStamp.exe --version="2.0.0.7" diff --git a/fix-sln.py b/fix-sln.py deleted file mode 100644 index 4b74543ed..000000000 --- a/fix-sln.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function -import re -import io - -with open('Duplicati.sln', 'r') as f: - c = f.read() - -p = re.compile(r"\{[0-9a-fA-F\-]*\}") - -tags = p.findall(c) - -d = {} - -for n in tags: - d[n] = 0 - -for n in tags: - d[n] = d[n] + 1 - -for n in d: - if d[n] > 7: - print(n) diff --git a/make.sh b/make.sh deleted file mode 100755 index ad6e5a293..000000000 --- a/make.sh +++ /dev/null @@ -1,2 +0,0 @@ -cd Installer/Makefile -make $@ diff --git a/tabs-to-spaces.sh b/tabs-to-spaces.sh deleted file mode 100755 index 1e52ad850..000000000 --- a/tabs-to-spaces.sh +++ /dev/null @@ -1,7 +0,0 @@ -find Duplicati -type f -name *.html -exec sed -i '' $'s/\t/ /g' {} + -find Duplicati -type f -name *.js -exec sed -i '' $'s/\t/ /g' {} + -find Duplicati -type f -name *.css -exec sed -i '' $'s/\t/ /g' {} + -find Duplicati -type f -name *.cs -exec sed -i '' $'s/\t/ /g' {} + -find Duplicati -type f -name *.txt -exec sed -i '' $'s/\t/ /g' {} + - -find Duplicati -type f -name *.cs | xargs python unix2dos.py diff --git a/unix2dos.py b/unix2dos.py deleted file mode 100644 index 7a8ca956b..000000000 --- a/unix2dos.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python -import sys - -for fname in sys.argv[1:]: - with open(fname, 'rb') as infile: - instr = infile.read() - - outstr = instr.replace( b"\r\n", b"\n" ).replace( b"\r", b"\n" ).replace( b"\n", b"\r\n" ) - - if len(outstr) == len(instr): - continue - - with open( fname, "wb" ) as outfile: - outfile.write( outstr )