+const wxChar *wxGetInstallPrefix()
+{
+ wxString prefix;
+
+ if ( wxGetEnv(wxT("WX_PREFIX"), &prefix) )
+ return prefix.c_str();
+
+#ifdef wxINSTALL_PREFIX
+ return wxT(wxINSTALL_PREFIX);
+#else
+ return wxT("");
+#endif
+}
+
+wxString wxGetDataDir()
+{
+ wxString format = wxGetInstallPrefix();
+ format << wxFILE_SEP_PATH
+ << wxT("share") << wxFILE_SEP_PATH
+ << wxT("wx") << wxFILE_SEP_PATH
+ << wxT("%i.%i");
+ wxString dir;
+ dir.Printf(format.c_str(), wxMAJOR_VERSION, wxMINOR_VERSION);
+ return dir;
+}
+
+