Fix more wxWidgets 3.1 and later deprecated build warnings.

This commit is contained in:
Wayne Stambaugh 2022-08-17 14:13:33 -04:00
parent cfde5300d7
commit 40977514ce
2 changed files with 6 additions and 3 deletions

View File

@ -188,7 +188,7 @@ bool FILENAME_RESOLVER::createPathList()
}
else
{
fndummy.Assign( pathVal, "" );
fndummy.Assign( pathVal, wxEmptyString );
fndummy.Normalize( FN_NORMALIZE_FLAGS );
lpath.m_Pathexp = fndummy.GetFullPath();
}

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 NBEE Embedded Systems, Miguel Angel Ajo <miguelangel@nbee.es>
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -45,6 +45,7 @@
#include <paths.h>
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <wx_filename.h>
#include <kiplatform/environment.h>
@ -120,7 +121,9 @@ bool SCRIPTING::scriptingSetup()
pyHome.Assign( Pgm().GetExecutablePath() );
pyHome.Normalize();
// @warning Do we want to use our own ExpandEnvVarSubstitutions() here rather than depend
// on wxFileName::Normalize() to expand environment variables.
pyHome.Normalize( FN_NORMALIZE_FLAGS | wxPATH_NORM_ENV_VARS );
// MUST be called before Py_Initialize so it will to create valid default lib paths
if( !wxGetEnv( wxT( "KICAD_USE_EXTERNAL_PYTHONHOME" ), nullptr ) )