这篇教程C++ wxGetEnv函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wxGetEnv函数的典型用法代码示例。如果您正苦于以下问题:C++ wxGetEnv函数的具体用法?C++ wxGetEnv怎么用?C++ wxGetEnv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wxGetEnv函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: get_pluckerhome_directory// Looks up the root directory, as needed by get_plucker_directory.// Don't use this function directly, use a get_plucker_directory() instead.wxString get_pluckerhome_directory(){ wxString pluckerhome_directory; #if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) bool pluckerhome_exists; pluckerhome_exists = wxGetEnv( wxT( "PLUCKERHOME" ), &pluckerhome_directory ); if ( ! pluckerhome_exists ) { pluckerhome_directory = wxGetHomeDir() << wxT( "/.plucker" ); }#endif #ifdef __WXMAC__ bool pluckerhome_exists; pluckerhome_exists = wxGetEnv( wxT( "PLUCKERHOME" ), &pluckerhome_directory ); if ( ! pluckerhome_exists ) { pluckerhome_directory = wxGetHomeDir() << wxT( "/Library/Plucker" ); }#endif #ifdef __WXMSW__ bool pluckerhome_exists; pluckerhome_exists = wxGetEnv( wxT( "PLUCKERHOME" ), &pluckerhome_directory ); if ( ! pluckerhome_exists ) { pluckerhome_directory = wxGetHomeDir() << wxT( "/Application Data/Plucker" ); }#endif return pluckerhome_directory;}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:35,
示例2: configvoid Application::checkEnvironment(){ wxString envVar; if (wxGetEnv("FR_HOME", &envVar)) config().setHomePath(translatePathMacros(envVar)); if (wxGetEnv("FR_USER_HOME", &envVar)) config().setUserHomePath(translatePathMacros(envVar));}
开发者ID:AlfiyaZi,项目名称:flamerobin,代码行数:8,
示例3: wxGetEnvAutoDetectResult CompilerMSVC::AutoDetectInstallationDir(){ wxString sep = wxFileName::GetPathSeparator(); // Read the VCToolkitInstallDir environment variable wxGetEnv(_T("VCToolkitInstallDir"), &m_MasterPath); if (m_MasterPath.IsEmpty()) { // just a guess; the default installation dir wxString Programs = _T("C://Program Files"); // what's the "Program Files" location // TO DO : support 64 bit -> 32 bit apps are in "ProgramFiles(x86)" // 64 bit apps are in "ProgramFiles" wxGetEnv(_T("ProgramFiles"), &Programs); m_MasterPath = Programs + _T("//Microsoft Visual C++ Toolkit 2003"); } if (!m_MasterPath.IsEmpty()) { AddIncludeDir(m_MasterPath + sep + _T("include")); AddLibDir(m_MasterPath + sep + _T("lib"));#ifdef __WXMSW__ // add include dirs for MS Platform SDK too wxRegKey key; // defaults to HKCR key.SetName(_T("HKEY_CURRENT_USER//Software//Microsoft//Win32SDK//Directories")); if (key.Exists() && key.Open(wxRegKey::Read)) { wxString dir; key.QueryValue(_T("Install Dir"), dir); if (!dir.IsEmpty()) { if (dir.GetChar(dir.Length() - 1) != '//') dir += sep; AddIncludeDir(dir + _T("include")); AddLibDir(dir + _T("lib")); m_ExtraPaths.Add(dir + _T("bin")); } } // add extra paths for "Debugging tools" too key.SetName(_T("HKEY_CURRENT_USER//Software//Microsoft//DebuggingTools")); if (key.Exists() && key.Open(wxRegKey::Read)) { wxString dir; key.QueryValue(_T("WinDbg"), dir); if (!dir.IsEmpty()) { if (dir.GetChar(dir.Length() - 1) == '//') dir.Remove(dir.Length() - 1, 1); m_ExtraPaths.Add(dir); } }#endif // __WXMSW__ } return wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;}
开发者ID:Three-DS,项目名称:codeblocks-13.12,代码行数:58,
示例4: wxSetEnvvoid CrtTestCase::SetGetEnv(){ wxString val; wxSetEnv(_T("TESTVAR"), _T("value")); CPPUNIT_ASSERT( wxGetEnv(_T("TESTVAR"), &val) == true ); CPPUNIT_ASSERT( val == _T("value") ); wxSetEnv(_T("TESTVAR"), _T("something else")); CPPUNIT_ASSERT( wxGetEnv(_T("TESTVAR"), &val) ); CPPUNIT_ASSERT( val == _T("something else") ); CPPUNIT_ASSERT( wxUnsetEnv(_T("TESTVAR")) ); CPPUNIT_ASSERT( wxGetEnv(_T("TESTVAR"), NULL) == false );}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:12,
示例5: get_temp_dirwxStringget_temp_dir() { wxString temp_dir; wxGetEnv(wxT("TMP"), &temp_dir); if (temp_dir == wxEmptyString) wxGetEnv(wxT("TEMP"), &temp_dir); if ((temp_dir == wxEmptyString) && wxDirExists(wxT("/tmp"))) temp_dir = wxT("/tmp"); if (temp_dir != wxEmptyString) temp_dir += wxT(PATHSEP); return temp_dir;}
开发者ID:ProfOh,项目名称:mkvtoolnix,代码行数:14,
示例6: GetKicadConfigPath/* * GetKicadConfigPath() is taken from KiCad's common.cpp source: * Copyright (C) 2014-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2008-2015 Wayne Stambaugh <[email C++ wxGetHomeDir函数代码示例 C++ wxGetDisplay函数代码示例
|