Fix GetInstallPrefix availability check
Add wxHAS_STDPATHS_INSTALL_PREFIX to make checking for wxStandardPaths::GetInstallPrefix()'s availability simpler, as the condition under which it is compiled is nontrivial. Fixes compilation after2c24ee9216
on Cygwin, which is a UNIX, but its wxStandardPaths implementation is a Windows one. (cherry picked from commit13862ad8e6
)
This commit is contained in:
@@ -184,6 +184,7 @@ protected:
|
|||||||
#elif defined(__UNIX__)
|
#elif defined(__UNIX__)
|
||||||
#include "wx/unix/stdpaths.h"
|
#include "wx/unix/stdpaths.h"
|
||||||
#define wxHAS_NATIVE_STDPATHS
|
#define wxHAS_NATIVE_STDPATHS
|
||||||
|
#define wxHAS_STDPATHS_INSTALL_PREFIX
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -195,6 +196,7 @@ protected:
|
|||||||
// wxUSE_STDPATHS=0, so that our code can still use wxStandardPaths.
|
// wxUSE_STDPATHS=0, so that our code can still use wxStandardPaths.
|
||||||
|
|
||||||
#ifndef wxHAS_NATIVE_STDPATHS
|
#ifndef wxHAS_NATIVE_STDPATHS
|
||||||
|
#define wxHAS_STDPATHS_INSTALL_PREFIX
|
||||||
class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase
|
class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -1813,7 +1813,7 @@ wxArrayString GetSearchPrefixes()
|
|||||||
if ( paths.Index(stdp) == wxNOT_FOUND )
|
if ( paths.Index(stdp) == wxNOT_FOUND )
|
||||||
paths.Add(stdp);
|
paths.Add(stdp);
|
||||||
|
|
||||||
#if defined(__UNIX__) && !defined(__WXOSX_COCOA__) && !defined(__WXOSX_IPHONE__) && !defined(__DARWIN__)
|
#ifdef wxHAS_STDPATHS_INSTALL_PREFIX
|
||||||
stdp = wxStandardPaths::Get().GetInstallPrefix() + "/share/locale";
|
stdp = wxStandardPaths::Get().GetInstallPrefix() + "/share/locale";
|
||||||
if ( paths.Index(stdp) == wxNOT_FOUND )
|
if ( paths.Index(stdp) == wxNOT_FOUND )
|
||||||
paths.Add(stdp);
|
paths.Add(stdp);
|
||||||
|
Reference in New Issue
Block a user