KiCad PCB EDA Suite
Loading...
Searching...
No Matches
paths.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PATHS_H
21#define PATHS_H
22
23#include <kicommon.h>
24#include <wx/filename.h>
25#include <wx/string.h>
26
30#define UNIX_STRING_DIR_SEP wxT( "/" )
31#define WIN_STRING_DIR_SEP wxT( "\\" )
32
33
34// lowercase or pretty case depending on platform
35#if defined( __WXMAC__ ) || defined( __WXMSW__ )
36#define KICAD_PATH_STR wxT( "KiCad" )
37#else
38#define KICAD_PATH_STR wxT( "kicad" )
39#endif
40
45{
46public:
47
51 static wxString GetUserScriptingPath();
52
56 static wxString GetUserTemplatesPath();
57
61 static wxString GetUserPluginsPath();
62
66 static wxString GetDefaultUserProjectsPath();
67
71 static wxString GetDefaultUserSymbolsPath();
72
76 static wxString GetDefaultUserFootprintsPath();
77
81 static wxString GetDefaultUserDesignBlocksPath();
82
86 static wxString GetDefaultUser3DModelsPath();
87
91 static wxString GetStockDataPath( bool aRespectRunFromBuildDir = true );
92
97 static wxString GetStockEDALibraryPath();
98
102 static wxString GetDefault3rdPartyPath();
103
107 static wxString GetStockSymbolsPath();
108
112 static wxString GetStockFootprintsPath();
113
117 static wxString GetStockDesignBlocksPath();
118
122 static wxString GetStock3dmodelsPath();
123
127 static wxString GetStockScriptingPath();
128
132 static wxString GetStockPluginsPath();
133
137 static wxString GetStockPlugins3DPath();
138
142 static wxString GetStockDemosPath();
143
147 static wxString GetStockTemplatesPath();
148
152 static wxString GetLocaleDataPath();
153
157 static wxString GetUserCachePath();
158
162 static wxString GetDocumentationPath();
163
167 static wxString GetInstanceCheckerPath();
168
172 static wxString GetLogsPath();
173
177 static bool EnsurePathExists( const wxString& aPath, bool aPathToFile = false );
178
182 static void EnsureUserPathsExist();
183
184#ifdef __WXMAC__
190 static wxString GetOSXKicadUserDataDir();
191
195 static wxString GetOSXKicadMachineDataDir();
196
200 static wxString GetOSXKicadDataDir();
201#endif
202
203#ifdef _WIN32
207 static wxString GetWindowsFontConfigDir();
208
209
213 static wxString GetWindowsBaseSharePath();
214#endif
215
225 static wxString GetUserSettingsPath();
226
241 static wxString CalculateUserSettingsPath( bool aIncludeVer = true, bool aUseEnv = true );
242
243 static const wxString& GetExecutablePath();
244private:
245 // we are a static helper
246 PATHS() {}
247
253 static void getUserDocumentPath( wxFileName& aPath );
254
255#ifdef _WIN32
261 static wxString getWindowsKiCadRoot();
262#endif
263};
264
265#endif
Helper class to centralize the paths used throughout kicad.
Definition: paths.h:45
PATHS()
Definition: paths.h:246
#define KICOMMON_API
Definition: kicommon.h:28