Closed benkrikler closed 9 years ago
I think that you would change the line: https://github.com/alcap-org/g4sim/blob/8ad85f91b7e8828a6805f600e1fba206d5eb52f0/install-geant4.sh#L34
to something like:
cmake -DCMAKE_INSTALL_PREFIX=../geant4-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_G3TOG4=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_QT=ON ../geant${GEANT4_VERSION}/ 2>&1 |tee install_log.txt
I'm not so sure about this, but using both X11 and Qt on my machine causes some problem in run time. YMMV
And yes, you will need to have libqt-devel (or some similar thing?) installed.
Or you can configure the options through the ccmake:
cd geant4_build_dir
ccmake ../geant4_src_dir
Thanks for the help Nam! I changed the cmake config (I used the command line option in your first comment) and then I could see things compiling.
There were a few additional steps as well, so in case anyone else is interested, once you've reconfigured cmake as above, do:
touch g4sim/geant4.10.00.p02/source/interfaces/basic/src/G4UIExecutive.cc
This will force us to recompile G4UIExecutive which might not be needed, but since the dependencies might not be obvious to (c)make since they use preprocessor macros beyond #include
this might be safer to do anyway.)cd geant4-build
make
make install
export G4UI_USE_QT=true
That last line is needed to force G4UIExecutive to pick Qt. There are other ways to select it (command line options and a hidden .g4session
file, but this seems easiest. I put it into my env.sh script so i get it every time I set up to run. Now I get the Qt interface by default!
Oh and here's the Gui I get out of this. It's mega easy to manipulate the visualisation and check the geometry since I think Chen's set some stuff up quite nicely here already.
It would be helpful if I could use G4's Qt interface but Geant4 doesn't seem to have compiled with this supported. I know it's possible on my machine since I have this running for Comet's software, but my initial first attempts at resolving this (changing the CMakeLists.txt file) haven't worked. Has anyone else managed and can they point me in the right direction?