Build macOS: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(21 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
== Download and install dependencies == | == Download and install dependencies == | ||
Dependencies will be extracted under /opt/strawberry_macos_ARCH_release | |||
curl -f -O -L https://github.com/strawberrymusicplayer/strawberry-macos-dependencies/releases/latest/download/strawberry-macos- | curl -f -O -L https://github.com/strawberrymusicplayer/strawberry-macos-dependencies/releases/latest/download/strawberry-macos-$(uname -m)-release.tar.xz | ||
sudo tar -C / -xf strawberry-macos- | sudo tar -C / -xf strawberry-macos-$(uname -m)-release.tar.xz | ||
rm strawberry-macos- | rm strawberry-macos-$(uname -m)-release.tar.xz | ||
== Checkout code == | == Checkout code == | ||
git clone https://github.com/strawberrymusicplayer/strawberry | git clone --recursive https://github.com/strawberrymusicplayer/strawberry | ||
cd strawberry | cd strawberry | ||
mkdir build | mkdir build | ||
Line 27: | Line 27: | ||
== Configure build == | == Configure build == | ||
PKG_CONFIG_PATH=/opt/ | PKG_CONFIG_PATH=/opt/strawberry_macos_$(uname -m)_release/lib/pkgconfig LDFLAGS="-L/opt/strawberry_macos_$(uname -m)_release/lib -Wl,-rpath,/opt/strawberry_macos_$(uname -m)_release/lib" /opt/strawberry_macos_$(uname -m)_release/bin/cmake --log-level="DEBUG" -S .. -B . -DCMAKE_BUILD_TYPE="Release" -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH="/opt/strawberry_macos_$(uname -m)_release/lib/cmake" -DPKG_CONFIG_EXECUTABLE="/opt/strawberry_macos_$(uname -m)_release/bin/pkg-config" -DICU_ROOT="/opt/strawberry_macos_$(uname -m)_release" -DENABLE_DBUS=OFF -DMACDEPLOYQT_EXECUTABLE=/opt/strawberry_macos_$(uname -m)_release/bin/macdeployqt | ||
== Build == | == Build == | ||
Line 36: | Line 35: | ||
== | == Set environment variables == | ||
export GIO_EXTRA_MODULES="/opt/strawberry_macos_$(uname -m)_release/lib/gio/modules" | |||
export GST_PLUGIN_SCANNER="/opt/strawberry_macos_$(uname -m)_release/libexec/gstreamer-1.0/gst-plugin-scanner" | |||
export GST_PLUGIN_PATH="/opt/strawberry_macos_$(uname -m)_release/lib/gstreamer-1.0" | |||
export LIBSOUP_LIBRARY_PATH="/opt/strawberry_macos_$(uname -m)_release/lib/libsoup-3.0.0.dylib" | |||
Latest revision as of 22:16, 29 November 2024
Building on macOS
Install xcode tools
xcode-select --install
Download and install dependencies
Dependencies will be extracted under /opt/strawberry_macos_ARCH_release
curl -f -O -L https://github.com/strawberrymusicplayer/strawberry-macos-dependencies/releases/latest/download/strawberry-macos-$(uname -m)-release.tar.xz sudo tar -C / -xf strawberry-macos-$(uname -m)-release.tar.xz rm strawberry-macos-$(uname -m)-release.tar.xz
Checkout code
git clone --recursive https://github.com/strawberrymusicplayer/strawberry cd strawberry mkdir build cd build
(If you already did `git clone`, do `git pull` to make sure you have the latest code).
Configure build
PKG_CONFIG_PATH=/opt/strawberry_macos_$(uname -m)_release/lib/pkgconfig LDFLAGS="-L/opt/strawberry_macos_$(uname -m)_release/lib -Wl,-rpath,/opt/strawberry_macos_$(uname -m)_release/lib" /opt/strawberry_macos_$(uname -m)_release/bin/cmake --log-level="DEBUG" -S .. -B . -DCMAKE_BUILD_TYPE="Release" -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH="/opt/strawberry_macos_$(uname -m)_release/lib/cmake" -DPKG_CONFIG_EXECUTABLE="/opt/strawberry_macos_$(uname -m)_release/bin/pkg-config" -DICU_ROOT="/opt/strawberry_macos_$(uname -m)_release" -DENABLE_DBUS=OFF -DMACDEPLOYQT_EXECUTABLE=/opt/strawberry_macos_$(uname -m)_release/bin/macdeployqt
Build
make -j 4 make install
Set environment variables
export GIO_EXTRA_MODULES="/opt/strawberry_macos_$(uname -m)_release/lib/gio/modules" export GST_PLUGIN_SCANNER="/opt/strawberry_macos_$(uname -m)_release/libexec/gstreamer-1.0/gst-plugin-scanner" export GST_PLUGIN_PATH="/opt/strawberry_macos_$(uname -m)_release/lib/gstreamer-1.0" export LIBSOUP_LIBRARY_PATH="/opt/strawberry_macos_$(uname -m)_release/lib/libsoup-3.0.0.dylib"
Deploy
make deploy
Deploy check
Checks that all libraries are deployed correctly.
make deploycheck
Create DMG
make dmg
Install
To install, either open the DMG, drag Strawberry over to Applications, or manually copy the strawberry.app folder over to /Applications/