Mercurial > hg > orthanc-book
changeset 379:c9fe3d0d0fa1
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 08 Apr 2020 08:49:59 +0200 |
parents | 16dc3561b41e (current diff) ffe62e6c086f (diff) |
children | 06ab5ab05a2d 64b32cb19571 |
files | Sphinx/source/plugins/python.rst Sphinx/source/users/rest.rst |
diffstat | 3 files changed, 26 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Sphinx/source/plugins/python.rst Wed Apr 08 08:49:33 2020 +0200 +++ b/Sphinx/source/plugins/python.rst Wed Apr 08 08:49:59 2020 +0200 @@ -161,6 +161,30 @@ C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=2.7 -DPYTHON_WINDOWS_ROOT=C:/Python27 \ -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 15 2017" +**Note about debug builds**: usually, building Python modules such as the Python +plugin for Orthanc in debug mode (where ``_DEBUG`` is defined) leads to a module +(.exe or .dll) that requires a debug build of Python, and debug versions of all +the Python libraries. This is quite cumbersome, for it requires building Python +on your own or downloading additional debug files. + +Since using a debug build of Python is only necessary in very specific cases +(such as the debugging of code at the boundary between Python and an extension), +we have changed the default behavior to use the release Python library by default. + +This means that you are able to build this plugin in debug mode with the +standard Python distribution. + +In case you need to use the Python debug libraries, you can instruct the build +system to do so by setting the ``PYTHON_WINDOWS_USE_RELEASE_LIBS`` CMake option, +that is ``ON`` by default, to ``OFF``. The previous build example would then be, +should you require a full debug build:: + + C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=2.7 -DPYTHON_WINDOWS_ROOT=C:/Python27 \ + -DSTATIC_BUILD=ON -DPYTHON_WINDOWS_USE_RELEASE_LIBS=OFF \ + -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 15 2017" + +Please note that this CMake option only impacts **debug** builds under Windows, +when using (any version of) the Microsoft Visual Studio compiler. Configuration options ---------------------
--- a/Sphinx/source/users/advanced-rest.rst Wed Apr 08 08:49:33 2020 +0200 +++ b/Sphinx/source/users/advanced-rest.rst Wed Apr 08 08:49:59 2020 +0200 @@ -187,7 +187,7 @@ # create the json data $params = @{Tags = @{PatientName = "Benjamino";Modality = "CT"};Content= "data:application/pdf;base64,$fileInBase64"} - # disabling progress bar tremendously increases the Invoke-RestMethod call + # disabling the progress bar makes the Invoke-RestMethod call MUCH faster $ProgressPreference = 'SilentlyContinue' # upload it to Orthanc
--- a/Sphinx/source/users/rest.rst Wed Apr 08 08:49:33 2020 +0200 +++ b/Sphinx/source/users/rest.rst Wed Apr 08 08:49:59 2020 +0200 @@ -69,7 +69,7 @@ If you are using Powershell (>= 3.0), you can use the following to send a single Dicom instance to Orthanc:: - # disabling progress bar tremendously increases the Invoke-RestMethod call + # disabling the progress bar makes the Invoke-RestMethod call MUCH faster $ProgressPreference = 'SilentlyContinue' # upload it to Orthanc