From a69099fb2bcf170ae50f3041415ed3a140032af7 Mon Sep 17 00:00:00 2001 From: marco-calautti Date: Wed, 27 Dec 2023 19:21:19 +0100 Subject: [PATCH] Unify build and release actions --- .github/workflows/build.yml | 85 ------------------------------- .github/workflows/release.yml | 96 +++++++++++++++++++++++++++++++++++ CHANGELOG.txt | 79 ++++++++++++++++++++++++++++ 3 files changed, 175 insertions(+), 85 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml create mode 100644 CHANGELOG.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 274af07..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Build - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - - workflow_dispatch: - -env: - BUILD_TYPE: Release - wxBUILD_SHARED: OFF - wxBUILD_USE_STATIC_RUNTIME: ON - -jobs: - build-win-msvc2022: - - runs-on: windows-2022 - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}} - - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2 - - - uses: actions/upload-artifact@v3 - with: - name: windows_bin_x64 - path: ${{github.workspace}}/build/app/Release/DeltaPatcher.exe - - build-linux: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Pull dependencies - run: sudo apt install -y build-essential cmake git libgtk-3-dev - - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} - - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2 - -# - name: Package AppImage -# run: ${{github.workspace}}/utils/make-appimage.sh ${{github.workspace}}/build ${{github.workspace}} DeltaPatcher - - - uses: actions/upload-artifact@v3 - with: - name: linux_bin_gtk3_x86_64 - path: ${{github.workspace}}/build/app/DeltaPatcher - - build-macos11-universal: - - runs-on: macos-11 - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}} - - - name: Build - run: | - cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2 - cd ${{github.workspace}}/build/app - zip -r macos11_bin_universal.zip DeltaPatcher.app/ - - - - uses: actions/upload-artifact@v3 - with: - name: macos11_bin_universal - path: ${{github.workspace}}/build/app/macos11_bin_universal.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0ced448 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,96 @@ +name: Create Release + +on: + push: + branches: [ "master" ] + tags: + - 'v*' + pull_request: + branches: [ "master" ] + + workflow_dispatch: + +env: + BUILD_TYPE: Release + wxBUILD_SHARED: OFF + wxBUILD_USE_STATIC_RUNTIME: ON + +jobs: + create_release: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Create Release + id: create_release + if: contains(github.ref, 'refs/tags/') #Create release only on tag + uses: softprops/action-gh-release@v1 + with: + name: Delta Patcher ${{ github.ref_name }} + draft: false + prerelease: false + generate_release_notes: false + + build: + name: Build + needs: create_release + strategy: + matrix: + os: [ubuntu-latest, macos-11, windows-2022] + include: + - os: ubuntu-latest + relase_package: linux_bin_gtk3_x86_64 + - os: macos-latest + relase_package: macos_bin_universal + - os: windows-latest + relase_package: windows_bin_x86_64 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Pull dependencies + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt install -y build-essential cmake git libgtk-3-dev + + - name: Configure CMake + if: startsWith(matrix.os, 'windows') + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}} + if: startsWith(matrix.os, 'ubuntu') + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} + if: startsWith(matrix.os, 'macOS') + run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2 + + - name: Package + if: startsWith(matrix.os, 'macOS') + run: | + cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app + cd ${{github.workspace}}/build/app + zip -r ${{ matrix.release_package }}.zip DeltaPatcher.app/ CHANGELOG.txt + if: startsWith(matrix.os, 'windows') + run: | + cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app/Release/ + cd ${{github.workspace}}/build/app/Release + zip ${{ matrix.release_package }}.zip DeltaPatcher.exe CHANGELOG.txt + if: startsWith(matrix.os, 'ubuntu') + run: | + cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app/ + cd ${{github.workspace}}/build/app/ + zip ${{ matrix.release_package }}.zip DeltaPatcher CHANGELOG.txt + + - uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.release_package }} + path: ${{github.workspace}}/build/app/${{ matrix.release_package }}.zip + + if: contains(github.ref, 'refs/tags/') + - name: Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ needs.create_release.outputs.tag-name }} + files: ${{ matrix.release_package }}.zip + + diff --git a/CHANGELOG.txt b/CHANGELOG.txt new file mode 100644 index 0000000..8fd3d5e --- /dev/null +++ b/CHANGELOG.txt @@ -0,0 +1,79 @@ +--------------------------------------------- + Delta Patcher 3.0.2 +--------------------------------------------- + (C) 2010+ Phoenix + + +------------------------- +1. What is this? +------------------------- + +Delta Patcher is a GUI software that is able to create and apply xdelta patches. + +------------------------- +2. Changelog +------------------------- + +3.0.2: +- Added support for dark mode on Windows 10 or higher. On older versions of Windows, this feature is just disabled. +- Delta Patcher no longer supports Windows XP, and now requires Windows 7 or higher to run. +- The Windows binary is now 64 bits only. + +3.0.1: +- Fixed memory leak when applying patches without a description + +3.0.0: +- Modernized the build system using cmake. +- xdelta has now finally been embedded as a library rather than an exe that needs to be extracted on the fly. + This should finally avoid false positives from some antiviruses. In this process, xdelta has then also been updated to the latest stable version (3.0.11) which now supports secondary compressions. +- Delta Patcher now allows to select the desired secondary compression (including lzma), when in patch creation mode. +- There is no more distinction between lite and full versions. This separation was quite redundant and unnecessary (the only difference was in one button). +- Fixed an annoying bug that would prevent Delta Patcher to open some xdelta patches using secondary compression. +- The Windows exe is still fully self-contained and compatible with Windows XP or above. +- To avoid further false positive from anti virus software, the windows exe is not compressed anymore, so it is a bit larger than version 2. + +2.0.1: +-Added drag and drop functionality in patch creation mode. + +2.0: +-No xdelta.exe is needed. Starting from version 2.0, it has been embedded in the delta patcher executable; + +-More intuitive GUI design; + +-Multiple options for patch application/creation: + patch application: disable checksum validation + backup original file + + patch creation: patch compression level + source window size + checksum + *custom UTF8 description for patches* -> patches created with delta patcher will show this + description if opened with delta patcher (a là PPF-O-MATIC3); + +-Associate xdelta patch files to be opened with delta patcher; + +-Drag & Drop support for original file and + xdelta patch file in the decoding window; + +-Cross-platform and opensource: modify and + redistribuite it under the GPL2 license; + +-Multilanguage: Delta Patcher can be + translated into any language using .po files. + If you want multilanguage support you have + to place the "resource" directory along with + this tool (see source code for the pot file). + + +----------------------- +3. Contacts and sources +----------------------- + +You can contact me by email at +phoenix_87_c@hotmail.com, at the SadNES cITy +board at http://lnx.sadnescity.it/forum/ or on github. +The full source code can be found at +github.com/marco-calautti/DeltaPatcher. + + +Phoenix