From 9b54537e383e6bedf056cbfaac5391d2a36d55d3 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 5 Mar 2024 23:18:06 -0500 Subject: [PATCH] Add environment variable for configuring stock data home Fixes https://gitlab.com/kicad/code/kicad/-/issues/15687 --- common/paths.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/paths.cpp b/common/paths.cpp index efe0604e41..966cf95e42 100644 --- a/common/paths.cpp +++ b/common/paths.cpp @@ -169,6 +169,10 @@ wxString PATHS::GetStockDataPath( bool aRespectRunFromBuildDir ) path = GetExecutablePath() + wxT( ".." ); #endif } + else if( wxGetEnv( wxT( "KICAD_STOCK_DATA_HOME" ), &path ) && !path.IsEmpty() ) + { + return path; + } else { #if defined( __WXMAC__ )