# HG changeset patch # User Alain Mazy # Date 1699905401 -3600 # Node ID a3590caf93a3c3a8516f6dfa0cb226478478fe8a # Parent fdc007216fde9f87a0a74f2c0aa2925e9eb4cf87 sync orthanc folder diff -r fdc007216fde -r a3590caf93a3 Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake --- 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 ) diff -r fdc007216fde -r a3590caf93a3 Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp --- 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() { diff -r fdc007216fde -r a3590caf93a3 Common/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h --- 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(); diff -r fdc007216fde -r a3590caf93a3 Common/Resources/SyncOrthancFolder.py --- 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