Skip to content

Commit

Permalink
Install libpng in the macOS job
Browse files Browse the repository at this point in the history
Thanks to Andreas Grabher for some hints on how to build the png.framework.
  • Loading branch information
huth committed Dec 9, 2023
1 parent ab9ae24 commit 2ae8f3b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ freebsd_task:

macos12_task:
osx_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:13
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
env:
SDLVERSION: 2.26.5
PNGVERSION: 1.6.40
download_cache:
folder: dl_cache
populate_script:
Expand All @@ -26,9 +27,21 @@ macos12_task:
wget -O dl_cache/SDL2-$SDLVERSION.dmg
https://github.com/libsdl-org/SDL/releases/download/release-$SDLVERSION/SDL2-$SDLVERSION.dmg ;
fi
- if [ ! -e dl_cache/png.framework ]; then
wget -O dl_cache/libpng-$PNGVERSION.tar.xz
"http://prdownloads.sourceforge.net/libpng/libpng-$PNGVERSION.tar.xz?download" ;
tar -xJf dl_cache/libpng-$PNGVERSION.tar.xz ;
cd libpng-$PNGVERSION ;
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="10.9" -DPNG_FRAMEWORK=ON
-DPNG_HARDWARE_OPTIMIZATIONS=OFF . ;
cmake --build . --verbose --config Release -j$(sysctl -n hw.ncpu) ;
cd .. ;
mv libpng-$PNGVERSION/png.framework dl_cache/ ;
fi
install_script:
- hdiutil attach dl_cache/SDL2-$SDLVERSION.dmg
- sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/
- sudo cp -a dl_cache/png.framework /Library/Frameworks/
script:
- export PATH=/usr/local/bin:$PATH
- mkdir build
Expand All @@ -37,6 +50,7 @@ macos12_task:
|| { cat config.log; exit 1; }
- cmake --build . --verbose --config Release -j$(sysctl -n hw.ncpu) -t hatari
- cp -a /Volumes/SDL2/SDL2.framework src/hatari.app/Contents/Frameworks/
- cp -a ../dl_cache/png.framework src/hatari.app/Contents/Frameworks/
- codesign --force --deep --options=runtime -s -
--entitlements ../src/gui-osx/hatari.app.xcent src/hatari.app
- cd ..
Expand Down

0 comments on commit 2ae8f3b

Please sign in to comment.