|
# Geant4 Installation on Windows 10
|
|
# Geant4 Installation on Windows 10
|
|
|
|
# Page under construction
|
|
|
|
|
|
# Page In construction
|
|
|
|
[[_TOC_]]
|
|
[[_TOC_]]
|
|
|
|
|
|
Hire the instructions for native Geant4 installation with the Visual Studio C++ compiler on Windows.
|
|
Hire the instructions for native Geant4 installation with the Visual Studio C++ compiler on Windows.
|
|
|
|
|
|
The installation tested with Windows 10 MSVS 2019 and Windows 11 MSVC 2022
|
|
The installation tested with Windows 10 MSVC 2019 and Windows 11 MSVC 2022
|
|
|
|
|
|
## Installing MSVC in Windows
|
|
## Development Environment
|
|
|
|
|
|
## Installing Git
|
|
### Installing MSVC in Windows
|
|
|
|
|
|
## Installing Qt
|
|
The Visual Studio can be downloaded from Microsoft
|
|
|
|
https://visualstudio.microsoft.com/vs/
|
|
|
|
Community edition 2022 free for individuals and academic users.
|
|
|
|
|
|
## Installing Geant4 and Root on Windows
|
|
The components:
|
|
Follow the instructions in the [Install Geant4 on Ubuntu](Ubuntu Installation) section to install Geant4 and ROOT on WLS Ubuntu 20.04. Test you installation.
|
|
|
|
|
|
|
|
|
|
- Visual Core edor
|
|
|
|
- Desktop development with C++
|
|
|
|
|
|
### Windows SSH Clients
|
|
was necessarily to compile Geant4.
|
|
|
|
|
|
To use the ssh connection to VM you need to install an ssh client capable of X11 forwarding like [PuTTY](http://www.putty.org) or to use Windows 10 ssh.
|
|
### CMake for Windows
|
|
|
|
|
|
We use ssh from the Windows Git installation.
|
|
The Visual Studio come with cmake program but without CMake GUI.
|
|
|
|
We use this cmake for compilation and installing Geant4.
|
|
|
|
|
|
`ssh -X -p 2222 vagrant@localhost`
|
|
You can download and install latest version directly from
|
|
|
|
https://cmake.org/download/ or use package installers like
|
|
|
|
[Scoop](https://scoop.sh) or
|
|
|
|
[Chocolatey](https://chocolatey.org/install)
|
|
|
|
|
|
You can define the ssh session to localhost port 2222 in **MobaXterm**.
|
|
|
|
|
|
|
|
|
|
### Installing Git
|
|
|
|
|
|
## Tips ##
|
|
Git for Windows installer can be downloaded directly from Git site
|
|
|
|
https://git-scm.com/download/win
|
|
|
|
|
|
- WLS 2
|
|
Step by step installation instruction can be found f.e.
|
|
- Use the command
|
|
https://phoenixnap.com/kb/how-to-install-git-windows
|
|
export DISPLAY=`ip route | awk '/default/ {print $3; exit}'`:0.0
|
|
|
|
to setup display.
|
|
|
|
|
|
|
|
- All environment variables related to laguage
|
|
In _"Adjusting you PATH environments"_ section you need
|
|
(LANGUAGE, LANG, LC_* ) are set to C.UTF-8 in ubuntu wls.
|
|
select "Git from command line and also from 3rd-party software".
|
|
If you see the warnings when connect to another machine via ssh,
|
|
|
|
use f.e. : export LC_ALL=un_US.UTF-8 TODO
|
|
|
|
|
|
|
|
- Geant4
|
|
You can also use installers, i use git-with-openssh installed with scoop.
|
|
- You check the Geant4 datasets installation using the command:
|
|
|
|
`geant4-config --check-datasets`
|
|
|
|
- `geant4-config --help` also shows the Geant4 features (configuration options)
|
|
|
|
|
|
|
|
Visit Geant4 installation Guide for more info:
|
|
## Additional Libraries
|
|
http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/InstallationGuide/html/
|
|
|
|
|
|
All additional libraries was compiled locally from sources.
|
|
|
|
|
|
|
|
### Installing Qt
|
|
|
|
You can get qt installer from https://www.qt.io/download ( you will need
|
|
|
|
account ).
|
|
|
|
|
|
|
|
At time of writing only Qt5 was supported. Geant4 can't be build with Qt6.
|
|
|
|
|
|
|
|
On windows you need install latest version of Qt5 (5.15.2) for MSVC 2019 64 bit
|
|
|
|
and optionally Qt3D additional library.
|
|
|
|
|
|
|
|
|
|
|
|
### Installing Xerces-C
|
|
|
|
|
|
- zsh on vm
|
|
You can downalod source tar ball or zip from
|
|
- If you use zsh you need to use .zprofile instead of .bash_profile
|
|
https://xerces.apache.org/xerces-c/download.cgi
|
|
- Use *source* not a *.* to source setup scripts
|
|
|
|
|
|
|
|
- Ubuntu Desktop in HyperV run full screen.
|
|
and then follow Build instruction from this site, direct linl
|
|
|
|
|
|
|
|
https://xerces.apache.org/xerces-c/build-3.html
|
|
|
|
|
|
|
|
|
|
|
|
## Installing Geant4 and Root on Windows
|
|
|
|
Follow the instructions in the [Install Geant4 on Ubuntu](Ubuntu Installation) section to install Geant4 and ROOT on WLS Ubuntu 20.04. Test you installation.
|
|
|
|
|
|
Start terminal
|
|
|
|
|
|
|
|
- sudo vi /etc/default/grub
|
|
|
|
|
|
|
|
- Change the GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” line to GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash video=hyperv_fb:1920x1080”
|
|
|
|
|
|
|
|
- sudo update-grub
|
|
## Tips ##
|
|
|
|
|
|
- Restart your VM
|
|
- Windows SSH Clients
|
|
|
|
|
|
VM will run full screen mode.
|
|
To use the ssh connection to VM you need to install an ssh client capable of X11 forwarding like [PuTTY](http://www.putty.org) or to use Windows 10 ssh.
|
|
|
|
|
|
|
|
We use ssh from the Windows Git installation.
|
|
|
|
|
|
|
|
`ssh -X -p 2222 vagrant@localhost`
|
|
|
|
|
|
|
|
You can define the ssh session to localhost port 2222 in **MobaXterm**.
|
|
|
|
|
|
|
|
- Geant4
|
|
|
|
- You check the Geant4 datasets installation using the command:
|
|
|
|
`geant4-config --check-datasets`
|
|
|
|
- `geant4-config --help` also shows the Geant4 features (configuration options)
|
|
|
|
|
|
|
|
Visit Geant4 installation Guide for more info:
|
|
|
|
http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/InstallationGuide/html/ |