Automatically compress log file
It would be a good option that on the end Xenia automatically compress log file that can be submitted to the compatibility list issue page.
And upload to paste.ee or similar service?
What type of format would be best for this? targz? tarxz? zip? 7z? RAR? In order for this to get done, this would need to be decided on. I would be glad to implement this once it actually gets decided.
Sounds like it would be an easy first issue, but the problem I see here is that in order for it to be useful, it needs to be done in real time.
What type of format would be best for this? targz? tarxz? zip? 7z? RAR? In order for this to get done, this would need to be decided on. I would be glad to implement this once it actually gets decided.
It's a bit more challenging than it seems in my opinion, because you would need to compress the file in real time so to speak. You can't just have it auto zip something and then delete the original log file, because it would add a considerable delay to exiting.
However, as a suggestion I would say .ZIP should be decided here since it has native support in practically every operating system and does pretty well with compressing text. I am open for ideas on how this should be done as well.
Alright, well if it's ZIP, I have kind of a suggestion on how it should work. A kind of checklist of possible ways. Here's some psuedocode:
#ifdef __linux || ifdef MAC // *nix based
if (gzip exists) {
gzip(log)
return
}
else if (tar exists) {
tar(log)
return
}
else {
compressUsingBuiltInMethodFromLibrary(log)
return
}
#elifdef WIN32 // Windows
if (7zip) {
7zip(log, "zip")
return
}
else if (winrar) {
winrar(log, "zip")
return
}
else if (builtInWindowsZipTool) {
builtInWindowsZipTool(log)
return
}
else if (powershell) {
powershellWithCompress-ArchiveArgumen(log)
return
}
else {
compressUsingBuiltInMethodFromLibrary(log)
return
}
#else // Something else, we don't know what it has, so just use builtin method
compressUsingBuiltinMethodFromLibrary(log)
#endif