update INSTALL instructions for macOS

And tiny whitespace fixes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-04-26 21:20:06 -07:00
parent a73fd0ed60
commit e7ea951122
2 changed files with 18 additions and 27 deletions

41
INSTALL
View file

@ -26,7 +26,7 @@ You keep it updated by doing:
git checkout master git checkout master
git pull -r git pull -r
git submodule update git submodule update
Our flavor of libdivecomputer Our flavor of libdivecomputer
----------------------------- -----------------------------
@ -273,40 +273,31 @@ sudo ldconfig ~/src/install-root/lib
Building Subsurface under MacOSX Building Subsurface under MacOSX
-------------------------------- --------------------------------
You have 2 options for the first time install, either using homebrew While it is possible to build all required components completely from source,
or by manually building the dependencies from source, depending on at this point the preferred way to build Subsurface is to set up the build
what else you have installed on your mac. 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) 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 <repo>/..; bash <repo>/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: 3) now build Subsurface
1) install pkg-config
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" if you are building against Qt6 (still experimental) you can create a universal binary with
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 <repo>/..; bash <repo>/scripts/build.sh -build-deps -desktop
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 After the above is done, Subsurface.app will be available in the
subsurface/build directory. You can run Subsurface with the command 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 B) subsurface/build/Subsurface.app/Contents/MacOS/Subsurface
the TAB key is your friend :-) the TAB key is your friend :-)
Debugging can be done with either Xcode or QtCreator. Debugging can be done with either Xcode or QtCreator.
To install the app for all users, move subsurface/build/Subsurface.app to /Applications. To install the app for all users, move subsurface/build/Subsurface.app to /Applications.

View file

@ -71,7 +71,7 @@ while [[ $# -gt 0 ]] ; do
# use the same 3rd party set. # use the same 3rd party set.
shift shift
SRC_DIR="$1" SRC_DIR="$1"
;; ;;
-build-deps) -build-deps)
# in order to build the dependencies on Mac for release builds (to deal with the macosx-version-min for those) # 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 # call this script with -build-deps
@ -112,7 +112,7 @@ while [[ $# -gt 0 ]] ; do
-mobile) -mobile)
# we are building Subsurface-mobile # we are building Subsurface-mobile
# Note that this will run natively on the host OS. # 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 # use the scripts in packaging/xxx
BUILD_MOBILE="1" BUILD_MOBILE="1"
;; ;;