Default KISYSMOD and KISYS3DMOD path fixes. (fixes lp:1455472)

This commit is contained in:
Wayne Stambaugh 2015-07-20 20:46:58 -04:00
parent 752d0df916
commit 8482637c83
1 changed files with 16 additions and 2 deletions

View File

@ -421,8 +421,15 @@ bool PGM_BASE::initPgm()
envVarItem.SetDefinedExternally( wxGetEnv( envVarName, NULL ) );
m_local_env_vars[ envVarName ] = envVarItem;
wxFileName tmpFileName;
tmpFileName.AssignDir( wxString( wxT( DEFAULT_INSTALL_PATH ) ) );
wxFileName baseSharePath;
baseSharePath.AssignDir( wxString( wxT( DEFAULT_INSTALL_PATH ) ) );
#if !defined( __WXMAC__ )
baseSharePath.AppendDir( wxT( "share" ) );
baseSharePath.AppendDir( wxT( "kicad" ) );
#endif
wxFileName tmpFileName = baseSharePath;
tmpFileName.AppendDir( wxT( "modules" ) );
envVarName = wxT( "KISYSMOD" );
envVarItem.SetValue( tmpFileName.GetPath() );
@ -434,6 +441,13 @@ bool PGM_BASE::initPgm()
envVarItem.SetValue( tmpFileName.GetPath() );
envVarItem.SetDefinedExternally( wxGetEnv( envVarName, NULL ) );
m_local_env_vars[ envVarName ] = envVarItem;
envVarName = wxT( "KICAD_PTEMPLATES" );
tmpFileName = baseSharePath;
tmpFileName.AppendDir( wxT( "template" ) );
envVarItem.SetValue( tmpFileName.GetPath() );
envVarItem.SetDefinedExternally( wxGetEnv( envVarName, NULL ) );
m_local_env_vars[ envVarName ] = envVarItem;
}
ReadPdfBrowserInfos(); // needs m_common_settings