mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-25 16:38:21 -04:00
[welcome] Make libparted optional
- This turns off the space-available check in the welcome module; without libparted, always fail that check. - Allows running the welcome module on OS without libparted.
This commit is contained in:
parent
b0c4fbc1bb
commit
2bc394656d
2 changed files with 18 additions and 7 deletions
|
@ -1,20 +1,24 @@
|
||||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
||||||
|
|
||||||
find_package( LIBPARTED REQUIRED )
|
|
||||||
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network )
|
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network )
|
||||||
|
|
||||||
|
find_package( LIBPARTED )
|
||||||
|
if ( LIBPARTED_FOUND )
|
||||||
|
set( PARTMAN_SRC checker/partman_devices.c )
|
||||||
|
set( CHECKER_LINK_LIBRARIES ${LIBPARTED_LIBRARY} )
|
||||||
|
else()
|
||||||
|
set( PARTMAN_SRC )
|
||||||
|
set( CHECKER_LINK_LIBRARIES )
|
||||||
|
add_definitions( -DWITHOUT_LIBPARTED )
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
||||||
|
|
||||||
set( CHECKER_SOURCES
|
set( CHECKER_SOURCES
|
||||||
checker/CheckItemWidget.cpp
|
checker/CheckItemWidget.cpp
|
||||||
checker/CheckerWidget.cpp
|
checker/CheckerWidget.cpp
|
||||||
checker/RequirementsChecker.cpp
|
checker/RequirementsChecker.cpp
|
||||||
checker/partman_devices.c
|
${PARTMAN_SRC}
|
||||||
)
|
|
||||||
set( CHECKER_LINK_LIBRARIES
|
|
||||||
${LIBPARTED_LIBRARY}
|
|
||||||
Qt5::DBus
|
|
||||||
Qt5::Network
|
|
||||||
)
|
)
|
||||||
|
|
||||||
calamares_add_plugin( welcome
|
calamares_add_plugin( welcome
|
||||||
|
@ -29,5 +33,7 @@ calamares_add_plugin( welcome
|
||||||
LINK_PRIVATE_LIBRARIES
|
LINK_PRIVATE_LIBRARIES
|
||||||
calamaresui
|
calamaresui
|
||||||
${CHECKER_LINK_LIBRARIES}
|
${CHECKER_LINK_LIBRARIES}
|
||||||
|
Qt5::DBus
|
||||||
|
Qt5::Network
|
||||||
SHARED_LIB
|
SHARED_LIB
|
||||||
)
|
)
|
||||||
|
|
|
@ -313,7 +313,12 @@ RequirementsChecker::verdict() const
|
||||||
bool
|
bool
|
||||||
RequirementsChecker::checkEnoughStorage( qint64 requiredSpace )
|
RequirementsChecker::checkEnoughStorage( qint64 requiredSpace )
|
||||||
{
|
{
|
||||||
|
#ifdef WITHOUT_LIBPARTED
|
||||||
|
cDebug() << "WARNING: RequirementsChecker is configured without libparted.";
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
return check_big_enough( requiredSpace );
|
return check_big_enough( requiredSpace );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue