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 GetDefaultUser3DModelsPath();
74
78 static wxString GetStockDataPath( bool aRespectRunFromBuildDir = true );
79
84 static wxString GetStockEDALibraryPath();
85
89 static wxString GetDefault3rdPartyPath();
90
94 static wxString GetStockSymbolsPath();
95
99 static wxString GetStockFootprintsPath();
100
104 static wxString GetStock3dmodelsPath();
105
109 static wxString GetStockScriptingPath();
110
114 static wxString GetStockPluginsPath();
115
119 static wxString GetStockPlugins3DPath();
120
124 static wxString GetStockDemosPath();
125
129 static wxString GetStockTemplatesPath();
130
134 static wxString GetLocaleDataPath();
135
139 static wxString GetUserCachePath();
140
144 static wxString GetDocumentationPath();
145
149 static wxString GetInstanceCheckerPath();
150
154 static wxString GetLogsPath();
155
159 static bool EnsurePathExists( const wxString& aPath );
160
164 static void EnsureUserPathsExist();
165
166#ifdef __WXMAC__
172 static wxString GetOSXKicadUserDataDir();
173
177 static wxString GetOSXKicadMachineDataDir();
178
182 static wxString GetOSXKicadDataDir();
183#endif
184
185#ifdef __WXMSW__
189 static wxString GetWindowsFontConfigDir();
190
191
195 static wxString GetWindowsBaseSharePath();
196#endif
197
207 static wxString GetUserSettingsPath();
208
223 static wxString CalculateUserSettingsPath( bool aIncludeVer = true, bool aUseEnv = true );
224
225 static const wxString& GetExecutablePath();
226private:
227 // we are a static helper
228 PATHS() {}
229
235 static void getUserDocumentPath( wxFileName& aPath );
236
237#ifdef __WXMSW__
243 static wxString getWindowsKiCadRoot();
244#endif
245};
246
247#endif
Helper class to centralize the paths used throughout kicad.
Definition: paths.h:37
PATHS()
Definition: paths.h:228
#define KICOMMON_API
Definition: kicommon.h:28