From: Nabil Ghodbane Date: Tue, 18 Oct 2022 09:16:13 +0000 (+0200) Subject: MEDFile: on Windows - symbolic links need to escalate user privileges - do a copy X-Git-Tag: V9_11_0~227 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2703640f4e4212b9a6df07e20b25b06a8a5b4f5e;p=tools%2Fsat_salome.git MEDFile: on Windows - symbolic links need to escalate user privileges - do a copy --- diff --git a/products/medfile.pyconf b/products/medfile.pyconf index 37c5e07..1ebb4c0 100644 --- a/products/medfile.pyconf +++ b/products/medfile.pyconf @@ -42,7 +42,7 @@ version_4_1_1 : version_4_1_1_win : { compil_script : "medCMake.bat" - patches : ['med-4.1.0_win_3x_files_support.patch'] + patches : ['med-4.1.0_win_3x_files_support.patch', 'med-4.1.1-symlink-or-copy.patch'] } # needed in order to screen with windows version - see below diff --git a/products/patches/med-4.1.1-symlink-or-copy.patch b/products/patches/med-4.1.1-symlink-or-copy.patch new file mode 100644 index 0000000..b0b2f60 --- /dev/null +++ b/products/patches/med-4.1.1-symlink-or-copy.patch @@ -0,0 +1,16 @@ +--- med-4.1.1_ref/tools/mdump/CMakeLists.txt 2019-09-23 19:24:11.000000000 +0200 ++++ med-4.1.1_new/tools/mdump/CMakeLists.txt 2022-10-18 11:12:17.319703000 +0200 +@@ -44,6 +44,10 @@ + CONFIGURE_FILE(xmdump4.in ${PROJECT_BINARY_DIR}/xmdump4 @ONLY) + + INSTALL(PROGRAMS ${PROJECT_BINARY_DIR}/xmdump2 ${PROJECT_BINARY_DIR}/xmdump3 ${PROJECT_BINARY_DIR}/xmdump4 DESTINATION bin) +-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink mdump4 mdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)") +-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink xmdump4 xmdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)") +- ++IF(WIN32) ++ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy mdump4.exe mdump.exe WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)") ++ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy xmdump4 xmdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)") ++ELSE(WIN32) ++ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink mdump4 mdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)") ++ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink xmdump4 xmdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)") ++ENDIF(WIN32)