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 (C) 2021 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
37{
38public:
39
43 static wxString GetUserScriptingPath();
44
48 static wxString GetUserTemplatesPath();
49
53 static wxString GetUserPluginsPath();
54
58 static wxString GetDefaultUserProjectsPath();
59
63 static wxString GetDefaultUserSymbolsPath();
64
68 static wxString GetDefaultUserFootprintsPath();
69
73 static wxString GetDefaultUserDesignBlocksPath();
74
78 static wxString GetDefaultUser3DModelsPath();
79
83 static wxString GetStockDataPath( bool aRespectRunFromBuildDir = true );
84
89 static wxString GetStockEDALibraryPath();
90
94 static wxString GetDefault3rdPartyPath();
95
99 static wxString GetStockSymbolsPath();
100
104 static wxString GetStockFootprintsPath();
105
109 static wxString GetStockDesignBlocksPath();
110
114 static wxString GetStock3dmodelsPath();
115
119 static wxString GetStockScriptingPath();
120
124 static wxString GetStockPluginsPath();
125
129 static wxString GetStockPlugins3DPath();
130
134 static wxString GetStockDemosPath();
135
139 static wxString GetStockTemplatesPath();
140
144 static wxString GetLocaleDataPath();
145
149 static wxString GetUserCachePath();
150
154 static wxString GetDocumentationPath();
155
159 static wxString GetInstanceCheckerPath();
160
164 static wxString GetLogsPath();
165
169 static bool EnsurePathExists( const wxString& aPath );
170
174 static void EnsureUserPathsExist();
175
176#ifdef __WXMAC__
182 static wxString GetOSXKicadUserDataDir();
183
187 static wxString GetOSXKicadMachineDataDir();
188
192 static wxString GetOSXKicadDataDir();
193#endif
194
195#ifdef _WIN32
199 static wxString GetWindowsFontConfigDir();
200
201
205 static wxString GetWindowsBaseSharePath();
206#endif
207
217 static wxString GetUserSettingsPath();
218
233 static wxString CalculateUserSettingsPath( bool aIncludeVer = true, bool aUseEnv = true );
234
235 static const wxString& GetExecutablePath();
236private:
237 // we are a static helper
238 PATHS() {}
239
245 static void getUserDocumentPath( wxFileName& aPath );
246
247#ifdef _WIN32
253 static wxString getWindowsKiCadRoot();
254#endif
255};
256
257#endif
Helper class to centralize the paths used throughout kicad.
Definition: paths.h:37
PATHS()
Definition: paths.h:238
#define KICOMMON_API
Definition: kicommon.h:28