diff --git a/ci/RELEASE.md b/ci/RELEASE.md index d462ae47b..5589916ed 100644 --- a/ci/RELEASE.md +++ b/ci/RELEASE.md @@ -30,11 +30,6 @@ The Calamares release process * Check `README.md` and everything in `hacking`, make sure it's all still relevant. Run `hacking/calamaresstyle` to check the C++ code style. Python code is checked as part of the Travis CI builds. -* Update submodules. - ``` - git submodule # Note list of submodules - git submodule update thirdparty/libcrashreporter-qt - ``` * Check defaults in `settings.conf` and other configuration files. * Pull latest translations from Transifex. This is done nightly on Jenkins, so a manual pull is rarely necessary. diff --git a/src/calamares/CMakeLists.txt b/src/calamares/CMakeLists.txt index 62be0ed34..6129aa553 100644 --- a/src/calamares/CMakeLists.txt +++ b/src/calamares/CMakeLists.txt @@ -27,8 +27,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../libcalamares - ${THIRDPARTY_DIR}/libcrashreporter-qt/src/ - ../libcalamares ../libcalamaresui ) @@ -51,10 +49,6 @@ SET_TARGET_PROPERTIES(calamares_bin RUNTIME_OUTPUT_NAME calamares ) -if( WITH_CRASHREPORTER ) - list( APPEND LINK_LIBRARIES ${LINK_LIBRARIES} pthread crashreporter-handler ) -endif() - target_link_libraries( calamares_bin PRIVATE ${CALAMARES_LIBRARIES} diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp index ec6c233a1..a265d1e31 100644 --- a/src/calamares/main.cpp +++ b/src/calamares/main.cpp @@ -23,9 +23,6 @@ #include "utils/CalamaresUtils.h" #include "utils/Logger.h" #include "CalamaresConfig.h" -#ifdef WITH_CRASHREPORTER - #include "libcrashreporter-handler/Handler.h" -#endif #include #include @@ -36,13 +33,6 @@ 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(); diff --git a/src/crashreporter/CMakeLists.txt b/src/crashreporter/CMakeLists.txt deleted file mode 100644 index 20f16575b..000000000 --- a/src/crashreporter/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -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) diff --git a/src/crashreporter/CrashReporterConfig.h.in b/src/crashreporter/CrashReporterConfig.h.in deleted file mode 100644 index c1df8f8df..000000000 --- a/src/crashreporter/CrashReporterConfig.h.in +++ /dev/null @@ -1,23 +0,0 @@ -#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 diff --git a/src/crashreporter/main.cpp b/src/crashreporter/main.cpp deleted file mode 100644 index 8d7ef16e0..000000000 --- a/src/crashreporter/main.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2010-2011, Christian Muehlhaeuser - * Copyright 2015-2016, Teo Mrnjavac - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -#include - -#include - -#include "CrashReporterConfig.h" - -#include -#include -#include -#include -#include - -#include "utils/CalamaresUtils.h" -#include "utils/Logger.h" - -#include - -#ifdef Q_OS_WIN - #include - #include -#endif - - -#ifdef Q_OS_LINUX -static const char k_usage[] = - "Usage:\n" - " CrashReporter \n"; -#else -static const char k_usage[] = - "Usage:\n" - " CrashReporter \n"; -#endif - -int main( int argc, char* argv[] ) -{ -#ifdef Q_OS_WIN // log to console window - if ( fileno( stdout ) != -1 && _get_osfhandle( fileno( stdout ) ) != -1 ) - { - /* stdout is fine, presumably redirected to a file or pipe */ - } - else - { - typedef BOOL (WINAPI * AttachConsole_t) (DWORD); - AttachConsole_t p_AttachConsole = (AttachConsole_t) GetProcAddress( GetModuleHandleW( L"kernel32.dll" ), "AttachConsole" ); - - if ( p_AttachConsole != NULL && p_AttachConsole( ATTACH_PARENT_PROCESS ) ) - { - _wfreopen ( L"CONOUT$", L"w", stdout ); - dup2( fileno( stdout ), 1 ); - _wfreopen ( L"CONOUT$", L"w", stderr ); - dup2( fileno( stderr ), 2 ); - } - } -#endif - - // used by some Qt stuff, eg QSettings - // leave first! As Settings object is created quickly - QCoreApplication::setOrganizationName( QLatin1String( CALAMARES_ORGANIZATION_NAME ) ); - QCoreApplication::setOrganizationDomain( QLatin1String( CALAMARES_ORGANIZATION_DOMAIN ) ); - QCoreApplication::setApplicationName( QLatin1String( CALAMARES_APPLICATION_NAME ) ); - QCoreApplication::setApplicationVersion( QLatin1String( CALAMARES_VERSION ) ); - - QApplication app( argc, argv ); - CalamaresUtils::installTranslator( QLocale::system(), QString(), &app ); - -#ifdef Q_OS_LINUX - if ( app.arguments().size() != 8 ) -#else - if ( app.arguments().size() != 2 ) -#endif - { - std::cout << k_usage; - return 1; - } - cDebug() << "Arguments list:" << app.arguments().join( ", " ); - - CrashReporter reporter( QUrl( CRASHREPORTER_SUBMIT_URL ), app.arguments() ); - - #ifdef CRASHREPORTER_ICON - reporter.setLogo( QPixmap( CRASHREPORTER_ICON ) ); - #endif - reporter.setWindowTitle( CRASHREPORTER_PRODUCT_NAME ); - reporter.setText("

Sorry!" - " " CRASHREPORTER_PRODUCT_NAME " crashed. Please tell us " - "about it! " CRASHREPORTER_PRODUCT_NAME " has created an error " - "report for you that can help improve the stability in the " - "future. You can now send this report directly to the " - CRASHREPORTER_PRODUCT_NAME " developers.

Can you tell us " - "what you were doing when this happened?

"); - reporter.setBottomText(QString()); - - reporter.setReportData( "BuildID", CRASHREPORTER_BUILD_ID ); - reporter.setReportData( "ProductName", CRASHREPORTER_PRODUCT_NAME ); - reporter.setReportData( "Version", CRASHREPORTER_VERSION_STRING ); - reporter.setReportData( "ReleaseChannel", CRASHREPORTER_RELEASE_CHANNEL); - - //reporter.setReportData( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) ); - - - - // add parameters - -// QList pairs; -// pairs //<< Pair( "BuildID", buildId.toUtf8() ) -// << Pair( ) -// //<< Pair( "Version", CalamaresUtils::appFriendlyVersion().toLocal8Bit() ) -// //<< Pair( "Vendor", "Tomahawk" ) -// //<< Pair( ) - - // << Pair("InstallTime", "1357622062") - // << Pair("Theme", "classic/1.0") - // << Pair("Version", "30") - // << Pair("id", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}") - // << Pair("Vendor", "Mozilla") - // << Pair("EMCheckCompatibility", "true") - // << Pair("Throttleable", "0") - // << Pair("URL", "http://code.google.com/p/crashme/") - // << Pair("version", "20.0a1") - // << Pair("CrashTime", "1357770042") - // << Pair("submitted_timestamp", "2013-01-09T22:21:18.646733+00:00") - // << Pair("buildid", "20130107030932") - // << Pair("timestamp", "1357770078.646789") - // << Pair("Notes", "OpenGL: NVIDIA Corporation -- GeForce 8600M GT/PCIe/SSE2 -- 3.3.0 NVIDIA 313.09 -- texture_from_pixmap\r\n") - // << Pair("StartupTime", "1357769913") - // << Pair("FramePoisonSize", "4096") - // << Pair("FramePoisonBase", "7ffffffff0dea000") - // << Pair("Add-ons", "%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:20.0a1,crashme%40ted.mielczarek.org:0.4") - // << Pair("SecondsSinceLastCrash", "1831736") - // << Pair("ProductName", "WaterWolf") - // << Pair("legacy_processing", "0") - // << Pair("ProductID", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}") - - ; - - // send log - QFile logFile( CalamaresUtils::appLogDir().filePath( "Calamares.log" ) ); - logFile.open( QFile::ReadOnly ); - reporter.setReportData( "upload_file_calamareslog", - gzip_compress( logFile.readAll() ), - "application/x-gzip", - QFileInfo( logFile ).fileName().toUtf8()); - logFile.close(); - - reporter.show(); - - return app.exec(); -} diff --git a/src/crashreporter/resources.qrc b/src/crashreporter/resources.qrc deleted file mode 100644 index 4618c8f94..000000000 --- a/src/crashreporter/resources.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - ../../data/images/squid.svg - - diff --git a/src/libcalamares/CalamaresConfig.h.in b/src/libcalamares/CalamaresConfig.h.in index f278853a9..6fbab422c 100644 --- a/src/libcalamares/CalamaresConfig.h.in +++ b/src/libcalamares/CalamaresConfig.h.in @@ -10,7 +10,6 @@ //cmakedefines for CMake variables (e.g. for optdepends) go here #cmakedefine WITH_PYTHON -#cmakedefine WITH_CRASHREPORTER #cmakedefine WITH_PYTHONQT #endif // CALAMARESCONFIG_H