mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 01:20:02 +02:00
commit
a61c5e0206
111
README.md
111
README.md
@ -2,90 +2,67 @@
|
|||||||
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)
|
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)
|
||||||
|
|
||||||
### Binaries
|
### Binaries
|
||||||
Documentation to obtain the binaries via the conda package is available for [lib](https://github.com/slsdetectorgroup/sls_detector_lib) and [gui](https://github.com/slsdetectorgroup/sls_detector_gui)
|
Binaries for the slsDetectorPackage are available through conda.
|
||||||
|
```
|
||||||
|
#Add conda channels
|
||||||
|
conda config --add channels conda-forge
|
||||||
|
conda config --add channels slsdetectorgroup
|
||||||
|
|
||||||
|
conda install slsdetlib #only shared lib and command line
|
||||||
|
conda install slsdet #python bindings (includes slsdetlib)
|
||||||
|
conda install slsdetgui #gui (includes qt4)
|
||||||
|
|
||||||
|
#Install specific version
|
||||||
|
conda install slsdet=2020.03.02.dev0 #developer version from 3 March 2020
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
### Source code
|
### Source code
|
||||||
One can also obtain the source code from this repository and compile while realizing the setup dependencies as required.
|
One can also obtain the source code from this repository and compile.
|
||||||
```
|
```
|
||||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||||
|
|
||||||
```
|
```
|
||||||
#### Setup dependencies
|
#### Dependencies
|
||||||
* Gui Client <br>
|
* Lib: c++11 compiler (gcc=>4.8), ZeroMQ 4
|
||||||
Requirements: Qt 4.8 and Qwt 6.0
|
* Gui: Qt 4.8 and Qwt 6.0
|
||||||
```
|
* Calibration wizards and ctbGUI: ROOT
|
||||||
export QTDIR=/usr/local/Trolltech/
|
* Optional: HDF5
|
||||||
export QWTDIR=/usr/local/qwt-6.0.1/
|
|
||||||
```
|
|
||||||
If either of them does not exist, the GUI client will not be built.
|
|
||||||
|
|
||||||
* Advanced user Calibration wizards<br>
|
|
||||||
Requirements: ROOT
|
|
||||||
```
|
|
||||||
export ROOTSYS=/usr/local/root-5.34
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Compilation
|
#### Compilation
|
||||||
|
|
||||||
Compiling can be done in two ways.
|
Compiling can be done in two ways. Either with the convenience script
|
||||||
|
cmk.sh or directly with cmake for more control.
|
||||||
|
|
||||||
**1. Compile using script cmk.sh**<br>
|
**1. Compile using script cmk.sh**<br>
|
||||||
|
|
||||||
After compiling, the libraries and executables will be found in `slsDetectorPackage/build/bin` directory<br>
|
After compiling, the libraries and executables will be found in `slsDetectorPackage/build/bin` directory<br>
|
||||||
|
|
||||||
Usage: [-c] [-b] [-h] [-d HDF5 directory] [-j]<br>
|
Usage: [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [-h] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||||
* -[no option]: only make<br>
|
-[no option]: only make
|
||||||
* -c: Clean<br>
|
-c: Clean
|
||||||
* -b: Builds/Rebuilds CMake files normal mode<br>
|
-b: Builds/Rebuilds CMake files normal mode
|
||||||
* -h: Builds/Rebuilds Cmake files with HDF5 package<br>
|
-p: Builds/Rebuilds Python API
|
||||||
* -d: HDF5 Custom Directory<br>
|
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||||
* -t: Build/Rebuilds only text client<br>
|
-d: HDF5 Custom Directory
|
||||||
* -r: Build/Rebuilds only receiver<br>
|
-t: Build/Rebuilds only text client
|
||||||
* -g: Build/Rebuilds only gui<br>
|
-r: Build/Rebuilds only receiver
|
||||||
* -j: Number of threads to compile through<br>
|
-g: Build/Rebuilds only gui
|
||||||
* -e: Debug mode
|
-s: Simulator
|
||||||
|
-u: Chip Test Gui
|
||||||
Basic Option:
|
-j: Number of threads to compile through
|
||||||
./cmk.sh -b
|
-e: Debug mode
|
||||||
|
-i: Builds tests
|
||||||
For only make:
|
|
||||||
./cmk.sh
|
|
||||||
|
|
||||||
For make clean;make:
|
|
||||||
./cmk.sh -c
|
|
||||||
|
|
||||||
For using hdf5 without custom dir /blabla:
|
|
||||||
./cmk.sh -h -d /blabla
|
|
||||||
|
|
||||||
For rebuilding cmake without hdf5
|
|
||||||
./cmk.sh -b
|
|
||||||
|
|
||||||
For using multiple cores to compile faster:
|
|
||||||
./cmk.sh -j9<br>
|
|
||||||
|
|
||||||
|
|
||||||
For rebuilding only certain sections<br>
|
|
||||||
./cmk.sh -tg #only text client and gui<br>
|
|
||||||
./cmk.sh -r #only receiver<br>
|
|
||||||
|
|
||||||
|
eg. Rebuild when you switch to a new build and compile in parallel:
|
||||||
|
./cmk.sh -bj5
|
||||||
|
|
||||||
**2. Compile without script**<br>
|
**2. Compile without script**<br>
|
||||||
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory.
|
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers.
|
||||||
```
|
```
|
||||||
$ cd ..
|
$ mkdir build
|
||||||
$ mkdir slsDetectorPackage-build
|
$ cd build
|
||||||
$ cd slsDetectorPackage-build
|
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
|
||||||
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_HDF5=OFF
|
$ make -j12 #or whatever number of threads wanted
|
||||||
$ make
|
|
||||||
```
|
|
||||||
|
|
||||||
Use the following as an example to compile statically and using specific hdf5 folder
|
|
||||||
```
|
|
||||||
$ HDF5_ROOT=/opt/hdf5v1.10.0 cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_HDF5=ON
|
|
||||||
```
|
|
||||||
After compiling, the libraries and executables will be found at `bin` directory
|
|
||||||
```
|
|
||||||
$ ls bin/
|
|
||||||
gui_client libSlsDetector.a libSlsDetector.so libSlsReceiver.a libSlsReceiver.so
|
|
||||||
sls_detector_acquire sls_detector_get slsDetectorGui sls_detector_help sls_detector_put slsReceiver slsMultiReceiver
|
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user