Skip to content

Commit

Permalink
Enable gzip-compression of minidumps, update information (OpenRCT2#8159)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
janisozaur authored Oct 26, 2018
1 parent 80b7575 commit 11005c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
2.

**Dump file**
<!-- If you have a dump file: zip it before you drag & drop it here. -->
<!-- If you have a dump file: .dmp.gz will be accepted directly, otherwise zip it before you drag & drop it here. -->

**Screenshots / Video:**
<!-- Drag & drop screenshots here. You can use https://youtube.com to upload video. -->
Expand Down
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
10 changes: 7 additions & 3 deletions src/openrct2/platform/Crash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 11005c9

Please sign in to comment.