Build macOS: Difference between revisions

From Strawberry Music Player Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 34: Line 34:
== Configure build ==
== Configure build ==


     PKG_CONFIG_PATH=/opt/strawberry_macos_x86_64_release/lib/pkgconfig GIO_EXTRA_MODULES=/opt/strawberry_macos_x86_64_release/lib/gio/modules GST_PLUGIN_SCANNER="/opt/strawberry_macos_x86_64_release/libexec/gstreamer-1.0/gst-plugin-scanner" GST_PLUGIN_PATH="/opt/strawberry_macos_x86_64_release/lib/gstreamer-1.0" cmake --log-level="DEBUG" -S ../strawberry -B . -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_QT6=ON -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH="/opt/strawberry_macos_x86_64_release/lib/cmake" -DPKG_CONFIG_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/pkg-config" -DICU_ROOT="/opt/strawberry_macos_x86_64_release" -DFFTW3_DIR="/opt/strawberry_macos_x86_64_release" -DENABLE_DBUS=OFF -DGETTEXT_MSGMERGE_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/msgmerge" -DGETTEXT_MSGFMT_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/msgfmt" -DGETTEXT_XGETTEXT_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/xgettext"
     PKG_CONFIG_PATH=/opt/strawberry_macos_x86_64_release/lib/pkgconfig cmake --log-level="DEBUG" -S ../strawberry -B . -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_QT6=ON -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH="/opt/strawberry_macos_x86_64_release/lib/cmake" -DPKG_CONFIG_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/pkg-config" -DICU_ROOT="/opt/strawberry_macos_x86_64_release" -DFFTW3_DIR="/opt/strawberry_macos_x86_64_release" -DENABLE_DBUS=OFF -DGETTEXT_MSGMERGE_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/msgmerge" -DGETTEXT_MSGFMT_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/msgfmt" -DGETTEXT_XGETTEXT_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/xgettext"




Line 52: Line 52:


== Deploy ==
== Deploy ==
    export GIO_EXTRA_MODULES="/opt/strawberry_macos_x86_64_release/lib/gio/modules"
    export GST_PLUGIN_SCANNER="/opt/strawberry_macos_x86_64_release/libexec/gstreamer-1.0/gst-plugin-scanner"
    export GST_PLUGIN_PATH="/opt/strawberry_macos_x86_64_release/lib/gstreamer-1.0"


     make deploy
     make deploy

Revision as of 19:03, 6 September 2023

Building on macOS


Install xcode tools

   xcode-select --install


Download and install dependencies

Dependencies will be extracted under /opt/strawberry_macos_x86_64_release

   curl -f -O -L https://github.com/strawberrymusicplayer/strawberry-macos-dependencies/releases/latest/download/strawberry-macos-x86_64-release.tar.xz
   sudo tar -C / -xf strawberry-macos-x86_64-release.tar.xz
   rm strawberry-macos-x86_64-release.tar.xz


Set environment variables

   export GIO_EXTRA_MODULES="/opt/strawberry_macos_x86_64_release/lib/gio/modules"
   export GST_PLUGIN_SCANNER="/opt/strawberry_macos_x86_64_release/libexec/gstreamer-1.0/gst-plugin-scanner"
   export GST_PLUGIN_PATH="/opt/strawberry_macos_x86_64_release/lib/gstreamer-1.0"


Checkout code

   git clone 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_x86_64_release/lib/pkgconfig cmake --log-level="DEBUG" -S ../strawberry -B . -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_QT6=ON -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH="/opt/strawberry_macos_x86_64_release/lib/cmake" -DPKG_CONFIG_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/pkg-config" -DICU_ROOT="/opt/strawberry_macos_x86_64_release" -DFFTW3_DIR="/opt/strawberry_macos_x86_64_release" -DENABLE_DBUS=OFF -DGETTEXT_MSGMERGE_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/msgmerge" -DGETTEXT_MSGFMT_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/msgfmt" -DGETTEXT_XGETTEXT_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/xgettext"


Build

   make -j 4
   make install


Manually copy files

You need to manually copy libsoup-3.0.0.dylib, as this library needs to be loaded by gstreamer at runtime:

   mkdir -p strawberry.app/Contents/Frameworks
   cp /opt/strawberry_macos_x86_64_release/lib/libsoup-3.0.0.dylib strawberry.app/Contents/Frameworks/


Deploy

   export GIO_EXTRA_MODULES="/opt/strawberry_macos_x86_64_release/lib/gio/modules"
   export GST_PLUGIN_SCANNER="/opt/strawberry_macos_x86_64_release/libexec/gstreamer-1.0/gst-plugin-scanner"
   export GST_PLUGIN_PATH="/opt/strawberry_macos_x86_64_release/lib/gstreamer-1.0"
   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/