]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
MEDFile: on Windows - symbolic links need to escalate user privileges - do a copy
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 18 Oct 2022 09:16:13 +0000 (11:16 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 18 Oct 2022 09:16:13 +0000 (11:16 +0200)
products/medfile.pyconf
products/patches/med-4.1.1-symlink-or-copy.patch [new file with mode: 0644]

index 37c5e070e43f535e8c0b46324a7e3cd2a64df13b..1ebb4c06adcd7c15921136978bbcdaed72601563 100644 (file)
@@ -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 (file)
index 0000000..b0b2f60
--- /dev/null
@@ -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)