Ce forum permet à des personnes du monde entier de communiquer, c′est pourquoi les messages échangés sont en anglais.
-
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 errorProject ERROR: Could not resolve SDK Path for 'macosx10.9'
Researches on the Net shows, it is not unique to polyphone and there are various workarounds proposed. For example by copying the older SDK's just manually into Xcode's SDK folder and hacking plist.Info by removing the key which limits XCode to the use of SDK 10.11.
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
After that polyphone builds smoothly on current OSX 10.11.6 and XCode 7.3.1 by running as usually from the source code directory: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 .
-
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:- including it in the sources so that the user doesn't have to use internet to find the script and the field "POLYPHONE_SRC" will be the current directory
- automatically finding the Qt root path (see this page ) so that the user doesn't have to fill the field "QT_ROOT"
- automatically modifying "polyphone.pro" file with the right variables
- providing a .dmg file at the end of the process with the command hdiutil
Davy -
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 addedQMAKE_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"
The linking tasks with install_name_tool are done through osascript to get a popup for entering the admin passwort. This approach also works with QtCreator.#!/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"
Connectez-vous ou inscrivez-vous pour participer à la discussion.
Polyphone a besoin de vous !
Polyphone est gratuit mais il y a des coûts associés à son site web et à son développement. Un petit coup de pouce aidera beaucoup.
Faire un don
Apprenez les bases
Voir le tutoriel
Haut de
page
page