diff --git a/docs/latex/wx/stdpaths.tex b/docs/latex/wx/stdpaths.tex index acfc21b36b..148dad7129 100644 --- a/docs/latex/wx/stdpaths.tex +++ b/docs/latex/wx/stdpaths.tex @@ -83,7 +83,7 @@ data files. Example return values: \begin{itemize} \item Unix: \texttt{\textit{prefix}/share/\textit{appname}} - \item Windows: \texttt{C:$\backslash$Program Files$\backslash$\textit{appname}} + \item Windows: the directory where the executable file is located \item Mac: \texttt{\textit{appname}.app/Contents/SharedSupport} bundle subdirectory \end{itemize} diff --git a/src/msw/stdpaths.cpp b/src/msw/stdpaths.cpp index 4ba9dc6d3c..707c30e383 100644 --- a/src/msw/stdpaths.cpp +++ b/src/msw/stdpaths.cpp @@ -246,7 +246,9 @@ wxString wxStandardPaths::GetUserConfigDir() const wxString wxStandardPaths::GetDataDir() const { - return AppendAppName(DoGetDirectory(CSIDL_PROGRAM_FILES)); + // under Windows each program is usually installed in its own directory and + // so its datafiles are in the same directory as its main executable + return wxFileName(wxGetFullModuleName()).GetPath(); } wxString wxStandardPaths::GetUserDataDir() const