25 #include <wx/filename.h> 26 #include <wx/snglinst.h> 27 #include <wx/stdpaths.h> 52 m_headless( aHeadless ),
54 m_common_settings( nullptr ),
56 m_migrateLibraryTables( true )
83 std::unique_ptr<JSON_SETTINGS> ptr( aSettings );
85 ptr->SetManager(
this );
87 wxLogTrace(
traceSettings, wxT(
"Registered new settings object <%s>" ), ptr->GetFullFilename() );
110 [&aSettings](
const std::unique_ptr<JSON_SETTINGS>& aPtr )
112 return aPtr.get() == aSettings;
125 if( dynamic_cast<COLOR_SETTINGS*>( settings.get() ) )
136 [&aSettings](
const std::unique_ptr<JSON_SETTINGS>& aPtr )
138 return aPtr.get() == aSettings;
143 wxLogTrace(
traceSettings, wxT(
"Saving %s" ), ( *it )->GetFullFilename() );
152 [&aSettings](
const std::unique_ptr<JSON_SETTINGS>& aPtr )
154 return aPtr.get() == aSettings;
159 wxLogTrace(
traceSettings, wxT(
"Flush and release %s" ), ( *it )->GetFullFilename() );
164 size_t typeHash =
typeid( *it->get() ).hash_code();
201 wxLogTrace(
traceSettings, wxT(
"Attempting to load color theme %s" ), aName );
205 if( !fn.IsOk() || !fn.Exists() )
207 wxLogTrace(
traceSettings, wxT(
"Theme file %s.json not found, falling back to user" ), aName );
213 if( settings->
GetFilename() != aName.ToStdString() )
215 wxLogTrace(
traceSettings, wxT(
"Warning: stored filename is actually %s, " ),
236 wxDirTraverseResult
OnFile(
const wxString& aFilePath )
override 238 wxFileName file( aFilePath );
240 if( file.GetExt() ==
"json" )
243 return wxDIR_CONTINUE;
246 wxDirTraverseResult
OnDir(
const wxString& dirPath )
override 248 return wxDIR_CONTINUE;
268 if( aName.EndsWith( wxT(
".json" ) ) )
280 settings->
SetName( wxT(
"User" ) );
294 wxFileName third_party_path;
296 auto it = env.find(
"KICAD6_3RD_PARTY" );
298 if( it != env.end() && !it->second.GetValue().IsEmpty() )
299 third_party_path.SetPath( it->second.GetValue() );
303 third_party_path.AppendDir(
"colors" );
305 wxDir third_party_colors_dir( third_party_path.GetFullPath() );
315 [&](
const wxFileName& aFilename )
321 wxDir colors_dir( color_settings_path );
323 if( colors_dir.IsOpened() )
325 if( third_party_colors_dir.IsOpened() )
326 third_party_colors_dir.Traverse( thirdPartyLoader );
328 colors_dir.Traverse( loader );
344 [aSettings] (
const std::pair<wxString, COLOR_SETTINGS*>& el )
346 return el.second->GetFilename() == aSettings->
GetFilename();
353 if( !aSettings->
Store() )
355 wxLogTrace(
traceSettings, wxT(
"Color scheme %s not modified; skipping save" ),
360 wxASSERT( aSettings->
Contains( aNamespace ) );
362 wxLogTrace(
traceSettings, wxT(
"Saving color scheme %s, preserving %s" ),
372 ( *aSettings->
Internals() )[aNamespace].update( *backup );
382 wxASSERT( aSettings );
400 wxASSERT_MSG(
false, wxT(
"Unknown settings location!" ) );
425 wxDirTraverseResult
OnFile(
const wxString& aSrcFilePath )
override 427 wxFileName file( aSrcFilePath );
430 file.GetName() == wxT(
"fp-lib-table" ) ) )
432 return wxDIR_CONTINUE;
436 if( file.GetFullName() == wxT(
"installed_packages.json" ) )
437 return wxDIR_CONTINUE;
441 if( file.GetExt() == wxT(
"hotkeys" ) )
442 return wxDIR_CONTINUE;
444 wxString
path = file.GetPath();
447 file.SetPath(
path );
449 wxLogTrace(
traceSettings, wxT(
"Copying %s to %s" ), aSrcFilePath, file.GetFullPath() );
454 return wxDIR_CONTINUE;
457 wxDirTraverseResult
OnDir(
const wxString& dirPath )
override 459 wxFileName dir( dirPath );
462 if( dir.GetName() ==
"colors" ||
463 dir.GetName() ==
"3d" )
466 wxString
path = dir.GetPath();
471 wxMkdir( dir.GetFullPath() );
473 return wxDIR_CONTINUE;
487 wxLogTrace(
traceSettings, wxT(
"Settings migration not checked; running headless" ) );
492 wxLogTrace(
traceSettings, wxT(
"Using settings path %s" ),
path.GetFullPath() );
494 if(
path.DirExists() )
496 wxFileName common =
path;
497 common.SetName(
"kicad_common" );
498 common.SetExt(
"json" );
500 if( common.Exists() )
502 wxLogTrace(
traceSettings, wxT(
"Path exists and has a kicad_common, continuing!" ) );
510 if( dlg.ShowModal() != wxID_OK )
512 wxLogTrace(
traceSettings, wxT(
"Migration dialog canceled; exiting" ) );
516 if( !
path.DirExists() )
518 wxLogTrace(
traceSettings, wxT(
"Path didn't exist; creating it" ) );
519 path.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL );
524 wxLogTrace(
traceSettings, wxT(
"No migration source given; starting with defaults" ) );
533 source_dir.Traverse( traverser );
535 if( !traverser.GetErrors().empty() )
545 const std::vector<wxString> libKeys = {
546 wxT(
"KICAD6_SYMBOL_DIR" ),
547 wxT(
"KICAD6_3DMODEL_DIR" ),
548 wxT(
"KICAD6_FOOTPRINT_DIR" ),
549 wxT(
"KICAD6_TEMPLATE_DIR" ),
552 wxT(
"KICAD_PTEMPLATES" ),
555 wxT(
"KICAD_SYMBOL_DIR" ),
558 for(
const wxString& key : libKeys )
575 std::vector<wxFileName> base_paths;
580 if( wxGetEnv( wxT(
"KICAD_CONFIG_HOME" ),
nullptr ) )
590 wxFileName wxGtkPath;
591 wxGtkPath.AssignDir(
"~/.config/kicad" );
592 wxGtkPath.MakeAbsolute();
593 base_paths.emplace_back( wxGtkPath.GetPath() );
596 wxGtkPath.AssignDir(
"~/.var/app/org.kicad.KiCad/config/kicad" );
597 wxGtkPath.MakeAbsolute();
598 base_paths.emplace_back( wxGtkPath.GetPath() );
605 auto check_dir = [&] (
const wxString& aSubDir )
610 wxString sub_path = dir.GetNameWithSep() + aSubDir;
614 aPaths->push_back( sub_path );
615 wxLogTrace(
traceSettings, wxT(
"GetPreviousVersionName: %s is valid" ), sub_path );
620 std::set<wxString> checkedPaths;
622 for(
auto base_path : base_paths )
624 if( checkedPaths.count( base_path.GetFullPath() ) )
627 checkedPaths.insert( base_path.GetFullPath() );
629 if( !dir.Open( base_path.GetFullPath() ) )
631 wxLogTrace(
traceSettings, wxT(
"GetPreviousVersionName: could not open base path %s" ),
632 base_path.GetFullPath() );
636 wxLogTrace(
traceSettings, wxT(
"GetPreviousVersionName: checking base path %s" ),
637 base_path.GetFullPath() );
639 if( dir.GetFirst( &subdir, wxEmptyString, wxDIR_DIRS ) )
644 while( dir.GetNext( &subdir ) )
655 wxT(
"GetPreviousVersionName: root path %s is valid" ), dir.GetName() );
656 aPaths->push_back( dir.GetName() );
660 return aPaths->size() > 0;
666 wxFileName
test( aPath,
"kicad_common" );
671 test.SetExt(
"json" );
673 return test.Exists();
682 path.AppendDir(
"colors" );
684 if( !
path.DirExists() )
686 if( !wxMkdir(
path.GetPath() ) )
689 wxT(
"GetColorSettingsPath(): Path %s missing and could not be created!" ),
694 return path.GetPath();
700 static wxString user_settings_path;
702 if( user_settings_path.empty() )
705 return user_settings_path;
716 if( aUseEnv && wxGetEnv( wxT(
"KICAD_CONFIG_HOME" ), &envstr ) && !envstr.IsEmpty() )
719 cfgpath.AssignDir( envstr );
725 cfgpath.AppendDir(
TO_STR( KICAD_CONFIG_DIR ) );
731 return cfgpath.GetPath();
751 wxLogTrace(
traceSettings, wxT(
"compareSettingsVersions: bad input (%s, %s)" ), aFirst, aSecond );
759 else if( a_maj > b_maj )
769 else if( a_min > b_min )
783 std::regex re_version(
"(\\d+)\\.(\\d+)" );
786 if( std::regex_match( aVersionString, match, re_version ) )
790 *aMajor = std::stoi( match[1].str() );
791 *aMinor = std::stoi( match[2].str() );
808 wxFileName
path( aFullPath );
813 wxString fullPath =
path.GetFullPath();
821 bool readOnly =
false;
822 std::unique_ptr<wxSingleInstanceChecker> lockFile =
::LockFile( fullPath );
826 wxLogTrace(
traceSettings, wxT(
"Project %s is locked; opening read-only" ), fullPath );
838 [&](
const std::unique_ptr<PROJECT>& ptr )
840 return ptr.get() == oldProject;
847 wxLogTrace(
traceSettings, wxT(
"Load project %s" ), fullPath );
849 std::unique_ptr<PROJECT>
project = std::make_unique<PROJECT>();
850 project->setProjectFullName( fullPath );
856 project->SetReadOnly( readOnly ||
project->GetProjectFile().IsReadOnly() );
865 wxString fn(
path.GetName() );
872 settings->LoadFromFile(
path.GetPath() );
874 m_projects[fullPath]->setLocalSettings( settings );
892 wxLogTrace(
traceSettings, wxT(
"Unload project %s" ), projectPath );
896 [&](
const std::unique_ptr<PROJECT>& ptr )
898 return ptr.get() == toRemove;
949 std::vector<wxString> ret;
951 for(
const std::pair<const wxString, PROJECT*>& pair :
m_projects )
952 ret.emplace_back( pair.first );
963 wxString
path = aFullPath;
978 project->SaveToFile( projectPath );
992 if( aFullPath.IsSameAs( oldName ) )
1001 wxFileName fn( aFullPath );
1010 project->SetFilename( fn.GetName() );
1011 project->SaveToFile( fn.GetPath() );
1030 wxString oldName =
project->GetFilename();
1031 wxFileName fn( aFullPath );
1033 bool readOnly =
project->IsReadOnly();
1034 project->SetReadOnly(
false );
1036 project->SetFilename( fn.GetName() );
1037 project->SaveToFile( fn.GetPath() );
1038 project->SetFilename( oldName );
1046 project->SetReadOnly( readOnly );
1053 wxString fn( fullFn.GetName() );
1060 file->SetProject( &aProject );
1062 wxString
path( fullFn.GetPath() );
1064 return file->LoadFromFile(
path );
1081 [&file](
const std::unique_ptr<JSON_SETTINGS>& aPtr )
1083 return aPtr.get() == file;
1093 ( *it )->SaveToFile( projectPath );
1115 wxDateTime timestamp = wxDateTime::Now();
1122 target.SetName( fileName );
1125 wxDir dir( target.GetPath() );
1127 if( !target.DirExists() && !wxMkdir( target.GetPath() ) )
1129 wxLogTrace(
traceSettings, wxT(
"Could not create project backup path %s" ), target.GetPath() );
1133 if( !target.IsDirWritable() )
1135 wxLogTrace(
traceSettings, wxT(
"Backup directory %s is not writable" ), target.GetPath() );
1139 wxLogTrace(
traceSettings, wxT(
"Backing up project to %s" ), target.GetPath() );
1143 return archiver.
Archive(
Prj().GetProjectPath(), target.GetFullPath(), aReporter );
1151 std::function<
bool(
const wxString& )> aCond ) :
1157 wxDirTraverseResult
OnFile(
const wxString& aFile )
override 1160 m_files.emplace_back( aFile );
1162 return wxDIR_CONTINUE;
1165 wxDirTraverseResult
OnDir(
const wxString& aDirName )
override 1167 return wxDIR_CONTINUE;
1187 [&prefix](
const wxString& aFile )
1190 wxString fn( wxFileName( aFile ).GetName() );
1191 fn.Replace( prefix,
"" );
1196 wxFileName projectPath(
Prj().GetProjectPath() );
1199 if( !projectPath.IsOk() || !projectPath.Exists() || !projectPath.IsDirWritable() )
1204 if( !wxDirExists( backupPath ) )
1206 wxLogTrace(
traceSettings, wxT(
"Backup path %s doesn't exist, creating it" ), backupPath );
1208 if( !wxMkdir( backupPath ) )
1210 wxLogTrace(
traceSettings, wxT(
"Could not create backups path! Skipping backup" ) );
1215 wxDir dir( backupPath );
1217 if( !dir.IsOpened() )
1219 wxLogTrace(
traceSettings, wxT(
"Could not open project backups path %s" ), dir.GetName() );
1223 std::vector<wxString> files;
1226 [&modTime](
const wxString& aFile )
1228 return modTime( aFile ).IsValid();
1231 dir.Traverse( traverser, wxT(
"*.zip" ) );
1234 std::sort( files.begin(), files.end(),
1235 [&](
const wxString& aFirst,
const wxString& aSecond ) ->
bool 1237 wxDateTime first = modTime( aFirst );
1238 wxDateTime second = modTime( aSecond );
1240 return first.GetTicks() > second.GetTicks();
1244 if( !files.empty() )
1246 wxDateTime lastTime = modTime( files[0] );
1248 if( lastTime.IsValid() )
1250 wxTimeSpan
delta = wxDateTime::Now() - modTime( files[0] );
1264 wxRemoveFile( files.back() );
1272 wxULongLong totalSize = 0;
1274 for(
const wxString& file : files )
1275 totalSize += wxFileName::GetSize( file );
1277 while( !files.empty() && totalSize > static_cast<wxULongLong>( settings.
limit_total_size ) )
1279 totalSize -= wxFileName::GetSize( files.back() );
1280 wxRemoveFile( files.back() );
1288 wxDateTime day = modTime( files[0] );
1291 wxASSERT( day.IsValid() );
1293 std::vector<wxString> filesToDelete;
1295 for(
size_t i = 1; i < files.size(); i++ )
1297 wxDateTime dt = modTime( files[i] );
1299 if( dt.IsSameDate( day ) )
1304 filesToDelete.emplace_back( files[i] );
1313 for(
const wxString& file : filesToDelete )
1314 wxRemoveFile( file );
static wxString backupDateTimeFormat
bool Archive(const wxString &aSrcDir, const wxString &aDestFile, REPORTER &aReporter, bool aVerbose=true, bool aIncludeExtraFiles=false)
Creates an archive of the project.
virtual bool IsReadOnly() const
virtual bool Store()
Stores the current parameters into the JSON document represented by this object Note: this doesn't do...
JSON_SETTINGS_INTERNALS * Internals()
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
Container for project specific data.
unsigned long long limit_total_size
Maximum total size of backups (bytes), 0 for unlimited.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
std::unique_ptr< wxSingleInstanceChecker > m_project_lock
Lock for loaded project (expand to multiple once we support MDI)
T * RegisterSettings(T *aSettings, bool aLoadNow=true)
Takes ownership of the pointer passed in.
bool SaveProject(const wxString &aFullPath=wxEmptyString, PROJECT *aProject=nullptr)
Saves a loaded project.
This file is part of the common library.
std::function< void(const wxFileName &)> m_action
static bool IsSettingsPathValid(const wxString &aPath)
Checks if a given path is probably a valid KiCad configuration directory.
const std::string ProjectFileExtension
KIWAY * m_kiway
The kiway this settings manager interacts with.
void SetReadOnly(bool aReadOnly)
wxString GetFilename() const
bool m_migrateLibraryTables
If true, the symbol and footprint library tables will be migrated from the previous version.
#define PROJECT_VAR_NAME
A variable name whose value holds the current project directory.
bool enabled
Automatically back up the project when files are saved.
virtual bool LoadFromFile(const wxString &aDirectory="")
Loads the backing file from disk and then calls Load()
The project local settings are things that are attached to a particular project, but also might be pa...
bool SaveToFile(const wxString &aDirectory="", bool aForce=false) override
wxDirTraverseResult OnFile(const wxString &aSrcFilePath) override
void KiCopyFile(const wxString &aSrcPath, const wxString &aDestPath, wxString &aErrors)
std::unordered_map< size_t, JSON_SETTINGS * > m_app_settings_cache
Cache for app settings.
OPT< nlohmann::json > GetJson(const std::string &aPath) const
Fetches a JSON object that is a subset of this JSON_SETTINGS object, using a path of the form "key1....
VECTOR_INSERT_TRAVERSER(std::vector< wxString > &aVec, std::function< bool(const wxString &)> aCond)
std::map< wxString, PROJECT_FILE * > m_project_files
Loaded project files, mapped according to project full name.
bool MigrateIfNeeded()
Handles the initialization of the user settings directory and migration from previous KiCad versions ...
A pure virtual class used to derive REPORTER objects from.
COLOR_SETTINGS * AddNewColorSettings(const wxString &aFilename)
Registers a new color settings object with the given filename.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
static int compareVersions(const std::string &aFirst, const std::string &aSecond)
Compares two settings versions, like "5.99" and "6.0".
bool BackupProject(REPORTER &aReporter) const
Creates a backup archive of the current project.
virtual const wxString GetProjectPath() const
Return the full path of the project.
The backing store for a PROJECT, in JSON format.
wxString GetMajorMinorVersion()
Get only the major and minor version in a string major.minor.
This file contains miscellaneous commonly used macros and functions.
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
std::vector< wxString > & m_files
The color scheme directory (e.g. ~/.config/kicad/colors/)
wxString m_migration_source
bool m_ok
True if settings loaded successfully at construction.
COLOR_SETTINGS * registerColorSettings(const wxString &aFilename, bool aAbsolutePath=false)
bool unloadProjectFile(PROJECT *aProject, bool aSave)
Optionally saves, and then unloads and unregisters the given PROJECT_FILE.
virtual bool SaveToFile(const wxString &aDirectory="", bool aForce=false)
bool IsProjectOpen() const
Helper for checking if we have a project open TODO: This should be deprecated along with Prj() once w...
wxDirTraverseResult OnDir(const wxString &aDirName) override
The settings directory inside a project folder.
wxDirTraverseResult OnDir(const wxString &dirPath) override
bool TriggerBackupIfNeeded(REPORTER &aReporter) const
Calls BackupProject if a new backup is needed according to the current backup policy.
SETTINGS_LOC GetLocation() const
std::function< bool(const wxString &)> m_condition
bool GetPreviousVersionPaths(std::vector< wxString > *aName=nullptr)
Retrieves the name of the most recent previous KiCad version that can be found in the user settings d...
COMMON_SETTINGS * GetCommonSettings() const
Retrieves the common settings shared by all applications.
virtual void ProjectChanged()
Calls ProjectChanged() on all KIWAY_PLAYERs.
std::unique_ptr< wxSingleInstanceChecker > LockFile(const wxString &aFileName)
Test to see if aFileName can be locked (is not already locked) and only then returns a wxSingleInstan...
Definition of file extensions used in Kicad.
static std::vector< COLOR_SETTINGS * > CreateBuiltinColorSettings()
Constructs and returns a list of color settings objects based on the built-in color themes.
bool m_headless
True if running outside a UI context.
wxDirTraverseResult OnFile(const wxString &aFile) override
static void EnsureUserPathsExist()
Ensures/creates user default paths.
void SetName(const wxString &aName)
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
const std::string LegacyProjectFileExtension
No directory prepended, full path in filename (used for PROJECT_FILE)
std::map< wxString, PROJECT * > m_projects
Loaded projects, mapped according to project full name.
JSON_DIR_TRAVERSER(std::function< void(const wxFileName &)> aAction)
wxDirTraverseResult OnFile(const wxString &aFilePath) override
SETTINGS_MANAGER(bool aHeadless=false)
virtual void setProjectFullName(const wxString &aFullPathAndName)
Set the full directory, basename, and extension of the project.
static wxString GetColorSettingsPath()
Returns the path where color scheme files are stored; creating it if missing (normally .
wxString GetProjectBackupsPath() const
bool loadProjectFile(PROJECT &aProject)
Registers a PROJECT_FILE and attempts to load it from disk.
static wxString GetUserSettingsPath()
Return the user configuration path used to store KiCad's configuration files.
std::unordered_map< wxString, COLOR_SETTINGS * > m_color_settings
int min_interval
Minimum time, in seconds, between subsequent backups.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
COLOR_SETTINGS * loadColorSettingsByName(const wxString &aName)
Attempts to load a color theme by name (the color theme directory and .json ext are assumed)
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
void ReloadColorSettings()
Re-scans the color themes directory, reloading any changes it finds.
std::vector< std::unique_ptr< JSON_SETTINGS > > m_settings
void SaveProjectCopy(const wxString &aFullPath, PROJECT *aProject=nullptr)
Saves a copy of the current project under the given path.
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
std::vector< wxString > GetOpenProjects() const
static wxString calculateUserSettingsPath(bool aIncludeVer=true, bool aUseEnv=true)
Determines the base path for user settings files.
#define PROJECT_BACKUPS_DIR_SUFFIX
Project settings path will be <projectname> + this.
bool UnloadProject(PROJECT *aProject, bool aSave=true)
Saves, unloads and unregisters the given PROJECT.
The main config directory (e.g. ~/.config/kicad/)
wxDirTraverseResult OnDir(const wxString &dirPath) override
void SaveColorSettings(COLOR_SETTINGS *aSettings, const std::string &aNamespace="")
Safely saves a COLOR_SETTINGS to disk, preserving any changes outside the given namespace.
void SaveProjectAs(const wxString &aFullPath, PROJECT *aProject=nullptr)
Sets the currently loaded project path and saves it (pointers remain valid) Note that this will not m...
static std::string GetSettingsVersion()
Parses the current KiCad build version and extracts the major and minor revision to use as the name o...
JSON_SETTINGS * registerSettings(JSON_SETTINGS *aSettings, bool aLoadNow=true)
Color settings are a bit different than most of the settings objects in that there can be more than o...
virtual const wxString GetProjectName() const
Return the short name of the project.
bool Contains(const std::string &aPath) const
int limit_daily_files
Maximum files to keep per day, 0 for unlimited.
const wxChar *const traceSettings
Flag to enable debug output of settings operations and management.
COMMON_SETTINGS * m_common_settings
void SetFilename(const wxString &aFilename)
virtual void setProjectFile(PROJECT_FILE *aFile)
Set the backing store file for this project.
static wxString GetDefault3rdPartyPath()
Gets the default path for PCM packages.
COLOR_SETTINGS * GetMigratedColorSettings()
Returns a color theme for storing colors migrated from legacy (5.x and earlier) settings,...
MIGRATION_TRAVERSER(const wxString &aSrcDir, const wxString &aDestDir, bool aMigrateTables)
void FlushAndRelease(JSON_SETTINGS *aSettings, bool aSave=true)
If the given settings object is registered, save it to disk and unregister it.
std::vector< std::unique_ptr< PROJECT > > m_projects_list
Loaded projects (ownership here)
virtual void Load()
Updates the parameters of this object based on the current JSON document contents.
PROJECT * GetProject(const wxString &aFullPath) const
Retrieves a loaded project by name.
int limit_total_files
Maximum number of backup archives to retain.
static bool extractVersion(const std::string &aVersionString, int *aMajor, int *aMinor)
Extracts the numeric version from a given settings string.
void loadAllColorSettings()
wxString GetPathForSettingsFile(JSON_SETTINGS *aSettings)
Returns the path a given settings file should be loaded from / stored to.
const std::string ArchiveFileExtension