Add share/locale to catalog paths on windows

(cherry picked from commit fc62d36441)
This commit is contained in:
Marek Roszko 2024-01-15 22:08:17 -05:00 committed by Mark Roszko
parent 6e93c08ff2
commit 9ceace2a47
3 changed files with 21 additions and 0 deletions

View File

@ -183,6 +183,17 @@ wxString PATHS::GetStockDataPath( bool aRespectRunFromBuildDir )
}
#ifdef __WXMSW__
/**
* Gets the stock (install) data path, which is the base path for things like scripting, etc
*/
wxString PATHS::GetWindowsBaseSharePath()
{
return getWindowsKiCadRoot() + wxT( "share\\" );
}
#endif
wxString PATHS::GetStockEDALibraryPath()
{
wxString path;

View File

@ -814,6 +814,10 @@ wxString PGM_BASE::GetLanguageTag()
void PGM_BASE::SetLanguagePath()
{
#ifdef _MSC_VER
wxLocale::AddCatalogLookupPathPrefix( PATHS::GetWindowsBaseSharePath()
+ wxT( "locale" ) );
#endif
wxLocale::AddCatalogLookupPathPrefix( PATHS::GetLocaleDataPath() );
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )

View File

@ -175,6 +175,12 @@ public:
* @return The macOS specific bundle data directory for KiCad
*/
static wxString GetWindowsFontConfigDir();
/**
* Gets the stock (install) data path, which is the base path for things like scripting, etc
*/
static wxString GetWindowsBaseSharePath();
#endif
private: