From 91d6211b00326dbee89a165c6c5a145410bb7528 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 12:29:19 +0100 Subject: [PATCH 01/71] first github actions experiment --- .github/workflows/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..6c083056a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: CI + +on: [push] + +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v1 + - name: Run a one-line script + run: echo Hello, world! + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From ffb9ddc286e71242e7dfa5a210d3446a686e10c9 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 12:45:39 +0100 Subject: [PATCH 02/71] ci macos: install dependencies --- .github/workflows/main.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c083056a..17ecc4bd9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,7 @@ name: CI -on: [push] +on: + - push jobs: build: @@ -9,9 +10,5 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Run a one-line script - run: echo Hello, world! - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. + - name: Install dependencies + run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun wget llvm cmake expat pkgconfig libomp From f7e826359e44346ee7135a752628794286b806bb Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 13:14:50 +0100 Subject: [PATCH 03/71] ci macos: first build attempt --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17ecc4bd9..4b53fc69b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,5 +10,18 @@ jobs: steps: - uses: actions/checkout@v1 + - name: test getting the git branch of the triggering ref + run: echo ${GITHUB_REF##*/} - name: Install dependencies run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun wget llvm cmake expat pkgconfig libomp + - name: cmake + env: + CMAKE_CXX_STANDARD: 11 + run: | + cmake \ + -DCMAKE_BUILD_TYPE="release" \ + -DCACHE_NAME_SUFFIX="5-${GITHUB_REF##*/}" \ + -DPROC_TARGET_NUMBER="2" \ + -DBUILD_BUNDLE="ON" \ + -DWITH_LTO="OFF" \ + -DLENSFUNDBDIR="./share/lensfun" From 0a492de25fc1a3c7122fb285e4941258cac963d6 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 13:17:57 +0100 Subject: [PATCH 04/71] ci macos: do not install already installed libs --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b53fc69b..39d1835fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: - name: test getting the git branch of the triggering ref run: echo ${GITHUB_REF##*/} - name: Install dependencies - run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun wget llvm cmake expat pkgconfig libomp + run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp - name: cmake env: CMAKE_CXX_STANDARD: 11 From caeeeaec3954152c80c9538c7625386fb8986d91 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 13:31:54 +0100 Subject: [PATCH 05/71] ci macos: remove default option --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39d1835fa..b5c00ebdc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,5 @@ jobs: -DCMAKE_BUILD_TYPE="release" \ -DCACHE_NAME_SUFFIX="5-${GITHUB_REF##*/}" \ -DPROC_TARGET_NUMBER="2" \ - -DBUILD_BUNDLE="ON" \ -DWITH_LTO="OFF" \ -DLENSFUNDBDIR="./share/lensfun" From 370044fbfed2cac13fee031524372ce0d1280b73 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 13:32:41 +0100 Subject: [PATCH 06/71] ci macos: point cmake to source directory --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5c00ebdc..5de9ff6fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,4 +23,5 @@ jobs: -DCACHE_NAME_SUFFIX="5-${GITHUB_REF##*/}" \ -DPROC_TARGET_NUMBER="2" \ -DWITH_LTO="OFF" \ - -DLENSFUNDBDIR="./share/lensfun" + -DLENSFUNDBDIR="./share/lensfun" \ + . From 3eff4ae873714486dacd8874c738f13f3571008e Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 13:37:04 +0100 Subject: [PATCH 07/71] ci macos: remove test lines --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5de9ff6fc..f880f9dad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,8 +10,6 @@ jobs: steps: - uses: actions/checkout@v1 - - name: test getting the git branch of the triggering ref - run: echo ${GITHUB_REF##*/} - name: Install dependencies run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp - name: cmake From d404072c32368b94ec0fb5aaee6b1ac1e471a33f Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 13:58:15 +0100 Subject: [PATCH 08/71] ci macos: whitespace fix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f880f9dad..fc86e3f31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: CMAKE_CXX_STANDARD: 11 run: | cmake \ - -DCMAKE_BUILD_TYPE="release" \ + -DCMAKE_BUILD_TYPE="release" \ -DCACHE_NAME_SUFFIX="5-${GITHUB_REF##*/}" \ -DPROC_TARGET_NUMBER="2" \ -DWITH_LTO="OFF" \ From 0b725ab252016c09df2311aa0503b4024b05f469 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 13:58:46 +0100 Subject: [PATCH 09/71] ci macos: link keg-only libs --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fc86e3f31..a1047150e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,4 +22,6 @@ jobs: -DPROC_TARGET_NUMBER="2" \ -DWITH_LTO="OFF" \ -DLENSFUNDBDIR="./share/lensfun" \ + -DLDFLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ + -DCXXFLAGS="-I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include" \ . From 62a71be567427a87f3bc0e650aad4d92a2d70d26 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 14:09:50 +0100 Subject: [PATCH 10/71] ci macos: set pkg config path --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1047150e..6ae59b34a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,7 @@ jobs: - name: cmake env: CMAKE_CXX_STANDARD: 11 + PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig run: | cmake \ -DCMAKE_BUILD_TYPE="release" \ From d17e1f303afc334d3bc041e086e094446e311507 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 14:34:19 +0100 Subject: [PATCH 11/71] ci macos: move to out-of-source build --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ae59b34a..892da1ed8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,8 @@ jobs: - uses: actions/checkout@v1 - name: Install dependencies run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp + - name: create and move to build directory + run: mkdir build && cd build - name: cmake env: CMAKE_CXX_STANDARD: 11 @@ -25,4 +27,4 @@ jobs: -DLENSFUNDBDIR="./share/lensfun" \ -DLDFLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ -DCXXFLAGS="-I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include" \ - . + .. From b1c6e20ce4c217903b245e530b578910391c8b83 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 14:38:09 +0100 Subject: [PATCH 12/71] ci macos: verbose make file --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 892da1ed8..66ccf7b32 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,6 +21,7 @@ jobs: run: | cmake \ -DCMAKE_BUILD_TYPE="release" \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCACHE_NAME_SUFFIX="5-${GITHUB_REF##*/}" \ -DPROC_TARGET_NUMBER="2" \ -DWITH_LTO="OFF" \ From aafaf33d0766cc9a33404f1b9a19fa545617cced Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 14:52:03 +0100 Subject: [PATCH 13/71] ci macos: add proc_label --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 66ccf7b32..11eedf096 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,7 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCACHE_NAME_SUFFIX="5-${GITHUB_REF##*/}" \ -DPROC_TARGET_NUMBER="2" \ + -DPROC_LABEL="generic processor" \ -DWITH_LTO="OFF" \ -DLENSFUNDBDIR="./share/lensfun" \ -DLDFLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ From 429f6bd5b3b95f2a2147757d7f1b8e83d9863eb7 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 14:52:36 +0100 Subject: [PATCH 14/71] ci macos: add openmp --- .github/workflows/main.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11eedf096..83914af61 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,12 @@ jobs: -DPROC_LABEL="generic processor" \ -DWITH_LTO="OFF" \ -DLENSFUNDBDIR="./share/lensfun" \ - -DLDFLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ - -DCXXFLAGS="-I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include" \ + -DOpenMP_C_FLAGS=-fopenmp=libomp \ + -DOpenMP_CXX_FLAGS=-fopenmp=libomp \ + -DOpenMP_C_LIB_NAMES="libomp" \ + -DOpenMP_CXX_LIB_NAMES="libomp" \ + -DOpenMP_libomp_LIBRARY="/usr/local/lib/libomp.dylib" \ + -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include" \ + -DOpenMP_CXX_LIB_NAMES="libomp" \ + -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include" \ .. From 4a6c6041d921bc621424904a9f7f0112d3f99730 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 14:55:23 +0100 Subject: [PATCH 15/71] ci macos: add make commands --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83914af61..d2831984b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,3 +36,6 @@ jobs: -DOpenMP_CXX_LIB_NAMES="libomp" \ -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include" \ .. + make --jobs 8 + make install + make macosx_bundle From 3ab43669e90f0f2063c45b1c5d19676bae662e4a Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 14:57:33 +0100 Subject: [PATCH 16/71] ci macos: add minor version number --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2831984b..7cf7f6871 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,11 +18,13 @@ jobs: env: CMAKE_CXX_STANDARD: 11 PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig + RAW_THERAPEE_MAJOR: '5' + RAW_THERAPEE_MINOR: '7' run: | cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ - -DCACHE_NAME_SUFFIX="5-${GITHUB_REF##*/}" \ + -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${GITHUB_REF##*/}" \ -DPROC_TARGET_NUMBER="2" \ -DPROC_LABEL="generic processor" \ -DWITH_LTO="OFF" \ From c4869d08d4a124057c513a13cd6eaf4b1f6d65e9 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 16:16:32 +0100 Subject: [PATCH 17/71] ci macos: fix out-of-source build --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7cf7f6871..fa9bb8be5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,8 +12,6 @@ jobs: - uses: actions/checkout@v1 - name: Install dependencies run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp - - name: create and move to build directory - run: mkdir build && cd build - name: cmake env: CMAKE_CXX_STANDARD: 11 @@ -21,6 +19,7 @@ jobs: RAW_THERAPEE_MAJOR: '5' RAW_THERAPEE_MINOR: '7' run: | + mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ From 4aad850267c9fd057dad14218a2c143ba6c1de7a Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 16:16:49 +0100 Subject: [PATCH 18/71] ci macos: attempt to fix linking issues --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa9bb8be5..06cb73145 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,11 +18,13 @@ jobs: PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig RAW_THERAPEE_MAJOR: '5' RAW_THERAPEE_MINOR: '7' + C_FLAGS: -Xpreprocessor -fopenmp /usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include run: | mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${GITHUB_REF##*/}" \ -DPROC_TARGET_NUMBER="2" \ -DPROC_LABEL="generic processor" \ @@ -32,10 +34,9 @@ jobs: -DOpenMP_CXX_FLAGS=-fopenmp=libomp \ -DOpenMP_C_LIB_NAMES="libomp" \ -DOpenMP_CXX_LIB_NAMES="libomp" \ - -DOpenMP_libomp_LIBRARY="/usr/local/lib/libomp.dylib" \ - -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include" \ - -DOpenMP_CXX_LIB_NAMES="libomp" \ - -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include" \ + -DOpenMP_libomp_LIBRARY="/usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib" \ + -DOpenMP_C_FLAGS="${C_FLAGS}" \ + -DOpenMP_CXX_FLAGS="${C_FLAGS}" \ .. make --jobs 8 make install From edfadf4ff20980efe6d03490b743cd5c30005bb8 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 16:38:07 +0100 Subject: [PATCH 19/71] ci macos: fix permission denieds --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06cb73145..e7f97f410 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,4 +40,5 @@ jobs: .. make --jobs 8 make install - make macosx_bundle + sudo make macosx_bundle + From dbf2c3fe2d0a000e687dd8017f18f8b88c721b91 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 16:44:28 +0100 Subject: [PATCH 20/71] ci macos: fix branch ref --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7f97f410..31fc77522 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,12 +20,13 @@ jobs: RAW_THERAPEE_MINOR: '7' C_FLAGS: -Xpreprocessor -fopenmp /usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include run: | + REF=${GITHUB_REF##*/} mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ - -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${GITHUB_REF##*/}" \ + -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ -DPROC_TARGET_NUMBER="2" \ -DPROC_LABEL="generic processor" \ -DWITH_LTO="OFF" \ From 2179b74c37a25726dcd81a745c0cbeb3552a9f58 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 17:09:32 +0100 Subject: [PATCH 21/71] ci macos: distinctively name macos build --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31fc77522..0fdc726a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: CI +name: Mac OS build on: - push From b41cf71aace0ccbfd013e149992feb7bf6c609bf Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 17:34:37 +0100 Subject: [PATCH 22/71] ci macos: upload dmg artifact --- .github/workflows/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fdc726a8..e288fda9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ name: Mac OS build on: - - push + push jobs: build: @@ -42,4 +42,11 @@ jobs: make --jobs 8 make install sudo make macosx_bundle - + + ARTIFACT=$(ls | grep .dmg) + echo "Writing -${ARTIFACT} to the ARTIFACT environment variable for use in upload-artifact step" + echo "::set-env name=ARTIFACT::${ARTIFACT}" + - uses: actions/upload-artifact@v1 + with: + name: ${{env.ARTIFACT}} + path: build/${{env.ARTIFACT}} From 03d2393af39bb136155a75c0a924648dc4892065 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 18:09:56 +0100 Subject: [PATCH 23/71] ci macos: remove empty line in run statement --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e288fda9b..995b1c210 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,9 +42,8 @@ jobs: make --jobs 8 make install sudo make macosx_bundle - ARTIFACT=$(ls | grep .dmg) - echo "Writing -${ARTIFACT} to the ARTIFACT environment variable for use in upload-artifact step" + echo "===== Writing ${ARTIFACT} to the ARTIFACT environment variable for use in upload-artifact step =====" echo "::set-env name=ARTIFACT::${ARTIFACT}" - uses: actions/upload-artifact@v1 with: From 59106b89a17d8d7be4913503487fdb3811273c17 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sat, 7 Dec 2019 19:44:58 +0100 Subject: [PATCH 24/71] ci macos: fix artifact upload --- .github/workflows/main.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 995b1c210..f386bdda7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,10 +42,11 @@ jobs: make --jobs 8 make install sudo make macosx_bundle - ARTIFACT=$(ls | grep .dmg) - echo "===== Writing ${ARTIFACT} to the ARTIFACT environment variable for use in upload-artifact step =====" - echo "::set-env name=ARTIFACT::${ARTIFACT}" + ARTIFACT=$(ls | grep RawTherapee*.zip) + echo "=== artifact: ${ARTIFACT}" + echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}" + echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}" - uses: actions/upload-artifact@v1 with: - name: ${{env.ARTIFACT}} - path: build/${{env.ARTIFACT}} + name: ${{env.ARTIFACT_FILE}} + path: ${{env.ARTIFACT_PATH}} From 64ce4d6bb9fcf721f613fed2d1586747ed31a6e9 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sun, 8 Dec 2019 21:56:32 +0100 Subject: [PATCH 25/71] macos: patch libiconv 1.16 --- tools/osx/libiconv_1.16_rt.patch | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/osx/libiconv_1.16_rt.patch diff --git a/tools/osx/libiconv_1.16_rt.patch b/tools/osx/libiconv_1.16_rt.patch new file mode 100644 index 000000000..470f7780c --- /dev/null +++ b/tools/osx/libiconv_1.16_rt.patch @@ -0,0 +1,31 @@ +diff --git a/lib/iconv.c b/lib/iconv.c +index b7a04f8..41c5896 100644 +--- a/lib/iconv.c ++++ b/lib/iconv.c +@@ -610,5 +610,26 @@ strong_alias (libiconv_open, iconv_open) + strong_alias (libiconv, iconv) + strong_alias (libiconv_close, iconv_close) + #endif ++ ++#undef iconv_open ++#undef iconv ++#undef iconv_close ++ ++LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode) ++{ ++ return libiconv_open(tocode, fromcode); ++} ++ ++LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd, ++ ICONV_CONST char * * inbuf, size_t *inbytesleft, ++ char * * outbuf, size_t *outbytesleft) ++{ ++ return libiconv(icd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++ ++LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd) ++{ ++ return libiconv_close(icd); ++} + + #endif From 6d6fbef216693259b7188a82e697192046361605 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sun, 8 Dec 2019 22:22:41 +0100 Subject: [PATCH 26/71] ci macos: patch libiconv --- .github/workflows/main.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f386bdda7..4cb80a2fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,20 @@ jobs: - uses: actions/checkout@v1 - name: Install dependencies run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp + - name: patch libiconv + run: | + mkdir libiconv && cd libiconv + wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz + tar xf libiconv-1.16.tar.gz + cd libiconv-1.16 + patch -p1 < "${GITHUB_WORKSPACE}/tools/osx/libiconv_1.16_rt.patch" + mkdir build && cd build + destDir="$(pwd)" + ../configure --prefix=/opt/local --disable-static 'CFLAGS=-arch x86_64 -mmacosx-version-min=10.9' 'LDFLAGS=-arch x86_64 -mmacosx-version-min=10.9' CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.9" + make --jobs 2 + make DESTDIR="${destDir}" install + sudo cp opt/local/lib/libiconv.2.dylib /usr/lib/libiconv.2.dylib + cd - - name: cmake env: CMAKE_CXX_STANDARD: 11 @@ -39,7 +53,7 @@ jobs: -DOpenMP_C_FLAGS="${C_FLAGS}" \ -DOpenMP_CXX_FLAGS="${C_FLAGS}" \ .. - make --jobs 8 + make --jobs 2 make install sudo make macosx_bundle ARTIFACT=$(ls | grep RawTherapee*.zip) From 7d403407e5d79cd6afd9c90cdc116eaf4dacdcd4 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Sun, 8 Dec 2019 23:18:35 +0100 Subject: [PATCH 27/71] ci macos: install and use entire patched libiconv --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4cb80a2fe..950e7587d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: ../configure --prefix=/opt/local --disable-static 'CFLAGS=-arch x86_64 -mmacosx-version-min=10.9' 'LDFLAGS=-arch x86_64 -mmacosx-version-min=10.9' CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.9" make --jobs 2 make DESTDIR="${destDir}" install - sudo cp opt/local/lib/libiconv.2.dylib /usr/lib/libiconv.2.dylib + sudo mv opt/local /usr/local/opt/libiconv cd - - name: cmake env: @@ -32,14 +32,14 @@ jobs: PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig RAW_THERAPEE_MAJOR: '5' RAW_THERAPEE_MINOR: '7' - C_FLAGS: -Xpreprocessor -fopenmp /usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include + C_FLAGS: -Xpreprocessor -fopenmp /usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include run: | REF=${GITHUB_REF##*/} mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ - -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ + -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ -DPROC_TARGET_NUMBER="2" \ -DPROC_LABEL="generic processor" \ From 72f261a1b0270aebadf06bdb4d292cdca59b7d18 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Mon, 9 Dec 2019 15:26:26 +0100 Subject: [PATCH 28/71] Print /usr/local/lib contents & link it before other libs --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 950e7587d..cdd0033f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,6 +26,8 @@ jobs: make DESTDIR="${destDir}" install sudo mv opt/local /usr/local/opt/libiconv cd - + - name: print /usr/local/lib contents + run: ls -al /usr/local/lib - name: cmake env: CMAKE_CXX_STANDARD: 11 @@ -39,7 +41,7 @@ jobs: cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ - -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ + -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ -DPROC_TARGET_NUMBER="2" \ -DPROC_LABEL="generic processor" \ From aa0a1a870f219e18c760cadd301db38eb46f478f Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Mon, 9 Dec 2019 23:25:12 +0100 Subject: [PATCH 29/71] ci macos: remove unneccesary cd statement --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cdd0033f2..bdedf5432 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,6 @@ jobs: make --jobs 2 make DESTDIR="${destDir}" install sudo mv opt/local /usr/local/opt/libiconv - cd - - name: print /usr/local/lib contents run: ls -al /usr/local/lib - name: cmake From 62da9d434a3abc49f0c19090cdc7607aa381439a Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Mon, 9 Dec 2019 23:25:50 +0100 Subject: [PATCH 30/71] ci macos: change order of linker statements --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bdedf5432..4bc769e3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ - -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \ + -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib" \ -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ -DPROC_TARGET_NUMBER="2" \ -DPROC_LABEL="generic processor" \ From 0e662ccb4a68ca4e46397bca299892bdd9257406 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Mon, 9 Dec 2019 23:26:28 +0100 Subject: [PATCH 31/71] ci macos: configure AR and RANLIB libraries for cmake --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4bc769e3f..b90fedef1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,6 +53,8 @@ jobs: -DOpenMP_libomp_LIBRARY="/usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib" \ -DOpenMP_C_FLAGS="${C_FLAGS}" \ -DOpenMP_CXX_FLAGS="${C_FLAGS}" \ + -DCMAKE_AR="/usr/local/opt/llvm/bin/llvm-ar" \ + -DCMAKE_RANLIB="/usr/local/opt/llvm/bin/llvm-ranlib" \ .. make --jobs 2 make install From d5b8c9658ddcd183f1fada371929a05f07d4ad0b Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Mon, 9 Dec 2019 23:34:23 +0100 Subject: [PATCH 32/71] ci macos: use symlink reference for libomp --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b90fedef1..dad60b0db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig RAW_THERAPEE_MAJOR: '5' RAW_THERAPEE_MINOR: '7' - C_FLAGS: -Xpreprocessor -fopenmp /usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include + C_FLAGS: -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include run: | REF=${GITHUB_REF##*/} mkdir build && cd build @@ -50,7 +50,7 @@ jobs: -DOpenMP_CXX_FLAGS=-fopenmp=libomp \ -DOpenMP_C_LIB_NAMES="libomp" \ -DOpenMP_CXX_LIB_NAMES="libomp" \ - -DOpenMP_libomp_LIBRARY="/usr/local/Cellar/libomp/9.0.0/lib/libomp.dylib" \ + -DOpenMP_libomp_LIBRARY="/usr/local/lib/libomp.dylib" \ -DOpenMP_C_FLAGS="${C_FLAGS}" \ -DOpenMP_CXX_FLAGS="${C_FLAGS}" \ -DCMAKE_AR="/usr/local/opt/llvm/bin/llvm-ar" \ From 0a4f140aadfa9e1e2e90df68180cf812dc4d015e Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 00:05:08 +0100 Subject: [PATCH 33/71] ci macos: fix path for gdk-pixbuf-2.0 --- tools/osx/macosx_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 2501e936b..d3da8c7b7 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -117,7 +117,7 @@ msg "Copying dependencies from ${GTK_PREFIX}:" CheckLink "${EXECUTABLE}" msg "Copying library modules from ${GTK_PREFIX}:" -ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gdk-pixbuf-2.0 +ditto --arch "${arch}" {"/usr/local/Cellar/gdk-pixbuf/2*/lib","${LIB}"}/gdk-pixbuf-2.0 ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gtk-3.0 msg "Removing static libraries and cache files:" From 7eb2366e98d17a853a301e32de7691a20b292970 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 00:36:32 +0100 Subject: [PATCH 34/71] ci macos: link gdk-pixbuf from usr/local/opt --- .github/workflows/main.yml | 4 ++-- tools/osx/macosx_bundle.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dad60b0db..7ff4c4352 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,14 +33,14 @@ jobs: PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig RAW_THERAPEE_MAJOR: '5' RAW_THERAPEE_MINOR: '7' - C_FLAGS: -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include + C_FLAGS: -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/gdk-pixbuf/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include run: | REF=${GITHUB_REF##*/} mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ - -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib" \ + -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/opt/gdk-pixbuf/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib" \ -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ -DPROC_TARGET_NUMBER="2" \ -DPROC_LABEL="generic processor" \ diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index d3da8c7b7..e697ec766 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -117,7 +117,7 @@ msg "Copying dependencies from ${GTK_PREFIX}:" CheckLink "${EXECUTABLE}" msg "Copying library modules from ${GTK_PREFIX}:" -ditto --arch "${arch}" {"/usr/local/Cellar/gdk-pixbuf/2*/lib","${LIB}"}/gdk-pixbuf-2.0 +ditto --arch "${arch}" {"/usr/local/opt/gdk-pixbuf/lib","${LIB}"}/gdk-pixbuf-2.0 ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gtk-3.0 msg "Removing static libraries and cache files:" From 351fe7e2f11ca1da45edac219dd9e92e223e51e4 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 19:39:28 +0100 Subject: [PATCH 35/71] ci macos: fix for gdk-pixbuf not being within gtk+3 (on brew) --- tools/osx/macosx_bundle.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index e697ec766..44cacef88 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -99,6 +99,7 @@ MACOS="${CONTENTS}/MacOS" LIB="${CONTENTS}/Frameworks" ETC="${RESOURCES}/etc" EXECUTABLE="${MACOS}/rawtherapee" +GDK_PREFIX="/usr/local/opt/gdk-pixbuf" msg "Removing old files:" rm -rf "${APP}" "${PROJECT_NAME}_*.dmg" "*zip" @@ -117,7 +118,7 @@ msg "Copying dependencies from ${GTK_PREFIX}:" CheckLink "${EXECUTABLE}" msg "Copying library modules from ${GTK_PREFIX}:" -ditto --arch "${arch}" {"/usr/local/opt/gdk-pixbuf/lib","${LIB}"}/gdk-pixbuf-2.0 +ditto --arch "${arch}" {"${GDK_PREFIX}/lib","${LIB}"}/gdk-pixbuf-2.0 ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gtk-3.0 msg "Removing static libraries and cache files:" @@ -132,8 +133,8 @@ mv "${LIB}"/gtk-3.0/3*/immodules/*.so "${LIB}" rm -r "${LIB}"/gtk-3.0 rm -r "${LIB}"/gdk-pixbuf-2.0 -"${GTK_PREFIX}/bin/gdk-pixbuf-query-loaders" "${LIB}"/libpix*.so > "${ETC}/gtk-3.0/gdk-pixbuf.loaders" -"${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so,libprint*.so} > "${ETC}/gtk-3.0/gtk.immodules" +"${GDK_PREFIX}/bin/gdk-pixbuf-query-loaders" "${LIB}"/libpix*.so > "${ETC}/gtk-3.0/gdk-pixbuf.loaders" +"${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so,libprint*.so} > "${ETC}/gtk-3.0/gtk.immodules" sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/glib-2.0/schemas From fa2e8e63545e22e2ee829841058a76e910a8ba1c Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 19:40:27 +0100 Subject: [PATCH 36/71] ci macos: many fixes for library locations (homebrew) --- tools/osx/macosx_bundle.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 44cacef88..fd3a84c14 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -137,43 +137,43 @@ rm -r "${LIB}"/gdk-pixbuf-2.0 "${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so,libprint*.so} > "${ETC}/gtk-3.0/gtk.immodules" sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/glib-2.0/schemas -"${GTK_PREFIX}/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" +ditto {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas +"/usr/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" msg "Copying shared files from ${GTK_PREFIX}:" -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/mime +ditto {"/usr/local","${RESOURCES}"}/share/mime # GTK3 themes -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css +ditto {"/usr/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css +ditto {"/usr/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css # Adwaita icons iconfolders=("16x16/actions" "16x16/devices" "16x16/mimetypes" "16x16/places" "16x16/status" "48x48/devices") for f in "${iconfolders[@]}"; do - ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/"$f" + ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/"$f" done -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/index.theme -"${GTK_PREFIX}/bin/gtk-update-icon-cache-3.0" "${RESOURCES}/share/icons/Adwaita" +ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/index.theme +"/usr/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita" # Copy libjpeg-turbo into the app bundle -cp /opt/local/lib/libjpeg.62.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libjpeg.*.dylib "${RESOURCES}/../Frameworks" -# Copy libexpat into the app bundle -cp /opt/local/lib/libexpat.1.dylib "${RESOURCES}/../Frameworks" +# Copy libexpat into the app bundle (which is keg-only) +cp /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${RESOURCES}/../Frameworks" # Copy libz into the app bundle -cp /opt/local/lib/libz.1.dylib "${RESOURCES}/../Frameworks" +cp /usr/lib/libz.1.dylib "${RESOURCES}/../Frameworks" # Copy libtiff into the app bundle -cp /opt/local/lib/libtiff.5.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libtiff.5.dylib "${RESOURCES}/../Frameworks" # Copy the Lensfun database into the app bundle mkdir -p "${RESOURCES}/share/lensfun" -cp /opt/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun" +cp /usr/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun" # Copy liblensfun to Frameworks -cp /opt/local/lib/liblensfun.2.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/liblensfun.2.dylib "${RESOURCES}/../Frameworks" # Copy libomp to Frameworks -cp /opt/local/lib/libomp.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libomp.dylib "${RESOURCES}/../Frameworks" # Install names find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do From 56169fb95d9129d98bdd693d2fda7a4d4e5cd805 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 20:10:27 +0100 Subject: [PATCH 37/71] ci macos: cp resources from where they actually are --- tools/osx/macosx_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index fd3a84c14..9236f8fac 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -112,7 +112,7 @@ install -d "${RESOURCES}" \ msg "Copying release files:" ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}" -ditto "${CMAKE_BUILD_TYPE}/Resources" "${RESOURCES}" +ditto "Resources" "${RESOURCES}" msg "Copying dependencies from ${GTK_PREFIX}:" CheckLink "${EXECUTABLE}" From f463cf8085fb37cfe8f4091d7e963668710f2adb Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 21:18:48 +0100 Subject: [PATCH 38/71] ci macos: fix, libprint .so files are now also in target LIB --- tools/osx/macosx_bundle.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 9236f8fac..267d20f0c 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -130,6 +130,7 @@ install -d "${ETC}/gtk-3.0" # Make Frameworks folder flat mv "${LIB}"/gdk-pixbuf-2.0/2*/loaders/*.so "${LIB}" mv "${LIB}"/gtk-3.0/3*/immodules/*.so "${LIB}" +mv "${LIB}"/gtk-3.0/3*/printbackends/*.so "${LIB}" rm -r "${LIB}"/gtk-3.0 rm -r "${LIB}"/gdk-pixbuf-2.0 From aa6140198b6f619cc2dc259f897b2079b6f2d06b Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 21:21:24 +0100 Subject: [PATCH 39/71] ci macos: simplify frameworks path --- tools/osx/macosx_bundle.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 267d20f0c..70bbf6f7d 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -155,26 +155,26 @@ ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/index.theme "/usr/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita" # Copy libjpeg-turbo into the app bundle -cp /usr/local/lib/libjpeg.*.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libjpeg.*.dylib "${CONTENTS}/Frameworks" # Copy libexpat into the app bundle (which is keg-only) -cp /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks" # Copy libz into the app bundle -cp /usr/lib/libz.1.dylib "${RESOURCES}/../Frameworks" +cp /usr/lib/libz.1.dylib "${CONTENTS}/Frameworks" # Copy libtiff into the app bundle -cp /usr/local/lib/libtiff.5.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libtiff.5.dylib "${CONTENTS}/Frameworks" # Copy the Lensfun database into the app bundle mkdir -p "${RESOURCES}/share/lensfun" cp /usr/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun" # Copy liblensfun to Frameworks -cp /usr/local/lib/liblensfun.2.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks" # Copy libomp to Frameworks -cp /usr/local/lib/libomp.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libomp.dylib "${CONTENTS}/Frameworks" # Install names find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do From 5298f95cbdf4ef3c375963986157f4a76a9c85f1 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 21:30:05 +0100 Subject: [PATCH 40/71] ci macos: follow symlinked files while copying --- tools/osx/macosx_bundle.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 70bbf6f7d..2b008fbf5 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -138,7 +138,8 @@ rm -r "${LIB}"/gdk-pixbuf-2.0 "${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so,libprint*.so} > "${ETC}/gtk-3.0/gtk.immodules" sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" -ditto {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas +mkdir -p ${RESOURCES}/share/glib-2.0 +cp -pRL {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas "/usr/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" msg "Copying shared files from ${GTK_PREFIX}:" From bff973eef83adca82fbe4fcac6c6a4b9aaa1e9bc Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 21:56:36 +0100 Subject: [PATCH 41/71] ci macos: debug printing for mime copy action --- tools/osx/macosx_bundle.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 2b008fbf5..d2fefc7ac 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -143,7 +143,10 @@ cp -pRL {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas "/usr/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" msg "Copying shared files from ${GTK_PREFIX}:" +set -x +find /usr/local -name mime ditto {"/usr/local","${RESOURCES}"}/share/mime +set +x # GTK3 themes ditto {"/usr/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css ditto {"/usr/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css From f6f9da10cc550b1ded3fc66ecca9d53ec59c109c Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 23:40:22 +0100 Subject: [PATCH 42/71] ci macos: do not include libprint to avoid error --- tools/osx/macosx_bundle.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index d2fefc7ac..31233ef38 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -130,12 +130,14 @@ install -d "${ETC}/gtk-3.0" # Make Frameworks folder flat mv "${LIB}"/gdk-pixbuf-2.0/2*/loaders/*.so "${LIB}" mv "${LIB}"/gtk-3.0/3*/immodules/*.so "${LIB}" -mv "${LIB}"/gtk-3.0/3*/printbackends/*.so "${LIB}" +# the print*.so lead to errors when running gtk-query-immodules-3.0, just seeing what the app does without, since they are not in immodules +# and including them leads to errors and a completely empty gtk.immodules file +# mv "${LIB}"/gtk-3.0/3*/printbackends/*.so "${LIB}" rm -r "${LIB}"/gtk-3.0 rm -r "${LIB}"/gdk-pixbuf-2.0 "${GDK_PREFIX}/bin/gdk-pixbuf-query-loaders" "${LIB}"/libpix*.so > "${ETC}/gtk-3.0/gdk-pixbuf.loaders" -"${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so,libprint*.so} > "${ETC}/gtk-3.0/gtk.immodules" +"${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so} > "${ETC}/gtk-3.0/gtk.immodules" sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" mkdir -p ${RESOURCES}/share/glib-2.0 From ed05d156126a4c36416812732a253a0741c58ffd Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Tue, 10 Dec 2019 23:40:58 +0100 Subject: [PATCH 43/71] ci macos: follow symlink files in copy --- tools/osx/macosx_bundle.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 31233ef38..4a0dc30be 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -146,8 +146,8 @@ cp -pRL {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas msg "Copying shared files from ${GTK_PREFIX}:" set -x -find /usr/local -name mime -ditto {"/usr/local","${RESOURCES}"}/share/mime +sudo find / -name mime +cp -pRL {"/usr/local","${RESOURCES}"}/share/mime set +x # GTK3 themes ditto {"/usr/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css @@ -155,7 +155,7 @@ ditto {"/usr/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css # Adwaita icons iconfolders=("16x16/actions" "16x16/devices" "16x16/mimetypes" "16x16/places" "16x16/status" "48x48/devices") for f in "${iconfolders[@]}"; do - ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/"$f" + cp -pRL {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/"$f" done ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/index.theme "/usr/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita" From 055072c15a3e3c91d95973c740eeb4ff18c712f2 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Wed, 11 Dec 2019 00:06:29 +0100 Subject: [PATCH 44/71] ci macos: install shared-mime-info --- .github/workflows/main.yml | 2 +- tools/osx/macosx_bundle.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ff4c4352..1468a069e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Install dependencies - run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp + run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp shared-mime-info - name: patch libiconv run: | mkdir libiconv && cd libiconv diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 4a0dc30be..e3012d453 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -146,7 +146,7 @@ cp -pRL {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas msg "Copying shared files from ${GTK_PREFIX}:" set -x -sudo find / -name mime +find /usr -name mime cp -pRL {"/usr/local","${RESOURCES}"}/share/mime set +x # GTK3 themes From 0e7a7efa1a5299febe93c4b28ab80392e67c5bd6 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Wed, 11 Dec 2019 00:32:54 +0100 Subject: [PATCH 45/71] ci macos: create directories for icons --- tools/osx/macosx_bundle.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index e3012d453..bf2357c62 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -145,16 +145,15 @@ cp -pRL {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas "/usr/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" msg "Copying shared files from ${GTK_PREFIX}:" -set -x -find /usr -name mime cp -pRL {"/usr/local","${RESOURCES}"}/share/mime -set +x + # GTK3 themes ditto {"/usr/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css ditto {"/usr/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css # Adwaita icons iconfolders=("16x16/actions" "16x16/devices" "16x16/mimetypes" "16x16/places" "16x16/status" "48x48/devices") for f in "${iconfolders[@]}"; do + mkdir -p ${RESOURCES}/share/icons/Adwaita/${f} cp -pRL {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/"$f" done ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/index.theme From 10d5fc4d8e837a8d9db687060e26e92465fdc30f Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Wed, 11 Dec 2019 17:41:47 +0100 Subject: [PATCH 46/71] ci macos: fix globbing --- tools/osx/macosx_bundle.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index bf2357c62..cadb1d5e8 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -136,8 +136,8 @@ mv "${LIB}"/gtk-3.0/3*/immodules/*.so "${LIB}" rm -r "${LIB}"/gtk-3.0 rm -r "${LIB}"/gdk-pixbuf-2.0 -"${GDK_PREFIX}/bin/gdk-pixbuf-query-loaders" "${LIB}"/libpix*.so > "${ETC}/gtk-3.0/gdk-pixbuf.loaders" -"${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so} > "${ETC}/gtk-3.0/gtk.immodules" +"${GDK_PREFIX}"/bin/gdk-pixbuf-query-loaders "${LIB}"/libpix*.so > "${ETC}"/gtk-3.0/gdk-pixbuf.loaders +"${GTK_PREFIX}"/bin/gtk-query-immodules-3.0 "${LIB}"/im*.so > "${ETC}"/gtk-3.0/gtk.immodules sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" mkdir -p ${RESOURCES}/share/glib-2.0 From 67e35fdb5d37386064d56aeb2c1f7799297b24fb Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Wed, 11 Dec 2019 18:31:04 +0100 Subject: [PATCH 47/71] ci macos: fix icons path --- tools/osx/macosx_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index cadb1d5e8..3958326e8 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -154,7 +154,7 @@ ditto {"/usr/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css iconfolders=("16x16/actions" "16x16/devices" "16x16/mimetypes" "16x16/places" "16x16/status" "48x48/devices") for f in "${iconfolders[@]}"; do mkdir -p ${RESOURCES}/share/icons/Adwaita/${f} - cp -pRL {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/"$f" + cp /usr/local/share/icons/Adwaita/${f}/* "${RESOURCES}"/share/icons/Adwaita/${f} done ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/index.theme "/usr/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita" From 2498423a6f010ab4fc11598858b36ace5458494e Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Thu, 12 Dec 2019 15:32:59 +0100 Subject: [PATCH 48/71] ci macos: avoid ls parsing bugs --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1468a069e..ba6e44172 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: make --jobs 2 make install sudo make macosx_bundle - ARTIFACT=$(ls | grep RawTherapee*.zip) + ARTIFACT=(RawTherapee*.zip) echo "=== artifact: ${ARTIFACT}" echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}" echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}" From ec00334acba24a9f48b07b5b2ac951f0d5fb3ea2 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Thu, 12 Dec 2019 15:37:01 +0100 Subject: [PATCH 49/71] ci macos: use Apple's way of spelling macOS --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba6e44172..ff9eb98a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Mac OS build +name: macOS build on: push From ed6eeca929041a448f293f7e623cb5546bebe29c Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Thu, 12 Dec 2019 15:42:53 +0100 Subject: [PATCH 50/71] ci macos: explain GITHUB_REF parsing --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff9eb98a2..e17414f44 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,6 +35,7 @@ jobs: RAW_THERAPEE_MINOR: '7' C_FLAGS: -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/gdk-pixbuf/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include run: | + # GITHUB_REF is the ref that triggered the build, like refs/heads/new-feature - the next line parses that to REF: the branch name only (new-feature) REF=${GITHUB_REF##*/} mkdir build && cd build cmake \ From 8071e4229250d30087611e2bb44106a2000caf2a Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Thu, 12 Dec 2019 16:12:36 +0100 Subject: [PATCH 51/71] ci macos: automatic jobs config test 2 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e17414f44..0bb14c479 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: mkdir build && cd build destDir="$(pwd)" ../configure --prefix=/opt/local --disable-static 'CFLAGS=-arch x86_64 -mmacosx-version-min=10.9' 'LDFLAGS=-arch x86_64 -mmacosx-version-min=10.9' CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.9" - make --jobs 2 + make --jobs make DESTDIR="${destDir}" install sudo mv opt/local /usr/local/opt/libiconv - name: print /usr/local/lib contents @@ -57,7 +57,7 @@ jobs: -DCMAKE_AR="/usr/local/opt/llvm/bin/llvm-ar" \ -DCMAKE_RANLIB="/usr/local/opt/llvm/bin/llvm-ranlib" \ .. - make --jobs 2 + make --jobs make install sudo make macosx_bundle ARTIFACT=(RawTherapee*.zip) From 8425e974e6033a84c2eced672be13169a6daf8dd Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Fri, 13 Dec 2019 14:04:46 +0100 Subject: [PATCH 52/71] ci macos: document echo ::set-env --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0bb14c479..5f5b93686 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,6 +62,7 @@ jobs: sudo make macosx_bundle ARTIFACT=(RawTherapee*.zip) echo "=== artifact: ${ARTIFACT}" + # defining environment variables for next step as per https://github.com/actions/starter-workflows/issues/68 echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}" echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}" - uses: actions/upload-artifact@v1 From 66cf9f0c7a7f93b062b05cb8d4ed5be3d8c5dd41 Mon Sep 17 00:00:00 2001 From: Quinten Krijger Date: Fri, 13 Dec 2019 14:13:50 +0100 Subject: [PATCH 53/71] ci macos: cleanup debug print statement --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f5b93686..bab7397a6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,8 +25,6 @@ jobs: make --jobs make DESTDIR="${destDir}" install sudo mv opt/local /usr/local/opt/libiconv - - name: print /usr/local/lib contents - run: ls -al /usr/local/lib - name: cmake env: CMAKE_CXX_STANDARD: 11 From 6b221015001e3f5fbbfe63855cc3746e94562238 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Sun, 15 Dec 2019 17:00:50 +0100 Subject: [PATCH 54/71] better white level for FUJIFILM X-A7 --- rtengine/camconst.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index a3bab58a8..ab42f3d19 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1323,6 +1323,11 @@ Camera constants: "ranges": { "white": 16100 } }, + { // Quality C, bisected from the overexposed region of one pre-release sample file + "make_model": "FUJIFILM X-A7", + "ranges": { "white": 16382 } + }, + { // Quality B "make_model": "FUJIFILM X-A10", "dcraw_matrix": [ 11540,-4999,-991,-2949,10963,2278,-382,1049,5605 ], // DNGv9.12 D65 From 4a25633bd72604535ed9198a21117e7e556ae9c3 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Mon, 16 Dec 2019 14:35:40 +0100 Subject: [PATCH 55/71] Do not gray out adjusters when automatic is enabled, fixes #5565 --- rtgui/adjuster.cc | 44 +++++++++++++------------------------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index 2267a9fc1..142374213 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -230,22 +230,7 @@ void Adjuster::setDefaultEditedState (EditedState eState) void Adjuster::autoToggled () { - if (!editedCheckBox) { - // If not used in the BatchEditor panel - if (automatic->get_active()) { - // Disable the slider and spin button - spin->set_sensitive(false); - slider->set_sensitive(false); - reset->set_sensitive(false); - } else { - // Enable the slider and spin button - spin->set_sensitive(true); - slider->set_sensitive(true); - reset->set_sensitive(true); - } - } - - if (adjusterListener != nullptr && !blocked) { + if (adjusterListener && !blocked) { adjusterListener->adjusterAutoToggled(this); } } @@ -380,6 +365,9 @@ void Adjuster::spinChanged () if (adjusterListener && !blocked) { if (!buttonReleaseSlider.connected() || afterReset) { eventPending = false; + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } else { eventPending = true; @@ -419,6 +407,9 @@ void Adjuster::sliderChanged () if (adjusterListener && !blocked) { if (!buttonReleaseSlider.connected() || afterReset) { eventPending = false; + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } else { eventPending = true; @@ -459,21 +450,6 @@ void Adjuster::setAutoValue (bool a) const bool oldVal = autoChange.block(true); automatic->set_active(a); autoChange.block(oldVal); - - if (!editedCheckBox) { - // If not used in the BatchEditor panel - if (a) { - // Disable the slider and spin button - spin->set_sensitive(false); - slider->set_sensitive(false); - reset->set_sensitive(false); - } else { - // Enable the slider and spin button - spin->set_sensitive(true); - slider->set_sensitive(true); - reset->set_sensitive(true); - } - } } } @@ -481,6 +457,9 @@ bool Adjuster::notifyListener () { if (eventPending && adjusterListener != nullptr && !blocked) { + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } @@ -571,6 +550,9 @@ void Adjuster::showEditedCB () void Adjuster::editedToggled () { if (adjusterListener && !blocked) { + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } From d6f65dc8e22262e331c2e0553aaf3acb3f4c2e6a Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 16 Dec 2019 23:42:48 +0100 Subject: [PATCH 56/71] Added help button to main menu #5566 Opens RawPedia in the default URI handler --- rtdata/languages/default | 1 + rtgui/rtwindow.cc | 20 +++++++++++++++++--- rtgui/rtwindow.h | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index da4d5c804..5004bf25c 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -225,6 +225,7 @@ GENERAL_DISABLED;Disabled GENERAL_ENABLE;Enable GENERAL_ENABLED;Enabled GENERAL_FILE;File +GENERAL_HELP;Help GENERAL_LANDSCAPE;Landscape GENERAL_NA;n/a GENERAL_NO;No diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 5ab3ab85d..7f3c409a6 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -383,8 +383,13 @@ RTWindow::RTWindow () iccProfileCreator->set_tooltip_markup (M ("MAIN_BUTTON_ICCPROFCREATOR")); iccProfileCreator->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showICCProfileCreator) ); - //Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !? - //Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"...")); + Gtk::Button* helpBtn = Gtk::manage (new Gtk::Button ()); + setExpandAlignProperties (helpBtn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + helpBtn->set_relief(Gtk::RELIEF_NONE); + helpBtn->set_image (*Gtk::manage (new RTImage ("info.png"))); + helpBtn->set_tooltip_markup (M ("GENERAL_HELP")); + helpBtn->signal_clicked().connect (sigc::mem_fun (*this, &RTWindow::showRawPedia)); + Gtk::Button* preferences = Gtk::manage (new Gtk::Button ()); setExpandAlignProperties (preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); preferences->set_relief(Gtk::RELIEF_NONE); @@ -392,7 +397,6 @@ RTWindow::RTWindow () preferences->set_tooltip_markup (M ("MAIN_BUTTON_PREFERENCES")); preferences->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showPreferences) ); - //btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN"))); btn_fullscreen = Gtk::manage ( new Gtk::Button()); setExpandAlignProperties (btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); btn_fullscreen->set_relief(Gtk::RELIEF_NONE); @@ -414,6 +418,7 @@ RTWindow::RTWindow () actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL); actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*helpBtn, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); mainNB->set_action_widget (actionGrid, Gtk::PACK_END); @@ -422,6 +427,7 @@ RTWindow::RTWindow () actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL); actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*helpBtn, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); mainNB->set_action_widget (actionGrid, Gtk::PACK_END); @@ -913,6 +919,14 @@ void RTWindow::writeToolExpandedStatus (std::vector &tpOpen) } +void RTWindow::showRawPedia() +{ + const Glib::ustring& uri = "https://rawpedia.rawtherapee.com/"; + guint32 err = 0; + RTWindow *rtWin = this; + rtWin->show_uri(uri, err); +} + void RTWindow::showICCProfileCreator () { ICCProfileCreator *iccpc = new ICCProfileCreator (this); diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 100ddf636..4791ac6c1 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -90,6 +90,7 @@ public: bool on_window_state_event (GdkEventWindowState* event) override; void on_mainNB_switch_page (Gtk::Widget* widget, guint page_num); + void showRawPedia(); void showICCProfileCreator (); void showPreferences (); void on_realize () override; From 9a0cae035753922db32398b42a1b0600b31aba04 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 16 Dec 2019 23:47:54 +0100 Subject: [PATCH 57/71] Clear progress bar when opening in external editor The last step remained visible in the progress bar when invoking the external editor. Fixes #5475 --- rtgui/editorpanel.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 1b5ed3fa7..806af8b2e 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -2067,6 +2067,7 @@ bool EditorPanel::idle_sentToGimp (ProgressConnector *pc, rtengine::IImagef { img->free (); int errore = pc->returnValue(); + setProgressState(false); delete pc; if (!errore) { From abac9856e7c17ce5ff5e4c2477eaa58c1b64a207 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Tue, 17 Dec 2019 00:44:01 +0100 Subject: [PATCH 58/71] Apply internal default profile (neutral) instead of user defined default profiles for missing parts of existing profile when loading a raw file which already has a .pp3, fixes #5564 --- rtgui/thumbnail.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index bcf578143..5295b9d61 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -341,34 +341,31 @@ void Thumbnail::notifylisterners_procParamsChanged(int whoChangedIt) * the Preferences). * * The result is a complete ProcParams with default values merged with the values - * from the default Raw or Image ProcParams, then with the values from the loaded - * ProcParams (sidecar or cache file). - */ + * from the loaded ProcParams (sidecar or cache file). +*/ void Thumbnail::loadProcParams () { MyMutex::MyLock lock(mutex); pparamsValid = false; pparams->setDefaults(); - const PartialProfile *defaultPP = ProfileStore::getInstance()->getDefaultPartialProfile(getType() == FT_Raw); - defaultPP->applyTo(pparams.get()); if (options.paramsLoadLocation == PLL_Input) { // try to load it from params file next to the image file - int ppres = pparams->load (fname + paramFileExtension); + const int ppres = pparams->load(fname + paramFileExtension); pparamsValid = !ppres && pparams->ppVersion >= 220; // if no success, try to load the cached version of the procparams if (!pparamsValid) { - pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension)); + pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension)); } } else { // try to load it from cache - pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension)); + pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension)); // if no success, try to load it from params file next to the image file if (!pparamsValid) { - int ppres = pparams->load (fname + paramFileExtension); + const int ppres = pparams->load(fname + paramFileExtension); pparamsValid = !ppres && pparams->ppVersion >= 220; } } From 56de2e7a0736642a7a6b695b1efc894fc28e868a Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 17 Dec 2019 10:38:04 +0100 Subject: [PATCH 59/71] Help button - new icon, simplified code #5567 --- rtdata/images/svg/questionmark.svg | 122 +++++++++++++++++++++++++++++ rtgui/rtwindow.cc | 7 +- 2 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 rtdata/images/svg/questionmark.svg diff --git a/rtdata/images/svg/questionmark.svg b/rtdata/images/svg/questionmark.svg new file mode 100644 index 000000000..4c4b59590 --- /dev/null +++ b/rtdata/images/svg/questionmark.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + image/svg+xml + + + + + Maciej Dworak + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + ? + + + + diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 7f3c409a6..4c6dc753f 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -386,7 +386,7 @@ RTWindow::RTWindow () Gtk::Button* helpBtn = Gtk::manage (new Gtk::Button ()); setExpandAlignProperties (helpBtn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); helpBtn->set_relief(Gtk::RELIEF_NONE); - helpBtn->set_image (*Gtk::manage (new RTImage ("info.png"))); + helpBtn->set_image (*Gtk::manage (new RTImage ("questionmark.png"))); helpBtn->set_tooltip_markup (M ("GENERAL_HELP")); helpBtn->signal_clicked().connect (sigc::mem_fun (*this, &RTWindow::showRawPedia)); @@ -921,10 +921,7 @@ void RTWindow::writeToolExpandedStatus (std::vector &tpOpen) void RTWindow::showRawPedia() { - const Glib::ustring& uri = "https://rawpedia.rawtherapee.com/"; - guint32 err = 0; - RTWindow *rtWin = this; - rtWin->show_uri(uri, err); + show_uri("https://rawpedia.rawtherapee.com/", GDK_CURRENT_TIME); } void RTWindow::showICCProfileCreator () From 5e0ad767ad27bd73fbf67fa85f939c2529400be8 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Wed, 18 Dec 2019 13:16:37 +0100 Subject: [PATCH 60/71] Capture sharpening: fix wrong calculation for radius > 0.84 --- rtengine/capturesharpening.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/capturesharpening.cc b/rtengine/capturesharpening.cc index 281a2ad71..f991400e5 100644 --- a/rtengine/capturesharpening.cc +++ b/rtengine/capturesharpening.cc @@ -181,7 +181,7 @@ inline void gauss7x7div(float** RESTRICT src, float** RESTRICT dst, float** REST const float val = c31 * (src[i - 3][j - 1] + src[i - 3][j + 1] + src[i - 1][j - 3] + src[i - 1][j + 3] + src[i + 1][j - 3] + src[i + 1][j + 3] + src[i + 3][j - 1] + src[i + 3][j + 1]) + c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) + c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) + - c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] * c21 + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -250,7 +250,7 @@ inline void gauss7x7mult(float** RESTRICT src, float** RESTRICT dst, const int t const float val = c31 * (src[i - 3][j - 1] + src[i - 3][j + 1] + src[i - 1][j - 3] + src[i - 1][j + 3] + src[i + 1][j - 3] + src[i + 1][j + 3] + src[i + 3][j - 1] + src[i + 3][j + 1]) + c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) + c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) + - c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] * c21 + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + From 3a207dace71f4380185b2b86e758084df299f49a Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Wed, 18 Dec 2019 17:33:41 +0100 Subject: [PATCH 61/71] Some optimizations for capture sharpening --- rtengine/capturesharpening.cc | 40 +++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/rtengine/capturesharpening.cc b/rtengine/capturesharpening.cc index f991400e5..d2bb6b351 100644 --- a/rtengine/capturesharpening.cc +++ b/rtengine/capturesharpening.cc @@ -152,7 +152,7 @@ inline void gauss5x5div (float** RESTRICT src, float** RESTRICT dst, float** RES for (int i = 2; i < tileSize - 2; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 2; j < tileSize - 2; ++j) { - const float val = c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + const float val = c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -178,10 +178,10 @@ inline void gauss7x7div(float** RESTRICT src, float** RESTRICT dst, float** REST for (int i = 3; i < tileSize - 3; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 3; j < tileSize - 3; ++j) { - const float val = c31 * (src[i - 3][j - 1] + src[i - 3][j + 1] + src[i - 1][j - 3] + src[i - 1][j + 3] + src[i + 1][j - 3] + src[i + 1][j + 3] + src[i + 3][j - 1] + src[i + 3][j + 1]) + + const float val = c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) + c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) + c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) + - c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -221,7 +221,7 @@ inline void gauss5x5mult (float** RESTRICT src, float** RESTRICT dst, const int for (int i = 2; i < tileSize - 2; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 2; j < tileSize - 2; ++j) { - const float val = c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + const float val = c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -247,10 +247,10 @@ inline void gauss7x7mult(float** RESTRICT src, float** RESTRICT dst, const int t for (int i = 3; i < tileSize - 3; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 3; j < tileSize - 3; ++j) { - const float val = c31 * (src[i - 3][j - 1] + src[i - 3][j + 1] + src[i - 1][j - 3] + src[i - 1][j + 3] + src[i + 1][j - 3] + src[i + 1][j + 3] + src[i + 3][j - 1] + src[i + 3][j + 1]) + + const float val = c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) + c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) + c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) + - c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -563,19 +563,25 @@ BENCHFUN // fill tiles if (endOfRow || endOfCol) { // special handling for small tiles at end of row or column + float maxVal = 0.f; if (checkIterStop) { - float maxVal = 0.f; for (int k = 0, ii = endOfCol ? H - fullTileSize + border : i; k < tileSize; ++k, ++ii) { for (int l = 0, jj = endOfRow ? W - fullTileSize + border : j; l < tileSize; ++l, ++jj) { iterCheck[k][l] = oldLuminance[ii][jj] * clipmask[ii][jj] * 0.5f; maxVal = std::max(maxVal, clipmask[ii][jj]); } } - if (maxVal < minBlend) { - // no pixel of the tile has a blend factor >= minBlend => skip the tile - continue; + } else { + for (int k = 0, ii = endOfCol ? H - fullTileSize + border : i; k < tileSize; ++k, ++ii) { + for (int l = 0, jj = endOfRow ? W - fullTileSize + border : j; l < tileSize; ++l, ++jj) { + maxVal = std::max(maxVal, clipmask[ii][jj]); + } } } + if (maxVal < minBlend) { + // no pixel of the tile has a blend factor >= minBlend => skip the tile + continue; + } for (int k = 0, ii = endOfCol ? H - fullTileSize : i - border; k < fullTileSize; ++k, ++ii) { for (int l = 0, jj = endOfRow ? W - fullTileSize : j - border; l < fullTileSize; ++l, ++jj) { tmpIThr[k][l] = oldLuminance[ii][jj]; @@ -583,19 +589,25 @@ BENCHFUN } } } else { + float maxVal = 0.f; if (checkIterStop) { - float maxVal = 0.f; for (int ii = 0; ii < tileSize; ++ii) { for (int jj = 0; jj < tileSize; ++jj) { iterCheck[ii][jj] = oldLuminance[i + ii][j + jj] * clipmask[i + ii][j + jj] * 0.5f; maxVal = std::max(maxVal, clipmask[i + ii][j + jj]); } } - if (maxVal < minBlend) { - // no pixel of the tile has a blend factor >= minBlend => skip the tile - continue; + } else { + for (int ii = 0; ii < tileSize; ++ii) { + for (int jj = 0; jj < tileSize; ++jj) { + maxVal = std::max(maxVal, clipmask[i + ii][j + jj]); + } } } + if (maxVal < minBlend) { + // no pixel of the tile has a blend factor >= minBlend => skip the tile + continue; + } for (int ii = i; ii < i + fullTileSize; ++ii) { for (int jj = j; jj < j + fullTileSize; ++jj) { tmpIThr[ii - i][jj - j] = oldLuminance[ii - border][jj - border]; From 765499bf5568d000af567a1aa850a544d3b9bb1e Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Thu, 19 Dec 2019 20:46:35 -0500 Subject: [PATCH 62/71] Fix doxygen typo and other various typos --- rtengine/cJSON.h | 2 +- rtengine/camconst.cc | 2 +- rtengine/color.h | 2 +- rtengine/improcfun.cc | 2 +- rtgui/cropwindow.cc | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rtengine/cJSON.h b/rtengine/cJSON.h index 786dd2e0e..49fd67b72 100644 --- a/rtengine/cJSON.h +++ b/rtengine/cJSON.h @@ -195,7 +195,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void); /* Create a string where valuestring references a string so * it will not be freed by cJSON_Delete */ CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string); -/* Create an object/arrray that only references it's elements so +/* Create an object/array that only references it's elements so * they will not be freed by cJSON_Delete */ CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child); CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child); diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index e8f7b1cbf..d136d6a21 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -253,7 +253,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) } if (i % 4 != 0) { - fprintf(stderr, "\"masked_areas\" array length must be divisable by 4\n"); + fprintf(stderr, "\"masked_areas\" array length must be divisible by 4\n"); goto parse_error; } } diff --git a/rtengine/color.h b/rtengine/color.h index d9c344c27..ec2f17e6f 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -1372,7 +1372,7 @@ public: * @param HH hue before [-PI ; +PI] * @param Chprov1 chroma after [0 ; 180 (can be superior)] * @param CC chroma before [0 ; 180] - * @param corectionHuechroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) + * @param correctionHuechroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) * @param correctlum hue correction depending on luminance (brightness, contrast,...), in radians [0 ; 0.45] (return value) * @param munsDbgInfo (Debug target only) object to collect information */ diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index cb0834570..59fb0f016 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -5590,7 +5590,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double whiteclipg = CurveFactory::igamma2 ((float) (whiteclipg / 65535.0)) * 65535.0; //need to inverse gamma transform to get correct exposure compensation parameter - //corection with gamma + //correction with gamma black = (int) ((65535 * black) / whiteclipg); //expcomp = log(65535.0 / (whiteclipg)) / log(2.0); diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index b00032191..0a9b81112 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -1492,9 +1492,9 @@ void CropWindow::expose (Cairo::RefPtr cr) const float kernel_size2 = SQR(2.f * blur_radius2 + 1.f); // count of pixels in the small blur kernel const float rkernel_size2 = 1.0f / kernel_size2; // reciprocal of kernel_size to avoid divisions - // aloocate buffer for precalculated Luminance + // allocate buffer for precalculated Luminance float* tmpL = (float*)malloc(bHeight * bWidth * sizeof(float) ); - // aloocate buffers for sums and sums of squares of small kernel + // allocate buffers for sums and sums of squares of small kernel float* tmpLsum = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); float* tmpLsumSq = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); float* tmpstdDev2 = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); @@ -1631,7 +1631,7 @@ void CropWindow::expose (Cairo::RefPtr cr) && stdDev_L2 > stdDev_L //this is the key to select fine detail within lower contrast on larger scale && stdDev_L > focus_threshby10 //options.highlightThreshold ) { - // transpareny depends on sdtDev_L2 and maxstdDev_L2 + // transparency depends on sdtDev_L2 and maxstdDev_L2 float transparency = 1.f - std::min(stdDev_L2 / maxstdDev_L2, 1.0f) ; // first row of circle guint8* currtmp = &curr[0] + (-3 * pixRowStride); From c5d2e00ba32353a4361ac0af1221cce6d4c9dc9b Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Fri, 20 Dec 2019 06:06:52 -0500 Subject: [PATCH 63/71] Fixed previous commit per review feedback --- rtengine/color.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/color.h b/rtengine/color.h index ec2f17e6f..211615de1 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -1372,7 +1372,7 @@ public: * @param HH hue before [-PI ; +PI] * @param Chprov1 chroma after [0 ; 180 (can be superior)] * @param CC chroma before [0 ; 180] - * @param correctionHuechroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) + * @param correctionHueChroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) * @param correctlum hue correction depending on luminance (brightness, contrast,...), in radians [0 ; 0.45] (return value) * @param munsDbgInfo (Debug target only) object to collect information */ From 7f425e7fe64e0aa5917cc49594b37cde9fab1c9e Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Fri, 20 Dec 2019 06:07:52 -0500 Subject: [PATCH 64/71] Found a few more typos --- rtgui/editwidgets.h | 2 +- rtgui/options.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/editwidgets.h b/rtgui/editwidgets.h index 55b4ca3cc..0fa7a91bf 100644 --- a/rtgui/editwidgets.h +++ b/rtgui/editwidgets.h @@ -55,7 +55,7 @@ class RTSurface; * - drag1 * - button1Released * - * Actually, only curves does use this class, and everything is handled for curve implementor (as much as possible). + * Actually, only curves does use this class, and everything is handled for curve implementer (as much as possible). * See the curve's class documentation to see how to implement the curve's pipette feature. * * ### Event handling diff --git a/rtgui/options.cc b/rtgui/options.cc index f5b6b5b60..dcb16e1ea 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -225,7 +225,7 @@ Glib::ustring Options::getPreferredProfilePath() * *@param profName path + filename of the procparam to look for. A filename without path can be provided for backward compatibility. * In this case, this parameter will be updated with the new format. - *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementor will have + *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementer will have * to test for this particular value. If the absolute path is invalid (e.g. the file doesn't exist), it will return an empty string. */ Glib::ustring Options::findProfilePath(Glib::ustring &profName) From bd6088837c99b95f9a9c53fdd5ff4990f1c550c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Fri, 20 Dec 2019 13:34:37 +0100 Subject: [PATCH 65/71] Fix crash on `DCraw::data_error` (fixes #5571) --- rtengine/dcraw.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index d5348286c..812f122b3 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -4433,6 +4433,10 @@ void CLASS foveon_interpolate() void CLASS crop_masked_pixels() { + if (data_error) { + return; + } + int row, col; unsigned r, c, m, mblack[8], zero, val; From 5face2e4499c93422ca907f1966dc7d7d5cd75ec Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Fri, 20 Dec 2019 17:44:51 +0100 Subject: [PATCH 66/71] buildBlendMask: remove multiplication by amount as amount always was 1 --- rtengine/capturesharpening.cc | 4 ++-- rtengine/dual_demosaic_RT.cc | 2 +- rtengine/ipsharpen.cc | 2 +- rtengine/rt_algo.cc | 11 +++++------ rtengine/rt_algo.h | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/rtengine/capturesharpening.cc b/rtengine/capturesharpening.cc index d2bb6b351..e5bfde555 100644 --- a/rtengine/capturesharpening.cc +++ b/rtengine/capturesharpening.cc @@ -800,7 +800,7 @@ BENCHFUN } array2D& blend = red; // red will be overridden anyway => we can use its buffer to store the blend mask - buildBlendMask(L, blend, W, H, contrast, 1.f, sharpeningParams.autoContrast, clipMask); + buildBlendMask(L, blend, W, H, contrast, sharpeningParams.autoContrast, clipMask); if (plistener) { plistener->setProgress(0.2); } @@ -849,7 +849,7 @@ BENCHFUN } // calculate contrast based blend factors to reduce sharpening in regions with low contrast array2D& blend = clipMask; // we can share blend and clipMask buffer here - buildBlendMask(L, blend, W, H, contrast, 1.f, sharpeningParams.autoContrast, clipMask); + buildBlendMask(L, blend, W, H, contrast, sharpeningParams.autoContrast, clipMask); if (plistener) { plistener->setProgress(0.2); } diff --git a/rtengine/dual_demosaic_RT.cc b/rtengine/dual_demosaic_RT.cc index 69d1a189a..93508808c 100644 --- a/rtengine/dual_demosaic_RT.cc +++ b/rtengine/dual_demosaic_RT.cc @@ -105,7 +105,7 @@ void RawImageSource::dual_demosaic_RT(bool isBayer, const procparams::RAWParams JaggedArray blend(winw, winh); float contrastf = contrast / 100.f; - buildBlendMask(L, blend, winw, winh, contrastf, 1.f, autoContrast); + buildBlendMask(L, blend, winw, winh, contrastf, autoContrast); contrast = contrastf * 100.f; array2D& redTmp = L; // L is not needed anymore => reuse it diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index a35476d3a..7198b76c5 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -256,7 +256,7 @@ void ImProcFunctions::sharpening (LabImage* lab, const procparams::SharpeningPar // calculate contrast based blend factors to reduce sharpening in regions with low contrast JaggedArray blend(W, H); float contrast = sharpenParam.contrast / 100.f; - buildBlendMask(lab->L, blend, W, H, contrast, 1.f); + buildBlendMask(lab->L, blend, W, H, contrast); if(showMask) { #ifdef _OPENMP diff --git a/rtengine/rt_algo.cc b/rtengine/rt_algo.cc index 79a7c3679..a5b48af95 100644 --- a/rtengine/rt_algo.cc +++ b/rtengine/rt_algo.cc @@ -299,7 +299,7 @@ void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& maxOut = rtengine::LIM(maxOut, minVal, maxVal); } -void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, float amount, bool autoContrast, float ** clipMask) { +void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, bool autoContrast, float ** clipMask) { if (autoContrast) { constexpr float minLuminance = 2000.f; @@ -403,7 +403,7 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, if(contrastThreshold == 0.f) { for(int j = 0; j < H; ++j) { for(int i = 0; i < W; ++i) { - blend[j][i] = amount; + blend[j][i] = 1.f; } } } else { @@ -415,7 +415,6 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, #ifdef __SSE2__ const vfloat contrastThresholdv = F2V(contrastThreshold); const vfloat scalev = F2V(scale); - const vfloat amountv = F2V(amount); #endif #ifdef _OPENMP #pragma omp for schedule(dynamic,16) @@ -429,14 +428,14 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) + SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev; - STVFU(blend[j][i], LVFU(clipMask[j][i]) * amountv * calcBlendFactor(contrastv, contrastThresholdv)); + STVFU(blend[j][i], LVFU(clipMask[j][i]) * calcBlendFactor(contrastv, contrastThresholdv)); } } else { for(; i < W - 5; i += 4) { vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) + SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev; - STVFU(blend[j][i], amountv * calcBlendFactor(contrastv, contrastThresholdv)); + STVFU(blend[j][i], calcBlendFactor(contrastv, contrastThresholdv)); } } #endif @@ -445,7 +444,7 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float contrast = sqrtf(rtengine::SQR(luminance[j][i+1] - luminance[j][i-1]) + rtengine::SQR(luminance[j+1][i] - luminance[j-1][i]) + rtengine::SQR(luminance[j][i+2] - luminance[j][i-2]) + rtengine::SQR(luminance[j+2][i] - luminance[j-2][i])) * scale; - blend[j][i] = (clipMask ? clipMask[j][i] : 1.f) * amount * calcBlendFactor(contrast, contrastThreshold); + blend[j][i] = (clipMask ? clipMask[j][i] : 1.f) * calcBlendFactor(contrast, contrastThreshold); } } diff --git a/rtengine/rt_algo.h b/rtengine/rt_algo.h index 5485346c7..81147fd75 100644 --- a/rtengine/rt_algo.h +++ b/rtengine/rt_algo.h @@ -24,5 +24,5 @@ namespace rtengine { void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& minOut, float maxPrct, float& maxOut, bool multiThread = true); -void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, float amount = 1.f, bool autoContrast = false, float ** clipmask = nullptr); +void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, bool autoContrast = false, float ** clipmask = nullptr); } From c75cc322686341c4c7159895e80caa13aa2f3378 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 23 Dec 2019 12:41:36 +0100 Subject: [PATCH 67/71] Japanese translation updated by Yz2house Closes #5576 --- rtdata/languages/Japanese | 86 +++++++++++++++------------------------ 1 file changed, 32 insertions(+), 54 deletions(-) diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 91ef2e931..588a817f2 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -8,30 +8,6 @@ #08 2012-12-22 a3novy #09 2013-04-01 a3novy #10 2013-04-19 a3novy -#11 2013-09-10 firefly -#12 2013-10-28 firefly -#13 2014-01-07 firefly -#14 2014-01-15 firefly -#15 2014-02-25 firefly -#16 2014-04-07 firefly -#17 2014-04-08 firefly -#18 2014-05-16 firefly -#19 2014-07-13 firefly -#20 2014-07-24 firefly -#21 2014-09-11 firefly -#22 2014-10-21 firefly -#23 2014-11-07 firefly -#24 2014-11-18 firefly -#25 2015-01-05 firefly -#26 2015-02-17 firefly -#27 2015-02-21 firefly -#28 2015-03-03 firefly -#29 2015-04-20 firefly -#30 2015-05-01 firefly -#31 2015-05-31 firefly -#32 2015-06-13 firefly -#33 2015-07-20 firefly -#34 2015-08-12 firefly ABOUT_TAB_BUILD;バージョン ABOUT_TAB_CREDITS;クレジット @@ -49,7 +25,7 @@ CURVEEDITOR_CURVE;カーブ CURVEEDITOR_CURVES;カーブ CURVEEDITOR_CUSTOM;カスタム CURVEEDITOR_DARKS;ダーク -CURVEEDITOR_EDITPOINT_HINT;ボタンを押すと数値で入出力を編集出来ます\n\n編集したいカーブ上のポイントを右クリックします\n編集を無効にする場合はポイント以外の部分んで右クリックします +CURVEEDITOR_EDITPOINT_HINT;ボタンを押すと数値で入出力を編集出来ます\n\n編集したいカーブ上のポイントを右クリックします\n編集を無効にする場合はポイント以外の部分で右クリックします CURVEEDITOR_HIGHLIGHTS;ハイライト CURVEEDITOR_LIGHTS;ライト CURVEEDITOR_LINEAR;リニア @@ -489,8 +465,8 @@ HISTORY_MSG_205;CAM02 ホット/バッドピクセル HISTORY_MSG_206;CAT02 - 自動で順応 HISTORY_MSG_207;フリンジ低減 - 色相カーブ HISTORY_MSG_208;ブルー/レッド イコライザ -HISTORY_MSG_210;グラデーションフィルター - 角度 -HISTORY_MSG_211;グラデーションフィルター +HISTORY_MSG_210;減光フィルター - 角度 +HISTORY_MSG_211;減光フィルター HISTORY_MSG_212;ビネットフィルター - 強さ HISTORY_MSG_213;ビネットフィルター HISTORY_MSG_214;白黒 @@ -517,10 +493,10 @@ HISTORY_MSG_234;白黒 ‘後の‘カーブのタイプ HISTORY_MSG_235;白黒 チャンネルミキサー 自動 HISTORY_MSG_236;--未使用-- HISTORY_MSG_237;白黒 チャンネルミキサー -HISTORY_MSG_238;グラデーションフィルター フェザー処理 -HISTORY_MSG_239;グラデーションフィルター 強さ -HISTORY_MSG_240;グラデーションフィルター 中央 -HISTORY_MSG_241;ビネットフィルター フェザー処理 +HISTORY_MSG_238;減光フィルター フェザー +HISTORY_MSG_239;減光フィルター 強さ +HISTORY_MSG_240;減光フィルター 中央 +HISTORY_MSG_241;ビネットフィルター フェザー HISTORY_MSG_242;ビネットフィルター 形状 HISTORY_MSG_243;半径 HISTORY_MSG_244;ビネットフィルター 強さ @@ -757,6 +733,7 @@ HISTORY_MSG_490;DRC - 量 HISTORY_MSG_491;ホワイトバランス HISTORY_MSG_492;RGBカーブ HISTORY_MSG_493;L*a*b*調整 +HISTORY_MSG_494;キャプチャーシャープニング HISTORY_MSG_CLAMPOOG;色域外の色を切り取る HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - カラー補正 HISTORY_MSG_COLORTONING_LABREGION_AB;CT - 色の補正 @@ -774,6 +751,7 @@ HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK;CT - マスクの表示 HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - スロープ HISTORY_MSG_DEHAZE_DEPTH;霞除去 - 深度 HISTORY_MSG_DEHAZE_ENABLED;霞除去 +HISTORY_MSG_DEHAZE_LUMINANCE;霞除去 - 輝度のみ HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;霞除去 - 深度マップの表示 HISTORY_MSG_DEHAZE_STRENGTH;霞除去 - 強さ HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;デュアルデモザイク - 自動しきい値 @@ -794,6 +772,13 @@ HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;ローカルコントラスト - 明るい HISTORY_MSG_LOCALCONTRAST_RADIUS;ローカルコントラスト - 半径 HISTORY_MSG_METADATA_MODE;メタデータ コピーモード HISTORY_MSG_MICROCONTRAST_CONTRAST;マイクロコントラスト - コントラストのしきい値 +HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - しきい値の自動設定 +HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - シグマの自動設定 +HISTORY_MSG_PDSHARPEN_CHECKITER;CS - 繰り返しの自動制限 +HISTORY_MSG_PDSHARPEN_CONTRAST;CS - コントラストのしきい値 +HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - 繰り返し +HISTORY_MSG_PDSHARPEN_RADIUS;CS - シグマ +HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - 周辺のシグマを増やす HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - 振れに対するデモザイクの方式 HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;ラインノイズフィルタの方向 HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAFラインフィルタ @@ -960,8 +945,8 @@ MAIN_TOOLTIP_BACKCOLOR2;プレビューの背景色を指定します: 中間のグレー\nショートカット: 9 MAIN_TOOLTIP_BEFOREAFTERLOCK;固定 / 固定解除 - 補正前 の表示設定\n\n固定: 補正前をそのまま表示し変更されません\n複数のツールの累積効果を評価するのに役立ちます\nさらに、比較は履歴上のどこからでも行うことができます\n\n固定解除: 現在使用のツールの効果が 補正後 に表示され、その1段階前が 補正前 に表示されます MAIN_TOOLTIP_HIDEHP;左パネル 表示/非表示 (履歴含む)\nショートカット: l -MAIN_TOOLTIP_INDCLIPPEDH;ハイライト・クリッピング領域の表示\nショートカット: > -MAIN_TOOLTIP_INDCLIPPEDS;シャドウ・クリッピング領域の表示\nショートカット: < +MAIN_TOOLTIP_INDCLIPPEDH;ハイライト・クリッピング領域の表示\nショートカット: < +MAIN_TOOLTIP_INDCLIPPEDS;シャドウ・クリッピング領域の表示\nショートカット: > MAIN_TOOLTIP_PREVIEWB;ブルー チャンネル表示\nショートカット: b MAIN_TOOLTIP_PREVIEWFOCUSMASK;フォーカス・マスク表示\nショートカット: Shift-f\n\n浅い被写界深度、低ノイズ、高ズームの画像の場合は、より正確に\n\nノイズの多い画像に対しては、検出精度を向上させるため10から30%縮小して評価します\n\nフォーカス・マスクをオンにすると表示に時間が掛かります MAIN_TOOLTIP_PREVIEWG;グリーン チャンネル表示\nショートカット: g @@ -1023,7 +1008,7 @@ PARTIALPASTE_FLATFIELDBLURRADIUS;フラットフィールド ぼかし半径 PARTIALPASTE_FLATFIELDBLURTYPE;フラットフィールド ぼかしタイプ PARTIALPASTE_FLATFIELDCLIPCONTROL;フラットフィールド クリップコントロール PARTIALPASTE_FLATFIELDFILE;フラットフィールド ファイル -PARTIALPASTE_GRADIENT;グラデーションフィルター +PARTIALPASTE_GRADIENT;減光フィルター PARTIALPASTE_HSVEQUALIZER;HSV イコライザ PARTIALPASTE_ICMSETTINGS;ICM 設定 PARTIALPASTE_IMPULSEDENOISE;インパルス・ノイズ低減 @@ -1562,6 +1547,7 @@ TP_DEFRINGE_RADIUS;半径 TP_DEFRINGE_THRESHOLD;しきい値 TP_DEHAZE_DEPTH;深度 TP_DEHAZE_LABEL;霞除去 +TP_DEHAZE_LUMINANCE;輝度のみ TP_DEHAZE_SHOW_DEPTH_MAP;深度マップの表示 TP_DEHAZE_STRENGTH;強さ TP_DIRPYRDENOISE_CHROMINANCE_AMZ;自動(多分割方式) @@ -1672,9 +1658,9 @@ TP_EXPOS_BLACKPOINT_LABEL;raw ブラック・ポイント TP_EXPOS_WHITEPOINT_LABEL;raw ホワイト・ポイント TP_FILMNEGATIVE_BLUE;ブルーの比率 TP_FILMNEGATIVE_GREEN;参考指数(コントラスト) -TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. Set the white balance afterwards. +TP_FILMNEGATIVE_GUESS_TOOLTIP;原画像の中で色相がニュートラルな部分2か所をピックすることでレッドとブルーの比率を自動で設定します。明るさが異なる2か所をピックします。その後、ホワイトバランスを設定します。 TP_FILMNEGATIVE_LABEL;ネガフィルム -TP_FILMNEGATIVE_PICK;Pick neutral spots +TP_FILMNEGATIVE_PICK;ニュートラルなポイントをピック TP_FILMNEGATIVE_RED;レッドの比率 TP_FILMSIMULATION_LABEL;フィルムシミュレーション TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapeeはフィルムシミュレーション機能に使う画像をHald CLUTフォルダーの中から探すよう設計されています(プログラムに組み込むにはフォルダーが大き過ぎるため)。\n変更するには、環境設定 > 画像処理 > フィルムシミュレーションと進み\nどのフォルダーが使われているか確認します。機能を利用する場合は、Hald CLUTだけが入っているフォルダーを指定するか、 この機能を使わない場合はそのフォルダーを空にしておきます。\n\n詳しくはRawPediaを参照して下さい。\n\nフィルム画像のスキャンを止めますか? @@ -1698,9 +1684,9 @@ TP_GRADIENT_CENTER_Y;中央 Y軸 TP_GRADIENT_CENTER_Y_TOOLTIP;アンカーポイントの位置 y軸: -100=上端, 0=中央, +100=下端 TP_GRADIENT_DEGREE;角度 TP_GRADIENT_DEGREE_TOOLTIP;回転角度の度数 -TP_GRADIENT_FEATHER;フェザー処理 -TP_GRADIENT_FEATHER_TOOLTIP;対角線に対するグラデーションの幅の割合 -TP_GRADIENT_LABEL;グラデーションフィルター +TP_GRADIENT_FEATHER;フェザー +TP_GRADIENT_FEATHER_TOOLTIP;対角線に対する減光の幅の割合 +TP_GRADIENT_LABEL;減光フィルター TP_GRADIENT_STRENGTH;強さ TP_GRADIENT_STRENGTH_TOOLTIP;終点位置でのフィルターの強さ TP_HLREC_BLEND;ブレンド @@ -1817,13 +1803,14 @@ TP_METADATA_STRIP;メタデータを全て取り除く TP_METADATA_TUNNEL;変更なしでコピー TP_NEUTRAL;リセット TP_NEUTRAL_TIP;露光量補正のスライダー値をニュートラルにリセットします。\n自動露光補正の調整値ついても同様にリセットされます -TP_PCVIGNETTE_FEATHER;フェザー処理 -TP_PCVIGNETTE_FEATHER_TOOLTIP;フェザー処理: 0=四隅だけ、50=中央までの半分、100=中央まで +TP_PCVIGNETTE_FEATHER;フェザー +TP_PCVIGNETTE_FEATHER_TOOLTIP;フェザー: 0=四隅だけ、50=中央までの半分、100=中央まで TP_PCVIGNETTE_LABEL;ビネットフィルター TP_PCVIGNETTE_ROUNDNESS;フィルター形状 TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;形状: 0=長方形、50=楕円形、100=円形 TP_PCVIGNETTE_STRENGTH;強さ TP_PCVIGNETTE_STRENGTH_TOOLTIP;終点位置でのフィルターの強さ(四隅) +TP_PDSHARPENING_LABEL;キャプチャーシャープニング TP_PERSPECTIVE_HORIZONTAL;水平 TP_PERSPECTIVE_LABEL;パースペクティブ TP_PERSPECTIVE_VERTICAL;垂直 @@ -2054,10 +2041,12 @@ TP_SHARPENING_EDRADIUS;半径 TP_SHARPENING_EDTOLERANCE;エッジ許容 TP_SHARPENING_HALOCONTROL;ハロ抑制 TP_SHARPENING_HCAMOUNT;適用量 +TP_SHARPENING_ITERCHECK;繰り返しの自動制限 TP_SHARPENING_LABEL;シャープニング TP_SHARPENING_METHOD;方式 TP_SHARPENING_ONLYEDGES;エッジのみシャープニング TP_SHARPENING_RADIUS;半径 +TP_SHARPENING_RADIUS_BOOST;周辺のシグマを増やす TP_SHARPENING_RLD;RL デコンボリューション TP_SHARPENING_RLD_AMOUNT;適用量 TP_SHARPENING_RLD_DAMPING;減衰 @@ -2311,6 +2300,7 @@ TP_WBALANCE_TUNGSTEN;タングステン TP_WBALANCE_WATER1;水中 1 TP_WBALANCE_WATER2;水中 2 TP_WBALANCE_WATER_HEADER;水中 +The last update by firefly 2019-12-21 ZOOMPANEL_100;(100%) ZOOMPANEL_NEWCROPWINDOW;新規ディテール ウィンドウを開く ZOOMPANEL_ZOOM100;100%にズーム\nショートカット: z @@ -2323,16 +2313,4 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!HISTORY_MSG_494;Capture Sharpening -!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only -!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold -!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius -!HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations -!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold -!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations -!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius -!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost -!TP_DEHAZE_LUMINANCE;Luminance only -!TP_PDSHARPENING_LABEL;Capture Sharpening -!TP_SHARPENING_ITERCHECK;Auto limit iterations -!TP_SHARPENING_RADIUS_BOOST;Corner radius boost +!GENERAL_HELP;Help From 898527732b99107ac7246038cc5ceb0484a33170 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 23 Dec 2019 12:42:19 +0100 Subject: [PATCH 68/71] ./tools/generateTranslationDiffs --- rtdata/languages/Catala | 1 + rtdata/languages/Chinese (Simplified) | 1 + rtdata/languages/Czech | 1 + rtdata/languages/Deutsch | 1 + rtdata/languages/English (UK) | 1 + rtdata/languages/English (US) | 1 + rtdata/languages/Espanol | 1 + rtdata/languages/Francais | 1 + rtdata/languages/Italiano | 1 + rtdata/languages/Magyar | 1 + rtdata/languages/Nederlands | 1 + rtdata/languages/Polish | 1 + rtdata/languages/Portugues | 1 + rtdata/languages/Portugues (Brasil) | 1 + rtdata/languages/Russian | 1 + rtdata/languages/Serbian (Cyrilic Characters) | 1 + rtdata/languages/Slovenian | 1 + rtdata/languages/Swedish | 1 + 18 files changed, 18 insertions(+) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 36666a533..31614c7b3 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -977,6 +977,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !GENERAL_AUTO;Automatic !GENERAL_CLOSE;Close !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 89a4dd9b4..5be2958e8 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -973,6 +973,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !FILEBROWSER_SHOWUNCOLORHINT;Show images without a color label.\nShortcut: Alt-0 !FILEBROWSER_UNRANK_TOOLTIP;Unrank.\nShortcut: Shift-0 !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... !GENERAL_SLIDER;Slider diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 0ce34e3ee..25bcf2820 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2323,6 +2323,7 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 9122d5984..592801054 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -2390,5 +2390,6 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!GENERAL_HELP;Help !HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations !TP_SHARPENING_ITERCHECK;Auto limit iterations diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index 1fc07391e..e30425b68 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -340,6 +340,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !GENERAL_ENABLE;Enable !GENERAL_ENABLED;Enabled !GENERAL_FILE;File +!GENERAL_HELP;Help !GENERAL_LANDSCAPE;Landscape !GENERAL_NA;n/a !GENERAL_NO;No diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 63dff83da..a1e0050a8 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -226,6 +226,7 @@ !GENERAL_ENABLE;Enable !GENERAL_ENABLED;Enabled !GENERAL_FILE;File +!GENERAL_HELP;Help !GENERAL_LANDSCAPE;Landscape !GENERAL_NA;n/a !GENERAL_NO;No diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 96bce0cdf..ee8b0d17d 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -2321,6 +2321,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 9d1c6a3f7..9ecf43733 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -2266,6 +2266,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index db09b5d3a..0fd256d7c 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1285,6 +1285,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 43a4ae1e1..4b6f2811b 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -908,6 +908,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !GENERAL_AUTO;Automatic !GENERAL_CLOSE;Close !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 07e40256f..c230323f5 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -1982,6 +1982,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... !GENERAL_SLIDER;Slider diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index c923c3bad..4e5d950fc 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1407,6 +1407,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Portugues b/rtdata/languages/Portugues index efe3214f8..789d26cd6 100644 --- a/rtdata/languages/Portugues +++ b/rtdata/languages/Portugues @@ -2264,6 +2264,7 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index e6adf3bc4..d619356a9 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -2269,6 +2269,7 @@ ZOOMPANEL_ZOOMOUT;Menos Zoom\nAtalho: - !!!!!!!!!!!!!!!!!!!!!!!!! !FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_COLORTONING_LABREGION_OFFSET;CT - region offset !HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - region power diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index a4e501a77..4246ecbb6 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1475,6 +1475,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: - !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_PP;Processing profiles !FILECHOOSER_FILTER_SAME;Same format as current photo +!GENERAL_HELP;Help !GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_MODE;Toggle between linear, log-linear and log-log scaling of the histogram. !HISTORY_MSG_235;B&W - CM - Auto diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 9ec7c998b..7fd0ca378 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1257,6 +1257,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Slovenian b/rtdata/languages/Slovenian index b015cb6f1..0afaa83e9 100644 --- a/rtdata/languages/Slovenian +++ b/rtdata/languages/Slovenian @@ -2306,5 +2306,6 @@ ZOOMPANEL_ZOOMOUT;Zoom Out\nBližnjica: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!GENERAL_HELP;Help !HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations !TP_SHARPENING_ITERCHECK;Auto limit iterations diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 7861f2276..6dbea54d8 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1772,6 +1772,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... !GENERAL_SLIDER;Slider From c4cf68c6b562253f00e403e4819318d0782a59c3 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Tue, 24 Dec 2019 19:01:36 +0100 Subject: [PATCH 69/71] Speedup for darkframe subtraction --- rtengine/rawflatfield.cc | 47 +++++++++++++++++++------------------- rtengine/rawimagesource.cc | 27 ++++++++++++++-------- rtengine/rawimagesource.h | 2 +- 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/rtengine/rawflatfield.cc b/rtengine/rawflatfield.cc index 05b3be408..cbc5e6bd6 100644 --- a/rtengine/rawflatfield.cc +++ b/rtengine/rawflatfield.cc @@ -263,10 +263,9 @@ void cfaboxblur(const float* const * riFlatFile, float* cfablur, int boxH, int b namespace rtengine { -void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const unsigned short black[4]) +void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]) { // BENCHFUN - const float fblack[4] = {static_cast(black[0]), static_cast(black[1]), static_cast(black[2]), static_cast(black[3])}; std::unique_ptr cfablur(new float[H * W]); const int BS = raw.ff_BlurRadius + (raw.ff_BlurRadius & 1); @@ -292,7 +291,7 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra const int col = 2 * (W >> 2) + n; const int c = ri->get_colors() != 1 ? FC(row, col) : 0; const int c4 = ri->get_colors() != 1 ? ((c == 1 && !(row & 1)) ? 3 : c) : 0; - refcolor[m][n] = std::max(0.0f, cfablur[row * W + col] - fblack[c4]); + refcolor[m][n] = std::max(0.0f, cfablur[row * W + col] - black[c4]); } float limitFactor = 1.f; @@ -315,16 +314,16 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra clippedBefore = true; break; } - const float tempval = (rawVal - fblack[c4]) * (refcolor[m][n] / std::max(1e-5f, cfablur[(row + m) * W + col + n] - fblack[c4])); + const float tempval = (rawVal - black[c4]) * (refcolor[m][n] / std::max(1e-5f, cfablur[(row + m) * W + col + n] - black[c4])); maxval = std::max(maxval, tempval); } } // now we have the max value for the channel // if it clips, calculate factor to avoid clipping - if (maxval + fblack[c4] >= ri->get_white(c4)) { + if (maxval + black[c4] >= ri->get_white(c4)) { if (!clippedBefore) { - limitFactor = std::min(limitFactor, ri->get_white(c4) / (maxval + fblack[c4])); + limitFactor = std::min(limitFactor, ri->get_white(c4) / (maxval + black[c4])); } else { limitFactor = 1.f; } @@ -361,8 +360,8 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra const vfloat refcolorv[2] = {_mm_set_ps(refcolor[0][1], refcolor[0][0], refcolor[0][1], refcolor[0][0]), _mm_set_ps(refcolor[1][1], refcolor[1][0], refcolor[1][1], refcolor[1][0]) }; - const vfloat blackv[2] = {_mm_set_ps(fblack[c4[0][1]], fblack[c4[0][0]], fblack[c4[0][1]], fblack[c4[0][0]]), - _mm_set_ps(fblack[c4[1][1]], fblack[c4[1][0]], fblack[c4[1][1]], fblack[c4[1][0]]) + const vfloat blackv[2] = {_mm_set_ps(black[c4[0][1]], black[c4[0][0]], black[c4[0][1]], black[c4[0][0]]), + _mm_set_ps(black[c4[1][1]], black[c4[1][0]], black[c4[1][1]], black[c4[1][0]]) }; const vfloat onev = F2V(1.f); @@ -389,9 +388,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra #endif for (; col < W; ++col) { - const float blur = cfablur[row * W + col] - fblack[c4[row & 1][col & 1]]; + const float blur = cfablur[row * W + col] - black[c4[row & 1][col & 1]]; const float vignettecorr = blur <= minValue ? 1.f : refcolor[row & 1][col & 1] / blur; - rawData[row][col] = (rawData[row][col] - fblack[c4[row & 1][col & 1]]) * vignettecorr + fblack[c4[row & 1][col & 1]]; + rawData[row][col] = (rawData[row][col] - black[c4[row & 1][col & 1]]) * vignettecorr + black[c4[row & 1][col & 1]]; } } } else if (ri->getSensorType() == ST_FUJI_XTRANS) { @@ -404,7 +403,7 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra const int row = 2 * (H >> 2) + m; const int col = 2 * (W >> 2) + n; const int c = riFlatFile->XTRANSFC(row, col); - refcolor[c] += std::max(0.0f, cfablur[row * W + col] - fblack[c]); + refcolor[c] += std::max(0.0f, cfablur[row * W + col] - black[c]); cCount[c] ++; } @@ -430,14 +429,14 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra clippedBefore = true; break; } - const float tempval = (rawVal - fblack[0]) * (refcolor[ri->XTRANSFC(row, col)] / std::max(1e-5f, cfablur[(row) * W + col] - fblack[0])); + const float tempval = (rawVal - black[0]) * (refcolor[ri->XTRANSFC(row, col)] / std::max(1e-5f, cfablur[(row) * W + col] - black[0])); maxval = std::max(maxval, tempval); } } // there's only one white level for xtrans - if (!clippedBefore && maxval + fblack[0] > ri->get_white(0)) { - limitFactor = ri->get_white(0) / (maxval + fblack[0]); + if (!clippedBefore && maxval + black[0] > ri->get_white(0)) { + limitFactor = ri->get_white(0) / (maxval + black[0]); flatFieldAutoClipValue = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui } } else { @@ -458,9 +457,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra for (int row = 0; row < H; ++row) { for (int col = 0; col < W; ++col) { const int c = ri->XTRANSFC(row, col); - const float blur = cfablur[(row) * W + col] - fblack[c]; + const float blur = cfablur[(row) * W + col] - black[c]; const float vignettecorr = blur <= minValue ? 1.f : refcolor[c] / blur; - rawData[row][col] = (rawData[row][col] - fblack[c]) * vignettecorr + fblack[c]; + rawData[row][col] = (rawData[row][col] - black[c]) * vignettecorr + black[c]; } } } @@ -488,8 +487,8 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra } #ifdef __SSE2__ - const vfloat blackv[2] = {_mm_set_ps(fblack[c4[0][1]], fblack[c4[0][0]], fblack[c4[0][1]], fblack[c4[0][0]]), - _mm_set_ps(fblack[c4[1][1]], fblack[c4[1][0]], fblack[c4[1][1]], fblack[c4[1][0]]) + const vfloat blackv[2] = {_mm_set_ps(black[c4[0][1]], black[c4[0][0]], black[c4[0][1]], black[c4[0][0]]), + _mm_set_ps(black[c4[1][1]], black[c4[1][0]], black[c4[1][1]], black[c4[1][0]]) }; const vfloat epsv = F2V(1e-5f); @@ -513,9 +512,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra #endif for (; col < W; ++col) { - const float linecorr = SQR(std::max(1e-5f, cfablur[row * W + col] - fblack[c4[row & 1][col & 1]])) / - (std::max(1e-5f, cfablur1[row * W + col] - fblack[c4[row & 1][col & 1]]) * std::max(1e-5f, cfablur2[row * W + col] - fblack[c4[row & 1][col & 1]])); - rawData[row][col] = (rawData[row][col] - fblack[c4[row & 1][col & 1]]) * linecorr + fblack[c4[row & 1][col & 1]]; + const float linecorr = SQR(std::max(1e-5f, cfablur[row * W + col] - black[c4[row & 1][col & 1]])) / + (std::max(1e-5f, cfablur1[row * W + col] - black[c4[row & 1][col & 1]]) * std::max(1e-5f, cfablur2[row * W + col] - black[c4[row & 1][col & 1]])); + rawData[row][col] = (rawData[row][col] - black[c4[row & 1][col & 1]]) * linecorr + black[c4[row & 1][col & 1]]; } } } else if (ri->getSensorType() == ST_FUJI_XTRANS) { @@ -526,9 +525,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra for (int row = 0; row < H; ++row) { for (int col = 0; col < W; ++col) { const int c = ri->XTRANSFC(row, col); - const float hlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - fblack[c]) / std::max(1e-5f, cfablur1[(row) * W + col] - fblack[c]); - const float vlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - fblack[c]) / std::max(1e-5f, cfablur2[(row) * W + col] - fblack[c]); - rawData[row][col] = (rawData[row][col] - fblack[c]) * hlinecorr * vlinecorr + fblack[c]; + const float hlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - black[c]) / std::max(1e-5f, cfablur1[(row) * W + col] - black[c]); + const float vlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - black[c]) / std::max(1e-5f, cfablur2[(row) * W + col] - black[c]); + rawData[row][col] = (rawData[row][col] - black[c]) * hlinecorr * vlinecorr + black[c]; } } } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index d00812d88..e7b431141 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -42,7 +42,7 @@ #include "../rtgui/options.h" //#define BENCHMARK -//#include "StopWatch.h" +#include "StopWatch.h" #ifdef _OPENMP #include @@ -2397,11 +2397,10 @@ void RawImageSource::HLRecovery_Global(const ToneCurveParams &hrp) */ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile, array2D &rawData ) { - // TODO: Change type of black[] to float to avoid conversions - unsigned short black[4] = { - (unsigned short)ri->get_cblack(0), (unsigned short)ri->get_cblack(1), - (unsigned short)ri->get_cblack(2), (unsigned short)ri->get_cblack(3) - }; + const float black[4] = { + static_cast(ri->get_cblack(0)), static_cast(ri->get_cblack(1)), + static_cast(ri->get_cblack(2)), static_cast(ri->get_cblack(3)) + }; if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) { if (!rawData) { @@ -2409,11 +2408,19 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw } if (riDark && W == riDark->get_width() && H == riDark->get_height()) { // This works also for xtrans-sensors, because black[0] to black[4] are equal for these + StopWatch Stop1("darkframe subtraction"); for (int row = 0; row < H; row++) { - for (int col = 0; col < W; col++) { - int c = FC(row, col); - int c4 = ( c == 1 && !(row & 1) ) ? 3 : c; - rawData[row][col] = max(src->data[row][col] + black[c4] - riDark->data[row][col], 0.0f); + const int c0 = FC(row, 0); + const float black0 = black[(c0 == 1 && !(row & 1) ) ? 3 : c0]; + const int c1 = FC(row, 1); + const float black1 = black[(c1 == 1 && !(row & 1) ) ? 3 : c1]; + int col; + for (col = 0; col < W - 1; col += 2) { + rawData[row][col] = max(src->data[row][col] + black0 - riDark->data[row][col], 0.0f); + rawData[row][col + 1] = max(src->data[row][col + 1] + black1 - riDark->data[row][col + 1], 0.0f); + } + if (col < W) { + rawData[row][col] = max(src->data[row][col] + black0 - riDark->data[row][col], 0.0f); } } } else { diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 28cf30010..bd460c61b 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -136,7 +136,7 @@ public: return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified } - void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const unsigned short black[4]); + void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]); void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D &rawData ); void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D &rawData); // raw for cblack From b2cfb457ccff2d3c5887e55fc1bbc57715d374ba Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Tue, 24 Dec 2019 19:07:32 +0100 Subject: [PATCH 70/71] multithread darkframe subtraction, #5582 --- rtengine/rawimagesource.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index e7b431141..18fc18f58 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -2409,6 +2409,9 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw if (riDark && W == riDark->get_width() && H == riDark->get_height()) { // This works also for xtrans-sensors, because black[0] to black[4] are equal for these StopWatch Stop1("darkframe subtraction"); +#ifdef _OPENMP + #pragma omp parallel for +#endif for (int row = 0; row < H; row++) { const int c0 = FC(row, 0); const float black0 = black[(c0 == 1 && !(row & 1) ) ? 3 : c0]; From a62b0f8040a1e9cb7fdb49c9ead8ff70176261bb Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Sat, 28 Dec 2019 13:05:18 +0100 Subject: [PATCH 71/71] Use gtk_show_uri, fixes #5578, thanks to @Floessie for the patch --- rtgui/rtwindow.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 4c6dc753f..514685a16 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -921,7 +921,8 @@ void RTWindow::writeToolExpandedStatus (std::vector &tpOpen) void RTWindow::showRawPedia() { - show_uri("https://rawpedia.rawtherapee.com/", GDK_CURRENT_TIME); + GError* gerror = nullptr; + gtk_show_uri(nullptr, "https://rawpedia.rawtherapee.com/", GDK_CURRENT_TIME, &gerror); } void RTWindow::showICCProfileCreator ()