/* $(prefix)/share/mmex/res */ const wxFileName mmex::GetResourceDir() { static wxFileName fname; if (!fname.IsOk()) { fname = GetSharedDir(); fname.AppendDir("res"); } return fname; }
const wxFileName mmex::GetDocDir() { static wxFileName fname; if (!fname.IsOk()) { fname = GetSharedDir(); fname.AppendDir("doc"); } return fname; }
const wxString mmex::getPathShared(ESharedFile f) { static const wxString files[SHARED_FILES_MAX] = { "locale" }; wxASSERT(f >= 0 && f < SHARED_FILES_MAX); wxString path = files[f]; path.Replace("/",wxFILE_SEP_PATH); return path.Prepend(GetSharedDir().GetPathWithSep()); }
/* $(prefix)/share/doc/mmex */ const wxFileName mmex::GetDocDir() { static wxFileName fname; if (!fname.IsOk()) { fname = GetSharedDir(); const wxArrayString &dirs = fname.GetDirs(); if (dirs.Last().Lower() == GetAppName()) fname.RemoveLastDir(); // mmex folder fname.AppendDir("doc"); fname.AppendDir(GetAppName()); } return fname; }