|
7 | 7 | # bailout on errors and echo commands |
8 | 8 | set -xe |
9 | 9 |
|
10 | | -brew install cairo libexif xz libarchive python3 |
| 10 | +brew install cairo libexif xz |
| 11 | +export MACOSX_DEPLOYMENT_TARGET=10.9 |
| 12 | +# We need to build own libarchive |
| 13 | +wget https://libarchive.org/downloads/libarchive-3.3.3.tar.gz |
| 14 | +tar zxf libarchive-3.3.3.tar.gz |
| 15 | +cd libarchive-3.3.3 |
| 16 | +./configure --without-lzo2 --without-nettle --without-xml2 --without-openssl --with-expat |
| 17 | +make |
| 18 | +make install |
| 19 | +cd .. |
| 20 | + |
11 | 21 | wget http://opencpn.navnux.org/build_deps/wx312_opencpn50_macos109.tar.xz |
12 | 22 | tar xJf wx312_opencpn50_macos109.tar.xz -C /tmp |
13 | 23 | export PATH="/usr/local/opt/gettext/bin:$PATH" |
14 | 24 | echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile |
15 | | - |
16 | | -mkdir build |
| 25 | + |
| 26 | +mkdir build |
17 | 27 | cd build |
18 | | -test -z "$TRAVIS_TAG" && CI_BUILD=OFF || CI_BUILD=ON |
| 28 | +test -n "$TRAVIS_TAG" && CI_BUILD=OFF || CI_BUILD=ON |
| 29 | + |
19 | 30 | cmake -DOCPN_CI_BUILD=$CI_BUILD \ |
20 | | - -DOCPN_USE_LIBCPP=ON \ |
21 | 31 | -DwxWidgets_CONFIG_EXECUTABLE=/tmp/wx312_opencpn50_macos109/bin/wx-config \ |
22 | 32 | -DwxWidgets_CONFIG_OPTIONS="--prefix=/tmp/wx312_opencpn50_macos109" \ |
23 | | - -DCMAKE_INSTALL_PREFIX=/tmp/opencpn -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \ |
24 | | - .. |
| 33 | + -DCMAKE_INSTALL_PREFIX=/tmp/opencpn \ |
| 34 | + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \ |
| 35 | + .. |
| 36 | + |
25 | 37 | make -sj2 |
26 | | -make package |
| 38 | +#make create-pkg |
| 39 | +mkdir -p /tmp/opencpn/bin/ocpn_draw_pi.app/Contents/MacOS |
| 40 | +mkdir -p /tmp/opencpn/bin/ocpn_draw_pi.app/Contents/SharedSupport/plugins |
27 | 41 | chmod 644 /usr/local/lib/lib*.dylib |
| 42 | +make install |
| 43 | +#make install # Dunno why the second is needed but it is, otherwise |
| 44 | + # plugin data is not included in the bundle |
| 45 | +# make create-dmg |
| 46 | + |
| 47 | +wget http://opencpn.navnux.org/build_deps/Packages.dmg; |
| 48 | +hdiutil attach Packages.dmg; |
| 49 | +sudo installer -pkg "/Volumes/Packages 1.2.5/Install Packages.pkg" -target "/"; |
| 50 | + |
| 51 | +make create-pkg |
0 commit comments