## This lists the commands needed to install the librarys for generating and analyzing configurations
## Tested on a machine with Linux Mint Cinnamon 22.1 on 2025-07-30

sudo apt-get install git


## su2 libary for generating configurations:
## copy the contents of the folder 'generation/code' to your installation folder
## alternatively
## git clone git@github.com:HISKP-LQCD/su2.git
## cd su2
## git checkout 0bcdb4bad6cb51f7c20fca16f73d76760f5b3504
## cd ..
export mycode=$(pwd)
mkdir build_su2
cd build_su2
sudo apt-get install xtensor-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libyaml-cpp-dev
sudo apt-get install libboost-all-dev

## Install the code for the ensemble generation
## if you want to use CMake, download the project https://doi.org/10.5281/zenodo.11176392 and copy the file CMakeLists.txt into the directory with the source code for the ensemble generation.
## Then do the following for the installation:
sudo apt install cmake
cmake -B ${mycode}/build_su2 -S ${mycode}/su2/ -D CMAKE_INSTALL_PREFIX ${mycode}/build_su2
make -j$(nproc) install
make -j$(nproc)
cd ${mycode}

## R library hadron
sudo apt-get install r-base-core
sudo apt-get install libxml2-dev
sudo apt-get install libfontconfig1-dev
sudo apt-get install libharfbuzz-dev libfribidi-dev
sudo apt-get install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
sudo apt-get install libgsl-dev
## start R console and install R packages now
# R packages:
# install.packages("curl")
# install.packages("openssl")
# install.packages("devtools")
# install.packages("optparse")
# install.packages("abind")
# install.packages("dplyr")
## exit R console
## install hadron
cd ${mycode}
git clone git@github.com:HISKP-LQCD/hadron.git
cd ${mycode}/hadron/
git checkout generalize_uwerrcf
bash install

