Windows packaging

This section describes the recommended build configuration for building official plastimatch windows binaries.

You should have a working virtual machine, as described in Windows virtual machine.

As of plastimatch 1.9.0, the following build tools are used:

QEMU/KVM        3.1               (Debian host)
MS Windows      10                (Windows 10 Pro)
Visual Studio   14.0.25431.01     (Aka MSVC Community 2015 Update 3)
CMake           3.17.0
WiX             3.11

And the following third party libraries are used:

CUDA            8.0 GA2           (64 bit only)
DCMTK           3.6.5             (Build separate 32 & 64 bit)
FFTW            3.3.5             (Download separate 32 & 64 bit)
ITK             4.13.2            (Build separate 32 & 64 bit)

NVIDIA deprecated support for 32-bit CUDA as of version 7.0. Therefore, plastimatch does not offer CUDA in its 32-bit binary download.

  1. Build DCMTK

    1. Use fresh build directory

    2. Set BUILD_APPS to OFF

    3. Set BUILD_SHARED_LIBS to ON

    4. Set DCMTK_OVERWRITE_WIN32_COMPILE_FLAGS to OFF

  2. Build ITK

    1. Use fresh build directory

    2. Set BUILD_SHARED_LIBS to ON

    3. Set Module_ITKReview to ON

    4. Set ITK_SKIP_PATH_LENGTH_CHECKS to ON

    5. Set CMAKE_INSTALL_PREFIX c:/Users/grego/install/{32,64}/ITK-{version}

    6. Make and install

  3. Build plastimatch

    1. Use fresh build directory

    2. Set GIT_EXECUTABLE to “git” or “wsl git” as appropriate

    3. Set BUILD_SHARED to ON

    4. For 32-bit build, set PLM_CONFIG_ENABLE_CUDA to OFF

    5. For 64-bit build, set PLM_CUDA_ALL_DEVICES to ON

    6. If using CUDA 9, one should set CUDA_HOST_COMPILER manually for the 64-bit build. See: https://github.com/opencv/opencv/issues/9908

  4. Run test cases, make sure all pass

  5. Build PACKAGE

  6. Test package on fresh VM

  7. Upload to sourceforge:

    sftp gregsharp@frs.sourceforge.net
    cd /home/pfs/project/plastimatch/Windows\ Binaries
    lcd ~/build/32/plastimatch-1.8.0
    put Plastimatch-1.8.0-win32.msi
    lcd ~/build/64/plastimatch-1.8.0
    put Plastimatch-1.8.0-win64.msi