MSYS2 in TPC
MSYS2 is a software building and distribution platform for Windows. It includes, among other tools, bash terminal, GCC, MinGW-w64, CMake, and Git, which are required to build and test TPCCLIB CLI applications for Windows. MSYS2 can also be used to build the static PET data analysis and modelling web site. This page gives instructions on setting up the MSYS2 for these purposes.
Setup
Download MSYS2 and install it in a local folder, by default,
C:\msys64. After installation, a bash terminal for the UCRT64 environment opens.
MSYS2 home directory /home/username/ can be found in Windows as folder
C:\msys64\home\username.
Windows home directory can be found in MSYS2 as folder /c/Users/username.
Add an exclusion path for your entire MSYS2 installation directory C:\msys64 in your
antivirus settings; otherwise it may work slowly, or sometimes hang.
MSYS2 may have had recent updates since the last installation package had been made; update MSYS2 in the MSYS2 bash terminal with command:
pacman -Suy
If there were updates, the terminal will close, and you will need to start MSYS2 again.
Inside the MSYS2 bash terminal, install the version control system (Git):
pacman -S mingw-w64-ucrt-x86_64-git
After installing Git, configure it to leave the line endings as they are, and set your user identification, for example:
git config --global core.autocrlf false git config --global user.email "vesoik@utu.fi" git config --global user.name "Vesa Oikonen"
In order to commit any changes to GitLab repository, you may also need to create and set ssh key.
Setup for building TPCCLIB
Inside the MSYS2 bash terminal, install the compiler, CMake, make, and documentation system:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake make mingw-w64-ucrt-x86_64-doxygen
You can the retrieve the codes from git repository and compile TPCCLIB applications as instructed in https://gitlab.utu.fi/vesoik/tpcclib.
Setup for building WWW site
You need to have Git installed, as mentioned above. The static petanalysis pages are built with
Nanoc, which requires Ruby to run.
Deploying the built pages to server requires rsync. Thus, you need to install
pacman -S mingw-w64-ucrt-x86_64-ruby rsync
Optionally, Nu Html Checker (vnu) can be installed with:
pacman -S mingw-w64-ucrt-x86_64-nodejs npm install -g vnu-jar
You can the retrieve the codes from git repository and compile the pages as instructed in https://gitlab.utu.fi/vesoik/petanalysis.
Update MSYS2 and tools
Update the MSYS2 and tools, again with command
pacman -Suy
You should use this command every now and then to update both the MSYS2 and the tools.
See also:
- Windows Subsystem for Linux
- TPCCLIB development in Linux
- PET software
- List of TPCCLIB software
- Command-line interface (CLI)
Tags: CLI, Software, Windows, Shell, bash, Script, TPCCLIB
Updated at: 2026-10-09
Created at: 2026-10-06
Written by: Vesa Oikonen