Remove more crashreporter references

main
Adriaan de Groot 7 years ago
parent af2643cdfc
commit a4a05acc61

@ -30,11 +30,6 @@ The Calamares release process
* Check `README.md` and everything in `hacking`, make sure it's all still * Check `README.md` and everything in `hacking`, make sure it's all still
relevant. Run `hacking/calamaresstyle` to check the C++ code style. relevant. Run `hacking/calamaresstyle` to check the C++ code style.
Python code is checked as part of the Travis CI builds. 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. * Check defaults in `settings.conf` and other configuration files.
* Pull latest translations from Transifex. This is done nightly on Jenkins, * Pull latest translations from Transifex. This is done nightly on Jenkins,
so a manual pull is rarely necessary. so a manual pull is rarely necessary.

@ -27,8 +27,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../libcalamares ${CMAKE_CURRENT_BINARY_DIR}/../libcalamares
${THIRDPARTY_DIR}/libcrashreporter-qt/src/
../libcalamares ../libcalamares
../libcalamaresui ../libcalamaresui
) )
@ -51,10 +49,6 @@ SET_TARGET_PROPERTIES(calamares_bin
RUNTIME_OUTPUT_NAME calamares RUNTIME_OUTPUT_NAME calamares
) )
if( WITH_CRASHREPORTER )
list( APPEND LINK_LIBRARIES ${LINK_LIBRARIES} pthread crashreporter-handler )
endif()
target_link_libraries( calamares_bin target_link_libraries( calamares_bin
PRIVATE PRIVATE
${CALAMARES_LIBRARIES} ${CALAMARES_LIBRARIES}

@ -23,9 +23,6 @@
#include "utils/CalamaresUtils.h" #include "utils/CalamaresUtils.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "CalamaresConfig.h" #include "CalamaresConfig.h"
#ifdef WITH_CRASHREPORTER
#include "libcrashreporter-handler/Handler.h"
#endif
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QDebug> #include <QDebug>
@ -36,13 +33,6 @@ main( int argc, char* argv[] )
{ {
CalamaresApplication a( argc, argv ); CalamaresApplication a( argc, argv );
#ifdef WITH_CRASHREPORTER
CrashReporter::Handler* handler =
new CrashReporter::Handler( QDir::tempPath(),
true,
"calamares_crash_reporter" );
#endif
QCommandLineParser parser; QCommandLineParser parser;
parser.setApplicationDescription( "Distribution-independent installer framework" ); parser.setApplicationDescription( "Distribution-independent installer framework" );
parser.addHelpOption(); parser.addHelpOption();

@ -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)

@ -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

@ -1,166 +0,0 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include <libcrashreporter-gui/CrashReporter.h>
#include <libcrashreporter-gui/CrashReporterGzip.h>
#include "CrashReporterConfig.h"
#include <QTranslator>
#include <iostream>
#include <QApplication>
#include <QDir>
#include <QFileInfo>
#include "utils/CalamaresUtils.h"
#include "utils/Logger.h"
#include <numeric>
#ifdef Q_OS_WIN
#include <windows.h>
#include <unistd.h>
#endif
#ifdef Q_OS_LINUX
static const char k_usage[] =
"Usage:\n"
" CrashReporter <dumpFilePath> <linuxBacktracePath>\n";
#else
static const char k_usage[] =
"Usage:\n"
" CrashReporter <dumpFilePath>\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("<html><head/><body><p><span style=\" font-weight:600;\">Sorry!"
"</span> " 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.</p><p>Can you tell us "
"what you were doing when this happened?</p></body></html>");
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<Pair> 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();
}

@ -1,5 +0,0 @@
<RCC>
<qresource prefix="/">
<file alias="squid.svg">../../data/images/squid.svg</file>
</qresource>
</RCC>

@ -10,7 +10,6 @@
//cmakedefines for CMake variables (e.g. for optdepends) go here //cmakedefines for CMake variables (e.g. for optdepends) go here
#cmakedefine WITH_PYTHON #cmakedefine WITH_PYTHON
#cmakedefine WITH_CRASHREPORTER
#cmakedefine WITH_PYTHONQT #cmakedefine WITH_PYTHONQT
#endif // CALAMARESCONFIG_H #endif // CALAMARESCONFIG_H

Loading…
Cancel
Save