Installation:Mac
Contents
Binary package
If it is available for your OS version download the DMG archive and install it.
- Remove previously installed releases by cleaning
/Applications/Geopsy.org /Library/Geopsy.org
- Copy
Applications/Geopsy.org ==> /Applications Library/Geopsy.org ==> /Library
- To use the command line tools, modify your .zshrc file like this:
echo "export PATH=/Applications/Geopsy.org/3.3/Utilities:\$PATH" >> ~/.zshrc
Notes
- replace "3.3" by the actual branch number
- .zshrc is a startup script for zsh , an extension of bash found on Catalina. To get the current shell, run:
echo $SHELL
Source package
Compiling from the source package may be an option if the binary package is not yet available for your OS version. It takes a bit longer and requires several steps. Once a build environment is ready updates are relatively straight forward. Getting Xcode, Qt and compiling FFTW are required only once. When updating from a previous Geopsy release you can skip these steps and go directly to Geopsy package. As a general comment, do not move directories after their installation, prefer a new installation instead.
Xcode
It is the official compiler provided by Apple. It is available free of charge from the App Store if you create an account.
From a terminal, run:
clang++ --version
You should get something like:
Apple clang version 12.0.0 (clang-1200.0.32.2) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
If so, you can skip this step. If not, download Xcode from the App Store. It may take several tens of minutes. Be patient. Do not click on square stop button. The progress is indicated by a growing arc of circle. Upon completion, the progress/stop button is replaced by "Open".
Start Xcode graphical interface to accept the license agreement and finish the installation of some additional components. When ready, quit Xcode and check the availability of clang++ in a terminal.
Qt
This is an interface library that provides portability to virtually all platforms. A binary package for Mac OS can be downloaded from Qt. Go to "Download. Try. Buy.". Under "Downloads for open source users", click on "Go open source". Go to the bottom of the page and click on "Download the Qt Online Installer". Click on "Download" button.
A Qt DMG file should be available in your Download directory. Open the DMG file and launch "qt-unified-mac-x64-...-online". A Qt account is required to proceed with the installation. A new one can created within the installer. Once logged in, accept the Qt Open Source Usage Obligations.
By default Qt is installed in "~/Qt" but other locations can be chosen. This tutorial assumes that Qt is installed in "~/Geopsy/Qt-5.14". Qt provide a lot of components, to get the minimal footprint, select only one Qt version and inside this version, only "macOS" (Qt 5.14.2 for this tutorial). After the license agreement, the installation should start. Do not launch Qt Creator at the end.
In a terminal, add Qt path to your profile:
echo "export PATH=~/Geopsy/Qt-5.14/5.14.2/clang_64/bin:\$PATH" >> ~/.zshrc
Update your current environment:
source ~/.zshrc
qmake should be available:
make -v
QMake version 3.1 Using Qt version 5.14.2 in /Users/wathelem/Geopsy/Qt-5.14/5.14.2/clang_64/lib
To run Qt graphical applications some files must be copied to a specific system path.
sudo mkdir -p /Library/Geopsy.org/3.3/plugins cd ~/Geopsy/Qt-5.14/5.14.2/clang_64/plugins sudo cp -r platforms imageformats /Library/Geopsy.org/3.3/plugins
FFTW
Fastest Fourier Transform of the West.
FFTW >= 3.0.1 is required. Version 3.3.5 has been successfully tested.
Download the archive from FFTW.
Unpack it
cd ~/Geopsy tar xvf ~/Downloads/fftw-3.3.5.tar cd fftw-3.3.5
Safari automatically uncompresses it, if not, use instead
tar xvfz ~/Downloads/fftw-3.3.5.tar.gz
Configure FFTW with these specific flags:
SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk export CFLAGS="-fPIC -arch x86_64 -isysroot $SDK -mmacosx-version-min=10.7" export LDFLAGS="-arch x86_64 -Wl,-syslibroot,$SDK -mmacosx-version-min=10.7" ./configure
Then finally, run into compilation (less than a minute):
make -j 8
Geopsy package
Download the source package (the same as for Linux) or access the Git repository. The first option is detailed in this tutorial.
Unpack the archive
cd ~/Geopsy tar xvf ~/Downloads/geopsypack-src-3.3.3.tar
The original archive is compressed but Safari automatically uncompresses it before leaving it in "Downloads". If not, run instead
tar xvfz ~/Downloads/geopsypack-src-3.3.3.tar.gz
A source tree is now ready for the configure step
cd geopsypack-src-3.3.3 ./configure -builddir ~/Geopsy/build/src-3.3.3/Qt-5.14 -bindir /Applications/Geopsy.org/3.3 \ -libdir /Library/Geopsy.org/3.3/Frameworks -sharedir /Library/Geopsy.org/3.3/share \ -incdir /tmp/Geopsy -I ~/Geopsy/fftw-3.3.5/api -L ~/Geopsy/fftw-3.3.5/.libs \ -no-pch -march native
Go to the build directory and run make (adjust -j option to the number of available cores):
cd ~/build/src-3.3.3/Qt-5.14 make -j 8
It takes a little while. You can have a coffee or two. If it stops before the end with an error, write a post on geopsy forum. Once the compilation reaches the end without error, you can install in the destination paths:
sudo make install
That's it! You can try to run your geopsy applications from the Finder under /Applications/Geopsy.org. The installation produces undesirable files directed to /tmp/Geopsy. You can safely remove them.
sudo rm -rf /tmp/Geopsy
Geopsy plugins
Plugins are installed by make inside /Library/Geopsy.org/3.3/Frameworks. To get the same structure as a binary package, you can move them to "plugins".
sudo find /Library/Geopsy.org/3.3/Frameworks -name "*.dylib" -exec mv {} /Library/Geopsy.org/3.3/plugins ';'
The final touch
If you want to use graphical applications from a terminal, you can add symbolic links this way.
sudo -s
mkdir /Applications/Geopsy.org/3.3/Utilities for APP in $(find /Applications/Geopsy.org/3.3 -name "*.app"); do APP_NAME=$(basename $APP .app) ln -s $APP/Contents/MacOS/$APP_NAME /Applications/Geopsy.org/3.3/Utilities/$APP_NAME done
exit
find /Applications/Geopsy.org/3.3 -name "*.app" -exec ln -s {}/Contents/MacOS/
If you want to move all core command line tools into Utilities, you have to run after each "make install":
sudo find /Applications/Geopsy.org/3.3 -maxdepth 1 -type f -exec mv {} /Applications/Geopsy.org/3.3/Utilities ';'
Define the PATH in the same way as described for binary packages.
Building a DMG file
Qt libraries must be added to a self-consistent package. We copy only the required libraries to /Library. Everything must run under 'root'.
for LIB in Core DBus Gui Widgets Network Qml Svg Xml PrintSupport; do cp -RPp ~/Geopsy/Qt-5.14/5.14.2/clang_64/lib/Qt${LIB}.framework /Library/Geopsy.org/3.3/Frameworks done rm /Library/Geopsy.org/3.3/Frameworks/*.a cp /Users/wathelem/Geopsy/geopsypack-src-3.3.3/LICENSE.* /Library/Geopsy.org/3.3 cp /Users/wathelem/Geopsy/geopsypack-src-3.3.3/INSTALL.MAC /Library/Geopsy.org/3.3 exit
The original Qt directory can be moved or deleted, the applications will continue to work.
Create the DMG file
mkdir -p /tmp/GeopsyVolume/Applications/Geopsy.org/3.3 mkdir -p /tmp/GeopsyVolume/Library/Geopsy.org/3.3 cp -RPp /Library/Geopsy.org/3.3/* /tmp/GeopsyVolume/Library/Geopsy.org/3.3 cp -RPp /Application/Geopsy.org/3.3/* /tmp/GeopsyVolume/Applications/Geopsy.org/3.3 hdiutil create -volname geopsypack-mac-catalina-3.3.3 -srcfolder /tmp/GeopsyVolume -ov -format UDZO geopsypack-mac-catalina-3.3.3.dmg rm -rf /tmp/GeopsyVolume
Going further
Was it successful? If you want to participate in this project, your binaries can be packed in a DMG archive and distributed to other users. Contact us for details.
Trouble shooting
Qt 5.15.1, geopsypack 3.3
- For applications started from the command line, the top menu bar does not respond correctly. Fix it by activating another application and return to geopsy application. It should be fixed.
- Errors are encountered while compiling geopsypack-3.3.2 with Qt-5.15. geopsypack-3.3.3-preview fixes some issues but not all.
- Errors are encountered while compiling geopsypack-3.3.3-preview (git) with Qt-5.15.