Skip to content

Getting Started on Mac

Carole Hayakawa edited this page Oct 9, 2024 · 6 revisions

These instructions describe how to clone the source code on Mac and build it

Prerequisites

  • To install git in MacOS Catalina, macOS Big Sur, and MacOS Mojave, bring up a terminal window
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew doctor
brew install git
  • To install in MacOS High Sierra, Sierra, El Capitan, and earlier, bring up a terminal window
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install git
brew install powershell
pwsh

More instructions to install powershell can be found here

Getting the Source Code

Clone the source code from GitHub using the command:

git clone https://github.com/VirtualPhotonics/vts.git

This will create a directory "vts" in your current directory.

Building the Code

  • Using powershell:
cd vts
pwsh
./BuildTestRelease.ps1 
exit

To execute any application, e.g. Monte Carlo CommandLine (MCCL):

8cd src/Vts.MonteCarlo.CommandLineApplication/bin/Debug/net8.0/

To generate sample infiles for MCCL

./mc geninfiles

To run MCCL with sample infile

./mc infile=infile_one_layer_all_detectors.txt