Difference between revisions of "Installation:Mac"
(→Qt) |
|||
Line 63: | Line 63: | ||
QMake version 3.1 | QMake version 3.1 | ||
Using Qt version 5.15.1 in /Users/wathelem/Qt/5.15.1/clang_64/lib | Using Qt version 5.15.1 in /Users/wathelem/Qt/5.15.1/clang_64/lib | ||
+ | |||
+ | To run Qt graphical applications some files must be copied to a specific system path. | ||
+ | |||
+ | sudo mkdir /Library/Geopsy.org/3.3/plugins | ||
+ | cd ~/Qt/5.15.1/clang_64/plugins | ||
+ | sudo cp -r platforms imageformats /Library/Geopsy.org/3.3/plugins | ||
=== Geopsy package === | === Geopsy package === |
Revision as of 19:59, 21 September 2020
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/Geopsy.org Library/Geopsy.org ==> /Library/Geopsy.org
- To use the command line tools, modify your .profile like this:
echo "export PATH=/Applications/Geopsy.org/3.3/Utilities:$PATH" >> ~/.profile
(replace "3.3" by the actual branch number)
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.
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 that default location. Qt provide a lot of components, to get the minimal footprint, select only one Qt version and inside this version, only "macOS" (Qt 5.15.1 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=~/Qt/5.15.1/clang_64/bin:$PATH" >> ~/.profile
Update your current environment:
source ~/.profile
qmake should be available:
make -v
QMake version 3.1 Using Qt version 5.15.1 in /Users/wathelem/Qt/5.15.1/clang_64/lib
To run Qt graphical applications some files must be copied to a specific system path.
sudo mkdir /Library/Geopsy.org/3.3/plugins cd ~/Qt/5.15.1/clang_64/plugins sudo cp -r platforms imageformats /Library/Geopsy.org/3.3/plugins
Geopsy package
Download the source package (the same as for Linux) or access the Git repository. The first option is detailed in this tutorial.
Create a working directory
mkdir Geopsy
Enter in it
cd Geopsy
Unpack the archive
tar xvf ~/Downloads/geopsypack-src-3.3.3.tar
The original archive is compressed but apparently Safari automatically uncompress 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 -bindir /Applications/Geopsy.org/3.3 -libdir /Library/Geopsy.org/3.3/Frameworks -sharedir /Library/Geopsy.org/3.3 -no-pch -march native
Go to the build directory and run make (adjust -j option to the number of available cores):
cd ../build 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