Add modules path in build dir if --debug.
Also fix config.h location.
This commit is contained in:
parent
392c8ec108
commit
ef48f36445
@ -68,7 +68,24 @@ Settings::Settings( QObject* parent )
|
|||||||
for ( int i = 0; i < rawPaths.length(); ++i )
|
for ( int i = 0; i < rawPaths.length(); ++i )
|
||||||
{
|
{
|
||||||
if ( rawPaths[ i ] == "local" )
|
if ( rawPaths[ i ] == "local" )
|
||||||
m_modulesSearchPaths.append( CalamaresUtils::appDataDir().absolutePath() + QDir::separator() + "modules" );
|
{
|
||||||
|
// If we're running in debug mode, we assume we might also be
|
||||||
|
// running from the build dir, so we add a maximum priority
|
||||||
|
// module search path in the build dir.
|
||||||
|
if ( APP->isDebug() )
|
||||||
|
{
|
||||||
|
QString buildDirModules = QDir::current().absolutePath() +
|
||||||
|
QDir::separator() + "src" +
|
||||||
|
QDir::separator() + "modules";
|
||||||
|
if ( QDir( buildDirModules ).exists() )
|
||||||
|
m_modulesSearchPaths.append( buildDirModules );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install path is set in CalamaresAddPlugin.cmake
|
||||||
|
m_modulesSearchPaths.append( CalamaresUtils::systemLibDir().absolutePath() +
|
||||||
|
QDir::separator() + "calamares" +
|
||||||
|
QDir::separator() + "modules" );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDir path( rawPaths[ i ] );
|
QDir path( rawPaths[ i ] );
|
||||||
|
@ -5,7 +5,7 @@ add_definitions( -DQT_SHARED )
|
|||||||
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
|
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
|
||||||
add_definitions( -DDLLEXPORT_PRO )
|
add_definitions( -DDLLEXPORT_PRO )
|
||||||
|
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../calamares/Config.h.in
|
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/config.h )
|
${CMAKE_CURRENT_BINARY_DIR}/config.h )
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../calamares/CalamaresVersion.h.in
|
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../calamares/CalamaresVersion.h.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h )
|
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h )
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
||||||
#define CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}"
|
#define CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}"
|
||||||
#define CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}"
|
#define CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}"
|
||||||
|
#define CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}"
|
||||||
#define CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/calamares"
|
#define CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/calamares"
|
||||||
|
|
||||||
//cmakedefines for CMake variables (e.g. for optdepends) go here
|
//cmakedefines for CMake variables (e.g. for optdepends) go here
|
@ -45,6 +45,17 @@ appDataDir()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QDir
|
||||||
|
systemLibDir()
|
||||||
|
{
|
||||||
|
QDir path( CMAKE_INSTALL_FULL_LIBDIR );
|
||||||
|
if ( !path.exists() || !path.isReadable() )
|
||||||
|
path.mkpath( path.absolutePath() );
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QDir
|
QDir
|
||||||
appLogDir()
|
appLogDir()
|
||||||
{
|
{
|
||||||
|
@ -33,6 +33,7 @@ namespace CalamaresUtils
|
|||||||
{
|
{
|
||||||
DLLEXPORT QDir appDataDir();
|
DLLEXPORT QDir appDataDir();
|
||||||
DLLEXPORT QDir appLogDir();
|
DLLEXPORT QDir appLogDir();
|
||||||
|
DLLEXPORT QDir systemLibDir();
|
||||||
DLLEXPORT void installTranslator( QObject* parent );
|
DLLEXPORT void installTranslator( QObject* parent );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user