Commit a098e510 authored by Matthias Klumpp's avatar Matthias Klumpp

Imported Upstream version 2.2

parent a0a52393
......@@ -56,6 +56,12 @@ find_package( YamlCpp 0.5.1 REQUIRED )
find_package( PolkitQt5-1 REQUIRED )
option( WITH_PYTHON "Enable Python modules support." ON )
option( WITH_CRASHREPORTER "Build with CrashReporter" ON )
if( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libcrashreporter-qt/CMakeLists.txt" )
message( STATUS "Build of crashreporter disabled." )
set( WITH_CRASHREPORTER OFF )
endif()
macro_optional_find_package( PythonLibs 3.3 )
macro_log_feature(
......@@ -94,7 +100,7 @@ set( CALAMARES_DESCRIPTION_SUMMARY "The distribution-independent installer frame
set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX es eu fr hu id is it_IT ja lt nl pl pt_BR pt_PT ro ru sv th tr_TR zh_CN zh_TW )
set( CALAMARES_VERSION_MAJOR 2 )
set( CALAMARES_VERSION_MINOR 0 )
set( CALAMARES_VERSION_MINOR 2 )
set( CALAMARES_VERSION_PATCH 0 )
set( CALAMARES_VERSION_RC 0 )
......@@ -152,6 +158,9 @@ file( COPY CalamaresAddBrandingSubdirectory.cmake DESTINATION "${PROJECT_BINARY_
set( CALAMARES_LIBRARIES calamares )
set( THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty" )
add_subdirectory( thirdparty )
add_subdirectory( src )
macro_display_feature_log()
......
......@@ -27,7 +27,7 @@ Modules:
* partition:
* extra-cmake-modules
* KF5: KCoreAddons, KConfig, KI18n, KIconThemes, KIO, KService
* KPMcore >= 2.0
* KPMcore >= 2.1
* sgdisk
* bootloader:
* systemd-boot or GRUB
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -25,3 +25,6 @@ add_subdirectory( modules )
# branding components
add_subdirectory( branding )
if( WITH_CRASHREPORTER )
add_subdirectory( crashreporter )
endif()
......@@ -19,7 +19,7 @@ set( calamaresSources
)
set( calamaresUi
CalamaresWindow.ui
#nothing to do here
)
include_directories(
......@@ -27,6 +27,8 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../libcalamares
${THIRDPARTY_DIR}/libcrashreporter-qt/src/
../libcalamares
../libcalamaresui
)
......@@ -51,15 +53,18 @@ SET_TARGET_PROPERTIES(calamares_bin
RUNTIME_OUTPUT_NAME calamares
)
if( WITH_CRASHREPORTER )
list( APPEND LINK_LIBRARIES ${LINK_LIBRARIES} pthread crashreporter-handler )
endif()
qt5_use_modules( calamares_bin Core Widgets )
target_link_libraries( calamares_bin
${LINK_LIBRARIES}
${CALAMARES_LIBRARIES}
calamaresui
Qt5::Core
Qt5::Widgets
yaml-cpp
${LINK_LIBRARIES}
)
install( TARGETS calamares_bin
......
This diff is collapsed.
......@@ -22,6 +22,10 @@
#include "kdsingleapplicationguard/kdsingleapplicationguard.h"
#include "utils/CalamaresUtils.h"
#include "utils/Logger.h"
#include "CalamaresConfig.h"
#ifdef WITH_CRASHREPORTER
#include "libcrashreporter-handler/Handler.h"
#endif
#include <QCommandLineParser>
#include <QDebug>
......@@ -32,6 +36,13 @@ main( int argc, char* argv[] )
{
CalamaresApplication a( argc, argv );
#ifdef WITH_CRASHREPORTER
CrashReporter::Handler* handler =
new CrashReporter::Handler( QDir::tempPath(),
true,
"calamares_crash_reporter" );
#endif
QCommandLineParser parser;
parser.setApplicationDescription( "Distribution-independent installer framework" );
parser.addHelpOption();
......
PROJECT( CrashReporter )
cmake_policy(SET CMP0017 NEW)
set(CALAMARES_CRASH_REPORTER_TARGET calamares_crash_reporter)
list(APPEND crashreporter_SOURCES main.cpp)
list(APPEND crashreporter_RC resources.qrc)
qt5_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
qt5_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
if(BUILD_RELEASE)
set(CRASHREPORTER_RELEASE_CHANNEL "release")
else()
set(CRASHREPORTER_RELEASE_CHANNEL "nightly")
endif()
set(CRASHREPORTER_SUBMIT_URL "https://calamares.io/oops/addreport.php")
set(CRASHREPORTER_ICON ":/squid.svg")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CrashReporterConfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/CrashReporterConfig.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR}
../../libcalamares
../../libcalamaresui
../../thirdparty/libcrashreporter-qt/src
)
add_executable( ${CALAMARES_CRASH_REPORTER_TARGET}
${crashreporter_SOURCES}
${crashreporter_HEADERS_MOC}
${crashreporter_UI_HEADERS}
${crashreporter_RC_RCC}
)
target_link_libraries( ${CALAMARES_CRASH_REPORTER_TARGET}
${CALAMARES_LIBRARIES}
crashreporter-gui
${QT_LIBRARIES}
)
set_target_properties(${CALAMARES_CRASH_REPORTER_TARGET} PROPERTIES AUTOMOC ON)
install(TARGETS ${CALAMARES_CRASH_REPORTER_TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
qt5_use_modules(${CALAMARES_CRASH_REPORTER_TARGET} Widgets Network)
#ifndef CRASHREPORTERCONFIG_H
#define CRASHREPORTERCONFIG_H
// QCoreApplication settings for QSettings
#cmakedefine CALAMARES_ORGANIZATION_NAME "${CALAMARES_ORGANIZATION_NAME}"
#cmakedefine CALAMARES_ORGANIZATION_DOMAIN "${CALAMARES_ORGANIZATION_DOMAIN}"
#cmakedefine CALAMARES_APPLICATION_NAME "${CALAMARES_APPLICATION_NAME}"
#cmakedefine CALAMARES_VERSION "${CALAMARES_VERSION}"
#define CRASHREPORTER_BUILD_ID "@CMAKE_DATESTAMP_YEAR@@CMAKE_DATESTAMP_MONTH@@CMAKE_DATESTAMP_DAY@000000"
#define CRASHREPORTER_RELEASE_CHANNEL "@CRASHREPORTER_RELEASE_CHANNEL@"
#define CRASHREPORTER_PRODUCT_NAME "@CALAMARES_APPLICATION_NAME@"
#define CRASHREPORTER_VERSION_STRING "@CALAMARES_VERSION_STRING@"
#define CRASHREPORTER_SUBMIT_URL "@CRASHREPORTER_SUBMIT_URL@"
#define CRASHREPORTER_ICON "@CRASHREPORTER_ICON@"
#endif // CRASHREPORTERCONFIG_H
This diff is collapsed.
<RCC>
<qresource prefix="/">
<file alias="squid.svg">../../data/images/squid.svg</file>
</qresource>
</RCC>
......@@ -10,5 +10,6 @@
//cmakedefines for CMake variables (e.g. for optdepends) go here
#cmakedefine WITH_PYTHON
#cmakedefine WITH_CRASHREPORTER
#endif // CALAMARESCONFIG_H
......@@ -47,6 +47,7 @@ Settings::Settings( const QString& settingsFilePath,
: QObject( parent )
, m_debug( debugMode )
, m_promptInstall( false )
, m_doChroot( true )
{
cDebug() << "Using Calamares settings file at" << settingsFilePath;
QFile file( settingsFilePath );
......@@ -148,7 +149,7 @@ Settings::Settings( const QString& settingsFilePath,
.as< std::string >() );
m_promptInstall = config[ "prompt-install" ].as< bool >();
m_doChroot = !config[ "dont-chroot" ].as< bool >();
m_doChroot = config[ "dont-chroot" ] ? !config[ "dont-chroot" ].as< bool >() : true;
}
catch ( YAML::Exception& e )
{
......
......@@ -101,6 +101,7 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor,
{
cLog() << Q_FUNC_INFO << "bad module directory"
<< instanceId;
delete m;
return nullptr;