]> Creatis software - creaContours.git/blobdiff - appli/wxContourGUIExample/wxContourGUIExample.cxx
no message
[creaContours.git] / appli / wxContourGUIExample / wxContourGUIExample.cxx
index dc32ca0c496dce5aa6ee439ef893c0cef8d53ebe..fb162fe85278086ead1ec9ccc33882e1e796d77d 100644 (file)
@@ -64,31 +64,7 @@ wxContourMainFrame* wxTheApplication::frame = 0;
 
 
 
-#if defined(_WIN32)
-#define CREACONTOUR_VALID_FILE_SEPARATOR_CHAR '\\'
-#else
-#define CREACONTOUR_VALID_FILE_SEPARATOR_CHAR '/'
-#endif
 
-//=========================================================================
-std::string GetExecutablePath()
-{
-    char name[PATH_MAX];
-       //EED    int err = get_app_path(name, PATH_MAX);
-       int err = crea::System::GetAppPath(name,PATH_MAX);
-    if (err) 
-       {
-               printf("Could not determine current executable path ?  ");  
-       }    
-    // remove the exe name
-    char *slash;               
-    slash = strrchr(name, CREACONTOUR_VALID_FILE_SEPARATOR_CHAR);
-    if (slash)
-       {
-               *slash = 0;
-       }
-    return name;
-}
 
 //=========================================================================
 //=========================================================================
@@ -120,7 +96,6 @@ bool wxTheApplication :: OnInit()
        int threads = 1;
 
        std::vector<vtkImageData*> images;
-       printf("EED wxContourGUIExample:OnInit 1\n");
        creaImageIO::WxGimmickReaderDialog w(0,
                                                                                -1,
                                                                                "creaContours_Descriptor.dscp",
@@ -133,12 +108,11 @@ bool wxTheApplication :: OnInit()
                                                                                threads);
   
        w.ShowModal();
-       printf("EED wxContourGUIExample:OnInit 2\n");
 
 
 //JCP
        //std::string datadir(  crea::wx2std(GetExecutablePath()) );    
-       std::string datadir(  GetExecutablePath() );
+       std::string datadir(  crea::System::GetExecutablePath() );
 //JCP
 
            #ifdef LINUX /* assume this is OSX */