mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-18 19:29:17 +00:00
Allow AppImages to pick out different location
Don't assume that libraries are located in the CMAKE lib install directory as AppImage will relocate them based on the mount point
This commit is contained in:
parent
a32c0a8687
commit
2afa67f946
@ -381,10 +381,24 @@ wxString PATHS::GetStockPlugins3DPath()
|
||||
fn.AppendDir( wxT( "PlugIns" ) );
|
||||
}
|
||||
#else
|
||||
// KICAD_PLUGINDIR = CMAKE_INSTALL_FULL_LIBDIR path is the absolute path
|
||||
// corresponding to the install path used for constructing KICAD_USER_PLUGIN
|
||||
wxString tfname = wxString::FromUTF8Unchecked( KICAD_PLUGINDIR );
|
||||
fn.Assign( tfname, "" );
|
||||
wxString envPath;
|
||||
|
||||
// AppImages have a different path to the plugins, otherwise we end up with host sytem
|
||||
// plugins being loaded.
|
||||
if( wxGetEnv( wxT( "APPIMAGE" ), nullptr ) && wxGetEnv( wxT( "APPDIR" ), &envPath ) )
|
||||
{
|
||||
fn.AssignDir( envPath );
|
||||
fn.AppendDir( wxT( "usr" ) );
|
||||
fn.AppendDir( wxT( "lib" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
// KICAD_PLUGINDIR = CMAKE_INSTALL_FULL_LIBDIR path is the absolute path
|
||||
// corresponding to the install path used for constructing KICAD_USER_PLUGIN
|
||||
wxString tfname = wxString::FromUTF8Unchecked( KICAD_PLUGINDIR );
|
||||
fn.Assign( tfname, "" );
|
||||
}
|
||||
|
||||
fn.AppendDir( wxT( "kicad" ) );
|
||||
fn.AppendDir( wxT( "plugins" ) );
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user