Skip to content

Commit

Permalink
Unify build and release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-calautti committed Dec 27, 2023
1 parent 2229724 commit a69099f
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 85 deletions.
85 changes: 0 additions & 85 deletions .github/workflows/build.yml

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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


79 changes: 79 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---------------------------------------------
Delta Patcher 3.0.2
---------------------------------------------
(C) 2010+ Phoenix <[email protected]>


-------------------------
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
[email protected], 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

0 comments on commit a69099f

Please sign in to comment.