Author Topic: Yet Another VP Archiver  (Read 1322 times)

0 Members and 1 Guest are viewing this topic.

Yet Another VP Archiver
So long story short I wrote a tiny packer and an unpacker for VP files for UNIX based operating systems (tested on Linux, will likely work on Mac OSX and *BSD, but  OSX and *BSD users will have to compile from source. See below). They have basically no dependencies.

I don't like wxWidgets or Java, so I wrote both command line utilities using standard C libraries. I think my distro (Arch Linux) has a newer version of wxWidgets in the repositories; wxLauncher and wxVPViewer work tolerably with a few GTK related bugs, but a lot of the wx-based utilities will have major issues when this particular version reaches the rest of the community (deprecated and even flat out REMOVED a lot of things, some weird assertion failure bugs, mysterious crashes, the whole nine yards).

Let me know if it extracts improperly or the VP files it generates don't work with something! On a side note, it doesn't have very good sanity checking or error handling yet, so 9 times out of 10 typing something wrong will result in a segfault (make sure you include a '/' at the end of directory paths!!!).

You can get the code here: https://github.com/electrojustin/yavpa. Compilation is as simple as "make".
If you run a 64 bit operating system that supports ELF, e.g. Linux (FreeBSD folks, I think it's dynamically linked so I'm not sure my binary will work for you, see above for source compilation), and want to just download the binaries: https://github.com/electrojustin/yavpa/releases

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Yet Another VP Archiver
Sounds awesome, and if it supports, or could support listing directory structure somehow, and specific file extraction, it would be simple enough to make a front end for.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Yet Another VP Archiver
Quote
specific file extraction
Can be done. Very easily. Might even post a patch later tonight.

Quote
listing directory structure
Like textually? I dunno what a good way would be of listing the directory structure, but if anyone can think of a good one, the unpacker has a really nice internal representation of the file tree that would make this extremely simple.

Quote
it would be simple enough to make a front end for
Alas, I don't know any graphical APIs to a meaningful extent. I do a little OpenGL here and there, but raw OpenGL seems like a poor choice for this sort of thing. Perhaps it's time to finally learn GTK...but there goes the ability to run on OSX.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Yet Another VP Archiver
Something probably tab-delimited, that is both human readable, but also machine parseable, would allow a frontend to 'browse' the VP like 7-zip or the like, or most other VP tools.  Or allow command line only 'browsing', something which I don't think has ever been done before, and which would be pretty cool I think.  I wasn't suggesting that you take a stab at the GUI, merely that by doing the legwork of creating the crossplatform CLI unpacker, anyone could create a front end for it however they see fit.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Yet Another VP Archiver
Quote
Something probably tab-delimited, that is both human readable, but also machine parseable
That actually sounds like a really good way of doing it. Like Python code. Would be super simple to implement too, likely less than 10 lines of code.

Yeah my intent with the whole CLI thing was to pave the way for scripting (like maybe helping a cross platform mission editor get off the ground).

Just for the heck of it, I might even make a separate binary that allows file browsing with ncurses  :P

 
Re: Yet Another VP Archiver
Just pushed an update. Added the single file extraction thing and added a form of tab-delimited textual file listing. Let me know if you have ideas on how to improve it!

 
Re: Yet Another VP Archiver
Can this be extended to work with file-roller? It would be really cool if there was a gui for this and file-roller already handles a ton of file formats. As far as I know it just relies on the commandline tags being compatible...
wrong answer you see hiding in that asteroid belt are 6 dralthi fighters, a Kilrathi gangbang. -Devereaux

  

Offline delt

  • 23
  • Dressed to kill
Re: Yet Another VP Archiver
Nice work :D

I just wrote a similar program, and posted it in this thread http://www.hard-light.net/forums/index.php?topic=88759.0
You can have the world at your feet by tomorrow, just sign on this line ____________