[Vala] Linarchive 3.1.2 (was Binding 7zip library ?)



Hello

It seems libarchive don't handle 7Zip archive correctly. Anyway you could
find some files if you want to test libarchive with XZ, ZIP, ...

My platform : gcc 4.6.2 / MingW

Get lastest libarchive and compile it ;
$ cd libarchive-3.1.2
$ ./configure --prefix=/opt
$ make install

VAPI file, based on previous one (version 2 by Julian Andres Klode
<jak jak-linux org>), for libarchive version 3. I certainly made some
mistakes... Feel free to correct it ;)
Copy this file into you vala vapi directory.
Mine is "/opt/share//vala-0.20/vapi"

test.vala, sample test programm

archive.*, sample archive for test.exe

Results :
$ ./test.exe archive.zip
version libarchive 3.1.2
test_file1.txt
        file 1.A
        file 1.B
        file 1.C
test_file2.txt
        file 2.A
        file 2.B
        file 2.C
result 1

$ ./test.exe archive.tar.xz
version libarchive 3.1.2
test_file1.txt
        file 1.A
        file 1.B
        file 1.C
test_file2.txt
        file 2.A
        file 2.B
        file 2.C
result 1

$ ./test.exe archive.7z
version libarchive 3.1.2
result -30

Have fun

Raum

ps: Thanks to Evan Nemerson and Julian Andres Klode

Attachment: test.vala
Description: Binary data

Attachment: libarchive.vapi
Description: Binary data

Attachment: archive.7z
Description: Binary data

Attachment: archive.tar.xz
Description: Binary data

Attachment: archive.zip
Description: Zip compressed data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]