Software/Geant4/Installation/Qt: Difference between revisions
SimonJolly (talk | contribs) No edit summary |
SimonJolly (talk | contribs) No edit summary |
||
Line 28: | Line 28: | ||
== Installation == | == Installation == | ||
When downloading software, the downloaded tarball (or other <code>Zip</code> archive) should be placed in an appropriately named directory in <code>/unix/pbt/software/src</code>: the instructions below assume that the directory is <code>/unix/pbt/software/src/qt</code>. | |||
The source code should then be extracted into a suitable subdirectory in <code>/unix/pbt/software/build</code>. The extracted source code directory can only be deleted once the software has been built and installed | |||
=== Source Code Extraction === | |||
<pre> | |||
cd /unix/pbt/software/src/geant4-prerequisites/qt | |||
tar -xvz -f qtbase-opensource-src-5.6.0.tar.gz | |||
mv qtbase-opensource-src-5.6.0 qt-5.6.0 | |||
</pre> | |||
=== Build And Install === | |||
These instructions assume the code has already been built for the '''Development''' environment before building for the '''Production''' environment, so some of the commands for the '''Production''' install are omitted. | |||
Although it is highly discouraged to install straight to the '''Production''' environment without first compiling a '''Development''' version, it is possible to do so by adding in the directory creation commands at the start. | |||
==== Development Environment ==== | |||
<pre> | <pre> | ||
Line 34: | Line 51: | ||
mkdir -pv qt/qt-5.6.0 | mkdir -pv qt/qt-5.6.0 | ||
cd qt/qt-5.6.0 | cd qt/qt-5.6.0 | ||
../../../src/qt-5.6.0/configure -prefix /unix/pbt/software/dev/qt-5.6.0 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb | ../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/dev/qt-5.6.0 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb | ||
make | |||
make install | |||
</pre> | |||
==== <code>prod</code> ==== | |||
<pre> | |||
cd /unix/pbt/software/build/qt/qt-5.6.0 | |||
../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/prod-sl6 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb | |||
make | make | ||
make install | make install | ||
</pre> | </pre> |
Revision as of 13:52, 24 May 2016
Introduction
For Geant4
, the Qt
headers and libraries are required in order to allow visualisation and interaction through the Qt
user interface.
Details
- Website
- http://qt-project.org
- Source URL
- http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/
- Installed version
- 5.6.0 (24 April 2014)
- Source code
src/geant4-prerequisites/qt/qtbase-opensource-src-5.6.0.tar.gz
Installation Notes
Geant4
supports Qt 4.6
or higher (Qt 4.8
or higher on Mac).
Qt
is available in a number of different versions and with a vast array of submodules. Only the "qtbase" submodule is required to compile all the elements required for Geant4
. The various different installer and source code options can be found at: http://www.qt.io/download-open-source/
For installation, Qt
does not support installation into a sandbox directory (i.e. there are no options prefix
or DESTDIR
defined for command make install
) and must be given the installation directory with the -prefix
option. As such, to recompile Qt
for different target directories, the configure
script must be rerun with a modified -prefix /path/to/dest
option. This has to be managed manually as can be seen in the installation commands below.
The tarball extracts to a rather long folder name. To follow the installation commands below, rename this to src/qt-5.6.0
.
Some instructions on the correct package to download and the various compilation flags were provided by Ben Morgan at Warwick, along with this configuration script:
https://github.com/SuperNEMO-DBD/homebrew-cadfael/blob/master/Formula/qt5-base.rb
Installation
When downloading software, the downloaded tarball (or other Zip
archive) should be placed in an appropriately named directory in /unix/pbt/software/src
: the instructions below assume that the directory is /unix/pbt/software/src/qt
.
The source code should then be extracted into a suitable subdirectory in /unix/pbt/software/build
. The extracted source code directory can only be deleted once the software has been built and installed
Source Code Extraction
cd /unix/pbt/software/src/geant4-prerequisites/qt tar -xvz -f qtbase-opensource-src-5.6.0.tar.gz mv qtbase-opensource-src-5.6.0 qt-5.6.0
Build And Install
These instructions assume the code has already been built for the Development environment before building for the Production environment, so some of the commands for the Production install are omitted. Although it is highly discouraged to install straight to the Production environment without first compiling a Development version, it is possible to do so by adding in the directory creation commands at the start.
Development Environment
cd /unix/pbt/software/build mkdir -pv qt/qt-5.6.0 cd qt/qt-5.6.0 ../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/dev/qt-5.6.0 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb make make install
prod
cd /unix/pbt/software/build/qt/qt-5.6.0 ../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/prod-sl6 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb make make install