The issue was -bs, I thought it defaulted to o1, e2, p1 but that isn't the case when it's ran from a C++ instance. I had to tell it to put progress or -bsp# to 1. To direct quote the manual for 7zip 18.06 (x64);
I was able to use the Windows Subsystem for Linux to speed testing up in this case. When I sent stdout to a text file with > FileName.txt and used less, I saw that without -bsp1 it wasn't outputting anything. When the process finished I had the same thing I had in my Qt application. Adding -bsp1 to the 7zip command;-bs (Set output stream for output/error/progress line) switch
Syntax
-bs{o|e|p}{0|1|2}
{id} Stream Type
o standard output messages
e error messages
p progress information
{N} Stream Destination
0 disable stream
1 redirect to stdout stream
2 redirect to stderr stream
Default values: o1, e2, p1.
Examples
7z t a.7z -bse1 > messages.txt
tests a.7z archive and sends error messages to stdout that is redirected to messages.txt
7z a -si -so -bsp2 -txz -an < file.tar > file.tar.xz
compresses file.tar (from stdin) to file.tar.xz (stdout stream) and shows progress information in stderr stream that can be seen at console window.
Commands that can be used with this switch
a (Add), d (Delete), h (Hash), l (List), e (Extract), u (Update), x (Extract with full paths)
Qt Code:
if (ArchiveType == "7z") { Args << "-t7z"; Args << "-bsp1"; //<== Added Here Args << "-m0=LZMA2:d512m:fb273"; Args << "-mx9"; Args << "-myx=9"; Args << "-mtc=off"; Args << "-mtm=off"; } else { Args << "-tzip"; Args << "-bsp1"; //<== And Here Args << "-mx"; Args << "-mtc=off"; }To copy to clipboard, switch view to plain text mode
I got full feedback. I can also send the output to a different channel, -bsp2 which will send it to the error channel for easier parsing. I can use the output channel for final details and each line is absolutely positioned.
In short, my connect was working fine. It was 7zip that was giving me trouble.
Bookmarks