Skip to content

Commit

Permalink
Merge pull request #1495 from rouault/update_kdu
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
rouault committed Dec 8, 2023
2 parents 67c998f + d5af1d2 commit b0e83a1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
12 changes: 9 additions & 3 deletions tools/ctest_scripts/travis-ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,19 @@ BUILD_UNIT_TESTS:BOOL=TRUE
# JPEG2000 test files are available with git clone https://github.com/uclouvain/openjpeg-data.git
OPJ_DATA_ROOT:PATH=$ENV{PWD}/data
# jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer
JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}
# Enable astyle
WITH_ASTYLE:BOOL=${BUILD_ASTYLE}
" )

if(EXISTS "$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}")
set(CACHE_CONTENTS "
${CACHE_CONTENTS}
# jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer
JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}
")
endif()

#---------------------
#1. openjpeg specific:
set( CTEST_PROJECT_NAME "OPENJPEG" )
Expand Down
30 changes: 16 additions & 14 deletions tools/travis-ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
# We need jpylyzer for the test suite
JPYLYZER_VERSION="1.17.0"
echo "Retrieving jpylyzer"
if [ "${APPVEYOR:-}" == "True" -o "${RUNNER_OS:-}" == "Windows" ]; then
if [ "${TRAVIS_OS_NAME:-}" == "osx" -o "${RUNNER_OS:-}" == "macOS" ] || uname -s | grep -i Darwin &> /dev/null; then
echo "Skip Retrieving jpylyzer on OSX. Related tests no longer work on CI"
elif [ "${APPVEYOR:-}" == "True" -o "${RUNNER_OS:-}" == "Windows" ]; then
wget -q https://github.com/openpreserve/jpylyzer/releases/download/${JPYLYZER_VERSION}/jpylyzer_${JPYLYZER_VERSION}_win32.zip
mkdir jpylyzer
cd jpylyzer
Expand All @@ -79,29 +81,29 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then
if [ "${TRAVIS_OS_NAME:-}" == "linux" -o "${RUNNER_OS:-}" == "Linux" ] || uname -s | grep -i Linux &> /dev/null; then
echo "Retrieving Kakadu"
wget -q http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
cmake -E tar -xf KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
mv KDU805_Demo_Apps_for_Linux-x86-64_200602 kdu
wget -q http://kakadusoftware.com/wp-content/uploads/KDU841_Demo_Apps_for_Linux-x86-64_231117.zip
cmake -E tar -xf KDU841_Demo_Apps_for_Linux-x86-64_231117.zip
mv KDU841_Demo_Apps_for_Linux-x86-64_231117 kdu
elif [ "${TRAVIS_OS_NAME:-}" == "osx" -o "${RUNNER_OS:-}" == "macOS" ] || uname -s | grep -i Darwin &> /dev/null; then
echo "Retrieving Kakadu"
wget -v http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip
cmake -E tar -xf KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip
wget -v http://kakadusoftware.com/wp-content/uploads/KDU841_Demo_Apps_for_MacOS_231117.dmg_.zip
cmake -E tar -xf KDU841_Demo_Apps_for_MacOS_231117.dmg_.zip
wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip
mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip
./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg KDU805_Demo_Apps_for_MacOS_200602.dmg
./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg KDU841_Demo_Apps_for_MacOS_231117.dmg
pkgutil --expand Kakadu-demo-apps.pkg ./kdu
cd kdu
cat libkduv80r.pkg/Payload | gzip -d | cpio -id
cat libkduv84r.pkg/Payload | gzip -d | cpio -id
cat kduexpand.pkg/Payload | gzip -d | cpio -id
cat kducompress.pkg/Payload | gzip -d | cpio -id
install_name_tool -id ${PWD}/libkdu_v80R.dylib libkdu_v80R.dylib
install_name_tool -change /usr/local/lib/libkdu_v80R.dylib ${PWD}/libkdu_v80R.dylib kdu_compress
install_name_tool -change /usr/local/lib/libkdu_v80R.dylib ${PWD}/libkdu_v80R.dylib kdu_expand
install_name_tool -id ${PWD}/libkdu_v84R.dylib libkdu_v84R.dylib
install_name_tool -change /usr/local/lib/libkdu_v84R.dylib ${PWD}/libkdu_v84R.dylib kdu_compress
install_name_tool -change /usr/local/lib/libkdu_v84R.dylib ${PWD}/libkdu_v84R.dylib kdu_expand
elif [ "${APPVEYOR:-}" == "True" -o "${RUNNER_OS:-}" == "Windows" ] || uname -s | grep -i MINGW &> /dev/null || uname -s | grep -i CYGWIN &> /dev/null; then
echo "Retrieving Kakadu"
wget -q http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Win64_200602.msi_.zip
cmake -E tar -xf KDU805_Demo_Apps_for_Win64_200602.msi_.zip
msiexec /i KDU805_Demo_Apps_for_Win64_200602.msi /quiet /qn /norestart
wget -q http://kakadusoftware.com/wp-content/uploads/KDU841_Demo_Apps_for_Win64_231117.msi_.zip
cmake -E tar -xf KDU841_Demo_Apps_for_Win64_231117.msi_.zip
msiexec /i KDU841_Demo_Apps_for_Win64_231117.msi /quiet /qn /norestart
if [ -d "C:/Program Files/Kakadu" ]; then
cp -r "C:/Program Files/Kakadu" ./kdu
else
Expand Down

0 comments on commit b0e83a1

Please sign in to comment.