# HG changeset patch # User Sebastien Jodogne # Date 1477494684 -7200 # Node ID 021482366dacaa65da18271d7d0060ec8611071f # Parent 62adabb8c12243fcb3f64242450787fd749ab359 Windows resources for command-line tools diff -r 62adabb8c122 -r 021482366dac Applications/CMakeLists.txt --- a/Applications/CMakeLists.txt Wed Oct 26 16:53:54 2016 +0200 +++ b/Applications/CMakeLists.txt Wed Oct 26 17:11:24 2016 +0200 @@ -109,6 +109,7 @@ SRGB_ICC_PROFILE ${ORTHANC_WSI_DIR}/Resources/sRGB.icc ) + add_library(OrthancWSIFramework STATIC #${ORTHANC_WSI_DIR}/Framework/Messaging/PluginOrthancConnection.cpp ${ORTHANC_WSI_DIR}/Framework/Algorithms/PyramidReader.cpp @@ -194,9 +195,28 @@ ## Build the WSI DICOM-izer ##################################################################### +# Create the Windows resources, if need be +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py + ${ORTHANC_WSI_VERSION} OrthancWSIDicomizer OrthancWSIDicomizer.exe "Companion tool to Orthanc for whole-slide imaging" + ERROR_VARIABLE Failure + OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomizer.rc + ) + + if (Failure) + message(FATAL_ERROR "Error while computing the version information: ${Failure}") + endif() + + set(DICOMIZER_RESOURCES ${AUTOGENERATED_DIR}/OrthancWSIDicomizer.rc) +endif() + + add_executable(OrthancWSIDicomizer Dicomizer.cpp ApplicationToolbox.cpp + ${DICOMIZER_RESOURCES} ) target_link_libraries(OrthancWSIDicomizer OrthancWSIFramework ${DCMTK_LIBRARIES}) @@ -211,9 +231,28 @@ ## Build the DICOM-to-TIFF conversion tool ##################################################################### +# Create the Windows resources, if need be +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py + ${ORTHANC_WSI_VERSION} OrthancWSIDicomToTiff OrthancWSIDicomToTiff.exe "Companion tool to Orthanc for whole-slide imaging" + ERROR_VARIABLE Failure + OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomToTiff.rc + ) + + if (Failure) + message(FATAL_ERROR "Error while computing the version information: ${Failure}") + endif() + + set(DICOM_TO_TIFF_RESOURCES ${AUTOGENERATED_DIR}/OrthancWSIDicomToTiff.rc) +endif() + + add_executable(OrthancWSIDicomToTiff DicomToTiff.cpp ApplicationToolbox.cpp + ${DICOM_TO_TIFF_RESOURCES} ) target_link_libraries(OrthancWSIDicomToTiff OrthancWSIFramework ${DCMTK_LIBRARIES}) diff -r 62adabb8c122 -r 021482366dac NEWS --- a/NEWS Wed Oct 26 16:53:54 2016 +0200 +++ b/NEWS Wed Oct 26 17:11:24 2016 +0200 @@ -2,7 +2,8 @@ =============================== * Docker images are available -* Provide "--version" in command-line tools +* Provide "--version" flag in command-line tools +* Windows resources for command-line tools * Fix freeze if the target Orthanc is not accepting images