[calamares] Make KCoreAddons a requirement

- Require KCoreAddons for KAboutData (also, optionally, for KOSRelease)
main
Adriaan de Groot 5 years ago
parent a6db224fcb
commit bcb7f17584

@ -261,6 +261,8 @@ if( Qt5_VERSION VERSION_GREATER 5.12.1 )
list( APPEND _tx_ok "eo" )
endif()
endif()
# Optional Qt parts
find_package( Qt5DBus CONFIG )
find_package( YAMLCPP ${YAMLCPP_VERSION} REQUIRED )
if( INSTALL_POLKIT )
@ -291,7 +293,14 @@ if( ECM_FOUND )
include(KDEInstallDirs)
endif()
find_package( KF5 COMPONENTS CoreAddons Crash )
find_package( KF5 QUIET COMPONENTS CoreAddons Crash )
set_package_properties(
KF5::CoreAddons PROPERTIES
TYPE REQUIRED
DESCRIPTION "Classes built on QtCore for About Data"
URL "https://api.kde.org/frameworks/kcoreaddons/"
PURPOSE "About Calamares"
)
if( NOT KF5Crash_FOUND )
set( WITH_KF5Crash OFF )
endif()
@ -590,10 +599,25 @@ add_custom_target( uninstall
### CMAKE SUMMARY REPORT
#
feature_summary(WHAT ALL)
get_directory_property( SKIPPED_MODULES
DIRECTORY src/modules
DEFINITION LIST_SKIPPED_MODULES
)
calamares_explain_skipped_modules( ${SKIPPED_MODULES} )
feature_summary(
WHAT DISABLED_FEATURES
DESCRIPTION "The following features have been disabled:"
QUIET_ON_EMPTY
)
feature_summary(
WHAT OPTIONAL_PACKAGES_NOT_FOUND
DESCRIPTION "The following OPTIONAL packages were not found:"
QUIET_ON_EMPTY
)
feature_summary(
WHAT REQUIRED_PACKAGES_NOT_FOUND
FATAL_ON_MISSING_REQUIRED_PACKAGES
DESCRIPTION "The following REQUIRED packages were not found:"
QUIET_ON_EMPTY
)

@ -46,11 +46,11 @@ target_link_libraries( calamares_bin
calamaresui
Qt5::Core
Qt5::Widgets
KF5::CoreAddons
)
if( WITH_KF5Crash )
target_link_libraries( calamares_bin
PRIVATE
KF5::CoreAddons
KF5::Crash
)
target_compile_definitions( calamares_bin PRIVATE WITH_KF5Crash )

@ -26,8 +26,8 @@
#include "3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
#ifdef WITH_KF5Crash
#include <KF5/KCoreAddons/KAboutData>
#ifdef WITH_KF5Crash
#include <KF5/KCrash/KCrash>
#endif
@ -93,7 +93,6 @@ main( int argc, char* argv[] )
{
CalamaresApplication a( argc, argv );
#ifdef WITH_KF5Crash
KAboutData aboutData( "calamares",
"Calamares",
a.applicationVersion(),
@ -104,12 +103,14 @@ main( int argc, char* argv[] )
"https://calamares.io",
"https://github.com/calamares/calamares/issues" );
KAboutData::setApplicationData( aboutData );
a.setApplicationDisplayName( QString() ); // To avoid putting an extra "Calamares/" into the log-file
#ifdef WITH_KF5Crash
KCrash::initialize();
// KCrash::setCrashHandler();
KCrash::setDrKonqiEnabled( true );
KCrash::setFlags( KCrash::SaferDialog | KCrash::AlwaysDirectly );
// TODO: umount anything in /tmp/calamares-... as an emergency save function
a.setApplicationDisplayName( QString() );
#endif
handle_args( a );

Loading…
Cancel
Save