From: John L. <jr...@us...> - 2010-11-23 04:28:56
|
Update of /cvsroot/wxlua/wxLua/apps/wxluafreeze/src In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv25025/src Modified Files: wxluafreeze.cpp Log Message: Replace tabs with spaces Use wxT() around string for unicode, "exe" extension. Index: wxluafreeze.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluafreeze/src/wxluafreeze.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxluafreeze.cpp 9 Nov 2010 06:05:43 -0000 1.18 --- wxluafreeze.cpp 23 Nov 2010 04:28:48 -0000 1.19 *************** *** 111,115 **** // Find the full path this this executable ! wxFileName appFile = wxFindAppFullName(argv[0], wxGetCwd(), wxEmptyString); if (appFile.FileExists() == false) --- 111,115 ---- // Find the full path this this executable ! wxFileName appFile = wxFindAppFullName(argv[0], wxGetCwd(), wxEmptyString); if (appFile.FileExists() == false) *************** *** 273,320 **** wxFileName wxFindAppFullName(const wxString& argv0, const wxString& cwd, const wxString& appVariableName) { ! wxFileName fileName(argv0); ! wxString str; ! wxString path; #if defined(__WXMSW__) ! if (!fileName.HasExt()) ! fileName.SetExt("exe"); #endif ! // Try appVariableName ! if (!appVariableName.IsEmpty()) ! path = wxGetenv(appVariableName); #if defined(__WXMAC__) && !defined(__DARWIN__) ! // On Mac, the current directory is the relevant one when ! // the application starts. ! if (path.IsEmpty()) ! path = cwd; #endif ! if (path.IsEmpty()) ! { ! if (wxIsAbsolutePath(fileName.GetFullPath())) ! path = fileName.GetFullPath(); ! else ! { ! // Is it a relative path? ! wxString currentDir(cwd); ! if (currentDir.Last() != wxFILE_SEP_PATH) ! currentDir += wxFILE_SEP_PATH; ! if (wxFileExists(currentDir + fileName.GetFullName())) ! path = currentDir; ! } ! } ! if (path.IsEmpty()) ! { ! // OK, it's neither an absolute path nor a relative path. ! // Search PATH. ! wxPathList pathList; ! pathList.AddEnvList(wxT("PATH")); ! path = wxFileName(pathList.FindAbsoluteValidPath(fileName.GetFullName())).GetPath(); ! } ! fileName.SetPath(path); ! return fileName; } --- 273,320 ---- wxFileName wxFindAppFullName(const wxString& argv0, const wxString& cwd, const wxString& appVariableName) { ! wxFileName fileName(argv0); ! wxString str; ! wxString path; #if defined(__WXMSW__) ! if (!fileName.HasExt()) ! fileName.SetExt(wxT("exe")); #endif ! // Try appVariableName ! if (!appVariableName.IsEmpty()) ! path = wxGetenv(appVariableName); #if defined(__WXMAC__) && !defined(__DARWIN__) ! // On Mac, the current directory is the relevant one when ! // the application starts. ! if (path.IsEmpty()) ! path = cwd; #endif ! if (path.IsEmpty()) ! { ! if (wxIsAbsolutePath(fileName.GetFullPath())) ! path = fileName.GetFullPath(); ! else ! { ! // Is it a relative path? ! wxString currentDir(cwd); ! if (currentDir.Last() != wxFILE_SEP_PATH) ! currentDir += wxFILE_SEP_PATH; ! if (wxFileExists(currentDir + fileName.GetFullName())) ! path = currentDir; ! } ! } ! if (path.IsEmpty()) ! { ! // OK, it's neither an absolute path nor a relative path. ! // Search PATH. ! wxPathList pathList; ! pathList.AddEnvList(wxT("PATH")); ! path = wxFileName(pathList.FindAbsoluteValidPath(fileName.GetFullName())).GetPath(); ! } ! fileName.SetPath(path); ! return fileName; } |