[solved] reading debian package in windows (deb)



  • Hi,

    I am making a windows tool that should read and analyse the contents of a debian package. Is there any standard way (api) to do this? Or should make use of external tools like 7zip?

    Greetings

    Jos



  • Well, debian packages are basically just GNU ar files. So you could get a 3rd party library that can work on ar files.

    In linux (or cygwin under windows) you can do:

    @
    ar x package.deb
    @

    and that will extract the debian package to it's components.

    These would be:

    @
    debian-binary
    control.tar.gz
    data.tar.gz
    @

    To work on those files you will need zlib to decompress the gz, and a tar extraction utility to extract the tar file.

    You can find libraries to do all of these with Qt. I don't think it supports tar/ar but I believe qUncompress() can handle gzip data. Not 100% sure about that though, haven't actually tried it, but I know it uses zlib.



  • It seems that zlib is the way to go. Thanks!



  • No problem. :) Good luck.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.