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 GetUserPlugins3DPath();
59
63 static wxString GetDefaultUserProjectsPath();
64
68 static wxString GetDefaultUserSymbolsPath();
69
73 static wxString GetDefaultUserFootprintsPath();
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 GetStock3dmodelsPath();
110
114 static wxString GetStockScriptingPath();
115
119 static wxString GetStockPluginsPath();
120
124 static wxString GetStockPlugins3DPath();
125
129 static wxString GetStockDemosPath();
130
134 static wxString GetStockTemplatesPath();
135
139 static wxString GetLocaleDataPath();
140
144 static wxString GetUserCachePath();
145
149 static wxString GetDocumentationPath();
150
154 static bool EnsurePathExists( const wxString& aPath );
155
159 static void EnsureUserPathsExist();
160
161#ifdef __WXMAC__
167 static wxString GetOSXKicadUserDataDir();
168
172 static wxString GetOSXKicadMachineDataDir();
173
177 static wxString GetOSXKicadDataDir();
178#endif
179
180#ifdef __WXWINDOWS__
184 static wxString GetWindowsFontConfigDir();
185#endif
186
196 static wxString GetUserSettingsPath();
197
212 static wxString CalculateUserSettingsPath( bool aIncludeVer = true, bool aUseEnv = true );
213
214 static const wxString& GetExecutablePath();
215private:
216 // we are a static helper
217 PATHS() {}
218
224 static void getUserDocumentPath( wxFileName& aPath );
225
226#ifdef __WXWINDOWS__
232 static wxString getWindowsKiCadRoot();
233#endif
234};
235
236#endif
Helper class to centralize the paths used throughout kicad.
Definition: paths.h:37
PATHS()
Definition: paths.h:217
#define KICOMMON_API
Definition: kicommon.h:28