paths.UseAppInfo(wxStandardPaths::AppInfo_None);
70wxStandardPathsBase& paths = wxGUIAppTraits().GetStandardPaths();
71paths.UseAppInfo(wxStandardPaths::AppInfo_None);
91wxString path1 = path, path2;
93 size_tpos = path.find_first_of(
wxT(
"\\/"));
94 if(pos != wxString::npos) {
95path1 = path.substr(0, pos);
96path2 = path.substr(pos + 1);
107 constwxString& subdir)
109wxString ret_val(path);
112ret_val = it->second;
114 if(ret_val ==
wxT(
"<bin>")) {
115 #if defined( NCBI_OS_DARWIN ) && !defined( _DEBUG ) 118wxFileName fname(
GetStdPath(), wxEmptyString );
119fname.AppendDir(
wxT(
"bin"));
120ret_val = fname.GetPath();
122}
else if(ret_val ==
wxT(
"<std>")) {
124}
else if(ret_val ==
wxT(
"<home>")) {
126}
else if(ret_val ==
wxT(
"<pkgdir>")) {
127wxFileName fname(
GetStdPath(), wxEmptyString);
128fname.AppendDir(
wxT(
"packages"));
129ret_val = fname.GetPath();
130}
else if(ret_val ==
wxT(
"<res>")) {
135 if( !subdir.empty() ) {
136ret_val += wxFileName::GetPathSeparator();
143 constwxString& delim)
145wxArrayString toks = ::wxStringTokenize(path, delim);
147 size_t count= toks.GetCount();
148 for(
size_t i= 0;
i<
count;
i++ ) {
149wxString p =
ResolvePath(toks[
i].Trim().Trim(
false));
150 if(wxFileName::FileExists(p))
154 returnwxEmptyString;
164::wxGetEnv(
wxT(
"NCBI_GBENCH_HOME"), &ret_val);
166 if(ret_val.empty()) {
169 if(!ret_val.empty()) {
170wxFileName fname(ret_val);
171 constwxArrayString& dirs = fname.GetDirs();
172 if(!dirs.IsEmpty() && dirs.Last() ==
wxT(
"bin"))
173fname.RemoveLastDir();
175ret_val = fname.GetPath();
179 if(ret_val.empty()) {
181<<
"Can't identify the application's execution path. " 182 "Some components may be unavailable.");
192wxFileName fname(path, wxEmptyString);
193fname.AppendDir(
wxT(
"share"));
194fname.AppendDir(
wxT(
"gbench"));
195 returnfname.GetPath();
211 if(!ret_val.empty()) {
212wxFileName fname(ret_val, wxEmptyString);
213 #if defined(NCBI_OS_MSWIN) || defined(NCBI_OS_DARWIN) 214fname.AppendDir(
wxT(
"GenomeWorkbench2"));
216fname.AppendDir(
wxT(
".gbench2"));
219fname.AppendDir(
wxT(
"instances"));
220fname.AppendDir(wxString::FromUTF8(
sm_Inst.c_str()));
223ret_val = fname.GetPath();
234wxString PATH =
wxT(
"PATH");
237::wxGetEnv(PATH, &base_path);
239 constwxChar path_sep =
247wxString::size_type pos = base_path.find(path);
253 for(;pos != wxString::npos; pos = base_path.find(path, pos)) {
254 if(pos > 0 && base_path[pos - 1] != path_sep) {
255pos += path.length();
258 if(pos + path.length() < base_path.length() && base_path[pos + 1] != path_sep) {
259pos += path.length();
263base_path.erase(pos, path.length());
278base_path += path_sep;
283::wxSetEnv(PATH, base_path);
EPathMode
Add an element to the environment's PATH variable.
static wxString GetHomePath(void)
the user-specific application-specific home directory corresponds to the <home> alias above.
static wxString GetResourcePath(void)
the shared resource path corresponds to the <res> alias above.
static void SetInst(const string &inst)
static wxString ResolvePath(const wxString &path, const wxString &rel_name)
Utility function to hide the platform specifics of locating our standard directories and files.
static void BindAlias(const wxString &alias, const wxString &path)
Bind an alias to an existing path The application expects certain aliases to be present; if they are ...
static TAliasMap sm_AliasMap
static wxString GetStdPath(void)
the applicaton installation directory.
static void AddToPath(const wxString &path, EPathMode mode=ePath_Prepend)
PATH variable manipulators.
static wxStandardPathsBase & GetStandardPaths()
static wxString ResolvePathExisting(const wxString &path, const wxString &delim=wxT(","))
Utility function to hide the platform specifics of locating our standard directories.
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Warning(CExceptionArgs_Base &args)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define DEFINE_STATIC_FAST_MUTEX(id)
Define static fast mutex and initialize it.
const TYPE & Get(const CNamedParameterList *param)
Multi-threading â mutexes; rw-locks; semaphore.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4