Only x64 builds are currently supported.
- Install Visual Studio 2019 or later with C++ Desktop Development,
Meson, and
CMake. Make sure
meson,ninja, andcmakeare on thePATH. - Install Becker-Hickl's TCSPC Package (make sure SPCM and SPCM-DLL are selected).
- In Git Bash, clone vcpkg (if you do not already have it) and this repo:
git clone https://github.com/microsoft/vcpkg.git
git clone https://github.com/openscan-lsm/OpenScan-BHSPC.git(Currently, vcpkg is used to obtain libzip conveniently.)
- Bootstrap vcpkg (if you have not done so yet) and install libzip. This should be done in PowerShell or Command Prompt, not Git Bash:
cd path\to\vcpkg
.\bootstrap-vcpkg -disableMetrics
.\vcpkg install libzip --triplet=x64-windows-static- Build OpenScan-BHSPC. This is best done in the Developer PowerShell for VS 2019 (or later), which can be started from the Start Menu (hint: type 'developer powershell' into the Start Menu to search).
Release build (optimized, no debug info):
cd path\to\OpenScan-BHSPC
meson setup builddir -Dvcpkgdir=C:\full\path\to\vcpkg -Db_vscrt=mt --buildtype release
meson compile -C builddirDebug build (unoptimized, with debug info):
cd path\to\OpenScan-BHSPC
meson setup builddir -Dvcpkgdir=C:\full\path\to\vcpkg -Db_vscrt=mtd --buildtype debug
meson compile -C builddirThis results in the module OpenScanBHSPC.osdev in builddir.
OpenScanBHSPC.osdev requires two files from the TCSPC Package to be available at runtime:
C:\Program Files (x86)\BH\SPCM\DLL\spcm64.dllmust be findable by the OSC:\Program Files (x86)\BH\SPCM\scpm.inimust be findable by this library
The primary use case for this project is within Micro-Manager. To use this library within Micro-Manager, it is easiest to copy OpenScanBHSPC.osdev and the two additional files into the micro-manager installation folder.
SPC modules can be simulated in OpenScan. Simulation will occur when OpenScan cannot find a physical device, however you must specify which device is being simulated. To do this, edit spcm.ini:
simulation = <your device> ; 0 - hardware mode(default) ,
; >0 - simulation mode (see spcm_def.h for possible values)
The number <your_device> comes from C:\Program Files (x86)\BH\SPCM\DLL\Spcm_def.h - you can find the list by searching for possible modes of DLL operation.