Skip to content

Building GUIs on Linux

Frederic Tessier edited this page Dec 18, 2018 · 30 revisions

If you wish to compile the Qt GUIs yourself, for example to make changes to egs_gui, egs_view, egs_inprz or egs_configure, it is necessary to install Qt developer tools. The following are instructions to compile dynamically linked EGSnrc Qt graphical user interfaces on linux.

Note that qmake uses its own compiler configuration, in $QTDIR/mkspecs

Qt4 Instructions

In the 2018 release of the master branch, the GUIs are compatible with Qt4.

  1. Install the Qt4 development tools (libqt4-dev or libqt4-devel package in many distributions).
  2. Define the QTDIR environment variable as the path to the Qt4 development directory on your system. For example, on CentOS issue the command export QTDIR=/usr/lib64/qt4. On Ubuntu issue export QTDIR=/usr/share/qt4.
  3. Go to $HEN_HOUSE/egs++/view and issue the make clean; make command. If compilers have changed, first issue make realclean.

To build all GUIs

  1. Go to $HEN_HOUSE/gui and issue the make clean; make command to build all of egs_gui, egs_inprz and egs_configure. If compilers have changed, first issue make realclean in each of the three subdirectories.

To build individual GUIs

  1. Go to $HEN_HOUSE/gui/egs_gui and issue the make realclean; make command.
  2. Go to $HEN_HOUSE/gui/egs_inprz and issue the make realclean; make command.
  3. Go to $HEN_HOUSE/gui/egs_configure and issue the make realclean; make command.

Qt5 Instructions

In the current 2018 develop branch and future releases, the Qt GUIs are compatible with Qt5 (and Qt4).

  1. Ensure you have installed and configured the EGSnrc develop branch.
  2. Install the Qt5 development tools, e.g., qt5-default and qt5-qmake for Ubuntu or WSL.
  3. Define the QTDIR environment variable as the path of the Qt5 directory, e.g., export QTDIR=/usr/lib/qt5 on Ubuntu (check that the qmake binary is in the $QTDIR/bin/ directory).
  4. Define the QT_SELECT environment variable as export QT_SELECT=qt5.
  5. Go to $HEN_HOUSE/egs++/view and issue the make clean; make command. If compilers have changed, first issue make realclean.

To build all GUIs

  1. Go to $HEN_HOUSE/gui and issue the make clean; make command to build all of egs_gui, egs_inprz and egs_configure. If compilers have changed, first issue make realclean in each of the three subdirectories.
  2. If the compiler complains it cannot find the zlib.h file, install the package that provides this basic header. On Ubuntu, for example, issue the following command in a terminal: sudo apt-get install zlib1g-dev.

To build individual GUIs

  1. Go to $HEN_HOUSE/gui/egs_gui and issue the make realclean; make command.
  2. Go to $HEN_HOUSE/gui/egs_inprz and issue the make realclean; make command.
  3. Go to $HEN_HOUSE/gui/egs_configure and issue the make realclean; make command.
  4. If the compiler complains it cannot find the zlib.h file, install the package that provides this basic header. On Ubuntu, for example, issue the following command in a terminal: sudo apt-get install zlib1g-dev.
Clone this wiki locally