]> Creatis software - crea.git/commitdiff
#3214 creaFeature New Normal - vtk8itk4wx3-mingw64
authorEduardo Davila <davila@ei-ed-606.creatis.insa-lyon.fr>
Tue, 28 Aug 2018 13:06:21 +0000 (15:06 +0200)
committerEduardo Davila <davila@ei-ed-606.creatis.insa-lyon.fr>
Tue, 28 Aug 2018 13:06:21 +0000 (15:06 +0200)
cmake/CREAMacro_FindAndUseWxWidgets.cmake
lib/creaDevManagerLib/CDMUtilities.h
src/creaRTTI.cxx
src/creaRTTI.h

index 0c2494f583e7b982f51638295cd1d507e645abd5..b10b9f7212f54f45e4d662649a33c88635ceae7b 100644 (file)
@@ -56,8 +56,16 @@ MACRO(CREA_FIND_WXWIDGETS)
   ELSE(WIN32)
 
          MESSAGE ( "===============Manual wx-config 3 EED =======================")
+
+##2018-08-28     
+if(APPLE)
       SET(wxWidgets_CONFIG_EXECUTABLE /usr/bin/wx-config-3.0 CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
          SET(wxWidgets_wxrc_EXECUTABLE /usr/bin/wxrc-3.0 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE)
+elseif(UNIX)
+      SET(wxWidgets_CONFIG_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/bin/wx-config CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
+         SET(wxWidgets_wxrc_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/bin/wxrc-3.0 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE)
+endif()
+
 
 #      MESSAGE ( "===============Manual wx-config 2 EED =======================")
 #      SET(wxWidgets_CONFIG_EXECUTABLE /usr/bin/wx-config-2.0 CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
@@ -79,7 +87,7 @@ MACRO(CREA_FIND_WXWIDGETS)
   
     SET(WXAUILIBS "aui")
     # LG : These options should be set by the user at top level of crea
-    FIND_PACKAGE(wxWidgets COMPONENTS base core adv html
+    FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS base core adv html
       ${WXAUILIBS}
       ${WXGLCANVASLIBS})
     #
@@ -91,6 +99,7 @@ MACRO(CREA_FIND_WXWIDGETS)
     ENDIF(NOT wxWidgets_FOUND)
   ENDIF(WIN32)
   
+MESSAGE ( "EEEE")
 
 
 ENDMACRO(CREA_FIND_WXWIDGETS)
@@ -131,6 +140,8 @@ MACRO(CREA_USE_WXWIDGETS)
                                "${wxWidgets_LIB_DIR}/libwxmsw30u_html.a"   
                                "${wxWidgets_LIB_DIR}/libwxmsw30u_adv.a" )        
   ELSE(WIN32)
+  
+  
 ##    # GTK2
 ##    INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
 ##    LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS})
@@ -141,7 +152,6 @@ MACRO(CREA_USE_WXWIDGETS)
     LINK_LIBRARIES(${GTK3_LIBRARIES} )
     # WX
 
-
 #    INCLUDE( ${GTK_USE_FILE} )
     INCLUDE( ${wxWidgets_USE_FILE} )
     MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE)
@@ -151,8 +161,7 @@ MACRO(CREA_USE_WXWIDGETS)
 ##      ${GTK2_LIBRARIES}
       ${GTK3_LIBRARIES}
       #${GTK_LIBRARIES}
-
-      ${wxWidgets_LIBRARIES}
+      ${wxWidgets_LIBRARIES}      
       )
 
   ENDIF(WIN32)
index 4558c18315f407225ef0e71dfbf3f02ff286ed02..2ba3250a6a954fcfb1ae8d900a7ae22cb2af7a66 100644 (file)
@@ -63,6 +63,7 @@ namespace CDMUtilities
 #elif __APPLE__
   // ------ Apple
   //TODO: implementation for apple
+  static std::string TEXT_EDITOR = "open -e";
 #else
   static std::string TEXT_EDITOR = "gedit";
 #endif
@@ -76,6 +77,7 @@ namespace CDMUtilities
 #elif __APPLE__
   // ------ Apple
   //TODO: implementation for apple
+  static std::string FILE_EXPLORER = "open ";
 #else
   static std::string FILE_EXPLORER = "nautilus";
 #endif
@@ -89,6 +91,7 @@ namespace CDMUtilities
 #elif __APPLE__
   // ------ Apple
   //TODO: implementation for apple
+  static std::string TERMINAL = "open -a Terminal ";  
 #else
   static std::string TERMINAL = "gnome-terminal";
 #endif
index 635d9daddfcbd945ca0055bc841b2d7f0a2e62c1..d997215854e40ab7802d1209c40893aea48b2400 100644 (file)
@@ -62,43 +62,41 @@ namespace crea
                     << " to " << TypeName(target_type) << std::endl);
 
     void* target_pointer = 0;
-#if __GNUC__ > 3 ||                                    \
-  (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 ||             \
-                    (__GNUC_MINOR__ == 1 &&            \
-                     __GNUC_PATCHLEVEL__ > 0)))
-    
-    const abi::__class_type_info* targetTI = 
-      (const abi::__class_type_info *)( &(target_type));
     
+  
+  
+#if __APPLE__
+//EED2018-08-28  Be careful  #include <typeinfo> is not complete  (CommandLine mechanisme Xcode)
+printf("EED creaRTTI  run_time_up_or_down_cast   2018-08-28 Warnning !!!!  Apple cast missing  __do_upcast   ")
+       return source_pointer;
+#else
+ #if __GNUC__ > 3 ||                                   \
+   (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 ||            \
+                    (__GNUC_MINOR__ == 1 &&            \
+                     __GNUC_PATCHLEVEL__ > 0)))    
+    const abi::__class_type_info* targetTI = (const abi::__class_type_info *)( &(target_type));
     creaDebugMessage("info",7," * source   = "<<source_pointer<<std::endl);
-
     void* tmp = source_pointer;
     if (source_type.__do_upcast(targetTI,&tmp))
-      {
-       target_pointer = tmp;
-      }
-    else 
-      {
-       creaDebugMessage("info",7,
-                        " * upcast failed : trying dynamic down cast"
-                        <<std::endl);
-       const abi::__class_type_info* sourceTI = 
-         (const abi::__class_type_info *)( &(source_type));
-       
-       
+    {
+               target_pointer = tmp;
+    } else {
+               creaDebugMessage("info",7, " * upcast failed : trying dynamic down cast" <<std::endl);
+               const abi::__class_type_info* sourceTI = (const abi::__class_type_info *)( &(source_type));
        target_pointer = abi::__dynamic_cast(source_pointer, 
                                             sourceTI, 
                                             targetTI, 
                                             -1);   
       }
-    
     creaDebugMessage("info",7," * target   = "<<target_pointer<<std::endl);
-    
-#else
+  #else
     creaWarning("run_time_up_or_down_cast not impl. on Win : to do");
     // target_pointer = __RTDynamicCast(source_pointer, 0, source_type, target_type, 0);
-#endif
+  #endif
     return target_pointer;
+#endif 
+
     
   }
 
index 86bf0fea5d6b00645c03d6c001505328add8fcf8..d9cb69635df6f3448786b70ea65ffaea9ff6f5d8 100644 (file)
   (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 ||             \
                     (__GNUC_MINOR__ == 1 &&            \
                      __GNUC_PATCHLEVEL__ > 0)))
+                     
 #include <cxxabi.h>
 #include <stdlib.h>
+
 namespace crea
 {
   inline std::string demangle_type_name(const char* name)