Use paths relative to the executable on Windows
Paths based on DEFAULT_INSTALL_PATH do not work on Windows, as in fact there is no default install path, as in case of Unix-based systems. In such case, the initial paths point to mingw subdirectories that normally do not exist on user machines. The patch changes the initial path values to make them relative to the executable and follow the current Windows installer scheme. Fixes: lp:1775796 * https://bugs.launchpad.net/kicad/+bug/1775796
This commit is contained in:
parent
9d1b5698e9
commit
f10aa6c857
|
@ -473,7 +473,15 @@ bool PGM_BASE::InitPgm()
|
|||
m_local_env_vars[ envVarName ] = envVarItem;
|
||||
|
||||
wxFileName baseSharePath;
|
||||
#if defined( __WXMSW__ )
|
||||
// Make the paths relative to the executable dir as KiCad might be installed anywhere
|
||||
// It follows the Windows installer paths scheme, where binaries are installed in
|
||||
// PATH/bin and extra files in PATH/share/kicad
|
||||
baseSharePath.AssignDir( m_bin_dir + "\\.." );
|
||||
baseSharePath.Normalize();
|
||||
#else
|
||||
baseSharePath.AssignDir( wxString( wxT( DEFAULT_INSTALL_PATH ) ) );
|
||||
#endif
|
||||
|
||||
#if !defined( __WXMAC__ )
|
||||
baseSharePath.AppendDir( wxT( "share" ) );
|
||||
|
|
Loading…
Reference in New Issue