Installing Geant4
From UCL HEP PBT Wiki
m |
m |
||
Line 1: | Line 1: | ||
For the sake of demonstration I will assume you are installing geant4.10.00.p01 and that you | For the sake of demonstration I will assume you are installing geant4.10.00.p01 and that you | ||
wish to install Geant4 on your '''Desktop'''. The unzipped Geant4 package will have the | wish to install Geant4 on your '''Desktop'''. The unzipped Geant4 package will have the | ||
- | following directory | + | following directory <span style="color:#00ff00"> /home/your_name/Desktop/geant4.10.00.p01 </span> |
- | + | ||
- | <span style="color: | + | |
In the same directory (i.e: on the '''Desktop''') create a folder called ''''Geant4-build''' | In the same directory (i.e: on the '''Desktop''') create a folder called ''''Geant4-build''' | ||
Line 10: | Line 8: | ||
Now using the terminal as a root user, type the command: | Now using the terminal as a root user, type the command: | ||
- | + | <pre style="color: #800000; background-color: #dcdcdc"> | |
cd /home/your_name/Desktop/Geant4-build | cd /home/your_name/Desktop/Geant4-build | ||
- | + | </pre> | |
This command will change your present working directory to the folder “Geant4-build”. This is important because the Terminal will use present working directory as the destination for the build files. | This command will change your present working directory to the folder “Geant4-build”. This is important because the Terminal will use present working directory as the destination for the build files. | ||
Line 18: | Line 16: | ||
Using the '''terminal''' as root user type the command: | Using the '''terminal''' as root user type the command: | ||
+ | <pre style="color: #800000; background-color: #dcdcdc"> | ||
+ | cmake -DCMAKE_INSTALL_PREFIX = /home/your_name/Desktop/Geant4-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON | ||
- | + | -DGEANT4_INSTALL_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON /home/your_name/Desktop/geant4.10.00.p01 | |
- | + | </pre> | |
'''ENSURE YOU CORRECTLY TYPE THE ENTIRE PHRASE. IF YOU MISTYPE SOMETHING CERTAIN FEATURES MAY NOT WORK''' | '''ENSURE YOU CORRECTLY TYPE THE ENTIRE PHRASE. IF YOU MISTYPE SOMETHING CERTAIN FEATURES MAY NOT WORK''' | ||
- | |||
'''Explanation''' | '''Explanation''' | ||
- | |||
'''DGEANT4_INSTALL_DATA=ON''' ensures that the all of the '''optional''' modules (data files) are | '''DGEANT4_INSTALL_DATA=ON''' ensures that the all of the '''optional''' modules (data files) are | ||
Line 40: | Line 38: | ||
After this command has been processed you should receive the message | After this command has been processed you should receive the message | ||
- | + | <pre style="color: #800000; background-color: #dcdcdc"> | |
-- Configuring Done | -- Configuring Done | ||
-- Generating done | -- Generating done | ||
-- Build files have been written to….. | -- Build files have been written to….. | ||
- | + | </pre> | |
If you receive this message, type the command | If you receive this message, type the command | ||
- | + | ||
+ | <pre style="color: #800000; background-color: #dcdcdc"> | ||
make | make | ||
- | + | </pre> | |
+ | |||
If an error occurs during the '''“make”''' processes, retype the command '''make'''. | If an error occurs during the '''“make”''' processes, retype the command '''make'''. | ||
Line 64: | Line 64: | ||
When this has been done type the command | When this has been done type the command | ||
+ | <pre style="color: #800000; background-color: #dcdcdc"> | ||
make install | make install | ||
+ | </pre> | ||
to install Geant4. | to install Geant4. |