1
//--------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2010 LenMus project
5
// This program is free software; you can redistribute it and/or modify it under the
6
// terms of the GNU General Public License as published by the Free Software Foundation,
7
// either version 3 of the License, or (at your option) any later version.
9
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
10
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
// You should have received a copy of the GNU General Public License along with this
14
// program. If not, see <http://www.gnu.org/licenses/>.
16
// For any comment, suggestion or feature request, please contact the manager of
17
// the project at cecilios@users.sourceforge.net
19
//-------------------------------------------------------------------------------------
24
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
25
#pragma interface "Paths.cpp"
28
#include <wx/config.h>
29
#include <wx/filename.h>
34
lmPaths(wxString sBinPath);
37
void LoadUserPreferences();
38
void SaveUserPreferences();
41
wxString GetRootPath() { return m_root.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR); }
42
wxString GetBinPath() { return m_sBin; }
43
wxString GetXrcPath() { return m_sXrc; }
44
wxString GetTempPath() { return m_sTemp; }
45
wxString GetImagePath() { return m_sImages; }
46
wxString GetCursorsPath() { return m_sCursors; }
47
wxString GetSoundsPath() { return m_sSounds; }
48
wxString GetLocaleRootPath() { return m_sLocaleRoot; }
49
wxString GetScoresPath() { return m_sScores; }
50
wxString GetTestScoresPath() { return m_sTestScores; }
51
wxString GetSamplesPath() { return m_sSamples; }
52
wxString GetTemplatesPath() { return m_sTemplates; }
53
wxString GetConfigPath() { return m_sConfig; }
54
wxString GetLogPath() { return m_sLogs; }
55
wxString GetFontsPath() { return m_sFonts; }
57
// paths that depend on the language name
58
wxString GetLocalePath() { return m_sLocale; }
59
wxString GetHelpPath() { return m_sHelp; }
60
wxString GetBooksPath() { return m_sBooks; }
62
void SetLanguageCode(wxString sLangCode);
64
// Set paths selecteble by user
65
void SetScoresPath(wxString sPath) { m_sScores = sPath; }
68
void ClearTempFiles();
74
//root (instalation path) for LenMus
78
wxString m_sLocaleRoot; //root path for locale (it is m_sLocale without the language subfolder)
79
wxString m_sLocale; //path containing program translation files ( .mo catalogs)
80
wxString m_sLangCode; //language code (2 or 5 chars: i.e. "en", "en_US")
81
wxString m_sScores; //path for scores
82
wxString m_sTestScores; //path for scores for unit tests
83
wxString m_sSamples; //path for sample scores
84
wxString m_sTemplates; //path for templates
85
wxString m_sTemp; //path for temporary files (help books preprocessed, ...)
86
wxString m_sBooks; //path for books
87
wxString m_sHelp; //path for help files
88
wxString m_sBin; //path for binaries
89
wxString m_sXrc; //path for .xrc and .xrs resource files
90
wxString m_sImages; //path for resource images
91
wxString m_sCursors; //path for resource cursors
92
wxString m_sSounds; //path for wave sounds
93
wxString m_sConfig; //path for user configuration file
94
wxString m_sLogs; //path for logs and dumps
95
wxString m_sFonts; //path for resource fonts
99
extern lmPaths* g_pPaths;
101
#endif // __LM_PATH_H__