Skip to content

Installing XrayPhysics

Kyle Champley edited this page Mar 14, 2024 · 4 revisions

Dependencies

all operating systems: cmake version 3.0 or newer

Linux: gcc compiler

Windows: Visual Studio 2019 (be sure to check the box that says "Desktop development with C++")

If using the Python binding, one only needs the standard Python packages, including numpy.

Install using PIP

If you are on a Mac, you must first set the PATH variable for CMake

PATH="/Applications/CMake.app/Contents/bin":"$PATH"

Then installation on any system (Linux, Windows, or Mac) is done with the following commands:

cd XrayPhysics
pip install .

Compile C/C++ code only (using CMake)

Linux

cd XrayPhysics
sh ./etc/build.sh

Mac

PATH="/Applications/CMake.app/Contents/bin":"$PATH"
cd XrayPhysics
sh ./etc/build.sh

Windows

cd XrayPhysics
.\etc\win_build.bat

After running the command above, one may use Visual Studio to make changes and re-compile by using the solution file here:
XrayPhysics\win_build\xrayphysics.sln

Don't forget to change to "Release".