Updated Compile and install on macOS using macports (markdown)

Jonas Kvinge 2022-07-02 21:37:31 +02:00
parent 3935323e4f
commit 694249d72d
1 changed files with 1 additions and 60 deletions

@ -1,60 +1 @@
First install xcode tools:
xcode-select --install
Download and install macports from: https://www.macports.org/install.php
Prepare macports:
sudo port -v selfupdate
Install dependencies through port:
sudo port -N install glib2 pkgconfig cmake boost protobuf-cpp sqlite3 gnutls chromaprint fftw taglib
sudo port -N install qt6-qtbase qt6-sqlite-plugin
sudo port -N install qt6-qttools
sudo port -N install gstreamer1 gstreamer1-gst-plugins-base gstreamer1-gst-plugins-good gstreamer1-gst-plugins-bad gstreamer1-gst-plugins-ugly gstreamer1-gst-libav
sudo port -N install libcdio libmtp
sudo port -N install libgpod
Install create-dmg:
mkdir -p ~/build
cd ~/build
git clone https://github.com/create-dmg/create-dmg
cd create-dmg
sudo make install
Set environment variables:
export GIO_EXTRA_MODULES=/opt/local/lib/gio/modules
export GST_PLUGIN_SCANNER=/opt/local/libexec/gstreamer-1.0/gst-plugin-scanner
export GST_PLUGIN_PATH=/opt/local/lib/gstreamer-1.0
Get code and prepare build:
mkdir -p ~/build
cd ~/build
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).
Compile and create DMG:
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/local/lib/cmake -DBUILD_WITH_QT6=ON -DUSE_BUNDLE=ON
make -j$(nproc)
make install
install_name_tool -change "@rpath/QtCore.framework/Versions/A/QtCore" "/opt/local/libexec/qt6/lib/QtCore.Framework/Versions/A/QtCore" 3rdparty/macdeployqt/macdeployqt
install_name_tool -change "@rpath/QtCore.framework/Versions/A/QtCore" "/opt/local/libexec/qt6/lib/QtCore.Framework/Versions/A/QtCore" ext/macdeploycheck/macdeploycheck
make deploy
make dmg
You might get errors in make deploy about missing gstreamer plugins because macports does not have all gstreamer plugins, you need to edit `3rdparty/macdeployqt/shared.cpp` and remove the the specific files from the `gstreamer_plugins` list.
Install:
To install, either open the DMG, drag Strawberry over to Applications, or manually copy the strawberry.app folder over to /Applications/
This page has moved to https://wiki.strawberrymusicplayer.org/wiki/Compile_macOS_using_macports