#include "wx/wxprec.h"
#include <wx/datetime.h>
#include <wx/wx.h>
#include <wx/log.h>
#include <vtkDebugLeaks.h>
#include "wxMaracasFrame02.h"
#include "wxMaracasApp02.h"
#include "marGdcmDicom.h"
Go to the source code of this file.
Functions | |
wxString | getExecutablePath () |
IMPLEMENT_APP (wxMaracasApp02) |
wxString getExecutablePath | ( | ) |
Definition at line 65 of file wxMaracasApp02.cxx.
Referenced by wxMaracasApp02::OnInit().
00066 { 00067 char buf[512]; 00068 char* slash; 00069 00070 #if defined(WIN32) 00071 GetModuleFileName(NULL, buf, 511); 00072 slash = strrchr(buf, '\\'); 00073 if (slash) 00074 { 00075 *slash = 0; 00076 } 00077 #elif defined(__LINUX__) 00078 int res; 00079 res = readlink("/proc/self/exe", buf, 512); 00080 if (res == -1) 00081 return _T(""); 00082 buf[res] = 0; 00083 slash = strrchr(buf, '/'); 00084 if (slash) 00085 { 00086 *slash = 0; 00087 } 00088 #else 00089 return ""; 00090 #endif 00091 00092 return wxString(buf, wxConvUTF8 ); 00093 }
IMPLEMENT_APP | ( | wxMaracasApp02 | ) |