X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2FwxContourGUIExample%2FwxContourGUIExample.cxx;h=fb162fe85278086ead1ec9ccc33882e1e796d77d;hb=11655d90501504ddcb8df4e4091f5770f607cac1;hp=8fb4a1002810a2d846f516b2f3297bc841255e2d;hpb=383158b7df6b1d0a4c95177979219eb30472dbde;p=creaContours.git diff --git a/appli/wxContourGUIExample/wxContourGUIExample.cxx b/appli/wxContourGUIExample/wxContourGUIExample.cxx index 8fb4a10..fb162fe 100644 --- a/appli/wxContourGUIExample/wxContourGUIExample.cxx +++ b/appli/wxContourGUIExample/wxContourGUIExample.cxx @@ -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; -} //========================================================================= //========================================================================= @@ -136,7 +112,7 @@ bool wxTheApplication :: OnInit() //JCP //std::string datadir( crea::wx2std(GetExecutablePath()) ); - std::string datadir( GetExecutablePath() ); + std::string datadir( crea::System::GetExecutablePath() ); //JCP #ifdef LINUX /* assume this is OSX */