Skip to content

Instantly share code, notes, and snippets.

@ischoegl
Last active November 2, 2020 03:07
Show Gist options
  • Save ischoegl/d5a2b490b92eee084931553eec597e1f to your computer and use it in GitHub Desktop.
Save ischoegl/d5a2b490b92eee084931553eec597e1f to your computer and use it in GitHub Desktop.
Toolchain for out-of-tree Micro-Manager device adapters

Toolchain for out-of-tree Micro-Manager device adapters

This toolchain was successfully used to compile device adapters for Micro-Manager on Windows 10 (last tested: August 2020). Steps are loosely based on official instructions, but I found that some steps no longer worked.

Steps will become obsolete once the (currently open) issue Migrate C++ build to Visual Studio 2015-2019 is resolved.

Windows7.1SDK

  • Download Windows7.1SDK iso from Microsoft's Download Center
  • Unzip, and run the installer within the setup folder (which avoids the check for .NET 4)
  • Make sure to have Visual C++ compilers unticked (this is broken and will fail to install, see post)
  • Apply patch KB2519277 (which applies VS2010 SP1)

Visual Studio 2010

  • Install Visual C++ 2010 Express
  • Upgrade to Visual Studio 2010 SP1
  • It is not necessary to run Visual Studio 2010

Visual Studio 2019 Community

  • Run installer, check Desktop development with C++

Micro-Manager

  • Download binaries

Compile Driver

  • Clone the micro-manager/micro-manager repository
  • Within MMDevice, open MMDevice-SharedRuntime.vcxproj, and compile
  • Within DeviceAdapters/<adapter>, open <adapter>.vcxproj, and compile
  • There may be some installation specific object paths that need to be adjusted, but that's not too difficult

Note that it is possible to compile device adapters with VS 2019 alone, but drivers won't work if dll's are copied to other machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment