+ return wxStandardPathsBase::GetExecutablePath();
+}
+
+void wxStandardPaths::DetectPrefix()
+{
+ // we can try to infer the prefix from the location of the executable
+ wxString exeStr = GetExecutablePath();
+ if ( !exeStr.empty() )
+ {
+ // consider that we're in the last "bin" subdirectory of our prefix
+ size_t pos = exeStr.rfind(wxT("/bin/"));
+ if ( pos != wxString::npos )
+ m_prefix.assign(exeStr, 0, pos);
+ }
+
+ if ( m_prefix.empty() )
+ {
+ m_prefix = wxT("/usr/local");
+ }
+}
+
+wxString wxStandardPaths::GetInstallPrefix() const
+{
+ if ( m_prefix.empty() )
+ {
+ wxStandardPaths *pathPtr = wx_const_cast(wxStandardPaths *, this);
+ pathPtr->DetectPrefix();