Author Topic: RELEASE: wxVPView (aka Completely Useless VP Viewer)  (Read 5383 times)

0 Members and 1 Guest are viewing this topic.

RELEASE: wxVPView (aka Completely Useless VP Viewer)
In order to make my modpack cleaner tool more useful, it's gonna need VP support. So I wrote a little VP viewing tool to get the hang of it. Also because I was annoyed with the Java dependency of Maja Express, which currently seems to be the only cross-platform VP tool around.

What does it do?
  • Displays VP contents in the familiar layout of the vintage VPView32
  • Extract files & directories by right-click; batch exporting files is also possible.
  • Probably the most lightweight, hence fastest VP viewer around
  • But most importantly, written in wxWidgets for complete cross-platform compatibility: Windows, Linux and OSX

What doesn't it do?
  • File previews. Nope, sorry, you're out of luck there. This is supposed to be a lightweight tool; if you want to look at a file, you'll have to extract it.
  • VP editing/creation. Similar to VPView32, wxVPView treats VPs as read-only. If you want to edit VPs on non-Windows, try Maja Express.
  • Sort the file list by column header. Sorting is nontrivial in wxWidgets 2.8, I decided it's not worth the effort. I may revisit this decision when (if ever) wxWidgets 3.0 comes out.
  • Elaborate error checking. If you encounter any issues during normal use, please report them here.

So indeed, it's actually completely useless :P Still though, in case you're interested, here's the latest version (v1.0):

Source code (9 KB) @ Google Drive; hit File->Download to get the ZIP.

Older versions (source & binaries) are available at Google Code.

Compiling
Linux (and possibly OSX):
  • Install CMake, GCC and wxWidgets 2.8.12 - all required packages are in the Ubuntu repos, and most other large distros should have them available as well.
  • Unzip the source to a folder of your choosing, create a new directory to store the build files (I usually mkdir build inside the source folder)
  • From the build folder, run cmake .. (replace .. by the path to the source files if needed) If you did everything right, the output should end with:
Code: [Select]
-- Found wxWidgets: TRUE 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/downwash/Code/wxvpview/release
  • Now, still inside the build folder, run make. The wxVPView binary will be created. That's it!

Windows:
The code was written for wxWidgets 2.8.12; be advised that this version may not be fully compatible with your setup.
Because of the above, I'm not actually testing it on Windows myself - but if you encounter any issues, please let me know.

Screenshots

If your platform is not in the list yet, you're welcome to take a screenshot :)

Ubuntu:


Mint MATE:


Lubuntu:


Windows 7:


Windows XP:


OSX:
« Last Edit: June 30, 2013, 12:01:05 pm by FreeSpaceFreak »

 

Offline niffiwan

  • 211
  • Eluder Class
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Huzzah for cross platform tools  :D :yes:

Compiles and works fine on my Mint 13 PC.  And it isn't useless, it does almost everything that I use Maja Express for... so... how hard is it to add the option to extract an entire directory?  :nervous:
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Not too hard, luckily :) I updated the OP with version 0.2 - now exports directories too, and doesn't even crash anymore when it fails to open a VP!

Notes on directory exporting:
  • Double-clicking a directory in the tree will recursively extract its contents to a place of your choosing - the directory itself will not be recreated.
  • Exporting big directories may take a while, during which the tool will go unresponsive. A progress bar is planned for version 0.3.
  • Existing files & folders will be overwritten without warning.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Thanks - I'll try the new version in a few days or so.  Just one question in the meantime, what happens when you try to extract a directory with another directory inside it?  e.g. from your screenshot, if you double clicked on "players" what would happen?  Do you get all the files in the target dir, or are the sub-dirs kept as is?  I guess what I'm trying to say is that I feel that not creating the top level dir prior to extracting is a bit counter intuitive :)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
If someone's nice enough to plop out a Windows exe, I'd love to take a look at this.

 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Thanks - I'll try the new version in a few days or so.  Just one question in the meantime, what happens when you try to extract a directory with another directory inside it?  e.g. from your screenshot, if you double clicked on "players" what would happen?  Do you get all the files in the target dir, or are the sub-dirs kept as is?  I guess what I'm trying to say is that I feel that not creating the top level dir prior to extracting is a bit counter intuitive :)
Subdirectories will be created inside the directory selected for export, along with all their contents. I guess it is indeed kind of inconsistent behaviour... I'll change it for the next version.

 

Offline Kopachris

  • 28
  • It's Pythonic
    • Steam
    • Twitter
    • HLP QuoteDB
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
I'll take a look at the code when I get home from work.  I could use some C/C++ experience, and I'd love to work on adding the ability to create VPs.

EDIT: Couldn't help myself.  Looking at the code while at work.
« Last Edit: April 08, 2013, 04:42:12 am by Kopachris »
--
Yo momma's so fat when she sits on a binary tree she flattens it to a linked list in constant time.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Subdirectories will be created inside the directory selected for export, along with all their contents. I guess it is indeed kind of inconsistent behaviour... I'll change it for the next version.

Thanks :D

And, here's a Linux Mint 13 MATE shot for your gallery :)

edit: screenshot is now in OP

« Last Edit: April 09, 2013, 04:39:17 pm by niffiwan »
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Enjoy!

A few notes:
  • Don't mix tabs and spaces
  • wxLC_SORT_DESCENDING breaks things on Windows
  • Why are you #defining _UNICODE?
  • strcasecmp is non-standard
  • Use iter1-> instead of (*iter1).
  • Extracting when double-clicking in the tree view is annoying

 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
I'll take a look at the code when I get home from work.  I could use some C/C++ experience, and I'd love to work on adding the ability to create VPs.
That would be a very nice feature indeed :)

And, here's a Linux Mint 13 MATE shot for your gallery :)
Added to OP - thanks!

Enjoy!

A few notes:
  • Don't mix tabs and spaces
  • wxLC_SORT_DESCENDING breaks things on Windows
  • Why are you #defining _UNICODE?
  • strcasecmp is non-standard
  • Use iter1-> instead of (*iter1).
  • Extracting when double-clicking in the tree view is annoying
You, sir, are awesome :yes: I'll make sure to get these fixed for the next release. I'd been wondering if the double-click-to-export was a good idea - I'm thinking I'll change it to a right-click menu option for the next release. It would have the added benefit of being able to select multiple files from the list and batch-exporting them.

 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Alright, I updated the OP with version 0.3 (the source, that is). Enjoy!

Changes:
- Exporting is now done with a right-click menu
- Batch-exporting files is now also possible (select multiple files, right-click, export)
- Added a progress dialog box during export, you can now also cancel an ongoing export (note that already exported files will not be deleted)
- Improved Windows compilability

 

Offline Spicious

  • Master Chief John-158
  • 210

 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Awesome, many thanks! I've mirrored them on the Modpack Cleaner download page.

Since nobody seems to be running into issues, and work has picked up again for me, looks like version 0.3 will be the last release for a while. So you can all start using it now, you won't need to update any time soon :D
« Last Edit: April 24, 2013, 03:15:27 pm by FreeSpaceFreak »

 

Offline niffiwan

  • 211
  • Eluder Class
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
I realise that you're probably busy at the moment, but I found a minor issue.  When you extract a folder to a location that has a folder with the same name, a "can't create folder" error is logged.  The contents of the VP-folder are extracted to the existing folder OK, so the error seems redundant in this care.  I haven't checked extracting duplicate files onto each other, an error would be expected in this case.

As an example, I was extracting the "data/missions" folder from every mod I have into a single location (/tmp) so I can find which missions are using a given sexp.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Hmm, right, I can see that happening... I've put it on the to-do list. For laterTM :nervous:

 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Bumpish! Version 1.0 has been released, now with niffiwan's bug fixed and an Export menu for extra intuitivity. Source is available in the first post.

 

Offline Echelon9

  • 210
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Is there a compiled version for Mac anywhere around?

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
A few thoughts after trying to get it to compile with Xcode 3:

- For future releases, could you put the files in a folder and then zip the folder?

- MyFrame::OnContext() being overloaded caused problems because of the resulting ambiguity in MyFrame's event table. Try changing the function names to, say, OnTreeContext() and OnListContext().

- I can build a Unix executable easily enough, so I can see a GUI, but I can't use it. It'll require a working .app bundle, which'll require some changes to the CMakeLists.txt file. I'll try to look into it this weekend.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Here you go.

Screenshot:



 
Re: RELEASE: wxVPView (aka Completely Useless VP Viewer)
Awesome, thanks a lot!