From 11005c9f77e3c506f37e02432f835a5a50f1e473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 26 Oct 2018 04:39:25 -0700 Subject: [PATCH] Enable gzip-compression of minidumps, update information (#8159) Enable gzip, but only for local save, as GitHub will accept gzip-compressed files even if they don't advertise it explicitly. Update changelog and GitHub issue template to reflect that. --- .github/ISSUE_TEMPLATE.md | 2 +- distribution/changelog.txt | 1 + src/openrct2/platform/Crash.cpp | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 71bdb9ba2b..5aa47faa23 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -17,7 +17,7 @@ 2. **Dump file** - + **Screenshots / Video:** diff --git a/distribution/changelog.txt b/distribution/changelog.txt index d0e3a44f0e..4ad24f459c 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -5,6 +5,7 @@ - Feature: [#7956, #7964] Add sprite font glyphs for Hungarian and some Czech letters. - Feature: [#7971] Toolbox option to open custom content folder. - Feature: [#7980] Allow data path for RCT1 to be specified by a command line argument. +- Feature: [#8073] Auto-upload minidumps to backtrace.io (optional, MSVC/Windows only) - Feature: [#8078] Add save_park command to in-game console. - Feature: [#8080] New console variable "current_rotation" to get or set view rotation. - Feature: [#8099] Add Powered Launch mode to Inverted RC (for RCT1 parity). diff --git a/src/openrct2/platform/Crash.cpp b/src/openrct2/platform/Crash.cpp index c9d9fb2bea..886716e8e9 100644 --- a/src/openrct2/platform/Crash.cpp +++ b/src/openrct2/platform/Crash.cpp @@ -103,18 +103,22 @@ static bool OnCrash( wchar_t dumpFilePathGZIP[MAX_PATH]; swprintf_s(dumpFilePathGZIP, sizeof(dumpFilePathGZIP), L"%s.gz", dumpFilePathNew); - // TODO: enable gzip compression once supported on backtrace.io - /* FILE* input = _wfopen(dumpFilePath, L"rb"); FILE* dest = _wfopen(dumpFilePathGZIP, L"wb"); if (util_gzip_compress(input, dest)) { + // TODO: enable upload of gzip-compressed dumps once supported on + // backtrace.io (uncomment the line below). For now leave compression + // on, as GitHub will accept .gz files, even though it does not + // advertise it officially. + + /* minidumpToUpload = dumpFilePathGZIP; + */ } fclose(input); fclose(dest); - */ // Try to rename the files if (_wrename(dumpFilePath, dumpFilePathNew) == 0)