From 0d5cb77e3d08fc20dd2c81faa04325427e088b3e Mon Sep 17 00:00:00 2001 From: James Crook Date: Wed, 14 Dec 2016 19:20:29 +0000 Subject: [PATCH] Improved support for building release on mac --- .travis.yml | 3 +-- mac/Build.txt | 42 +++++++++++++++++-------------------- mac/scripts/get_gitident.sh | 1 + mac/scripts/sign_dist.sh | 13 ++++++++++++ 4 files changed, 34 insertions(+), 25 deletions(-) create mode 100644 mac/scripts/get_gitident.sh create mode 100644 mac/scripts/sign_dist.sh diff --git a/.travis.yml b/.travis.yml index db8382282..65840be3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,7 @@ addons: before_install: - sudo apt-get update -qq - sudo apt-get install -y libwxgtk3.0-dev libgtk2.0-dev - - git show -s --format="wxT(\"%h of %cd\")" - - git show -s --format="wxT(\"%h of %cd\")" > ./src/RevisionIdent.h + - git show -s --format="wxT(\"[[http://github.com/audacity/audacity/commit/%H|%h]] of %cd\")" | tee ./src/RevisionIdent.h - export CXX="g++-4.9" CC="gcc-4.9" - FLAGS="-w -std=gnu++11" - export CFLAGS="$CFLAGS $FLAGS" diff --git a/mac/Build.txt b/mac/Build.txt index 64e6dce1a..444b2d89f 100644 --- a/mac/Build.txt +++ b/mac/Build.txt @@ -2,13 +2,14 @@ At this time, the newest SDK version that Audacity can build with is 10.6. To build Audacity using Xcode 5.1 or newer, you need to extract the 10.6 SDK from an earlier version of Xcode. -In the instructions below, Xcode 4.3.3 (for the 10.6 SDK) and Xcode 5.1.1 will -be used. Xcode 6.1.1, 6.3, 6.4.1, and 7.1 have also been verified to work. -Xcode 7.2 and later require a custom build setting to accept the 10.6 SDK, or -to edit src\MemoryX.h in the Audacity code. See this topic: -http://forum.audacityteam.org/viewtopic.php?p=303835#p303835 . +In the instructions below, Xcode 4.3.3 (for the 10.6 SDK) and Xcode 8.1 will +be used. Fuller instructions that cover + * Using other Xcodes (e.g. to build on platforms prior to OS X 10.11.5) + * Optional signing of DMGs + * Applying wxWidgets patches one by one +can be found on our wiki at http://wiki.audacityteam.org/wiki/Building_On_Mac -1) Download Xcode 5.1.1 or greater and install it to /Applications. +1) Download Xcode 8.1 and install it to /Applications. 2) Download Xcode 4.3.3 (it includes the 10.6 and 10.7 SDK's despite the downloads page says it only has the 10.7 SDK). 3) Open the DMG in Finder. @@ -21,28 +22,24 @@ http://forum.audacityteam.org/viewtopic.php?p=303835#p303835 . /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ +7) Change the MinimumSDKVersion key value in + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist + to 10.6 + Xcode is now ready. -7) Download wxWidgets 3.0.2 fron the wxWidgets project: - http://sourceforge.net/projects/wxwindows/files/3.0.2/wxWidgets-3.0.2.tar.bz2 . +8) Download audacity patched wxWidgets 3.0.2 zip from the audacity copy of the + wxWidgets project: + https://github.com/audacity/wxWidgets/tree/audacity-fixes + + it's the green "clone or download" button on the right. Don't be tempted to use Widgets already installed by a package manager such - as Homebrew because this may cause problems. + as Homebrew because this will cause problems. -8) Once the download is complete, untar it (your browser may do this itelf): +9) Once the download is complete, unzip it: - tar xf wxWidgets-3.0.2.tar.bz2 . - -9) Apply the following fixes to wxWidgets: - - cd wxWidgets-3.0.2 - patch -p0 -i /mac/wxMac_additions/wxMac-3.0.2-fixes.patch . - patch -p0 -i /mac/wxMac_additions/eventloops.patch . - patch -p0 -i /mac/wxMac_additions/pinch-spread.patch . - patch -p0 -i /mac/wxMac_additions/focusrings.patch . - patch -p0 -i /mac/wxMac_additions/wxMac-3.0.2-wxaccessible.patch . - patch -p0 -i /mac/wxMac_additions/tooldock-quit.patch . - patch -p0 -i /mac/wxMac_additions/fullscreen.patch . + unzip wxWidgets-audacity-fixes.zip 10) And finally build/install wxWidgets: @@ -74,4 +71,3 @@ And install: cd gexttext-latest ./configure sudo make install - diff --git a/mac/scripts/get_gitident.sh b/mac/scripts/get_gitident.sh new file mode 100644 index 000000000..6a6c01036 --- /dev/null +++ b/mac/scripts/get_gitident.sh @@ -0,0 +1 @@ +git show -s --format="wxT(\"[[http://github.com/audacity/audacity/commit/%H|%h]] of %cd\")" | tee ../src/RevisionIdent.h \ No newline at end of file diff --git a/mac/scripts/sign_dist.sh b/mac/scripts/sign_dist.sh new file mode 100644 index 000000000..55232c299 --- /dev/null +++ b/mac/scripts/sign_dist.sh @@ -0,0 +1,13 @@ + +#Hand edit this to get the 'right' results. +#This batch file is just a reminder of the commands... + +hdiutil resize -size 200m /private/tmp/TMP.dmg +hdiutil mount /private/tmp/TMP.dmg +codesign --deep -s IDENTITY -v "/Volumes/Audacity VERSION/Audacity.app" +spctl -s -v "Volumes/Audacity VERSION/Audacity.app" +hdiutil eject "/Volumes/Audacity VERSION/" + +# Compress and prepare for Internet delivery +hdiutil convert /private/tmp/TMP.dmg -format UDZO -imagekey zlib-level=9 -o "/private/tmp/RESULT.dmg" +