Mercurial > hg > orthanc-object-storage
changeset 117:a3590caf93a3 2.3.0
sync orthanc folder
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 13 Nov 2023 20:56:41 +0100 |
parents | fdc007216fde |
children | a5fd20b9dc56 |
files | Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Common/Resources/SyncOrthancFolder.py |
diffstat | 4 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Tue Oct 17 14:18:36 2023 +0200 +++ b/Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Mon Nov 13 20:56:41 2023 +0100 @@ -271,7 +271,7 @@ else() message("Forking the Orthanc source repository using Mercurial") execute_process( - COMMAND ${ORTHANC_FRAMEWORK_HG} clone "https://hg.orthanc-server.com/orthanc/" + COMMAND ${ORTHANC_FRAMEWORK_HG} clone "https://orthanc.uclouvain.be/hg/orthanc/" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE Failure )
--- a/Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Tue Oct 17 14:18:36 2023 +0200 +++ b/Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Mon Nov 13 20:56:41 2023 +0100 @@ -79,6 +79,10 @@ } } + void ResetGlobalContext() + { + globalContext_ = NULL; + } bool HasGlobalContext() {
--- a/Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Tue Oct 17 14:18:36 2023 +0200 +++ b/Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Mon Nov 13 20:56:41 2023 +0100 @@ -137,6 +137,8 @@ void SetGlobalContext(OrthancPluginContext* context); + void ResetGlobalContext(); + bool HasGlobalContext(); OrthancPluginContext* GetGlobalContext();
--- a/Common/Resources/SyncOrthancFolder.py Tue Oct 17 14:18:36 2023 +0200 +++ b/Common/Resources/SyncOrthancFolder.py Mon Nov 13 20:56:41 2023 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # This maintenance script updates the content of the "Orthanc" folder @@ -8,11 +8,11 @@ import multiprocessing import os import stat -import urllib2 +import urllib.request TARGET = os.path.join(os.path.dirname(__file__), 'Orthanc') PLUGIN_SDK_VERSION = '1.12.1' -REPOSITORY = 'https://hg.orthanc-server.com/orthanc/raw-file' +REPOSITORY = 'https://orthanc.uclouvain.be/hg/orthanc/raw-file' FILES = [ ('OrthancFramework/Resources/CMake/AutoGeneratedCode.cmake', 'CMake'), @@ -42,7 +42,7 @@ branch = x[0] source = x[1] target = os.path.join(TARGET, x[2]) - print target + print(target) try: os.makedirs(os.path.dirname(target)) @@ -51,9 +51,9 @@ url = '%s/%s/%s' % (REPOSITORY, branch, source) - with open(target, 'w') as f: + with open(target, 'wb') as f: try: - f.write(urllib2.urlopen(url).read()) + f.write(urllib.request.urlopen(url).read()) except: print('ERROR %s' % url) raise