KiCad PCB EDA Suite
Loading...
Searching...
No Matches
project_template.cpp File Reference
#include <wx/bitmap.h>
#include <wx/dir.h>
#include <wx/ffile.h>
#include <wx/txtstrm.h>
#include <wx/wfstream.h>
#include <wx/log.h>
#include <wx/textfile.h>
#include <unordered_map>
#include <wildcards_and_files_ext.h>
#include <wx_filename.h>
#include "project_template.h"

Go to the source code of this file.

Classes

class  FILE_TRAVERSER
 

Macros

#define SEP   wxFileName::GetPathSeparator()
 

Functions

wxFileName EnsureDefaultProjectTemplate (const wxString &aBaseDir)
 Seed the built-in "default" project template under aBaseDir, creating the directory tree and minimal metadata (meta/info.html) and project (default.kicad_pro) files when they are missing.
 

Macro Definition Documentation

◆ SEP

#define SEP   wxFileName::GetPathSeparator()

Definition at line 36 of file project_template.cpp.

Function Documentation

◆ EnsureDefaultProjectTemplate()

wxFileName EnsureDefaultProjectTemplate ( const wxString & aBaseDir)

Seed the built-in "default" project template under aBaseDir, creating the directory tree and minimal metadata (meta/info.html) and project (default.kicad_pro) files when they are missing.

The default template is always seeded into the stable default user templates path rather than KICAD_USER_TEMPLATE_DIR so that it remains available regardless of how the user configures that variable.

Parameters
aBaseDiris the directory under which the "default" template directory is created. It must already be expanded (no unresolved environment variable references).
Returns
the full path of the seeded "default" template directory on success, otherwise an invalid wxFileName.

Definition at line 440 of file project_template.cpp.

References FN_NORMALIZE_FLAGS, info, METADIR, and METAFILE_INFO_HTML.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and KICAD_MANAGER_CONTROL::NewProject().