<div dir="ltr">Hi David!<div><br></div><div>Yes, that was just a mistake when I copied some code. I could finally make my .pro and compile the library in QtCreator.</div><div><br></div><div>Thanks!!</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-06 6:21 GMT-03:00 David Faure <span dir="ltr"><<a href="mailto:faure@kde.org" target="_blank">faure@kde.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On jeudi 4 mai 2017 17:19:57 CEST Fernando Theirs wrote:<br>
> Hi everyone!<br>
><br>
> I'm working with Qt and I have to port a Linux application to Android.<br>
> Basically I need to manage some compressed files (targz, zip, among others)<br>
> and in Qt Forum they recommend me to use KArchive.<br>
><br>
> I started working with Qt only a year ago and I'm still a rookie. I could<br>
> not find binaries for this library and the source code uses CMake (I was<br>
> expecting a .pro :/) so it's getting really hard for me to get it work.<br>
><br>
> Asking to the same guy that recommended me the library and following his<br>
> indications I could compile KArchive for Linux and I'm testing it but I<br>
> can't understand very well the documentation.<br>
><br>
> 1) Using KTar I could create a tar.gz with two txt files with the following<br>
> code:<br>
><br>
> QString input = "/home/ferni/QtBuild/<wbr>KArchiveTest/testTar.txt";<br>
> QString input2 = "/home/ferni/QtBuild/<wbr>KArchiveTest/testTar2.txt";<br>
> QString output = "/home/ferni/QtBuild/<wbr>KArchiveTest/testTar.tar.gz";<br>
><br>
> KTar archive(output, "application/x-gzip");<br>
> // Prepare the archive for writing.<br>
> if (!archive.open(QIODevice::<wbr>ReadOnly)) {<br>
<br>
</span>Don't you mean WriteOnly here?<br>
<span class=""><br>
> // Failed to open file.<br>
> return 1;<br>
> }<br>
><br>
> // Create or open an archive<br>
> archive.addLocalFile(input, input);<br>
> archive.addLocalFile(input2, input2);<br>
> archive.close();<br>
><br>
> My question is: how can I decompress the file that I created?<br>
<br>
</span>Using KTar again, this time with ReadOnly ;-)<br>
See the KArchive API (base class for KTar).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
David Faure, <a href="mailto:faure@kde.org">faure@kde.org</a>, <a href="http://www.davidfaure.fr" rel="noreferrer" target="_blank">http://www.davidfaure.fr</a><br>
Working on KDE Frameworks 5<br>
<br>
</font></span></blockquote></div><br></div>