From a9ed47f06c0a1eb3207908cd5a1b9f87be11d63f Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 22 Jan 2023 10:38:02 -0800 Subject: [PATCH] Update KICAD6->KICAD7 --- 3d-viewer/3d_viewer/eda_3d_viewer_frame.h | 2 +- .../dialog_global_lib_table_config.cpp | 2 +- common/env_vars.cpp | 28 +++++++++---------- common/filename_resolver.cpp | 20 ++++++------- common/fp_lib_table.cpp | 10 +++---- common/settings/common_settings.cpp | 22 +++++++-------- common/settings/settings_manager.cpp | 6 +++- cvpcb/cvpcb.cpp | 2 +- cvpcb/dialogs/dialog_config_equfiles.cpp | 2 +- eeschema/symbol_lib_table.cpp | 10 +++---- include/filename_resolver.h | 6 ++-- kicad/kicad.cpp | 4 +-- kicad/pcm/pcm.cpp | 2 +- kicad/pcm/pcm_task_manager.cpp | 2 +- kicad/tools/kicad_manager_control.cpp | 2 +- pcbnew/dialogs/panel_fp_lib_table.cpp | 4 +-- .../dialogs/panel_fp_properties_3d_model.cpp | 8 +++--- .../dialogs/panel_pcbnew_color_settings.cpp | 10 +++---- scripting/python_scripting.cpp | 2 +- 19 files changed, 74 insertions(+), 70 deletions(-) diff --git a/3d-viewer/3d_viewer/eda_3d_viewer_frame.h b/3d-viewer/3d_viewer/eda_3d_viewer_frame.h index ba7a110e61..1238c45e01 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer_frame.h +++ b/3d-viewer/3d_viewer/eda_3d_viewer_frame.h @@ -42,7 +42,7 @@ /// A variable name whose value holds the path of 3D shape files. /// Currently an environment variable, eventually a project variable. -#define KICAD6_3DMODEL_DIR wxT( "KICAD6_3DMODEL_DIR" ) +#define KICAD7_3DMODEL_DIR wxT( "KICAD7_3DMODEL_DIR" ) #define KICAD_DEFAULT_3D_DRAWFRAME_STYLE (wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS) diff --git a/common/dialogs/dialog_global_lib_table_config.cpp b/common/dialogs/dialog_global_lib_table_config.cpp index a146112ded..c2f1c1f727 100644 --- a/common/dialogs/dialog_global_lib_table_config.cpp +++ b/common/dialogs/dialog_global_lib_table_config.cpp @@ -109,7 +109,7 @@ bool DIALOG_GLOBAL_LIB_TABLE_CONFIG::TransferDataToWindow() SystemDirsAppend( &ss ); wxString templatePath = - Pgm().GetLocalEnvVariables().at( wxT( "KICAD6_TEMPLATE_DIR" ) ).GetValue(); + Pgm().GetLocalEnvVariables().at( wxT( "KICAD7_TEMPLATE_DIR" ) ).GetValue(); if( !templatePath.IsEmpty() ) ss.AddPaths( templatePath, 0 ); diff --git a/common/env_vars.cpp b/common/env_vars.cpp index 5cdb75f82b..f8e11193a6 100644 --- a/common/env_vars.cpp +++ b/common/env_vars.cpp @@ -35,13 +35,13 @@ using STRING_MAP = std::map; */ static const ENV_VAR::ENV_VAR_LIST predefinedEnvVars = { wxS( "KIPRJMOD" ), - wxS( "KICAD6_SYMBOL_DIR" ), - wxS( "KICAD6_3DMODEL_DIR" ), - wxS( "KICAD6_FOOTPRINT_DIR" ), - wxS( "KICAD6_TEMPLATE_DIR" ), + wxS( "KICAD7_SYMBOL_DIR" ), + wxS( "KICAD7_3DMODEL_DIR" ), + wxS( "KICAD7_FOOTPRINT_DIR" ), + wxS( "KICAD7_TEMPLATE_DIR" ), wxS( "KICAD_USER_TEMPLATE_DIR" ), wxS( "KICAD_PTEMPLATES" ), - wxS( "KICAD6_3RD_PARTY" ), + wxS( "KICAD7_3RD_PARTY" ), }; @@ -67,19 +67,19 @@ static void initialiseEnvVarHelp( STRING_MAP& aMap ) { // Set up dynamically, as we want to be able to use _() translations, // which can't be done statically - aMap[wxS( "KICAD6_FOOTPRINT_DIR" )] = + aMap[wxS( "KICAD7_FOOTPRINT_DIR" )] = _( "The base path of locally installed system " "footprint libraries (.pretty folders)."); - aMap[wxS( "KICAD6_3DMODEL_DIR" )] = + aMap[wxS( "KICAD7_3DMODEL_DIR" )] = _( "The base path of system footprint 3D shapes (.3Dshapes folders)."); - aMap[wxS( "KICAD6_SYMBOL_DIR" )] = + aMap[wxS( "KICAD7_SYMBOL_DIR" )] = _( "The base path of the locally installed symbol libraries."); - aMap[wxS( "KICAD6_TEMPLATE_DIR" )] = + aMap[wxS( "KICAD7_TEMPLATE_DIR" )] = _( "A directory containing project templates installed with KiCad."); aMap[wxS( "KICAD_USER_TEMPLATE_DIR" )] = _( "Optional. Can be defined if you want to create your own project " "templates folder."); - aMap[wxS( "KICAD6_3RD_PARTY" )] = + aMap[wxS( "KICAD7_3RD_PARTY" )] = _( "A directory containing 3rd party plugins, libraries and other " "downloadable content."); aMap[wxS( "KIPRJMOD" )] = @@ -88,18 +88,18 @@ static void initialiseEnvVarHelp( STRING_MAP& aMap ) "variable can be used to define files and paths relative to the currently loaded " "project. For instance, ${KIPRJMOD}/libs/footprints.pretty can be defined as a " "folder containing a project specific footprint library named footprints.pretty." ); - aMap[wxS( "KICAD6_SCRIPTING_DIR" )] = + aMap[wxS( "KICAD7_SCRIPTING_DIR" )] = _( "A directory containing system-wide scripts installed with KiCad" ); - aMap[wxS( "KICAD6_USER_SCRIPTING_DIR" )] = + aMap[wxS( "KICAD7_USER_SCRIPTING_DIR" )] = _( "A directory containing user-specific scripts installed with KiCad" ); // Deprecated vars aMap[wxS( "KICAD_PTEMPLATES" )] = _( "Deprecated version of KICAD_TEMPLATE_DIR."); aMap[wxS( "KISYS3DMOD" )] = - _( "Deprecated version of KICAD6_3DMODEL_DIR." ); + _( "Deprecated version of KICAD7_3DMODEL_DIR." ); aMap[wxS( "KISYSMOD" )] = - _( "Deprecated version of KICAD6_FOOTPRINT_DIR." ); + _( "Deprecated version of KICAD7_FOOTPRINT_DIR." ); aMap[wxS( "KICAD_SYMBOL_DIR" )] = _( "Deprecated version of KICAD_SYMBOL_DIR."); } diff --git a/common/filename_resolver.cpp b/common/filename_resolver.cpp index 82a8ade055..f1ffd9cbf5 100644 --- a/common/filename_resolver.cpp +++ b/common/filename_resolver.cpp @@ -305,8 +305,8 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName, const wxStri // check the path relative to the current project directory; // NB: this is not necessarily the same as the current working directory, which has already // been checked. This case accounts for partial paths which do not contain ${KIPRJMOD}. - // This check is performed before checking the path relative to ${KICAD6_3DMODEL_DIR} so that - // users can potentially override a model within ${KICAD6_3DMODEL_DIR}. + // This check is performed before checking the path relative to ${KICAD7_3DMODEL_DIR} so that + // users can potentially override a model within ${KICAD7_3DMODEL_DIR}. if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( ":" ) ) { tmpFN.Assign( m_paths.begin()->m_Pathexp, "" ); @@ -339,11 +339,11 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName, const wxStri } } - // check the partial path relative to ${KICAD6_3DMODEL_DIR} (legacy behavior) + // check the partial path relative to ${KICAD7_3DMODEL_DIR} (legacy behavior) if( !tname.StartsWith( wxS( ":" ) ) ) { wxFileName fpath; - wxString fullPath( wxS( "${KICAD6_3DMODEL_DIR}" ) ); + wxString fullPath( wxS( "${KICAD7_3DMODEL_DIR}" ) ); fullPath.Append( fpath.GetPathSeparator() ); fullPath.Append( tname ); fullPath = ExpandEnvVarSubstitutions( fullPath, m_project ); @@ -365,8 +365,8 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName, const wxStri { if( !( m_errflags & ERRFLG_RELPATH ) ) { - // this can happen if the file was intended to be relative to ${KICAD6_3DMODEL_DIR} - // but ${KICAD6_3DMODEL_DIR} is not set or is incorrect. + // this can happen if the file was intended to be relative to ${KICAD7_3DMODEL_DIR} + // but ${KICAD7_3DMODEL_DIR} is not set or is incorrect. m_errflags |= ERRFLG_RELPATH; wxString errmsg = "[3D File Resolver] No such path"; errmsg.append( wxS( "\n" ) ); @@ -442,7 +442,7 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath ) if( !path.DirExists() ) { - if( aPath.m_Pathvar == wxS( "${KICAD6_3DMODEL_DIR}" ) + if( aPath.m_Pathvar == wxS( "${KICAD7_3DMODEL_DIR}" ) || aPath.m_Pathvar == wxS( "${KIPRJMOD}" ) || aPath.m_Pathvar == wxS( "$(KIPRJMOD)" ) || aPath.m_Pathvar == wxS( "${KISYS3DMOD}" ) || aPath.m_Pathvar == wxS( "$(KISYS3DMOD)" ) ) { @@ -795,7 +795,7 @@ bool FILENAME_RESOLVER::GetKicadPaths( std::list< wxString >& paths ) const { // filter out URLs, template directories, and known system paths if( mS->first == wxS( "KICAD_PTEMPLATES" ) - || mS->first == wxS( "KICAD6_FOOTPRINT_DIR" ) ) + || mS->first.Matches( wxS( "KICAD*_FOOTPRINT_DIR") ) ) { ++mS; continue; @@ -810,14 +810,14 @@ bool FILENAME_RESOLVER::GetKicadPaths( std::list< wxString >& paths ) const //also add the path without the ${} to act as legacy alias support for older files paths.push_back( mS->first ); - if( mS->first == wxS("KICAD6_3DMODEL_DIR") ) + if( mS->first.Matches( wxS("KICAD*_3DMODEL_DIR") ) ) hasKisys3D = true; ++mS; } if( !hasKisys3D ) - paths.emplace_back( wxS("KICAD6_3DMODEL_DIR") ); + paths.emplace_back( wxS("KICAD7_3DMODEL_DIR") ); return true; } diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 7d14f54284..e5bd0645ae 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -476,7 +476,7 @@ FOOTPRINT* FP_LIB_TABLE::FootprintLoadWithOptionalNickname( const LIB_ID& aFootp const wxString FP_LIB_TABLE::GlobalPathEnvVariableName() { - return wxS( "KICAD6_FOOTPRINT_DIR" ); + return wxS( "KICAD7_FOOTPRINT_DIR" ); } @@ -500,12 +500,12 @@ public: wxFileName dir = wxFileName::DirName( dirPath ); // consider a directory to be a lib if it's name ends with .pretty and - // it is under $KICAD6_3RD_PARTY/footprints// i.e. has nested level of at least +3 + // it is under $KICAD7_3RD_PARTY/footprints// i.e. has nested level of at least +3 if( dirPath.EndsWith( wxS( ".pretty" ) ) && dir.GetDirCount() >= m_prefix_dir_count + 3 ) { wxArrayString parts = dir.GetDirs(); parts.RemoveAt( 0, m_prefix_dir_count ); - parts.Insert( wxS( "${KICAD6_3RD_PARTY}" ), 0 ); + parts.Insert( wxS( "${KICAD7_3RD_PARTY}" ), 0 ); wxString libPath = wxJoin( parts, '/' ); @@ -563,7 +563,7 @@ bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) SystemDirsAppend( &ss ); wxString templatePath = - Pgm().GetLocalEnvVariables().at( wxT( "KICAD6_TEMPLATE_DIR" ) ).GetValue(); + Pgm().GetLocalEnvVariables().at( wxT( "KICAD7_TEMPLATE_DIR" ) ).GetValue(); if( !templatePath.IsEmpty() ) ss.AddPaths( templatePath, 0 ); @@ -584,7 +584,7 @@ bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager(); KICAD_SETTINGS* settings = mgr.GetAppSettings(); - wxString packagesPath = Pgm().GetLocalEnvVariables().at( wxT( "KICAD6_3RD_PARTY" ) ).GetValue(); + wxString packagesPath = Pgm().GetLocalEnvVariables().at( wxT( "KICAD7_3RD_PARTY" ) ).GetValue(); if( settings->m_PcmLibAutoAdd ) { diff --git a/common/settings/common_settings.cpp b/common/settings/common_settings.cpp index 770ba6e02b..4c6799ac3b 100644 --- a/common/settings/common_settings.cpp +++ b/common/settings/common_settings.cpp @@ -38,10 +38,10 @@ ///! The following environment variables will never be migrated from a previous version const std::set envVarBlacklist = { - wxT( "KICAD6_SYMBOL_DIR" ), - wxT( "KICAD6_FOOTPRINT_DIR" ), - wxT( "KICAD6_TEMPLATES_DIR" ), - wxT( "KICAD6_3DMODEL_DIR" ) + wxT( "KICAD7_SYMBOL_DIR" ), + wxT( "KICAD7_FOOTPRINT_DIR" ), + wxT( "KICAD7_TEMPLATES_DIR" ), + wxT( "KICAD7_3DMODEL_DIR" ) }; @@ -574,21 +574,21 @@ void COMMON_SETTINGS::InitializeEnvironment() wxFileName path( basePath ); path.AppendDir( wxT( "footprints" ) ); - addVar( wxT( "KICAD6_FOOTPRINT_DIR" ), path.GetFullPath() ); + addVar( wxT( "KICAD7_FOOTPRINT_DIR" ), path.GetFullPath() ); path = basePath; path.AppendDir( wxT( "3dmodels" ) ); - addVar( wxT( "KICAD6_3DMODEL_DIR" ), path.GetFullPath() ); + addVar( wxT( "KICAD7_3DMODEL_DIR" ), path.GetFullPath() ); - addVar( wxT( "KICAD6_TEMPLATE_DIR" ), PATHS::GetStockTemplatesPath() ); + addVar( wxT( "KICAD7_TEMPLATE_DIR" ), PATHS::GetStockTemplatesPath() ); addVar( wxT( "KICAD_USER_TEMPLATE_DIR" ), PATHS::GetUserTemplatesPath() ); - addVar( wxT( "KICAD6_3RD_PARTY" ), PATHS::GetDefault3rdPartyPath() ); + addVar( wxT( "KICAD7_3RD_PARTY" ), PATHS::GetDefault3rdPartyPath() ); path = basePath; path.AppendDir( wxT( "symbols" ) ); - addVar( wxT( "KICAD6_SYMBOL_DIR" ), path.GetFullPath() ); + addVar( wxT( "KICAD7_SYMBOL_DIR" ), path.GetFullPath() ); } @@ -666,9 +666,9 @@ bool COMMON_SETTINGS::readLegacy3DResolverCfg( const wxString& if( !getLegacy3DHollerith( cfgLine, idx, al.m_Alias ) ) continue; - // Don't add KICAD6_3DMODEL_DIR, one of its legacy equivalents, or KIPRJMOD from a + // Don't add KICAD7_3DMODEL_DIR, one of its legacy equivalents, or KIPRJMOD from a // config file. They're system variables are are defined at runtime. - if( al.m_Alias == wxS( "${KICAD6_3DMODEL_DIR}" ) || al.m_Alias == wxS( "${KIPRJMOD}" ) + if( al.m_Alias == wxS( "${KICAD7_3DMODEL_DIR}" ) || al.m_Alias == wxS( "${KIPRJMOD}" ) || al.m_Alias == wxS( "$(KIPRJMOD)" ) || al.m_Alias == wxS( "${KISYS3DMOD}" ) || al.m_Alias == wxS( "$(KISYS3DMOD)" ) ) { diff --git a/common/settings/settings_manager.cpp b/common/settings/settings_manager.cpp index 35d343db6c..a0739a566a 100644 --- a/common/settings/settings_manager.cpp +++ b/common/settings/settings_manager.cpp @@ -299,7 +299,7 @@ void SETTINGS_MANAGER::loadAllColorSettings() wxFileName third_party_path; const ENV_VAR_MAP& env = Pgm().GetLocalEnvVariables(); - auto it = env.find( wxS( "KICAD6_3RD_PARTY" ) ); + auto it = env.find( wxS( "KICAD7_3RD_PARTY" ) ); if( it != env.end() && !it->second.GetValue().IsEmpty() ) third_party_path.SetPath( it->second.GetValue() ); @@ -553,6 +553,10 @@ bool SETTINGS_MANAGER::MigrateIfNeeded() wxT( "KICAD6_3DMODEL_DIR" ), wxT( "KICAD6_FOOTPRINT_DIR" ), wxT( "KICAD6_TEMPLATE_DIR" ), // Stores the default library table to be copied + wxT( "KICAD7_SYMBOL_DIR" ), + wxT( "KICAD7_3DMODEL_DIR" ), + wxT( "KICAD7_FOOTPRINT_DIR" ), + wxT( "KICAD7_TEMPLATE_DIR" ), // Stores the default library table to be copied // Deprecated keys wxT( "KICAD_PTEMPLATES" ), diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 1345e5bc64..3d24dd0067 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -143,7 +143,7 @@ FOOTPRINT_LIST_IMPL GFootprintList; //!!!!!!!!!!!!!!! This code is obsolete because of the merge into Pcbnew, don't bother with it. // A short lived implementation. cvpcb will get combine into Pcbnew shortly, so -// we skip setting KICAD6_FOOTPRINT_DIR here for now. User should set the environment +// we skip setting KICAD7_FOOTPRINT_DIR here for now. User should set the environment // variable. bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) { diff --git a/cvpcb/dialogs/dialog_config_equfiles.cpp b/cvpcb/dialogs/dialog_config_equfiles.cpp index 7c284feb92..9d49bed0af 100644 --- a/cvpcb/dialogs/dialog_config_equfiles.cpp +++ b/cvpcb/dialogs/dialog_config_equfiles.cpp @@ -31,7 +31,7 @@ #include #include #include // For PROJECT_VAR_NAME definition -#include // For KICAD6_FOOTPRINT_DIR definition +#include // For KICAD7_FOOTPRINT_DIR definition #include #include diff --git a/eeschema/symbol_lib_table.cpp b/eeschema/symbol_lib_table.cpp index 5cd938dc8a..2a1ef9683b 100644 --- a/eeschema/symbol_lib_table.cpp +++ b/eeschema/symbol_lib_table.cpp @@ -520,7 +520,7 @@ LIB_SYMBOL* SYMBOL_LIB_TABLE::LoadSymbolWithOptionalNickname( const LIB_ID& aLib const wxString SYMBOL_LIB_TABLE::GlobalPathEnvVariableName() { - return "KICAD6_SYMBOL_DIR"; + return "KICAD7_SYMBOL_DIR"; } @@ -542,12 +542,12 @@ public: wxFileName file = wxFileName::FileName( aFilePath ); // consider a file to be a lib if it's name ends with .kicad_sym and - // it is under $KICAD6_3RD_PARTY/symbols// i.e. has nested level of at least +2 + // it is under $KICAD7_3RD_PARTY/symbols// i.e. has nested level of at least +2 if( file.GetExt() == wxT( "kicad_sym" ) && file.GetDirCount() >= m_prefix_dir_count + 2 ) { wxArrayString parts = file.GetDirs(); parts.RemoveAt( 0, m_prefix_dir_count ); - parts.Insert( "${KICAD6_3RD_PARTY}", 0 ); + parts.Insert( "${KICAD7_3RD_PARTY}", 0 ); parts.Add( file.GetFullName() ); wxString libPath = wxJoin( parts, '/' ); @@ -608,7 +608,7 @@ bool SYMBOL_LIB_TABLE::LoadGlobalTable( SYMBOL_LIB_TABLE& aTable ) SystemDirsAppend( &ss ); wxString templatePath = - Pgm().GetLocalEnvVariables().at( wxT( "KICAD6_TEMPLATE_DIR" ) ).GetValue(); + Pgm().GetLocalEnvVariables().at( wxT( "KICAD7_TEMPLATE_DIR" ) ).GetValue(); if( !templatePath.IsEmpty() ) ss.AddPaths( templatePath, 0 ); @@ -629,7 +629,7 @@ bool SYMBOL_LIB_TABLE::LoadGlobalTable( SYMBOL_LIB_TABLE& aTable ) SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager(); KICAD_SETTINGS* settings = mgr.GetAppSettings(); - wxString packagesPath = Pgm().GetLocalEnvVariables().at( wxT( "KICAD6_3RD_PARTY" ) ).GetValue(); + wxString packagesPath = Pgm().GetLocalEnvVariables().at( wxT( "KICAD7_3RD_PARTY" ) ).GetValue(); if( settings->m_PcmLibAutoAdd ) { diff --git a/include/filename_resolver.h b/include/filename_resolver.h index 4570f60215..d38a74333e 100644 --- a/include/filename_resolver.h +++ b/include/filename_resolver.h @@ -50,7 +50,7 @@ struct SEARCH_PATH * Provide an extensible class to resolve 3D model paths. * * Initially the legacy behavior will be implemented and an incomplete path would be checked - * against the project directory or the KICAD6_3DMODEL_DIR environment variable. In the future a + * against the project directory or the KICAD7_3DMODEL_DIR environment variable. In the future a * configurable set of search paths may be specified. */ class FILENAME_RESOLVER @@ -136,13 +136,13 @@ public: /** * Return a list of path environment variables local to KiCad. * - * This list always includes KICAD6_3DMODEL_DIR even if it is not defined locally. + * This list always includes KICAD7_3DMODEL_DIR even if it is not defined locally. */ bool GetKicadPaths( std::list< wxString >& paths ) const; private: /** - * Build the path list using available information such as KICAD6_3DMODEL_DIR and the 3d_path_list + * Build the path list using available information such as KICAD7_3DMODEL_DIR and the 3d_path_list * configuration file. * * @warning Invalid paths are silently discarded and removed from the configuration file. diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 311a011d8b..551cbd012a 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -194,8 +194,8 @@ bool PGM_KICAD::OnPgmInit() m_bm.m_search.AddPaths( fn.GetPath() ); } - // The KICAD6_TEMPLATE_DIR takes precedence over the search stack template path. - ENV_VAR_MAP_CITER it = GetLocalEnvVariables().find( "KICAD6_TEMPLATE_DIR" ); + // The KICAD7_TEMPLATE_DIR takes precedence over the search stack template path. + ENV_VAR_MAP_CITER it = GetLocalEnvVariables().find( "KICAD7_TEMPLATE_DIR" ); if( it != GetLocalEnvVariables().end() && it->second.GetValue() != wxEmptyString ) m_bm.m_search.Insert( it->second.GetValue(), 0 ); diff --git a/kicad/pcm/pcm.cpp b/kicad/pcm/pcm.cpp index 19082eab52..ff3ea27fe8 100644 --- a/kicad/pcm/pcm.cpp +++ b/kicad/pcm/pcm.cpp @@ -224,7 +224,7 @@ void PLUGIN_CONTENT_MANAGER::ReadEnvVar() { // Get 3rd party path const ENV_VAR_MAP& env = Pgm().GetLocalEnvVariables(); - auto it = env.find( wxT( "KICAD6_3RD_PARTY" ) ); + auto it = env.find( wxT( "KICAD7_3RD_PARTY" ) ); if( it != env.end() && !it->second.GetValue().IsEmpty() ) m_3rdparty_path = it->second.GetValue(); diff --git a/kicad/pcm/pcm_task_manager.cpp b/kicad/pcm/pcm_task_manager.cpp index 0c99f0c2ef..20e4d7f353 100644 --- a/kicad/pcm/pcm_task_manager.cpp +++ b/kicad/pcm/pcm_task_manager.cpp @@ -274,7 +274,7 @@ bool PCM_TASK_MANAGER::extract( const wxString& aFilePath, const wxString& aPack // Transform paths from // /$folder/$contents // To - // $KICAD6_3RD_PARTY/$folder/$package_id/$contents + // $KICAD7_3RD_PARTY/$folder/$package_id/$contents path_parts.Insert( clean_package_id, 1 ); path_parts.Insert( m_pcm->Get3rdPartyPath(), 0 ); diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index 9b9d9a36ee..a1978bcf21 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -145,7 +145,7 @@ int KICAD_MANAGER_CONTROL::NewFromTemplate( const TOOL_EVENT& aEvent ) wxFileName templatePath; // KiCad system template path. - ENV_VAR_MAP_CITER it = Pgm().GetLocalEnvVariables().find( "KICAD6_TEMPLATE_DIR" ); + ENV_VAR_MAP_CITER it = Pgm().GetLocalEnvVariables().find( "KICAD7_TEMPLATE_DIR" ); if( it != Pgm().GetLocalEnvVariables().end() && it->second.GetValue() != wxEmptyString ) { diff --git a/pcbnew/dialogs/panel_fp_lib_table.cpp b/pcbnew/dialogs/panel_fp_lib_table.cpp index 9efd887886..8f580c637d 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table.cpp @@ -39,7 +39,7 @@ #include #include -#include <3d_viewer/eda_3d_viewer_frame.h> // for KICAD6_3DMODEL_DIR +#include <3d_viewer/eda_3d_viewer_frame.h> // for KICAD7_3DMODEL_DIR #include #include #include @@ -1049,7 +1049,7 @@ void PANEL_FP_LIB_TABLE::populateEnvironReadOnlyTable() unique.insert( PROJECT_VAR_NAME ); unique.insert( FP_LIB_TABLE::GlobalPathEnvVariableName() ); // This special environment variable is used to locate 3d shapes - unique.insert( KICAD6_3DMODEL_DIR ); + unique.insert( KICAD7_3DMODEL_DIR ); for( const wxString& evName : unique ) { diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp index d8091e4230..c3fc61eeec 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp @@ -76,7 +76,7 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( PCBNEW_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings(); if( cfg->m_lastFootprint3dDir.IsEmpty() ) - wxGetEnv( KICAD6_3DMODEL_DIR, &cfg->m_lastFootprint3dDir ); + wxGetEnv( KICAD7_3DMODEL_DIR, &cfg->m_lastFootprint3dDir ); // Icon showing warning/error information wxGridCellAttr* attr = new wxGridCellAttr; @@ -144,7 +144,7 @@ bool PANEL_FP_PROPERTIES_3D_MODEL::TransferDataFromWindow() void PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint() { wxString default_path; - wxGetEnv( KICAD6_3DMODEL_DIR, &default_path ); + wxGetEnv( KICAD7_3DMODEL_DIR, &default_path ); #ifdef __WINDOWS__ default_path.Replace( wxT( "/" ), wxT( "\\" ) ); @@ -287,11 +287,11 @@ void PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel( wxCommandEvent& ) wxString sidx = prj.GetRString( PROJECT::VIEWER_3D_FILTER_INDEX ); int filter = 0; - // If the PROJECT::VIEWER_3D_PATH hasn't been set yet, use the KICAD6_3DMODEL_DIR environment + // If the PROJECT::VIEWER_3D_PATH hasn't been set yet, use the KICAD7_3DMODEL_DIR environment // variable and fall back to the project path if necessary. if( initialpath.IsEmpty() ) { - if( !wxGetEnv( wxT( "KICAD6_3DMODEL_DIR" ), &initialpath ) || initialpath.IsEmpty() ) + if( !wxGetEnv( wxT( "KICAD7_3DMODEL_DIR" ), &initialpath ) || initialpath.IsEmpty() ) initialpath = prj.GetProjectPath(); } diff --git a/pcbnew/dialogs/panel_pcbnew_color_settings.cpp b/pcbnew/dialogs/panel_pcbnew_color_settings.cpp index f7cefff581..72aeb8661e 100644 --- a/pcbnew/dialogs/panel_pcbnew_color_settings.cpp +++ b/pcbnew/dialogs/panel_pcbnew_color_settings.cpp @@ -82,7 +82,7 @@ std::string g_previewBoard = " (net 1 \"GND\") (tstamp 7920b7f9-55c4-4584-bf5c-436e8ef95e74))\n" " (pad \"2\" thru_hole circle (at 2 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask)\n" " (net 1 \"GND\") (tstamp e4c29d51-7825-48f6-aae3-5e0ea3eb6e7a))\n" - " (model \"${KICAD6_3DMODEL_DIR}/Capacitors_THT.3dshapes/CP_Radial_D5.0mm_P2.00mm.wrl\"\n" + " (model \"${KICAD7_3DMODEL_DIR}/Capacitors_THT.3dshapes/CP_Radial_D5.0mm_P2.00mm.wrl\"\n" " (offset (xyz 0 0 0))\n" " (scale (xyz 1 1 1))\n" " (rotate (xyz 0 0 0))\n" @@ -155,7 +155,7 @@ std::string g_previewBoard = " (pad \"1\" thru_hole circle (at 0 0) (size 1.8 1.8) (drill 0.85) (layers *.Cu *.Mask)\n" " (net 1 \"GND\") (tstamp def83b42-5ec2-442a-8f2b-ffd7b14105ce))\n" " (pad \"2\" thru_hole circle (at 10.16 0) (size 1.8 1.8) (drill 0.85) (layers *.Cu *.Mask) (tstamp 6386fdb7-f3d1-4839-9830-ab733b3e8d94))\n" - " (model \"${KICAD6_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n" + " (model \"${KICAD7_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n" " (offset (xyz 0 0 0))\n" " (scale (xyz 0.393701 0.393701 0.393701))\n" " (rotate (xyz 0 0 0))\n" @@ -193,7 +193,7 @@ std::string g_previewBoard = " (pad \"1\" thru_hole circle (at 0 0) (size 1.8 1.8) (drill 0.85) (layers *.Cu *.Mask)\n" " (net 1 \"GND\") (tstamp 5a702112-f16c-4b59-9902-914db0fa4360))\n" " (pad \"2\" thru_hole circle (at 10.16 0) (size 1.8 1.8) (drill 0.85) (layers *.Cu *.Mask) (tstamp b2b0d740-b086-433e-90f5-ffe119efdd07))\n" - " (model \"${KICAD6_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n" + " (model \"${KICAD7_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n" " (offset (xyz 0 0 0))\n" " (scale (xyz 0.393701 0.393701 0.393701))\n" " (rotate (xyz 0 0 0))\n" @@ -230,7 +230,7 @@ std::string g_previewBoard = " (fp_line (start 8.23 -1.25) (end 1.93 -1.25) (layer \"F.Fab\") (width 0.1) (tstamp c0322b20-ac45-4f20-bbab-44368f60ac5d))\n" " (pad \"1\" thru_hole circle (at 0 0 180) (size 1.8 1.8) (drill 0.85) (layers *.Cu *.Mask) (tstamp 945fccb0-61fe-41e2-8f09-c8a33f294a3e))\n" " (pad \"2\" thru_hole circle (at 10.16 0 180) (size 1.8 1.8) (drill 0.85) (layers *.Cu *.Mask) (tstamp d8e786d3-14bf-403c-80db-810abc9eda53))\n" - " (model \"${KICAD6_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n" + " (model \"${KICAD7_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n" " (offset (xyz 0 0 0))\n" " (scale (xyz 0.393701 0.393701 0.393701))\n" " (rotate (xyz 0 0 0))\n" @@ -265,7 +265,7 @@ std::string g_previewBoard = " (net 1 \"GND\") (tstamp 7ef87fdc-802f-4acb-9867-18732d4a7e7a))\n" " (pad \"2\" thru_hole circle (at 2 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask)\n" " (net 1 \"GND\") (tstamp 1ad1f5f9-68f6-4131-9e09-bd1d361fc282))\n" - " (model \"${KICAD6_3DMODEL_DIR}/Capacitors_THT.3dshapes/CP_Radial_D5.0mm_P2.00mm.wrl\"\n" + " (model \"${KICAD7_3DMODEL_DIR}/Capacitors_THT.3dshapes/CP_Radial_D5.0mm_P2.00mm.wrl\"\n" " (offset (xyz 0 0 0))\n" " (scale (xyz 1 1 1))\n" " (rotate (xyz 0 0 0))\n" diff --git a/scripting/python_scripting.cpp b/scripting/python_scripting.cpp index 50e8aac7ca..87bd67606a 100644 --- a/scripting/python_scripting.cpp +++ b/scripting/python_scripting.cpp @@ -537,7 +537,7 @@ wxString SCRIPTING::PyScriptingPath( PATH_TYPE aPathType ) break; case THIRDPARTY: const ENV_VAR_MAP& env = Pgm().GetLocalEnvVariables(); - auto it = env.find( "KICAD6_3RD_PARTY" ); + auto it = env.find( "KICAD7_3RD_PARTY" ); if( it != env.end() && !it->second.GetValue().IsEmpty() ) path = it->second.GetValue();