diff --git a/.gitlab-ci-files/macosx-desktop.yml b/.gitlab-ci-files/macosx-desktop.yml index 955b1a348..883b6f511 100644 --- a/.gitlab-ci-files/macosx-desktop.yml +++ b/.gitlab-ci-files/macosx-desktop.yml @@ -102,7 +102,7 @@ macosx-ninja-package: - if: $PACKAGE_MACOSX - if: $DEPLOY_MACOSX variables: - CMAKE_OPTIONS: -DPython3_ROOT_DIR=/opt/bc/pip-packages/ -DENABLE_APP_PACKAGING=ON -DENABLE_GPL_THIRD_PARTIES=OFF -DENABLE_G729=ON -DENABLE_BUGSPLAT_SYMBOLS_UPLOAD=ON -DBUGSPLAT_CLIENT_ID=$BUGSPLAT_CLIENT_ID -DBUGSPLAT_CLIENT_SECRET=$BUGSPLAT_CLIENT_SECRET -DBUGSPLAT_DATABASE=$BUGSPLAT_DATABASE + CMAKE_OPTIONS: -DPython3_ROOT_DIR=/opt/bc/pip-packages/ -DENABLE_APP_PACKAGING=ON -DENABLE_GPL_THIRD_PARTIES=OFF -DENABLE_G729=ON -DBUGSPLAT_CLIENT_ID=$BUGSPLAT_CLIENT_ID -DBUGSPLAT_CLIENT_SECRET=$BUGSPLAT_CLIENT_SECRET -DBUGSPLAT_DATABASE=$BUGSPLAT_DATABASE RELEASE_FILE: -DLINPHONE_SDK_MAKE_RELEASE_FILE_URL=$MAKE_RELEASE_FILE_URL/$MACOSX_PLATFORM/$APP_FOLDER extends: macosx-ninja script: diff --git a/.gitlab-ci-files/windows-desktop.yml b/.gitlab-ci-files/windows-desktop.yml index c3050d2a8..65f4e99ff 100644 --- a/.gitlab-ci-files/windows-desktop.yml +++ b/.gitlab-ci-files/windows-desktop.yml @@ -182,20 +182,20 @@ win64-ninja-vs2022-scheduled-windows: - !reference [.rules-merge-request-manual, rules] - if: $NIGHTLY_RELEASE - if: $PACKAGE_WINDOWS - variables: - CMAKE_OPTIONS: -DENABLE_APP_PACKAGING=YES -DENABLE_G729=ON -DENABLE_PQCRYPTO=ON -DENABLE_GPL_THIRD_PARTIES=OFF - RELEASE_FILE: -DLINPHONE_SDK_MAKE_RELEASE_FILE_URL=$MAKE_RELEASE_FILE_URL/$WINDOWS_PLATFORM/$APP_FOLDER - -.vs-win64-package-cr: - stage: package - needs: [] - rules: - - if: $NIGHTLY_MASTER - - if: $DEPLOY_WINDOWS variables: CMAKE_OPTIONS: -DENABLE_APP_PACKAGING=YES -DENABLE_G729=ON -DENABLE_PQCRYPTO=ON -DENABLE_GPL_THIRD_PARTIES=OFF -DENABLE_BUGSPLAT_SYMBOLS_UPLOAD=ON -DBUGSPLAT_CLIENT_ID=$BUGSPLAT_CLIENT_ID -DBUGSPLAT_CLIENT_SECRET=$BUGSPLAT_CLIENT_SECRET -DBUGSPLAT_DATABASE=$BUGSPLAT_DATABASE RELEASE_FILE: -DLINPHONE_SDK_MAKE_RELEASE_FILE_URL=$MAKE_RELEASE_FILE_URL/$WINDOWS_PLATFORM/$APP_FOLDER +# .vs-win64-package-cr: +# stage: package +# needs: [] +# rules: +# - if: $NIGHTLY_MASTER +# - if: $DEPLOY_WINDOWS +# variables: +# CMAKE_OPTIONS: -DENABLE_APP_PACKAGING=YES -DENABLE_G729=ON -DENABLE_PQCRYPTO=ON -DENABLE_GPL_THIRD_PARTIES=OFF -DENABLE_BUGSPLAT_SYMBOLS_UPLOAD=ON -DBUGSPLAT_CLIENT_ID=$BUGSPLAT_CLIENT_ID -DBUGSPLAT_CLIENT_SECRET=$BUGSPLAT_CLIENT_SECRET -DBUGSPLAT_DATABASE=$BUGSPLAT_DATABASE +# RELEASE_FILE: -DLINPHONE_SDK_MAKE_RELEASE_FILE_URL=$MAKE_RELEASE_FILE_URL/$WINDOWS_PLATFORM/$APP_FOLDER + win64-ninja-vs2022-package-windows: variables: CMAKE_GENERATOR: "Ninja" @@ -207,15 +207,15 @@ win64-ninja-vs2022-package-windows: - .vs-win64-package #Packaging for deployment (Upload symbols at the same time of the packaging) -win64-ninja-vs2022-package-cr-windows: - variables: - CMAKE_GENERATOR: "Ninja" - CMAKE_ARCHITECTURE: "" - PARALLEL_OPTIONS: "" - extends: - - .windows-vs2022 - - .windows-ninja-variables - - .vs-win64-package-cr +# win64-ninja-vs2022-package-cr-windows: +# variables: +# CMAKE_GENERATOR: "Ninja" +# CMAKE_ARCHITECTURE: "" +# PARALLEL_OPTIONS: "" +# extends: +# - .windows-vs2022 +# - .windows-ninja-variables +# - .vs-win64-package-cr ################################################# @@ -244,28 +244,6 @@ win64-codesigning: when: always expire_in: 1 week -win64-codesigning-cr: - stage: signing - allow_failure: true - extends: - - .windows-codesigning - needs: - - win64-ninja-vs2022-package-cr-windows - variables: - MINGW_TYPE: mingw64 - rules: - - if: $NIGHTLY_MASTER - - if: $DEPLOY_WINDOWS - script: - - cd build-desktop/OUTPUT/Packages/ - - Invoke-Expression "& ${WINDOWS_SIGN_TOOL} sign /fd SHA256 /t ${WINDOWS_SIGN_TIMESTAMP_URL} /sha1 ${WINDOWS_SIGN_HASH} *.exe" - - 'if (-not ($LastExitCode -eq 0)) {throw "Error: Signature failed"}' - artifacts: - paths: - - build-desktop\OUTPUT\Packages\* - when: always - expire_in: 1 week - ################################################# # DEPLOY ################################################# @@ -286,7 +264,7 @@ win64-ninja-vs2022-upload: extends: - .win64-upload needs: - - win64-codesigning-cr + - win64-codesigning .win64-plugins-upload: stage: deploy diff --git a/CMakeLists.txt b/CMakeLists.txt index 007413b71..52c27cb0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,7 +244,10 @@ if(NOT APPLE OR MONO_ARCH) add_external() endif() if(TARGET Crashpad) + message(DEBUG "Target Crashpad, enable crash handler") set(HAVE_CRASH_HANDLER 1) + else() + message(DEBUG "Target is not Crashpad, disable crash handler") endif() function(add_linphone_app) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index 3ce9c3801..0678928c0 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -312,8 +312,11 @@ App::App(int &argc, char *argv[]) mLinphoneThread = new Thread(this); init(); - lInfo() << QStringLiteral("Starting application " APPLICATION_NAME " (bin: " EXECUTABLE_NAME - "). Version:%1 Os:%2 Qt:%3") + lInfo() << QStringLiteral("Starting application %1 %2 %3 %4") + .arg(APPLICATION_NAME) + .arg("(bin:") + .arg(EXECUTABLE_NAME) + .arg("). Version:%1 Os:%2 Qt:%3") .arg(applicationVersion()) .arg(Utils::getOsProduct()) .arg(qVersion()); @@ -664,6 +667,17 @@ void App::initCore() { QMetaObject::invokeMethod(App::getInstance()->thread(), [this, settings] { // Initialize DestopTools here to have logs into files in case of errors. DesktopTools::init(); + + // CrashReporter must be call after app initialization like names. +#ifdef HAVE_CRASH_HANDLER + lInfo() << log().arg("Start CrashReporter."); + bool status = CrashReporter::start(); + if (!status) { + lWarning() << log().arg("CrashReporter could not start."); + } +#else + lWarning() << "[Main] The application doesn't support the CrashReporter."; +#endif // QML mEngine = new QQmlApplicationEngine(this); assert(mEngine); diff --git a/Linphone/core/path/Paths.cpp b/Linphone/core/path/Paths.cpp index 393ecb4e2..d5dc77114 100644 --- a/Linphone/core/path/Paths.cpp +++ b/Linphone/core/path/Paths.cpp @@ -290,7 +290,16 @@ QString Paths::getLogsDirPath() { QString Paths::getCrashpadDirPath() { #ifdef HAVE_CRASH_HANDLER return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + - Constants::PathCrashpad); + Constants::PathCrashpad); +#else + return ""; +#endif +} + +QString Paths::getCrashpadAttachmentsPath() { +#ifdef HAVE_CRASH_HANDLER + return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + + Constants::PathCrashpadAttachments); #else return ""; #endif diff --git a/Linphone/core/path/Paths.hpp b/Linphone/core/path/Paths.hpp index 46d39a8a0..fd2ce4635 100644 --- a/Linphone/core/path/Paths.hpp +++ b/Linphone/core/path/Paths.hpp @@ -44,6 +44,7 @@ QString getFriendsListFilePath(); QString getLimeDatabasePath(); QString getLogsDirPath(); QString getCrashpadDirPath(); +QString getCrashpadAttachmentsPath(); QString getMetricsDirPath(); QString getMessageHistoryFilePath(); QString getPackageDataDirPath(); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index d7e922ef6..1db800bec 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -6175,7 +6175,7 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. Utils - + nMinute %1 Minute @@ -6183,7 +6183,7 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + nHour %1 Stunde @@ -6191,8 +6191,8 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + nDay %1 Tag @@ -6200,7 +6200,7 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + nWeek %1 Woche @@ -6208,7 +6208,7 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + nSeconds %1 Sekunde @@ -6216,26 +6216,26 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + information_popup_call_not_created_message "L'appel n'a pas pu être créé" Anruf konnte nicht erstellt werden - - - + + + information_popup_error_title Failed to create 1-1 conversation with %1 ! Fehler - + information_popup_group_call_not_created_message Gruppengespräch konnte nicht erstellt werden - + number_of_years %n an(s) @@ -6244,7 +6244,7 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + number_of_month "%n mois" @@ -6253,7 +6253,7 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + number_of_weeks %n semaine(s) @@ -6262,7 +6262,7 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + number_of_days %n jour(s) @@ -6271,25 +6271,25 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + today "Aujourd'hui" Heute - + yesterday "Hier Gestern - + duration_tomorrow Tomorrow Morgen - + duration_number_of_days %1 jour(s) @@ -6298,109 +6298,109 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. - + call_zrtp_token_verification_possible_characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - + information_popup_chatroom_creation_error_message 1-zu-1-Konversation mit %1 konnte nicht erstellt werden! - + contact_presence_status_available Verfügbar - + contact_presence_status_away Abwesend - + contact_presence_status_busy Beschäftigt - + contact_presence_status_do_not_disturb Nicht stören - + contact_presence_status_offline Offline - + recorder_error Error with the recorder Fehler mit der Aufzeichnung - - - + + + chat_error Fehler im Chat - + chat_message_forward_error Cannot forward an invalid message Eine ungültige Nachricht kann nicht weitergeleitet werden - - - - - - + + + + + + info_popup_error_title Error Fehler - + info_popup_forward_message_error Could not forward message : %1 Nachricht konnte nicht weitergeleitet werden: %1 - + info_popup_send_forward_message_error_message Failed to create forward message Weiterleitungsnachricht konnte nicht erstellt werden - + chat_message_reply_error Cannot reply to invalid message Auf eine ungültige Nachricht kann nicht geantwortet werden - + info_popup_reply_message_error Could not send reply message : %1 Antwort konnte nicht gesendet werden: %1 - + info_popup_send_reply_message_error_message Failed to create reply message Antwort konnte nicht erstellt werden - + info_popup_send_voice_message_error_message Could not send voice message : %1 Sprachnachricht konnte nicht gesendet werden: %1 - + info_popup_send_voice_message_sending_error_message Failed to create message from record Nachricht aus der Aufnahme konnte nicht erstellt werden @@ -6569,1117 +6569,1117 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. country - + Afghanistan Afghanistan - + Albania Albanien - + Algeria Algerien - + AmericanSamoa Amerikanisch-Samoa - + Andorra Andorra - + Angola Angola - + Anguilla Anguilla - + AntiguaAndBarbuda Antigua und Barbuda - + Argentina Argentinien - + Armenia Armenien - + Aruba Aruba - + Australia Australien - + Austria Österreich - + Azerbaijan Aserbaidschan - + Bahamas Bahamas - + Bahrain Bahrain - + Bangladesh Bangladesch - + Barbados Barbados - + Belarus Belarus - + Belgium Belgien - + Belize Belize - + Benin Benin - + Bermuda Bermuda - + Bhutan Bhutan - + Bolivia Bolivien - + BosniaAndHerzegowina Bosnien und Herzegowina - + Botswana Botswana - + Brazil Brasilien - + Brunei Brunei - + Bulgaria Bulgarien - + BurkinaFaso Burkina Faso - + Burundi Burundi - + Cambodia Kambodscha - + Cameroon Kamerun - + Canada Kanada - + CapeVerde Kap Verde - + CaymanIslands Caymaninseln - + CentralAfricanRepublic Zentralafrikanische Republik - + Chad Tschad - + Chile Chile - + China China - + Colombia Kolumbien - + Comoros Komoren - + PeoplesRepublicOfCongo Volksrepublik Kongo - + CookIslands Cookinseln - + CostaRica Kosta Rica - + IvoryCoast Elfenbeinküste - + Croatia Kroatien - + Cuba Kuba - + Cyprus Zypern - + CzechRepublic Tschechische Republik - + Denmark Dänemark - + Djibouti Dschibuti - + Dominica Dominica - + DominicanRepublic Dominikanische Republik - + Ecuador Ecuador - + Egypt Ägypten - + ElSalvador El Salvador - + EquatorialGuinea Äquatorialguinea - + Eritrea Eritrea - + Estonia Estland - + Ethiopia Äthiopien - + FalklandIslands Falklandinseln - + FaroeIslands Färöer-Inseln - + Fiji Fidschi - + Finland Finnland - + France Frankreich - + FrenchGuiana Französisch-Guayana - + FrenchPolynesia Französisch-Polynesien - + Gabon Gabon - + Gambia Gambia - + Georgia Georgien - + Germany Deutschland - + Ghana Ghana - + Gibraltar Gibraltar - + Greece Griechenland - + Greenland Grönland - + Grenada Grenada - + Guadeloupe Guadeloupe - + Guam Guam - + Guatemala Guatemala - + Guinea Guinea - + GuineaBissau Guinea-Bissau - + Guyana Guyana - + Haiti Haiti - + Honduras Honduras - + DemocraticRepublicOfCongo Demokratische Republik Kongo - + HongKong Hongkong - + Hungary Ungarn - + Iceland Island - + India Indien - + Indonesia Indonesien - + Iran Iran - + Iraq Irak - + Ireland Irland - + Israel Israel - + Italy Italien - + Jamaica Jamaika - + Japan Japan - + Jordan Jordanien - + Kazakhstan Kasachstan - + Kenya Kenia - + Kiribati Kiribati - + DemocraticRepublicOfKorea Demokratische Volksrepublik Korea - + RepublicOfKorea Republik Korea - + Kuwait Kuwait - + Kyrgyzstan Kirgisistan - + Laos Laos - + Latvia Lettland - + Lebanon Libanon - + Lesotho Lesotho - + Liberia Liberien - + Libya Libyen - + Liechtenstein Liechtenstein - + Lithuania Litauen - + Luxembourg Luxemburg - + Macau Macau - + Macedonia Mazedonien - + Madagascar Madagaskar - + Malawi Malawi - + Malaysia Malaysien - + Maldives Malediven - + Mali Mali - + Malta Malta - + MarshallIslands Marshallinseln - + Martinique Martinique - + Mauritania Mauretanien - + Mauritius Mauritius - + Mayotte Mayotte - + Mexico Mexiko - + Micronesia Föderierte Staaten von Mikronesien - + Moldova Moldawien - + Monaco Monaco - + Mongolia Mongolei - + Montenegro Montenegro - + Montserrat Montserrat - + Morocco Marokko - + Mozambique Mosambik - + Myanmar Myanmar - + Namibia Namibia - + NauruCountry Nauru - + Nepal Nepal - + Netherlands Niederlande - + NewCaledonia Neukaledonien - + NewZealand Neuseeland - + Nicaragua Nicaragua - + Niger Niger - + Nigeria Nigeria - + Niue Niue - + NorfolkIsland Norfolkinsel - + NorthernMarianaIslands Nördliche Marianeninseln - + Norway Norwegen - + Oman Oman - + Pakistan Pakistan - + Palau Palau - + PalestinianTerritories Palästinensische Gebiete - + Panama Panama - + PapuaNewGuinea Papua-Neuguinea - + Paraguay Paraguay - + Peru Peru - + Philippines Philippinen - + Poland Polen - + Portugal Portugal - + PuertoRico Puerto Rico - + Qatar Katar - + Reunion Réunion - + Romania Rumänien - + RussianFederation Russische Föderation - + Rwanda Ruanda - + SaintHelena Sankt Helena - + SaintKittsAndNevis Sankt Kitts und Nevis - + SaintLucia Sankt Lucia - + SaintPierreAndMiquelon Sankt Pierre und Miquelon - + SaintVincentAndTheGrenadines Sankt Vincent und die Grenadinen - + Samoa Samoa - + SanMarino San Marino - + SaoTomeAndPrincipe São Tomé und Príncipe - + SaudiArabia Saudi-Arabien - + Senegal Senegal - + Serbia Serbien - + Seychelles Seychellen - + SierraLeone Sierra Leone - + Singapore Singapur - + Slovakia Slowakei - + Slovenia Slowenien - + SolomonIslands Salomonen - + Somalia Somalia - + SouthAfrica Südafrika - + Spain Spanien - + SriLanka Sri Lanka - + Sudan Sudan - + Suriname Suriname - + Swaziland Eswatini - + Sweden Schweden - + Switzerland Schweiz - + Syria Syrien - + Taiwan Taiwan - + Tajikistan Tadschikistan - + Tanzania Tansania - + Thailand Thailand - + Togo Togo - + Tokelau Tokelau - + Tonga Tonga - + TrinidadAndTobago Trinidad und Tobago - + Tunisia Tunesien - + Turkey Türkei - + Turkmenistan Turkmenistan - + TurksAndCaicosIslands Turks- und Caicosinseln - + Tuvalu Tuvalu - + Uganda Uganda - + Ukraine Ukraine - + UnitedArabEmirates Vereinigte Arabische Emirate - + UnitedKingdom Vereinigtes Königreich - + UnitedStates Vereinigte Staaten - + Uruguay Uruguay - + Uzbekistan Usbekistan - + Vanuatu Vanuatu - + Venezuela Venezuela - + Vietnam Vietnam - + WallisAndFutunaIslands Wallis und Futuna Inseln - + Yemen Jemen - + Zambia Sambia - + Zimbabwe Simbabwe diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index e3d2ee44e..aa4f78adf 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -6040,7 +6040,7 @@ To enable them in a commercial project, please contact us. Utils - + nSeconds %1 second @@ -6048,7 +6048,7 @@ To enable them in a commercial project, please contact us. - + nMinute %1 minute @@ -6056,43 +6056,43 @@ To enable them in a commercial project, please contact us. - + chat_message_forward_error Cannot forward an invalid message Cannot forward an invalid message - + info_popup_forward_message_error Could not forward message : %1 Could not forward message : %1 - + info_popup_send_forward_message_error_message Failed to create forward message Failed to create forward message - + chat_message_reply_error Cannot reply to invalid message Cannot reply to invalid message - + info_popup_reply_message_error Could not send reply message : %1 Could not send reply message : %1 - + info_popup_send_reply_message_error_message Failed to create reply message Failed to create reply message - + nHour %1 hour @@ -6100,8 +6100,8 @@ To enable them in a commercial project, please contact us. - + nDay %1 day @@ -6109,7 +6109,7 @@ To enable them in a commercial project, please contact us. - + nWeek %1 week @@ -6117,51 +6117,51 @@ To enable them in a commercial project, please contact us. - + contact_presence_status_available Available - + contact_presence_status_busy Busy - + contact_presence_status_do_not_disturb Do not disturb - + contact_presence_status_offline Offline - + contact_presence_status_away Idle/Away - + information_popup_call_not_created_message "L'appel n'a pas pu être créé" Call could not be created - - - + + + information_popup_error_title Failed to create 1-1 conversation with %1 ! Error - + information_popup_group_call_not_created_message Group call couldn't be created - + number_of_years %n an(s) @@ -6170,7 +6170,7 @@ To enable them in a commercial project, please contact us. - + number_of_month "%n mois" @@ -6179,7 +6179,7 @@ To enable them in a commercial project, please contact us. - + number_of_weeks %n semaine(s) @@ -6188,7 +6188,7 @@ To enable them in a commercial project, please contact us. - + number_of_days %n jour(s) @@ -6197,25 +6197,25 @@ To enable them in a commercial project, please contact us. - + today "Aujourd'hui" Today - + yesterday "Hier Yesterday - + duration_tomorrow Tomorrow Tomorrow - + duration_number_of_days %1 jour(s) @@ -6224,48 +6224,48 @@ To enable them in a commercial project, please contact us. - + call_zrtp_token_verification_possible_characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - + information_popup_chatroom_creation_error_message Failed to create 1-1 conversation with %1 ! - + recorder_error Error with the recorder Error with the recorder - - - + + + chat_error Error in the chat - - - - - - + + + + + + info_popup_error_title Error Error - + info_popup_send_voice_message_error_message Could not send voice message : %1 Could not send voice message : %1 - + info_popup_send_voice_message_sending_error_message Failed to create message from record Failed to create message from record @@ -6434,1117 +6434,1117 @@ To enable them in a commercial project, please contact us. country - + Afghanistan Afghanistan - + Albania Albania - + Algeria Algeria - + AmericanSamoa American Samoa - + Andorra Andorra - + Angola Angola - + Anguilla Anguilla - + AntiguaAndBarbuda Antigua-et-Barbuda - + Argentina Argentina - + Armenia Armenia - + Aruba Aruba - + Australia Australia - + Austria Austria - + Azerbaijan Azerbaijan - + Bahamas Bahamas - + Bahrain Bahrain - + Bangladesh Bangladesh - + Barbados Barbados - + Belarus Belarus - + Belgium Belgium - + Belize Belize - + Benin Benin - + Bermuda Bermuda - + Bhutan Bhutan - + Bolivia Bolivia - + BosniaAndHerzegowina Bosnia And Herzegowina - + Botswana Botswana - + Brazil Brazil - + Brunei Brunei - + Bulgaria Bulgaria - + BurkinaFaso Burkina Faso - + Burundi Burundi - + Cambodia Cambodia - + Cameroon Cameroon - + Canada Canada - + CapeVerde Cape Verde - + CaymanIslands Cayman Islands - + CentralAfricanRepublic Central African Republic - + Chad Chad - + Chile Chile - + China China - + Colombia Colombia - + Comoros Comoros - + PeoplesRepublicOfCongo Peoples Republic Of Congo - + CookIslands Cook Islands - + CostaRica Costa Rica - + IvoryCoast Ivory Coast - + Croatia Croatia - + Cuba Cuba - + Cyprus Cyprus - + CzechRepublic Czech Republic - + Denmark Denmark - + Djibouti Djibouti - + Dominica Dominica - + DominicanRepublic Dominican Republic - + Ecuador Ecuador - + Egypt Egypt - + ElSalvador El Salvador - + EquatorialGuinea Equatorial Guinea - + Eritrea Eritrea - + Estonia Estonia - + Ethiopia Ethiopia - + FalklandIslands Falkland Islands - + FaroeIslands Faroe Islands - + Fiji Fiji - + Finland Finland - + France France - + FrenchGuiana French Guiana - + FrenchPolynesia French Polynesia - + Gabon Gabon - + Gambia Gambia - + Georgia Georgia - + Germany Germany - + Ghana Ghana - + Gibraltar Gibraltar - + Greece Greece - + Greenland Greenland - + Grenada Grenada - + Guadeloupe Guadeloupe - + Guam Guam - + Guatemala Guatemala - + Guinea Guinea - + GuineaBissau Guinea-Bissau - + Guyana Guyana - + Haiti Haiti - + Honduras Honduras - + DemocraticRepublicOfCongo Democratic Republic Of Congo - + HongKong Hong Kong - + Hungary Hungary - + Iceland Iceland - + India India - + Indonesia Indonesia - + Iran Iran - + Iraq Iraq - + Ireland Ireland - + Israel Israel - + Italy Italy - + Jamaica Jamaica - + Japan Japan - + Jordan Jordan - + Kazakhstan Kazakhstan - + Kenya Kenya - + Kiribati Kiribati - + DemocraticRepublicOfKorea Democratic Republic Of Korea - + RepublicOfKorea Republic Of Korea - + Kuwait Kuwait - + Kyrgyzstan Kyrgyzstan - + Laos Laos - + Latvia Latvia - + Lebanon Lebanon - + Lesotho Lesotho - + Liberia Liberia - + Libya Libya - + Liechtenstein Liechtenstein - + Lithuania Lithuania - + Luxembourg Luxembourg - + Macau Macau - + Macedonia Macedonia - + Madagascar Madagascar - + Malawi Malawi - + Malaysia Malaysia - + Maldives Maldives - + Mali Mali - + Malta Malta - + MarshallIslands Marshall Islands - + Martinique Martinique - + Mauritania Mauritania - + Mauritius Mauritius - + Mayotte Mayotte - + Mexico Mexico - + Micronesia Micronesia - + Moldova Moldova - + Monaco Monaco - + Mongolia Mongolia - + Montenegro Montenegro - + Montserrat Montserrat - + Morocco Morocco - + Mozambique Mozambique - + Myanmar Myanmar - + Namibia Namibia - + NauruCountry Nauru Country - + Nepal Nepal - + Netherlands Netherlands - + NewCaledonia New-Caledonia - + NewZealand New-Zealand - + Nicaragua Nicaragua - + Niger Niger - + Nigeria Nigeria - + Niue Niue - + NorfolkIsland Norfolk Island - + NorthernMarianaIslands Northern Mariana Islands - + Norway Norway - + Oman Oman - + Pakistan Pakistan - + Palau Palau - + PalestinianTerritories Palestinian Territories - + Panama Panama - + PapuaNewGuinea Papua-New-Guinea - + Paraguay Paraguay - + Peru Peru - + Philippines Philippines - + Poland Poland - + Portugal Portugal - + PuertoRico Puerto Rico - + Qatar Qatar - + Reunion Reunion - + Romania Romania - + RussianFederation Russian Federation - + Rwanda Rwanda - + SaintHelena Saint-Helena - + SaintKittsAndNevis Saint-Kitts-And-Nevis - + SaintLucia Saint-Lucia - + SaintPierreAndMiquelon Saint-Pierre-And-Miquelon - + SaintVincentAndTheGrenadines Saint-Vincent And The Grenadines - + Samoa Samoa - + SanMarino San-Marino - + SaoTomeAndPrincipe Sao Tome-And-Principe - + SaudiArabia Saudi Arabia - + Senegal Senegal - + Serbia Serbia - + Seychelles Seychelles - + SierraLeone Sierra Leone - + Singapore Singapore - + Slovakia Slovakia - + Slovenia Slovenia - + SolomonIslands Solomon Islands - + Somalia Somalia - + SouthAfrica South Africa - + Spain Spain - + SriLanka Sri Lanka - + Sudan Sudan - + Suriname Suriname - + Swaziland Swaziland - + Sweden Sweden - + Switzerland Switzerland - + Syria Syria - + Taiwan Taiwan - + Tajikistan Tajikistan - + Tanzania Tanzania - + Thailand Thailand - + Togo Togo - + Tokelau Tokelau - + Tonga Tonga - + TrinidadAndTobago Trinidad-And-Tobago - + Tunisia Tunisia - + Turkey Turkey - + Turkmenistan Turkmenistan - + TurksAndCaicosIslands Turks And Caicos Islands - + Tuvalu Tuvalu - + Uganda Uganda - + Ukraine Ukraine - + UnitedArabEmirates United Arab Emirates - + UnitedKingdom United-Kingdom - + UnitedStates United-States - + Uruguay Uruguay - + Uzbekistan Uzbekistan - + Vanuatu Vanuatu - + Venezuela Venezuela - + Vietnam Vietnam - + WallisAndFutunaIslands Wallis And Futuna Islands - + Yemen Yemen - + Zambia Zambia - + Zimbabwe Zimbabwe diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 4edd9190d..ce92f19e8 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -6011,7 +6011,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. Utils - + nMinute %1 minute @@ -6019,7 +6019,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nHour %1 heure @@ -6027,8 +6027,8 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nDay %1 jour @@ -6036,7 +6036,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nWeek %1 semaine @@ -6044,7 +6044,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nSeconds %1 seconde @@ -6052,51 +6052,51 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + contact_presence_status_available Disponible - + contact_presence_status_busy Occupé - + contact_presence_status_do_not_disturb Ne pas déranger - + contact_presence_status_offline Hors ligne - + contact_presence_status_away Inactif/Absent - + information_popup_call_not_created_message "L'appel n'a pas pu être créé" L'appel n'a pas pu être créé - - - + + + information_popup_error_title Failed to create 1-1 conversation with %1 ! Erreur - + information_popup_group_call_not_created_message L'appel de groupe n'a pas pu être créé - + number_of_years %n an(s) @@ -6105,7 +6105,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_month "%n mois" @@ -6114,7 +6114,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_weeks %n semaine(s) @@ -6123,7 +6123,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + number_of_days %n jour(s) @@ -6132,25 +6132,25 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + today "Aujourd'hui" Aujourd'hui - + yesterday "Hier Hier - + duration_tomorrow Tomorrow Demain - + duration_number_of_days %1 jour(s) @@ -6159,84 +6159,84 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + call_zrtp_token_verification_possible_characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - + information_popup_chatroom_creation_error_message Erreur lors de la création de la conversation avec %1 - + recorder_error Error with the recorder Erreur avec l'enregistreur - - - + + + chat_error Erreur dans le chat - + chat_message_forward_error Cannot forward an invalid message Impossible de transférer : message invalide - - - - - - + + + + + + info_popup_error_title Error Erreur - + info_popup_forward_message_error Could not forward message : %1 Impossible de transférer le message : %1 - + info_popup_send_forward_message_error_message Failed to create forward message Impossible de créer le message - + chat_message_reply_error Cannot reply to invalid message Impossible de répondre : message invalide - + info_popup_reply_message_error Could not send reply message : %1 Impossible d'envoyer la réponse : %1 - + info_popup_send_reply_message_error_message Failed to create reply message Impossible de créer le message - + info_popup_send_voice_message_error_message Could not send voice message : %1 Impossible d'envoyer le message vocal : %1 - + info_popup_send_voice_message_sending_error_message Failed to create message from record Impossible de créer le message vocal @@ -6405,1117 +6405,1117 @@ Pour les activer dans un projet commercial, merci de nous contacter. country - + Afghanistan Afghanistan - + Albania Albanie - + Algeria Algérie - + AmericanSamoa Samoa américaines - + Andorra Andorre - + Angola Angola - + Anguilla Anguilla - + AntiguaAndBarbuda Antigua-et-Barbuda - + Argentina Argentine - + Armenia Arménie - + Aruba Aruba - + Australia Australie - + Austria Autriche - + Azerbaijan Azerbaïdjan - + Bahamas Bahamas - + Bahrain Bahreïn - + Bangladesh Bangladesh - + Barbados Barbade - + Belarus Biélorussie - + Belgium Belgique - + Belize Belize - + Benin Bénin - + Bermuda Bermudes - + Bhutan Bhoutan - + Bolivia Bolivie - + BosniaAndHerzegowina Bosnie-Herzégovine - + Botswana Botswana - + Brazil Brésil - + Brunei Brunéi - + Bulgaria Bulgarie - + BurkinaFaso Burkina Faso - + Burundi Burundi - + Cambodia Cambodge - + Cameroon Cameroun - + Canada Canada - + CapeVerde Cap-Vert - + CaymanIslands Îles Caïmans - + CentralAfricanRepublic République centrafricaine - + Chad Tchad - + Chile Chili - + China Chine - + Colombia Colombie - + Comoros Comores - + PeoplesRepublicOfCongo République populaire du Congo - + CookIslands Îles Cook - + CostaRica Costa Rica - + IvoryCoast Côte d'Ivoire - + Croatia Croatie - + Cuba Cuba - + Cyprus Chypre - + CzechRepublic République Tchèque - + Denmark Danemark - + Djibouti Djibouti - + Dominica Dominique - + DominicanRepublic République dominicaine - + Ecuador Équateur - + Egypt Égypte - + ElSalvador El Salvador - + EquatorialGuinea Guinée équatoriale - + Eritrea Érythrée - + Estonia Estonie - + Ethiopia Éthiopie - + FalklandIslands Îles Falkland - + FaroeIslands Îles Féroé - + Fiji Fidji - + Finland Finlande - + France France - + FrenchGuiana Guyane française - + FrenchPolynesia Polynésie française - + Gabon Gabon - + Gambia Gambie - + Georgia Géorgie - + Germany Allemagne - + Ghana Ghana - + Gibraltar Gibraltar - + Greece Grèce - + Greenland Groenland - + Grenada Grenade - + Guadeloupe Guadeloupe - + Guam Guam - + Guatemala Guatemala - + Guinea Guinée - + GuineaBissau Guinée-Bissau - + Guyana Guyana - + Haiti Haïti - + Honduras Honduras - + DemocraticRepublicOfCongo République démocratique du Congo - + HongKong Hong Kong - + Hungary Hongrie - + Iceland Islande - + India Inde - + Indonesia Indonésie - + Iran Iran - + Iraq Irak - + Ireland Irlande - + Israel Israël - + Italy Italie - + Jamaica Jamaïque - + Japan Japon - + Jordan Jordanie - + Kazakhstan Kazakhstan - + Kenya Kenya - + Kiribati Kiribati - + DemocraticRepublicOfKorea Corée du Nord - + RepublicOfKorea Corée du Sud - + Kuwait Koweït - + Kyrgyzstan Kirghizistan - + Laos Laos - + Latvia Lettonie - + Lebanon Liban - + Lesotho Lesotho - + Liberia Libéria - + Libya Libye - + Liechtenstein Liechtenstein - + Lithuania Lituanie - + Luxembourg Luxembourg - + Macau Macao - + Macedonia Macédoine - + Madagascar Madagascar - + Malawi Malawi - + Malaysia Malaisie - + Maldives Maldives - + Mali Mali - + Malta Malte - + MarshallIslands Îles Marshall - + Martinique Martinique - + Mauritania Mauritanie - + Mauritius Maurice - + Mayotte Mayotte - + Mexico Mexique - + Micronesia Micronésie - + Moldova Moldavie - + Monaco Monaco - + Mongolia Mongolie - + Montenegro Montenegro - + Montserrat Montserrat - + Morocco Maroc - + Mozambique Mozambique - + Myanmar Myanmar - + Namibia Namibie - + NauruCountry Nauru - + Nepal Népal - + Netherlands Pays-Bas - + NewCaledonia Nouvelle-Calédonie - + NewZealand Nouvelle-Zélande - + Nicaragua Nicaragua - + Niger Niger - + Nigeria Nigeria - + Niue Niué - + NorfolkIsland Île Norfolk - + NorthernMarianaIslands Îles Mariannes du Nord - + Norway Norvège - + Oman Oman - + Pakistan Pakistan - + Palau Palaos - + PalestinianTerritories Palestine - + Panama Panama - + PapuaNewGuinea Papouasie-Nouvelle-Guinée - + Paraguay Paraguay - + Peru Pérou - + Philippines Philippines - + Poland Pologne - + Portugal Portugal - + PuertoRico Porto Rico - + Qatar Qatar - + Reunion La Réunion - + Romania Roumanie - + RussianFederation Russie - + Rwanda Rwanda - + SaintHelena Sainte-Hélène - + SaintKittsAndNevis Saint-Christophe-et-Niévès - + SaintLucia Sainte-Lucie - + SaintPierreAndMiquelon Saint-Pierre-et-Miquelon - + SaintVincentAndTheGrenadines Saint-Vincent et les Grenadines - + Samoa Samoa - + SanMarino Saint-Marin - + SaoTomeAndPrincipe Sao Tomé-et-Principe - + SaudiArabia Arabie saoudite - + Senegal Sénégal - + Serbia Serbie - + Seychelles Seychelles - + SierraLeone Sierra Leone - + Singapore Singapour - + Slovakia Slovaquie - + Slovenia Slovénie - + SolomonIslands Îles Salomon - + Somalia Somalie - + SouthAfrica Afrique du Sud - + Spain Espagne - + SriLanka Sri Lanka - + Sudan Soudan - + Suriname Suriname - + Swaziland Eswatini - + Sweden Suède - + Switzerland Suisse - + Syria Syrie - + Taiwan Taïwan - + Tajikistan Tadjikistan - + Tanzania Tanzanie - + Thailand Thaïlande - + Togo Togo - + Tokelau Tokelau - + Tonga Tonga - + TrinidadAndTobago Trinité-et-Tobago - + Tunisia Tunisie - + Turkey Turquie - + Turkmenistan Turkménistan - + TurksAndCaicosIslands Îles Turks et Caïques - + Tuvalu Tuvalu - + Uganda Ouganda - + Ukraine Ukraine - + UnitedArabEmirates Émirats arabes unis - + UnitedKingdom Royaume-Uni - + UnitedStates États-Unis - + Uruguay Uruguay - + Uzbekistan Ouzbékistan - + Vanuatu Vanuatu - + Venezuela Venezuela - + Vietnam Vietnam - + WallisAndFutunaIslands Wallis et Futuna - + Yemen Yémen - + Zambia Zambie - + Zimbabwe Zimbabwe diff --git a/Linphone/tool/Constants.hpp b/Linphone/tool/Constants.hpp index 1dbb7eb26..cc37a994e 100644 --- a/Linphone/tool/Constants.hpp +++ b/Linphone/tool/Constants.hpp @@ -158,8 +158,9 @@ public: static constexpr char PathUserCertificates[] = "/usr-crt/"; #ifdef HAVE_CRASH_HANDLER static constexpr char PathCrashpad[] = "/crashpad/"; + static constexpr char PathCrashpadAttachments[] = "/crashpad/attachments/"; static constexpr char PathCrashpadHandler[] = CRASHPAD_EXECUTABLE_NAME; - static constexpr char BugsplatUrl[] = "https://Linphone.bugsplat.com/post/bp/crash/crashpad.php"; + static constexpr char BugsplatUrl[] = "https://" BUGSPLAT_DATABASE ".bugsplat.com/post/bp/crash/crashpad.php"; #endif static constexpr char PathCallHistoryList[] = "/call-history.db"; diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index f34263088..2e310fcab 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -39,6 +39,7 @@ #include "tool/providers/AvatarProvider.hpp" #include +#include #include #include @@ -2206,3 +2207,9 @@ bool Utils::stringMatchFormat(QString toMatch, QRegularExpression regExp) { auto match = regExp.match(toMatch); return match.hasMatch(); } + +// Debug +void Utils::forceCrash() { + lInfo() << "throwing segmentation fault for debug"; + raise(SIGSEGV); +} \ No newline at end of file diff --git a/Linphone/tool/Utils.hpp b/Linphone/tool/Utils.hpp index 8dfcc798c..358ab7308 100644 --- a/Linphone/tool/Utils.hpp +++ b/Linphone/tool/Utils.hpp @@ -192,6 +192,9 @@ public: Q_INVOKABLE static bool stringMatchFormat(QString toMatch, QRegularExpression regExp); + // Debug + Q_INVOKABLE static void forceCrash(); + // QDir findDirectoryByName(QString startPath, QString name); static QString getApplicationProduct(); diff --git a/Linphone/tool/crash_reporter/CrashReporter.cpp b/Linphone/tool/crash_reporter/CrashReporter.cpp index 46929efc6..e39347efb 100644 --- a/Linphone/tool/crash_reporter/CrashReporter.cpp +++ b/Linphone/tool/crash_reporter/CrashReporter.cpp @@ -20,28 +20,26 @@ #include "CrashReporter.hpp" #include "config.h" -#include "tool/Utils.hpp" -#include "tool/Constants.hpp" #include "core/path/Paths.hpp" #include "model/setting/SettingsModel.hpp" - +#include "tool/Constants.hpp" +#include "tool/Utils.hpp" #include "client/crash_report_database.h" #include "client/settings.h" #include +CrashReporter *CrashReporter::gHandler = nullptr; -CrashReporter* CrashReporter::gHandler = nullptr; - -CrashReporter::CrashReporter(QObject * parent): QObject(parent) { +CrashReporter::CrashReporter(QObject *parent) : QObject(parent) { mHandlerPath = base::FilePath(Utils::getNativeString(Paths::getCrashpadHandlerFilePath())); mDatabasePath = base::FilePath(Utils::getNativeString(Paths::getCrashpadDirPath())); mMetricsPath = base::FilePath(Utils::getNativeString(Paths::getMetricsDirPath())); mBugsplatUrl = Constants::BugsplatUrl; - mAnnotations["format"] = "minidump"; // Required: Crashpad setting to save crash as a minidump - mAnnotations["database"] = BUGSPLAT_DATABASE; // Required: BugSplat database - mAnnotations["product"] = APPLICATION_NAME; // Required: BugSplat appName + mAnnotations["format"] = "minidump"; // Required: Crashpad setting to save crash as a minidump + mAnnotations["database"] = BUGSPLAT_DATABASE; // Required: BugSplat database + mAnnotations["product"] = APPLICATION_NAME; // Required: BugSplat appName mAnnotations["version"] = APPLICATION_SEMVER; // annotations["key"] = "Sample key"; // Optional: BugSplat key field // annotations["user"] = "fred@bugsplat.com"; // Optional: BugSplat user email @@ -49,42 +47,69 @@ CrashReporter::CrashReporter(QObject * parent): QObject(parent) { // Disable crashpad rate limiting so that all crashes have dmp files mArguments.push_back("--no-rate-limit"); - auto config = linphone::Factory::get()->createConfig(Utils::appStringToCoreString(Paths::getConfigFilePath("", true))); + auto config = + linphone::Factory::get()->createConfig(Utils::appStringToCoreString(Paths::getConfigFilePath("", true))); // Attachments to be uploaded alongside the crash - default bundle size limit is 20MB // Crashpad doesn't manage folders. We have to guess the files to be uploaded. - QString logFiles = Paths::getLogsDirPath()+QDir::separator()+EXECUTABLE_NAME; - mAttachments.push_back(base::FilePath(Utils::getNativeString(logFiles+".log"))); + QString logFiles = Paths::getLogsDirPath() + QDir::separator() + EXECUTABLE_NAME; + mAttachments.push_back(base::FilePath(Utils::getNativeString(logFiles + ".log"))); mAttachments.push_back(base::FilePath(Utils::getNativeString(logFiles + "1.log"))); mAttachments.push_back(base::FilePath(Utils::getNativeString(logFiles + "2.log"))); } -void CrashReporter::start() { - auto config = linphone::Factory::get()->createConfig(Utils::appStringToCoreString(Paths::getConfigFilePath("", true))); - CrashReporter::enable(SettingsModel::getCrashReporterEnabled(config)); +bool CrashReporter::start() { + lInfo() << "[CrashReporter] Starting CrashReporter"; + auto config = + linphone::Factory::get()->createConfig(Utils::appStringToCoreString(Paths::getConfigFilePath("", true))); + return CrashReporter::enable(SettingsModel::getCrashReporterEnabled(config)); } -void CrashReporter::run() { - //crashpad::CrashpadClient *client = new crashpad::CrashpadClient(); - bool status = mClient.StartHandler(mHandlerPath, mDatabasePath, mMetricsPath, mBugsplatUrl.toStdString(), mAnnotations.toStdMap(), mArguments, true, true, mAttachments); +bool CrashReporter::run() { - if(!status){ + // Attachments to be uploaded alongside the crash - default bundle size limit is 20MB + base::FilePath attachment(Utils::getNativeString(Paths::getCrashpadAttachmentsPath())); +#if defined(Q_OS_WINDOWS) || defined(Q_OS_LINUX) + // Crashpad hasn't implemented attachments on OS X yet + mAttachments.push_back(attachment); +#endif + lInfo() << "[CrashReporter] Start handler, handler path =" << Paths::getCrashpadHandlerFilePath() + << "| database path =" << Paths::getCrashpadDirPath() << "| metrics path =" << Paths::getMetricsDirPath() + << "bugsplat url =" << mBugsplatUrl; + // crashpad::CrashpadClient *client = new crashpad::CrashpadClient(); + bool status = mClient.StartHandler(mHandlerPath, mDatabasePath, mMetricsPath, mBugsplatUrl.toStdString(), + mAnnotations.toStdMap(), mArguments, true, true, mAttachments); + + if (!status) { lWarning() << "[CrashReporter] Failed to start Crashpad handler. Crashes will not be logged."; } else { - lInfo() << "[CrashReporter] Started Crashpad handler. Database at " << Paths::getCrashpadDirPath(); + lInfo() << "[CrashReporter] Started Crashpad handler. Database at" << Paths::getCrashpadDirPath(); + lInfo() << "[CrashReporter] Crashes upload url :" << mBugsplatUrl; } + return status; } -void CrashReporter::enable(const bool& on) { - if(!gHandler) gHandler = new CrashReporter(); - std::unique_ptr database = crashpad::CrashReportDatabase::Initialize(gHandler->mDatabasePath); - if (database == NULL) return; +bool CrashReporter::enable(const bool &on) { + if (!gHandler) gHandler = new CrashReporter(); + lInfo() << "[CrashReporter] Enable CrashReporter" << on; + std::unique_ptr database = + crashpad::CrashReportDatabase::Initialize(gHandler->mDatabasePath); + if (database == NULL) { + lInfo() << "[CrashReporter] No Crashpad database, return"; + return false; + } crashpad::Settings *settings = database->GetSettings(); - if (settings == NULL) return; + if (settings == NULL) { + lInfo() << "[CrashReporter] No Crashpad settings, return"; + return false; + } settings->SetUploadsEnabled(on); - if(on) gHandler->run(); - else { + + if (on) { + lInfo() << "[CrashReporter] Run Crashpad"; + return gHandler->run(); + } else { lInfo() << "[CrashReporter] Crashpad has been deactivated by user."; + return false; } } - diff --git a/Linphone/tool/crash_reporter/CrashReporter.hpp b/Linphone/tool/crash_reporter/CrashReporter.hpp index 8c637a5a2..42a02d4f1 100644 --- a/Linphone/tool/crash_reporter/CrashReporter.hpp +++ b/Linphone/tool/crash_reporter/CrashReporter.hpp @@ -21,21 +21,21 @@ #ifndef CRASH_REPORTER_H_ #define CRASH_REPORTER_H_ -#include #include +#include #include #include #include "client/crashpad_client.h" // ============================================================================= -class CrashReporter : public QObject{ +class CrashReporter : public QObject { public: - CrashReporter(QObject * parent = nullptr); + CrashReporter(QObject *parent = nullptr); - static void start(); - static void enable(const bool& on); - void run(); + static bool start(); + static bool enable(const bool &on); + bool run(); crashpad::CrashpadClient mClient; std::vector mAttachments; @@ -46,7 +46,7 @@ public: base::FilePath mMetricsPath; base::FilePath mLogsPath; QString mBugsplatUrl; - static CrashReporter* gHandler; + static CrashReporter *gHandler; }; -#endif \ No newline at end of file +#endif diff --git a/Linphone/view/Page/Layout/Main/MainLayout.qml b/Linphone/view/Page/Layout/Main/MainLayout.qml index 6a5cc6b18..e108ff40c 100644 --- a/Linphone/view/Page/Layout/Main/MainLayout.qml +++ b/Linphone/view/Page/Layout/Main/MainLayout.qml @@ -568,6 +568,23 @@ Item { } } } + + MouseArea { + z: parent.z + 1 + anchors.fill: parent + acceptedButtons: Qt.RightButton + onPressAndHold: (mouse) => { + debugPopup.open() + } + PopupButton { + id: debugPopup + visible: false + popup.contentItem: Button { + text: "debug: force crash" + onClicked: UtilsCpp.forceCrash() + } + } + } } } } diff --git a/cmake/install/install.cmake b/cmake/install/install.cmake index 710e8fa31..dbc2264ff 100644 --- a/cmake/install/install.cmake +++ b/cmake/install/install.cmake @@ -171,6 +171,8 @@ if(HAVE_CRASH_HANDLER) endif() endif() endif() +else() + message(DEBUG "No Crash handler, do not configure Crashpad") endif() # ==============================================================================