Polyphone needs you!
If Polyphone or this website does a great job, do not hesitate to express your gratitude with a donation.
Welcome,
Guest
|
TOPIC: [SUCCESS] Build Polyphone on OSX 10.11.6 / Qt 5.7
[SUCCESS] Build Polyphone on OSX 10.11.6 / Qt 5.7 7 years 3 months ago #1
|
Polyphone ships with preconfigured installation package for Mac OSX. There is not really a need for compilation on OSX.
If in some cases you nevertheless want to compile it yourself, here a note about compiling with Xcode 7.3 or higher: With Xcode 7.3 Apple decided to ship only with SDK 10.11 and locked the developer to the use of only SDK 10.11 by introducing a new key in Xcode 7.3 Info.plist. The Qt configuration values QMAKE_MACOSX_DEPLOYMENT_TARGET and QMAKE_MAC_SDK in the project file (*.pro) are intended to be minimal version numbers. This means that the configured values 10.6 and 10.9 in polyphone.pro should be valid. But trying to build polyphone on OSX 10.11.6 with XCode 7.3 results in an error Project ERROR: Could not resolve SDK Path for 'macosx10.9' Having done this in a test, the next issue occurs by the pre-processor claiming an invalid deplyoment target for -stdlib=libc++ . It looks like the version minor numbers are not interpreted as numberic numbers but just as alphabetic ordered list. 10.11 becomes then lower as 10.6 and 10.9. Therefore, to solve and enable smooth compilation of polyphone on Mac OSX 10.11 and Xdoce 7.3 or higher is just to enter the exact values in polyphone.pro before running qmake: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
QMAKE_MAC_SDK = macosx10.11 qmake
make Note: To facilitate the post build tasks I entered the commands from the README in a short script. Just modify the initial variables for QT_ROOT, POLYPHONE_SRC and BUILD_TYPE to your needs (also available on github : -Thomas #!/bin/sh
#
# Polyphone Soundfont Editor
# Post build tasks in a shell script
#
# Run the following command to include libraries and frameworks inside the bundle (adjust the path first!):
export QT_ROOT=/Volumes/Data/Qt/5.7
# set source directory, the directory where polyphone.pro is located
export POLYPHONE_SRC=/Volumes/Data/Dev/polyphone-1.7/trunk
# set BUILD_TYPE DEBUG | RELEASE
export BUILD_TYPE=RELEASE
echo "Deploying qt dependencies ..."
"$QT_ROOT"/clang_64/bin/macdeployqt "$POLYPHONE_SRC"/"$BUILD_TYPE"/Polyphone.app
echo done
# Copy / paste the framework Jackmp from trunk/lib/mac to:
echo "Deploying Jack framework ... "
cp -rp "$POLYPHONE_SRC"/lib/mac/Jackmp.framework "$POLYPHONE_SRC"/"$BUILD_TYPE"/Polyphone.app/Contents/Frameworks
echo done
# Finally, run the following command in a single line
echo "Installing Jack Framework on system ..."
sudo install_name_tool -change /System/Library/Frameworks/Jackmp.framework/Versions/A/Jackmp @executable_path/../Frameworks/Jackmp.framework/Versions/A/Jackmp "$POLYPHONE_SRC"/RELEASE/Polyphone.app/Contents/MacOS/Polyphone
echo done
echo "You can now start Polyphon by executing"
echo "$POLYPHONE_SRC/RELEASE/Polyphone"
echo . |
Last Edit: 7 years 3 months ago by Thomas Oettli.
The administrator has disabled public write access.
The following user(s) said Thank You: Davy
|
[SUCCESS] Build Polyphone on OSX 10.11.6 / Qt 5.7 7 years 3 months ago #2
Hello Thomas,
Thanks a lot for reporting these issues with the latest version of Mac OSX. This will save time for the next builds ![]() I will update the documentation and add a link to this topic if someone needs help. Regarding the script this is a really good idea. I made one for automating the build of a package on Debian and we could do the same for Mac OSX. I have some suggestions:
Davy |
|
The administrator has disabled public write access.
The following user(s) said Thank You: Thomas Oettli
|
[SUCCESS] Build Polyphone on OSX 10.11.6 / Qt 5.7 7 years 3 months ago #3
|
Thanks Davy!
good hints,I've sorted out options for smoother integration into the Qmake build process. Qtcreator would provide post build steps, but I left that beside, because it's Qtcreator specific and I prefer to keep flexibility for either using qmake / make on the shell or Qtcreator. It's integrated in a mirror of the latest code on github here . DMG creation is not yet included. I've adapted the project file and added QMAKE_POST_LINK = $$PWD/support/mac/macx_post.sh $$DESTDIR where then macx_post.sh (stored in a subdirectory tree support/mac ) does the post build tasks: #!/bin/sh
# Polyphone
# QMAKE_POST_LINK script to automate post build deployment tasks
#
command_exists () {
which "$1" &> /dev/null;
}
: ${1?"Usage: $0 DESTDIR where DESTIR is either \"DEBUG\" or \"RELEASE\""}
export DESTDIR="$1"
if ! command_exists macdeployqt ; then
echo "Qt environment not set up correctly, macdeployqt not found"
exit 2
fi
echo "Deploying qt dependencies ..."
macdeployqt "$DESTDIR"/Polyphone.app
echo "Deploying Jack framework ..."
cp -rp lib/mac/Jackmp.framework "$DESTDIR"/Polyphone.app/Contents/Frameworks
echo "Requesting admin password..."
/usr/bin/osascript -e 'do shell script "support/mac/macx_configure_jack_framework.sh $DESTDIR args 2>&1" with administrator privileges'
echo "all done" #!/bin/sh
: ${1?"Usage: $0 DESTDIR where DESTIR is either \"DEBUG\" or \"RELEASE\""}
export DESTDIR="$1"
echo "Configuring Jack framework ..."
install_name_tool -change /System/Library/Frameworks/Jackmp.framework/Versions/A/Jackmp @executable_path/../Frameworks/Jackmp.framework/Versions/A/Jackmp "$DESTDIR"/Polyphone.app/Contents/MacOS/Polyphone
echo "done" |
The administrator has disabled public write access.
|
Time to create page: 0.073 seconds