From 605dcfbedf05bf8be637a801925e366cbad23bb7 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 13 Jan 2021 13:11:26 -0800 Subject: [PATCH] Fix Windows script location Windows has arbitrary installation locations, so reference relative to the executable --- pcbnew/swig/python_scripting.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/swig/python_scripting.cpp b/pcbnew/swig/python_scripting.cpp index ac438693c6..7fe0e6d624 100644 --- a/pcbnew/swig/python_scripting.cpp +++ b/pcbnew/swig/python_scripting.cpp @@ -657,8 +657,11 @@ wxString PyScriptingPath( bool aUserPath ) } else { + //TODO(snh) break out the directory functions into KIPLATFORM #if defined( __WXMAC__ ) path = GetOSXKicadDataDir() + wxT( "/scripting" ); +#elif defined( __WXMSW__ ) + path = Pgm().GetExecutablePath() + wxT( "../share/kicad/scripting" ); #else path = KICAD_DATA + wxS( "/scripting" ); #endif