Files
rawTherapee/.github/workflows/appimage.yml
Desmis 16db6186dd Generalized Hyperbolic Stretch in Selective Editing (#7210)
* GHS GUI first step

* GHS GUI first step

* GUI step 3

* Hide show ghsmethod

* Siril functions for ghs

* Init ghs in iplocallab

* ghs step 2

* ghs step 4

* Comment copyright Pixlnsight 2021

* Smooth highlights and tooltips

* Enabled saturation and luminance ghs mode

* First tooltip

* Ghs tooltips

* Remove wrong packstart inverssh

* Change labels and tooltips

* Disabled mask in global and other improvments

* Comment code

* appimage and windows yml ghs

* Change tooltip

* Ghsmethod hue and change tolltips

* Change tooltip

* Inverse Stretch step 1

* Inverse GHS

* GHS tooltips

* Change tooltips

* Change tooltip

* Linear black point

* Small change to blackpoint

* Change tooltip

* Clean and comment code

* forgotten GHS highlight attenuation msg in history

* Comment code with Transformation equations

* Change tooltip

* Wrong default value balck point

* Comment code iplocallab

* Ghs curve step 1

* GHS curve step 2

* Show GHS setting in a Curve Box

* Tooltip for ghs S curve

* Disabled warning in compilation simpleprocess

* Simplified code part 1

* Simplified code GHS graph part 2

* Improve black point with negatives values

* Improve BP and tooltip

* Listener enable only with GHS

* White point for GHS

* Change label and tooltip

* Improve behavior white point and black point

* Link sliders ghs_SP ghs_LP ghs_HP and change code to avoid balck screen

* hide unused button in diagonal curve GHS

* prevents the GHS representation in S from displaying artifacts if ghs-d=0

* Change tooltips

* Improvment and tooltips

* Forgotten tooltip

* Improve GUI GHS S curve - change tooltips

* Set transition gray areas in S curve GHS with values of the RT-spot

* Change label GHS

* setlogscale blackpoint and symmetry

* Set recursive reference enable by default in controlspotpanel

* Change lastlocalCurvesDir Dirghs in locallabtools and options - change labels

* Added in converttonormal ghsMode.. not sure if this is useful

* DIY to make GHS curve work without the choices

* Change RGB calculation with luminance function working profile

* 5 modes GHS method

* Label to show datas clipped Black point and White point

* Various change white point tooltips

* Bad behavior wp bp labels

* Small change to improccordinator call to ghschanged ghsbwchanged

* Set log scale ghs_D

* Hide Graduated filter if GHS enable

* Luminance Lab in ghsmethod

* Lab slope factor step 1

* Slope and Chromaticity GHS improvments

* Fixed bad sqrt line 17477 iplocallab

* Workaround linear GHS - re-enable Graduated filer GHS

* Change limits slope lab factor

* Ghs chromaticity Lab (Lch)

* Improve ghs chromaticity

* Change labels and tooltips Lab chroma

* Slope Lab to 100

* Noise and saturation RGB

* Saturation RGB standard and labels

* Change histogram and navigator panel without gamma when using working profile

* Remove gray in GHS curve

* Local contrast a minima

* Regularization stretch

* Improve Graduated Filter in all cases GHS Color and Light etc.

* Improves nlmeans to reduce noise after GHS

* Change to GF - tooltip Nlmeans

* Added oW oH tW tH etc.

* Added call GF

* tX tY for previewProps

* Comment code GF

* Improve local contrast ghs

* Change norm to norm2

* Improve GUI mode complexity and Lab GHS

* Show values BP WP in GUI

* Labgrid ghs step 1

* Labgrid for simulation GHS - step 2

* More points for Labgrid ghs

* Clean and comment code

* Fixed crash in inverse GHS white point - set to 10 points for GSH simulation

* Change to black point in inverse GHS

* Intilialize simulation with nothing if new spot

* Remove curve GHS - optimize code simulation - improve GUI

* set ghs default - fixed crash is case HP SP LP

* Fixed crash - I hope in inverse GHS

* Simplify WP and BP limits to avoid crash in inverse GHS

* Clean code with ghscurve - ghsshape

* Change tooltips

* Change to D - GUI - comment code

* Simulation with 4 more points

* Best simulation with point 0.05 and 0.95

* Clean code - change for crsah in Inverse GHS

* Show values WP and BP
2024-11-13 08:23:41 +01:00

279 lines
11 KiB
YAML

name: AppImage Build
on:
push:
branches:
- dev
- releases
- 'release-[0-9]+.*'
tags:
- '[0-9]+.*'
pull_request:
branches:
- dev
- releases
- 'release-[0-9]+.*'
workflow_dispatch:
env:
publish_pre_dev_labels: '["Beep6581:ghs"]'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
build_type: [release, debug]
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
echo "Running apt update."
sudo apt update
echo "Installing dependencies with apt."
DEBIAN_FRONTEND=noninteractive sudo apt install -y cmake libgtk-3-dev libgtkmm-3.0-dev liblensfun-dev librsvg2-dev liblcms2-dev libfftw3-dev libiptcdata0-dev libtiff5-dev libcanberra-gtk3-dev liblensfun-bin libexpat1-dev libbrotli-dev zlib1g-dev libinih-dev adwaita-icon-theme-full gettext libarchive-tools zstd libgif-dev libwebp-dev libwebpdemux2
- name: Install makedeb
run: |
echo "Installing makedeb..."
curl -Ss -qgb "" -fLC - --retry 3 --retry-delay 3 -o makedeb.deb \
"https://github.com/makedeb/makedeb/releases/download/v16.1.0-beta1/makedeb-beta_16.1.0-beta1_amd64_focal.deb"
DEBIAN_FRONTEND=noninteractive sudo dpkg -i makedeb.deb
- name: Install libjxl
working-directory: tools/makedeb
run: |
echo "Building and installing libjxl..."
makedeb -si --no-confirm -p PKGBUILD.libjxl
- name: Install Exiv2
run: |
EXIV2_VERSION='v0.28.3'
echo "Cloning Exiv2 $EXIV2_VERSION."
git clone --depth 1 --branch "$EXIV2_VERSION" https://github.com/Exiv2/exiv2.git ext/exiv2
echo "Configuring build."
mkdir ext/exiv2/build
cd ext/exiv2/build
cmake -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_BMFF=ON ..
echo "Building and installing."
sudo make -j$(nproc) install
- name: Install Librsvg required min. version
# Required min. version is not available for Ubuntu 20.04 LTS (but is for 22.04 LTS) so needs to be built manually
run: |
LIBRSVG2_VERSION='2.52.2'
echo "Cloning Librsvg2 $LIBRSVG2_VERSION."
git clone --depth 1 --branch "$LIBRSVG2_VERSION" https://gitlab.gnome.org/GNOME/librsvg.git ext/librsvg2
echo "Installing required dependencies with apt."
DEBIAN_FRONTEND=noninteractive sudo apt install -y rustc cargo gtk-doc-tools libgirepository1.0-dev
echo "Updating PATH."
export PATH="$PATH:/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0"
echo "Configuring build."
cd ext/librsvg2
sh autogen.sh
echo "Building and installing."
sudo make install
- name: Configure build
run: |
export REF_NAME_FILTERED="$(echo '${{github.ref_name}}' | sed 's/[^A-z0-9_.-]//g')"
echo "Setting cache suffix."
if [ '${{github.ref_type}}' == 'tag' ]; then
export CACHE_SUFFIX=""
else
export CACHE_SUFFIX="5-$REF_NAME_FILTERED"
fi
export CACHE_SUFFIX="$CACHE_SUFFIX-AppImage"
echo "Cache suffix is '$CACHE_SUFFIX'."
echo "Making build directory."
mkdir build
echo "Changing working directory to the build directory."
cd build
echo "Running CMake configure."
cmake \
-DCMAKE_BUILD_TYPE='${{matrix.build_type}}' \
-DCACHE_NAME_SUFFIX="$CACHE_SUFFIX" \
-DPROC_TARGET_NUMBER="1" \
-DBUILD_BUNDLE="ON" \
-DBUNDLE_BASE_INSTALL_DIR="/" \
-DOPTION_OMP="ON" \
-DWITH_LTO="OFF" \
-DWITH_PROF="OFF" \
-DWITH_SAN="OFF" \
-DWITH_SYSTEM_KLT="OFF" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLENSFUNDBDIR="../share/lensfun/version_1" \
..
echo "Recording filtered ref name."
echo "REF_NAME_FILTERED=$REF_NAME_FILTERED" >> $GITHUB_ENV
- name: Build RawTherapee
working-directory: ./build
run: |
echo "Running make install."
make -j$(nproc) install DESTDIR=AppDir/usr/bin
echo "Moving usr/bin/share to usr/share."
mv AppDir/usr/bin/share AppDir/usr/
- name: Include Lensfun
run: |
echo "Patching lensfun-update-data script."
sudo sed -i 's/HTTPError\(, ValueError\)/URLError\1/' $(which lensfun-update-data)
echo "Updating Lensfun database."
lensfun-update-data
echo "Creating Lensfun directory in the build directory."
mkdir -p build/AppDir/usr/share/lensfun
echo "Copying Lensfun database to the build directory."
cp -R ~/.local/share/lensfun/updates/* build/AppDir/usr/share/lensfun/
- name: Include Adwaita icon theme (partial)
run: |
mkdir build/AppDir/usr/bin/icons/Adwaita
icons_dir=('actions' 'devices' 'mimetypes' 'places' 'status' 'ui' 'devices')
for dir in "${icons_dir[@]}"; do
find_res=$(find /usr/share/icons/Adwaita -name "${dir}" -type d)
if [ -z "$find_res" ]
then
echo "-Warning: Icons folder '"${dir}"' not found in Adwaita theme."
else
new_dir=($(echo "$find_res" | awk -F/ '{print $(NF-1)"/"$NF}'))
for d in "${new_dir[@]}"; do
echo "-Copying '"${d}"' into 'AppDir/usr/bin/icons/Adwaita'."
mkdir -p "build/AppDir/usr/bin/icons/Adwaita/${d}"
cp -R "/usr/share/icons/Adwaita/${d}/." "build/AppDir/usr/bin/icons/Adwaita/${d}"
done
fi
done
echo "-Copying 'index.theme' into 'AppDir/usr/bin/icons/Adwaita'."
cp /usr/share/icons/Adwaita/index.theme build/AppDir/usr/bin/icons/Adwaita
- name: Restore AppImage tools from cache
id: appimage-tools-cache
uses: actions/cache@v4
with:
key: appimage-tools-1
path: |
./build/linuxdeploy-x86_64.AppImage
./build/linuxdeploy-plugin-gtk.sh
- name: Download AppImage tools
if: ${{steps.appimage-tools-cache.outputs.cache-hit != 'true'}}
working-directory: ./build
run: |
echo "Downloading linuxdeploy."
curl --location 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' > linuxdeploy-x86_64.AppImage
echo "Downloading GTK plugin for linuxdeploy."
curl --location 'https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh' \
| sed 's/^\(export GTK_THEME\)/#\1/' \
> linuxdeploy-plugin-gtk.sh
echo "Setting execute bit on all AppImage tools."
chmod u+x linuxdeploy-*
- name: Package AppImage
working-directory: ./build
run: |
echo "LD_LIBRARY_PATH is '$LD_LIBRARY_PATH'. Adding /usr/local/lib."
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
echo "Creating artifact name."
if [ '${{github.ref_type}}' == 'tag' ]; then
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
else
echo "Getting RawTherapee version."
export VERSION="$(grep -m 1 '^Version: .*$' 'AboutThisBuild.txt' | sed 's/^Version: \(.\+\)$/\1/')"
echo "Version is '$VERSION'."
FILTERED_VERSION="$(echo "$VERSION" | sed 's/[^A-z0-9_.-]//g')"
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_${FILTERED_VERSION}_${{matrix.build_type}}"
fi
echo "Artifact name is '$ARTIFACT_NAME'."
echo "Generating AppImage file name."
export OUTPUT="$ARTIFACT_NAME.AppImage"
echo "AppImage file name will be '$OUTPUT'."
echo "Packaging AppImage."
./linuxdeploy-x86_64.AppImage \
--appimage-extract-and-run \
--appdir AppDir \
--plugin gtk \
--output appimage
echo "Recording artifact name."
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{env.ARTIFACT_NAME}}.AppImage
path: ${{github.workspace}}/build/${{env.ARTIFACT_NAME}}.AppImage
- name: Prepare for publishing
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
run: |
echo "Setting publish name."
PUBLISH_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
echo "Publish name is '$PUBLISH_NAME'."
echo "Renaming AppImage."
cp "build/$ARTIFACT_NAME.AppImage" "$PUBLISH_NAME.AppImage"
echo "Creating version file."
cp "build/AboutThisBuild.txt" "$PUBLISH_NAME-AboutThisBuild.txt"
echo "Recording publish name."
echo "PUBLISH_NAME=$PUBLISH_NAME" >> $GITHUB_ENV
- name: Publish artifacts
uses: softprops/action-gh-release@v2
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
with:
tag_name: nightly-github-actions
files: |
${{env.PUBLISH_NAME}}.AppImage
${{env.PUBLISH_NAME}}-AboutThisBuild.txt
- name: Prepare for publishing pre-dev
id: prepare-publish-pre-dev
if: ${{github.event_name == 'pull_request' && contains(fromJSON(env.publish_pre_dev_labels), github.event.pull_request.head.label)}}
run: |
echo "Making ref name."
REF_NAME_FILTERED="$(echo '${{github.event.pull_request.head.label}}' | tr ':' '_' | sed 's/[^A-z0-9_.-]//g')"
echo "Ref name is '$REF_NAME_FILTERED'."
echo "Setting publish name."
PUBLISH_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
echo "Publish name is '$PUBLISH_NAME'."
echo "Renaming AppImage."
cp "build/$ARTIFACT_NAME.AppImage" "$PUBLISH_NAME.AppImage"
echo "Creating version file."
cp "build/AboutThisBuild.txt" "$PUBLISH_NAME-AppImage-AboutThisBuild.txt"
echo "Recording publish name."
echo "PUBLISH_NAME=$PUBLISH_NAME" >> $GITHUB_ENV
- name: Publish pre-dev artifacts
uses: softprops/action-gh-release@v2
if: ${{steps.prepare-publish-pre-dev.outcome == 'success'}}
with:
tag_name: pre-dev-github-actions
repository: Beep6581/RawTherapee
files: |
${{env.PUBLISH_NAME}}.AppImage
${{env.PUBLISH_NAME}}-AppImage-AboutThisBuild.txt