From e7ea951122b47b1d881036c3e51edfb594432a58 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 26 Apr 2022 21:20:06 -0700 Subject: [PATCH] update INSTALL instructions for macOS And tiny whitespace fixes. Signed-off-by: Dirk Hohndel --- INSTALL | 41 ++++++++++++++++------------------------- scripts/build.sh | 4 ++-- 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/INSTALL b/INSTALL index d1f8db2c4..ee564b0c1 100644 --- a/INSTALL +++ b/INSTALL @@ -26,7 +26,7 @@ You keep it updated by doing: git checkout master git pull -r git submodule update - + Our flavor of libdivecomputer ----------------------------- @@ -273,40 +273,31 @@ sudo ldconfig ~/src/install-root/lib Building Subsurface under MacOSX -------------------------------- -You have 2 options for the first time install, either using homebrew -or by manually building the dependencies from source, depending on -what else you have installed on your mac. +While it is possible to build all required components completely from source, +at this point the preferred way to build Subsurface is to set up the build +infrastructure via Homebrew and then build the dependencies from source. 0) You need to have XCode installed. The first time (and possibly after updating OSX) -0.1) run "xcode-select --install" +xcode-select --install -homebrew option: +1) install Homebrew (see https://brew.sh) and then the required build infrastructure: -1) brew install autoconf automake libtool hidapi libusb libxml2 libxslt libzip openssl pkg-config libgit2 libssh2 libjpg libpng libmtp +brew install autoconf automake libtool pkg-config gettext -2) cd /..; bash /scripts/build.sh +2) install Qt +download the macOS installer from https://download.qt.io/official_releases/online_installers +and use it to install the desired Qt version. At this point the latest Qt5 version is still +preferred over Qt6. -Manual option: -1) install pkg-config +3) now build Subsurface -1.1) download http://sourceforge.net/projects/macpkg/files/PkgConfig/0.26/PkgConfig.pkg/download +cd ~/src; bash subsurface/scripts/build.sh -build-deps -1.2) run "PkgConfig.pkg" - -1.3) run "sudo ln -s /opt/pkgconfig/bin/pkg-config /usr/local/bin/pkg-config" - -2) install autoconf tools - -2.1) curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz - -2.2) tar -xzf autoconf-latest.tar.gz - -2.3) cd autoconf-*; ./configure && make && sudo make install; cd .. - -3) cd /..; bash /scripts/build.sh -build-deps -desktop +if you are building against Qt6 (still experimental) you can create a universal binary with +cd ~/src; bash subsurface/scripts/build.sh -build-with-qt6 -build-deps -fat-build After the above is done, Subsurface.app will be available in the subsurface/build directory. You can run Subsurface with the command @@ -316,7 +307,7 @@ A) open subsurface/build/Subsurface.app B) subsurface/build/Subsurface.app/Contents/MacOS/Subsurface the TAB key is your friend :-) - + Debugging can be done with either Xcode or QtCreator. To install the app for all users, move subsurface/build/Subsurface.app to /Applications. diff --git a/scripts/build.sh b/scripts/build.sh index 2833fbe28..ff1d4f1d8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -71,7 +71,7 @@ while [[ $# -gt 0 ]] ; do # use the same 3rd party set. shift SRC_DIR="$1" - ;; + ;; -build-deps) # in order to build the dependencies on Mac for release builds (to deal with the macosx-version-min for those) # call this script with -build-deps @@ -112,7 +112,7 @@ while [[ $# -gt 0 ]] ; do -mobile) # we are building Subsurface-mobile # Note that this will run natively on the host OS. - # To cross build for Android or iOS (including simulator) + # To cross build for Android or iOS (including simulator) # use the scripts in packaging/xxx BUILD_MOBILE="1" ;;