Skip to content

Update macgstcopy.sh #918

Update macgstcopy.sh

Update macgstcopy.sh #918

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-macos-homebrew:
name: Build macOS Homebrew
runs-on: macos-11
steps:
- name: Remove packages
run: brew remove aliyun-cli ant aws-sam-cli azure-cli bazelisk bicep composer geckodriver ghostscript helm httpd imagemagick kotlin maven [email protected] mongodb-database-tools mongosh nginx php postgresql@14 [email protected] rustup-init sbt selenium-server swiftformat switchaudio-osx firefox google-chrome julia microsoft-edge r session-manager-plugin
- name: Update packages
run: brew update
- name: Upgrade packages
run: brew upgrade || true
- name: Install packages
run: |
brew install pkg-config cmake ninja meson bison flex wget create-dmg gettext boost protobuf protobuf-c rsync
brew install glib glib-openssl glib-utils glib-networking gdk-pixbuf gobject-introspection orc
brew install libffi openssl sqlite fftw libmtp libplist libxml2 libsoup
brew install libogg libvorbis flac wavpack opus speex mpg123 lame twolame taglib chromaprint libebur128 libbs2b libcdio libopenmpt faad2 faac fdk-aac musepack game-music-emu
brew install qt6
- name: Use modified gstreamer plugin formulas
run: |
wget https://files.strawberrymusicplayer.org/patches/gstreamer.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-base.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-good.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-bad.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-ugly.rb
wget https://files.strawberrymusicplayer.org/patches/gst-libav.rb
mv gstreamer.rb gst-plugins-{base,good,bad,ugly}.rb gst-libav.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/
- name: Build and install gstreamer
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gstreamer
- name: Build and install gst-plugins-base
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-base
- name: Build and install gst-plugins-good
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-good
- name: Build and install gst-plugins-bad
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-bad
- name: Build and install gst-plugins-ugly
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-ugly
- name: Build and install gst-libav
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-libav
- name: Find gst-plugin-scanner
run: sudo find /usr -name 'gst-plugin-scanner'
- name: Build libgpod
env:
PERL_MM_USE_DEFAULT: 1
run: |
git clone https://github.com/strawberrymusicplayer/strawberry-libgpod
cd strawberry-libgpod
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 4
sudo make install
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
GIO_EXTRA_MODULES: /usr/local/lib/gio/modules
GST_PLUGIN_SCANNER: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH: /usr/local/lib/gstreamer-1.0
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake -DICU_ROOT=/usr/local/opt/icu4c -DENABLE_DBUS=OFF -DPROTOBUF_INCLUDE_DIRS=/usr/local/include
- name: Build
run: cmake --build build --config Release --parallel 4
- name: Install
working-directory: build
run: make install
- name: Remove problematic files
run: |
sudo rm -rf /usr/local/opt/qt6/share/qt/plugins/virtualkeyboard /usr/local/opt/qt6/share/qt/plugins/platforminputcontexts
sudo rm -f /usr/local/Cellar/qt/*/share/qt/plugins/imageformats/libqpdf.dylib
- name: Manually copy files not handled by macdeployqt
working-directory: build
run: |
mkdir -p strawberry.app/Contents/Frameworks/
cp /usr/local/lib/libsoup-3.0.0.dylib strawberry.app/Contents/Frameworks/
- name: Deploy
working-directory: build
run: make deploy
# FIXME: Fix this properly in macdeployqt so it handles this when I get a mac.
- name: Fix broken paths
working-directory: build
run: |
otool -L strawberry.app/Contents/Frameworks/libgnutls.30.dylib
otool -L strawberry.app/Contents/Frameworks/libharfbuzz.0.dylib
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/gettext/lib/libintl.8.dylib" "@loader_path/../../Frameworks/libintl.8.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/p11-kit/lib/libp11-kit.0.dylib" "@loader_path/../../Frameworks/libp11-kit.0.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/libidn2/lib/libidn2.0.dylib" "@loader_path/../../Frameworks/libidn2.0.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/libunistring/lib/libunistring.5.dylib" "@loader_path/../../Frameworks//libunistring.5.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/libtasn1/lib/libtasn1.6.dylib" "@loader_path/../../Frameworks/libtasn1.6.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/nettle/lib/libnettle.8.dylib" "@loader_path/../../Frameworks/libnettle.8.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/nettle/lib/libhogweed.6.dylib" "@loader_path/../../Frameworks/libhogweed.6.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/gmp/lib/libgmp.10.dylib" "@loader_path/../../Frameworks/libgmp.10.dylib" "strawberry.app/Contents/Frameworks/libgnutls.30.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/freetype/lib/libfreetype.6.dylib" "@loader_path/../../Frameworks/libfreetype.6.dylib" "strawberry.app/Contents/Frameworks/libharfbuzz.0.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/glib/lib/libglib-2.0.0.dylib" "@loader_path/../../Frameworks/libglib-2.0.0.dylib" "strawberry.app/Contents/Frameworks/libharfbuzz.0.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/graphite2/lib/libgraphite2.3.dylib" "@loader_path/../../Frameworks/libgraphite2.3.dylib" "strawberry.app/Contents/Frameworks/libharfbuzz.0.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/libsamplerate/lib/libsamplerate.0.dylib" "@loader_path/../../Frameworks/libsamplerate.0.dylib" "strawberry.app/Contents/Frameworks/librubberband.2.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/leptonica/lib/libleptonica.6.dylib" "@loader_path/../../Frameworks/libleptonica.6.dylib" "strawberry.app/Contents/Frameworks/libtesseract.5.dylib"
install_name_tool -change "strawberry.app/Contents/Frameworks/../../../../opt/libarchive/lib/libarchive.13.dylib" "@loader_path/../../Frameworks/libarchive.13.dylib" "strawberry.app/Contents/Frameworks/libtesseract.5.dylib"
otool -L strawberry.app/Contents/Frameworks/libgnutls.30.dylib
otool -L strawberry.app/Contents/Frameworks/libharfbuzz.0.dylib
- name: Deploy check
working-directory: build
run: make deploycheck
- name: Create DMG
working-directory: build
run: make dmg
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: macos
path: build/*.dmg
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/macos
- name: rsync
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/*.dmg ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/macos/