Author Topic: [Windows] Volition Package Tool (CLI) - with MultiArc Addon for Total Commander  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

Offline Luke

[Windows] Volition Package Tool (CLI) - with MultiArc Addon for Total Commander
Hint: This is the english version of the german article in the WCSD Forum.
Hinweis: Das ist die englische Version des deutschen Artikels im WCSD Forum.

1. Introduction - What is Volition Package Tool?

VPT is a powerful scripting tool for creating and editing Volition Package archives (.VP). It is designed to be integrated into automated production environments, such as ours in the WCSD project. It does not have its own GUI, but is compatible with the Total Commander plugin "MultiArc". The combination VPT + MultiArc + Total Commander provides a comfortable interface for creating and editing VP archives in addition to the script functions. Thus VPT combined can be used as a script tool and as a GUI tool.

2. Field of application & Concept

2.1 Field of application / Target group

The domain of VPT is the script processing of files and VP archives. Especially with frequently recurring routine tasks, tools with a surface would be cumbersome, time-consuming and error-prone. It is therefore primarily suitable for mod and game developers looking for a way to automatically create VP archives.

For players who only want to change a few details of an existing mod, VPT is less suitable or not designed. In this case, rather a pure GUI solution should be considered. Although the combination VPT + MA + TC certainly offers a powerful and comfortable interface, but also needs to be set up. See 5.2.

2.2 The concept of VPT

Reliability and flexibility
Reliability was at the forefront of VPT's development. It should be a robust tool that provides good error detection. There was also a focus on flexibility to adapt the tool to any production environment and situation. The predecessor VPU (used by us from 2014 to 2016) for displaying and unpacking VP archives was designed according to these principles. On this basis, VPT was created in 2016.

Syntax and functions
The syntax and functions of VPT have been deliberately aligned with classic CLI packers. So if you work regularly with ZIP or RAR in the command line or use such packers in scripts, you will quickly get used to VPT. The commands of VPT are based on established standards. Only the switches of VPT differ mostly from the standards, also because the VP format has some peculiarities that, for example, ZIP or RAR does not have.

Hidden Text: An example and comparison with standard CLI-Packer • Show
It shows how the call would look at the individual packers. The folder "data" including all subfolders and files should be packed. In this example we assume that we are already in the parent folder in the shell, which contains the subfolder "data". Furthermore, the archive should be created in "z: \ temp \" and get the file name "test".

ARJ
Code: [Select]
>arj32 a -r "z:\temp\test" data\*
ZIP
Code: [Select]
>zip -r "z:\temp\test" data\*
7-Zip
Code: [Select]
>7za a "z:\temp\test" data\*
RAR
Code: [Select]
>rar a -r "z:\temp\test" data\*
VPT
Code: [Select]
>vpt a -ndd "z:\temp\test" data\*
From these examples it can be seen that VPT does not have exotic syntax, but provides a familiar interface. This is especially true if you already use one of the mentioned packers at the script level.

3. Functions and properties

  • Supports Create/Add/Move, List, Extract and Delete.
  • In the simplest case it can add a folder with all sub folders and files to a new VP archive (like VPMAKE).
  • It's faster than VPMAKE. On my computer VPMAKE needs 28 seconds to pack the WCS folder CBANIMS with 11,034 files and 1.34 GB. For the same job VPT needs 7 seconds.
  • Supports Regular Expression from AI3 so it can be flexible adapted to any development environment and situation.
  • Accepts multiple files via parameter for all functions.
  • Accepts simple file pattern (* and ?) for all functions.
  • Accepts a list file for all functions. Pattern (simple or RegEx) can also be used in this list.
  • Can extract files with or without paths.
  • Can simulate packing/deleting/extracting. Usefully for testing parameters like RegEx. On this function the most checks and calculation is working, so it's helpful to check the file structure and to get the several values for the finished VP before the VP is created.
  • Has several checks to ensure that the created archive is complete and intact: checks if there is enough free space for the VP, checks if the VP will not be too big, checks if the names of the files and folders are not too long and other things.
  • All operations for creating or change a VP archive will done in a temporary VP archive. Only if the complete operation is finished without errors the temporary archive will renamed to the destination VP archive.
  • If any critical problem occurs during packing then the process will immediately stopped, the temporary archive deleted and a error message shown. So there is a simple rule: If you see a VP after packing, it's intact.
  • Can show archive content (directory) in short, long or tech format (So you want to choose the red pill, right? :D).
  • Show archive summary for any operation.
  • Recover the date and time from UTC timestamp and set it to extracted files, inclusive local timezone and DST. As far as I know, VPT is the only Windows tool that can restore the date and time when unpacking.
  • Also if empty files should not be included in a VP archive it's supported for packing and unpacking. As standard empty files are ignored.
  • Show extracting log with return codes for every file.
  • Set return code (errorlevel) for error handling in scripts.
  • Can generate checksum files (MD5, SHA256) for the VP archive.
  • Has lot of switches to adapt all operations flexible to any situation.
  • RAR-like syntax.
  • With the functions Add and Delete it's possible to use VPT as part of a update package for updating VP archives directly on the players computer. So patch-VP's are no longer needed.
  • Needs Windows XP SP3 as minimum and has otherwise no dependency.
Compatible with Total Commander plugin "MultiArc". With this plugin the following standard functions are possible in Total Commander: Create, Add, Move, List, Extract, Delete. Furthermore, the combination of VPT and TC results in some special functions and features:

  • A VP archive can be synchronized with a normal directory (in both directions). The sync function allows a very simple updating of an already existing VP archive, ideal for updates.
  • Multiple VP archives can be unpacked at once. You can also specify whether each VP archive is to be unpacked into a separate subdirectory. Ideally if you unpack the complete contents of a Freespace Mod and want to preserve the original structures.
  • Any file can be changed directly in the VP without having to unpack the archive manually and have to pack it again after the change. Thus, e.g. a text file can be modified directly with an editor. After the change you are asked if the changed file is to be packed again into the archive.
  • Files and/or folders can be copied to a non existing path inside an archive. This can be specified directly during the packing process. The path may also contain a plurality of subfolders, that is to say e.g. "Folder1\Folder2\ ...".
  • Within a single VP, the file search can be performed. The files in the result list can then be called up directly, which changes the directory in the VP and the focus is set to the relevant file.
  • In a folder with several VPs or in a whole drive, the file search can also be searched globally in all VP archives. The files in the result list can then be called directly, which opens the relevant VP, changes the directory in the VP, and sets the focus to the relevant file.
4. Syntax and examples

Hidden Text: 4.1 Help - Syntax, inclusive special commands and switches. • Show
>vpt -h*

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

USAGE:

VPT <command> [<switches>] <archive> [<files>|<@list>] [<source/output dir>]
 [<path inside>]

<command>
  a      Add files to a new or existing archive
  d      Delete files
  e      Extract files without paths
  l      List files in archive - full: date, time, size, path & name
  lb     List files in archive - bare: path & name
* lt     List all files in archive - tech: offset, size, name, timestamp, flags
         Note: shows the real directory without any filter, sort or conversion
               methods.
* m      Move files to a new or existing archive (be carefully!)
         Note: same like 'a' but will delete source files and folders after
               packing.
  x      Extract files with full paths

<switches> - general
  -re    Use Regular Expression instead of simple pattern
  -nh    Show no header (not for command 'lb')
  -na    Show no actions (not for command 'lb')
  -nl    Show no file list (not for command 'lb')
  -nt    Show no table structure (not for command 'lb')
  -ns    Show no summary (not for command 'lb')
  -nvp   Add no .VP suffix if missing
  -sim   Simulate the operation (not for list commands)
         Note: useful for testing parameters like RegEx
* -nvc   No VP validity check (not recommended)
         Note: for all operations which reads an existing archive
* -pt    Print the current time with milliseconds at the begin of any line
         Note: useful for debugging/testing
  -nop   No operation - this switch does simply nothing
         Note: useful as placeholder in scripts

<switches> - Add/Move (a,m)
  -ndd   Add no top level directory 'data'
         Note: useful if 'data' is already added by file pattern/RegEx
  -o     Overwrite existing files
  -ovp   Overwrite VP - delete an existing archive before packing
  -nr    No recursion - add only files from source dir without subfolders
         Note: works only with file pattern/RegEx
  -cl    Convert folder and file names to lower case
         Note: on existing archives it converts the complete directory to
               lower case, not only the added files.
  -cu    Convert folder and file names to upper case
         Note: on existing archives it converts the complete directory to
               upper case, not only the added files.
  -ih    Include hidden files
         Note: works only with file pattern/RegEx
  -is    Include system files
         Note: works only with file pattern/RegEx
  -il    Include link/junction files
         Note: works only with file pattern/RegEx
* -ie    Include empty files (not recommended)
         Note: most other VP tools doesn't support empty files
* -ndc   No file date check
         Note: if set then an invalid file date will change to timestamp 1
               instead of stopping the process.
* -md5   Generate a MD5 checksum file for the archive
* -sha   Generate a SHA256 checksum file for the archive

<switches> - Delete (d)
* -md5   Generate a MD5 checksum file for the archive
* -sha   Generate a SHA256 checksum file for the archive

<switches> - Extract (e,x)
  -o     Overwrite existing files
  -du    Use UTC file date in archive instead of local timezone settings
  -dl    Ignore file date in archive and use the current local date
  -cl    Convert folder and file names to lower case
  -cu    Convert folder and file names to upper case
* -fls   Sort file list - normally not needed

<switches> - List (l,lb,lt)
  -du    Use UTC file date in archive instead of local timezone settings
  -cl    Convert folder and file names to lower case (not for command 'lt')
  -cu    Convert folder and file names to upper case (not for command 'lt')
* -co    Check directory overhead (only for command 'lt')
* -fls   Sort file list - normally not needed (not for command 'lt')

<switches> - MultiArc (Total Commander plugin)
* -wp    Show a window with progress bar
* -we    Show error popups (use it with -ne switch)
* -ne    No exit code
         Note: useful to avoid multiple error popups from MultiArc

Note: multiple switches must be typed without spaces between

<archive>
  Path and filename of the archive. The suffix '.vp' will added
  automatically if it's not set. This behavior can be disabled by using the
  -nvp switch. Path is created if not exists.

<files>
  Multiple files can used with | as separator and all files must enclosed in
  quotes like "file1|file2|file3". Simple file pattern allowed with ? and *
  or use RegEx (-re switch). It will automatically set to * if it's empty.

  Hint: The fastest way to list/extract a whole archive or to add a
  complete directory to a new archive is to use * as file pattern without
  -re switch. This disables all filter mechanism.

<@list>
  A file which contains all files wanted to add/list/extract/delete. It must
  have the same format like the list from command 'lb' (bare format). Simple
  file pattern and RegEx (use -re switch) can also be used in this list.

<source dir>
  Path from where files will be added recursively. It will automatically set
  to current work dir if it's empty.

<output dir>
  Path where files will be extracted. It will automatically set to current
  work dir if it's empty. Path is created if it doesn't exists.

<path inside>
  It's needed for adding files to an existing archive to put the files in an
  existing folder inside the archive or to create this folder. This path can
  contain multiple folders like "folder1\folder2\folder3...".


Type 'VPT -h'   for help
Type 'VPT -h*'  for help inclusive special commands/switches
Type 'VPT -hh'  for examples
Type 'VPT -hh*' for examples inclusive special ones for advanced users

Hidden Text: 4.2 Help - Examples, inclusive special ones for advanced users. • Show
>vpt -hh*

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

EXAMPLES:

List example 1:
VPT l hermes_core.vp
  List all content from 'hermes_core.vp' with long format.

List example 2:
VPT lt -nl hermes_core.vp
  Show only tech summary for 'hermes_core.vp' without file list.

List example 3:
VPT l hermes_core.vp *.fc2
  List all .fc2 files from 'hermes_core.vp' with long format.

* List example 4:
VPT l -re hermes_core.vp "^[^.]+$|\.(?!(tbl|fs2)$)"
  List all files from 'hermes_core.vp' with long format but exclude
  .tbl and .fs2 files.

Extract example 1:
VPT x -o hermes_core.vp * z:\temp
  Extract all files with relative paths to 'z:\temp' and overwrite
  existing files.

Extract example 2:
VPT e hermes_core.vp data\tables\strings.tbl
  Extract 'strings.tbl' without path into current directory.

Extract example 3:
VPT e hermes_core.vp "*.fs2|*.fc2"
  Extract all .fs2 and .fc2 files without paths into current directory.

Extract example 4:
VPT x -o-dl hermes_core.vp data\tables\*string* z:\temp
  Extract all files from 'data\tables\' containing 'string' in filename with
  relative paths to 'z:\temp' and overwrite existing files and ignore original
  file date.

Extract example 5:
VPT x -o hermes_core.vp @extract.lst z:\temp
  Extract all files listed in 'extract.lst' with relative paths to 'z:\temp'
  and overwrite existing files.

Extract example 6:
VPT x hermes_core.vp "data\tables\tips.tbl|data\fonts\font01.vf" z:\temp
  Extract 'data\tables\tips.tbl' and 'data\fonts\font01.fv' with relative
  paths to 'z:\temp'.

* Extract example 7:
VPT x -o-re hermes_core.vp "data\\players\\(?!.*\\)" z:\temp
  Extract all files only from 'data\players\' with relative paths to 'z:\temp'
  and overwrite existing files but exclude all subfolders.

Create example 1:
VPT a new_core.vp
  Add all files and folders from current directory with their relative paths
  to the new archive 'new_core.vp'. The top level directory 'data' will
  automatically added.

Create example 2:
VPT a -ih new_core.vp * d:\game\data
  Add all files with their relative paths from 'd:\game\data' inclusive hidden
  files to the new archive 'new_core.vp'. The top level directory 'data' will
  automatically added.

* Create example 3:
VPT a -re-sim new_core.vp "movies\\(?!prologue.*)" d:\game\data
  Add all movies from 'd:\game\data\movies' with their relative paths
  but exclude all movies beginning with 'prologue' in filename. The top level
  directory 'data' will automatically added. Packing is only simulated without
  any write access.

* Create example 4:
VPT a -re-ndd new_core.vp "data\\(?!(cbanims|hud|maps|movies)\\)" d:\game
  Add all files from 'd:\game\data' to the new archive 'new_core.vp' but
  exclude the subfolders 'cbanims', 'hud', 'maps' and 'movies' and supress the
  top level directory 'data'. The switch '-ndd' is needed here because
  'data' will added already by file pattern.

* Create example 5:
VPT a -re new_core.vp "^(?!(cbanims|hud|maps|movies)\\)" d:\game\data
  Variant of 'Create example 4' with the same result.

Add example 1:
VPT a -o core.vp @pack.lst
  Add all files listed in 'pack.lst' with their relative paths from current
  directory and overwrite all existing files.

Add example 2:
VPT a -o core.vp "*.tbl|*.fs2" d:\game\data data
  Add all .tbl and .fs2 files from 'd:\game\data' (and subfolders) with their
  relative paths into the folder 'data' inside the archive and overwrite all
  existing files.

Add example 3:
VPT a -o core.vp *.fs2 d:\game\missionfiles data\missions
  Add all .fs2 files from 'd:\game\data\missionfiles' (and subfolders)
  into the folder 'data\missions' inside 'core.vp' and overwrite all
  existing files.

Hidden Text: 4.3 Content of source directory for the following examples • Show
>dir "h:\WCS_BASE\patch" /b /s /ogn
h:\WCS_BASE\patch\interface
h:\WCS_BASE\patch\missions
h:\WCS_BASE\patch\tables
h:\WCS_BASE\patch\interface\2_OptionsMain.dds
h:\WCS_BASE\patch\interface\2_OptionsMain-M.pcx
h:\WCS_BASE\patch\missions\Demo-01-BG-Hermes.fs2
h:\WCS_BASE\patch\missions\Demo-02-BG-Hermes.fs2
h:\WCS_BASE\patch\missions\Demo-03-BG-Hermes.fs2
h:\WCS_BASE\patch\missions\Demo-04-BG-Hermes.fs2
h:\WCS_BASE\patch\missions\Demo-05-BG-Hermes.fs2
h:\WCS_BASE\patch\missions\M01-BG-Hermes.fs2
h:\WCS_BASE\patch\missions\M18-BG-Hermes.fs2
h:\WCS_BASE\patch\tables\messages.tbl
h:\WCS_BASE\patch\tables\strings.tbl

Hidden Text: 4.4 Example output - Create VP • Show
>vpt a "z:\temp\hermes_42181_1_1_patch.vp" * "h:\WCS_BASE\patch"

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

Create archive: "z:\temp\hermes_42181_1_1_patch.vp"
Mode          : add files
Filter        : "*"
Source dir    : "h:\WCS_BASE\patch\"

Build filter list (1 lines)
Read source dir (11 files found)
Filter source dir (11 files left)
Build VP directory (17 records)
Write VP header  OK
Add data\interface\2_OptionsMain.dds  OK
Add data\interface\2_OptionsMain-M.pcx  OK
Add data\missions\Demo-01-BG-Hermes.fs2  OK
Add data\missions\Demo-02-BG-Hermes.fs2  OK
Add data\missions\Demo-03-BG-Hermes.fs2  OK
Add data\missions\Demo-04-BG-Hermes.fs2  OK
Add data\missions\Demo-05-BG-Hermes.fs2  OK
Add data\missions\M01-BG-Hermes.fs2  OK
Add data\missions\M18-BG-Hermes.fs2  OK
Add data\tables\messages.tbl  OK
Add data\tables\strings.tbl  OK
Write VP directory  OK
Rename temporary VP archive  OK
Done

Bytes added     : 4,201,103
Files added     : 11
Directorys added: 4
Archive size    : 4,201,867 bytes
Processing time : 00:00:00.025

Hidden Text: 4.5 Example output - Delete files from VP • Show
>vpt d "z:\temp\hermes_42181_1_1_patch.vp" *.tbl

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

Delete files: "z:\temp\hermes_42181_1_1_patch.vp"
Mode        : standard
Filter      : "*.tbl"

Build filter list (1 lines)
Read VP directory (11 files)
Filter VP directory (9 files left)
Sort file list
Build VP directory (13 records)
Write VP header  OK
Rebuild archive...
Delete data\tables\messages.tbl  OK
Delete data\tables\strings.tbl  OK
Write VP directory  OK
Rename temporary VP archive  OK
Done

Bytes deleted   : 627,177
Files deleted   : 2
Archive size    : 3,574,514 bytes
Processing time : 00:00:00.022

Hidden Text: 4.6 Example output - Add files to VP • Show
>vpt a "z:\temp\hermes_42181_1_1_patch.vp" *.tbl "h:\WCS_BASE\patch" data

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

Update archive: "z:\temp\hermes_42181_1_1_patch.vp
Mode          : add files
Filter        : "*.tbl"
Source dir    : "h:\WCS_BASE\patch\"
Path inside   : "data\"

Build filter list (1 lines)
Read source dir (11 files found)
Filter source dir (2 files left)
Read VP directory (9 files)
Filter VP directory (9 files left)
Sort file list
Build VP directory (17 records)
Write VP header  OK
Rebuild archive...
Add data\tables\messages.tbl  OK
Add data\tables\strings.tbl  OK
Write VP directory  OK
Rename temporary VP archive  OK
Done

Bytes added     : 627,177
Files added     : 2
Archive size    : 4,201,867 bytes
Processing time : 00:00:00.028

Hidden Text: 4.7 Example output - Overwrite files in VP • Show
>vpt a -o "z:\temp\hermes_42181_1_1_patch.vp" *.fs2 "h:\WCS_BASE\patch" data

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

Update archive: "z:\temp\hermes_42181_1_1_patch.vp
Mode          : add files
Filter        : "*.fs2"
Source dir    : "h:\WCS_BASE\patch\"
Path inside   : "data\"

Build filter list (1 lines)
Read source dir (11 files found)
Filter source dir (7 files left)
Read VP directory (11 files)
Filter VP directory (4 files left)
Sort file list
Build VP directory (17 records)
Write VP header  OK
Rebuild archive...
Add data\missions\Demo-01-BG-Hermes.fs2  OK
Add data\missions\Demo-02-BG-Hermes.fs2  OK
Add data\missions\Demo-03-BG-Hermes.fs2  OK
Add data\missions\Demo-04-BG-Hermes.fs2  OK
Add data\missions\Demo-05-BG-Hermes.fs2  OK
Add data\missions\M01-BG-Hermes.fs2  OK
Add data\missions\M18-BG-Hermes.fs2  OK
Write VP directory  OK
Rename temporary VP archive  OK
Done

Bytes deleted   : 1,185,423
Files deleted   : 7
Bytes added     : 1,185,423
Files added     : 7
Archive size    : 4,201,867 bytes
Processing time : 00:00:00.031

Hidden Text: 4.8 Example output - List content of VP - bare • Show
>vpt lb "z:\temp\hermes_42181_1_1_patch.vp"
data\interface\2_OptionsMain.dds
data\interface\2_OptionsMain-M.pcx
data\missions\Demo-01-BG-Hermes.fs2
data\missions\Demo-02-BG-Hermes.fs2
data\missions\Demo-03-BG-Hermes.fs2
data\missions\Demo-04-BG-Hermes.fs2
data\missions\Demo-05-BG-Hermes.fs2
data\missions\M01-BG-Hermes.fs2
data\missions\M18-BG-Hermes.fs2
data\tables\messages.tbl
data\tables\strings.tbl

Hidden Text: 4.9 Example output - List content of VP - in detail • Show
>vpt l "z:\temp\hermes_42181_1_1_patch.vp"

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

List files: "z:\temp\hermes_42181_1_1_patch.vp"
Filter    : "*"

Build filter list (1 lines)
Read VP directory (11 files)
Filter VP directory (11 files left)
List files

Date       Time     Size       Path & Name
---------- -------- ---------- -------------------------------
2012-03-23 22:16:20    2359424 data\interface\2_OptionsMain.dds
2012-03-23 22:16:20      29079 data\interface\2_OptionsMain-M.pcx
2012-03-23 21:15:45     124909 data\missions\Demo-01-BG-Hermes.fs2
2012-03-24 01:09:26     178793 data\missions\Demo-02-BG-Hermes.fs2
2012-03-23 21:15:45     127914 data\missions\Demo-03-BG-Hermes.fs2
2012-03-26 15:30:50     150123 data\missions\Demo-04-BG-Hermes.fs2
2012-03-23 21:15:45     163317 data\missions\Demo-05-BG-Hermes.fs2
2012-03-24 19:14:05     125311 data\missions\M01-BG-Hermes.fs2
2012-03-26 15:30:50     315056 data\missions\M18-BG-Hermes.fs2
2012-03-21 23:53:32     390388 data\tables\messages.tbl
2012-03-24 19:14:06     236789 data\tables\strings.tbl
---------- -------- ---------- -------------------------------

Bytes total     : 4,201,103 / 4,201,103 (100 %)
Files total     : 11 / 11 (100 %)
Time base       : Local timezone (file date from archive)
Processing time : 00:00:00.004

Hidden Text: 4.10 Example output - List content of VP - technically • Show
>vpt lt -co "z:\temp\hermes_42181_1_1_patch.vp"

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

List archive: "z:\temp\hermes_42181_1_1_patch.vp"

Read VP directory
Check directory overhead
List directory

Pos    Offset     Size       Name                            Timestamp   Flags
------ ---------- ---------- ------------------------------- ----------- ---
     1          0          0 data                                      0 D--
     2          0          0 interface                                 0 D--
     3         16    2359424 2_OptionsMain.dds                1332537380 -F-
     4    2359440      29079 2_OptionsMain-M.pcx              1332537380 -F-
     5          0          0 ..                                        0 --B
     6          0          0 missions                                  0 D--
     7    2388519     124909 Demo-01-BG-Hermes.fs2            1332533745 -F-
     8    2513428     178793 Demo-02-BG-Hermes.fs2            1332547766 -F-
     9    2692221     127914 Demo-03-BG-Hermes.fs2            1332533745 -F-
    10    2820135     150123 Demo-04-BG-Hermes.fs2            1332772250 -F-
    11    2970258     163317 Demo-05-BG-Hermes.fs2            1332533745 -F-
    12    3133575     125311 M01-BG-Hermes.fs2                1332612845 -F-
    13    3258886     315056 M18-BG-Hermes.fs2                1332772250 -F-
    14          0          0 ..                                        0 --B
    15          0          0 tables                                    0 D--
    16    3573942     390388 messages.tbl                     1332370412 -F-
    17    3964330     236789 strings.tbl                      1332612846 -F-
------ ---------- ---------- ------------------------------- ----------- ---

Bytes total       : 4,201,103
Files total       : 11
Directorys total  : 4
Backdirs total    : 2
Directory depth   : 2
VP version        : 2
Directory offset  : 4201119
Directory records : 17
Directory size    : 748 bytes
Directory overhead: 0 records, 0 bytes (0 %)
Archive size      : 4,201,867 bytes
Processing time   : 00:00:00.006

Hidden Text: 4.11 Example output - Extract VP • Show
>vpt x "z:\temp\hermes_42181_1_1_patch.vp" * "z:\temp\"

Volition Package Tool v1.1.0.1646 (c) 2014-2018 Luke (www.wcsaga.org)

Extract files: "z:\temp\hermes_42181_1_1_patch.vp"
Mode         : with paths
Filter       : "*"
Output dir   : "z:\temp\"

Build filter list (1 lines)
Read VP directory (11 files)
Filter VP directory (11 files left)
Extract files

Date       Time     Size       RC Path & Name
---------- -------- ---------- -- -------------------------------
2012-03-23 22:16:20    2359424  0 data\interface\2_OptionsMain.dds
2012-03-23 22:16:20      29079  0 data\interface\2_OptionsMain-M.pcx
2012-03-23 21:15:45     124909  0 data\missions\Demo-01-BG-Hermes.fs2
2012-03-24 01:09:26     178793  0 data\missions\Demo-02-BG-Hermes.fs2
2012-03-23 21:15:45     127914  0 data\missions\Demo-03-BG-Hermes.fs2
2012-03-26 15:30:50     150123  0 data\missions\Demo-04-BG-Hermes.fs2
2012-03-23 21:15:45     163317  0 data\missions\Demo-05-BG-Hermes.fs2
2012-03-24 19:14:05     125311  0 data\missions\M01-BG-Hermes.fs2
2012-03-26 15:30:50     315056  0 data\missions\M18-BG-Hermes.fs2
2012-03-21 23:53:32     390388  0 data\tables\messages.tbl
2012-03-24 19:14:06     236789  0 data\tables\strings.tbl
---------- -------- ---------- -- -------------------------------

Bytes extracted : 4,201,103 / 4,201,103 (100 %)
Files extracted : 11 / 11 (100 %)
Files with error: 0
Time base       : Local timezone (file date from archive)
Processing time : 00:00:00.023

5. Total Commander

Hidden Text: 5.1 Total Commander examples • Show

Creating a new VP archive with selected folders. The top level folder "data" will created automatically.



Adding a folder to the created VP archive.



Adding selected files to a non existing folder. This folder name can defined directly in the input box, here "\tables".



Any file in an existing archive can be edited without manually unpack/pack the VP archive.



Synchronizing a folder with a VP archive.


Hidden Text: 5.2 Integration into Total Commander using MultiArc • Show

Here is the complete way to install MultiArc and VPT in Total Commander. The interface of VPT was designed for MA version 1.4.2.144. Older versions of MA may cause problems with VPT. During the development of VPT, Total Commander Version 9.0a was used.

1. Total Commander absolutely "Run as administrator", as it would lead to problems during the installation and especially configuration of MultiArc.

2. Download MultiArc: MultiArc MVV

3. Double-click on the downloaded MultiArc archive in the TC or press <Enter> and the following window appears. Confirm this with <Yes> and accept the suggested installation path in the next window.



4. Once MA is installed, two files must be copied to the MultiArc directory. If MA is installed in the proposed default folder, the easiest way to reach this folder is to insert the following command into the TC command line and press <Enter>.

Code: [Select]
cd %commander_path%\plugins\wcx\multiarc


5. In this folder, VPT.exe and Volition Package.addon must be copied from the VPT archive.



6. Now select any file in the TC - e.g. the newly copied file VPT.exe - and start the packing process. Either from the menu, toolbar or simply with <Alt> + <F5>. Then the following window should appear. On the right, select "MultiArc" from the drop-down list at "->". Then click <Configure> directly below.



7. Click the <Import types> button in the "MultiArc configuration" window.



8. Then open (import) the file Volition Package.addon. The following question "Are you sure to import ..." is confirmed with <Yes>.



9. Close the window "MultiArc configuration" with <OK> and reopen it.

10. Then select "VP" for "Type". Click on the <Change> button on the right side of the window.



11. In the "Format Capabilities" window, set the following checkboxes and close the window with <OK>.



12. Close the "MultiArc configuration" window with <OK>.

13. Cancel the packing process, quit TC and restart.

Now TC should create new VPs and open and unpack existing VPs. If you now start a packing process, the packing format "vp" should be selected via the drop-down list at "->".


6. Additional Information

Hidden Text: 6.1 Background and creation • Show

My first attempts at game-modding in general and Modding of Wing Commander Saga in particular, I did in 2012. At that time I had to do for the first time with VP archives and sat mainly VPVIEW. At the end of 2013, when our own project Wing Commander Saga German was started, a script-capable tool was needed to create VP archives. The only suitable tool that was available for Windows back then was VPMAKE, which we then used throughout the development and beta test. All other tools were useless for our project because they were not scriptable and also had some serious bugs.

Also after the release (end of 2015) the tool VPMAKE was used for all updates of WCSD (up to and including Service Pack 1, end of 2016). However, VPMAKE can only generate VPs but not unpack. So in 2014 I developed my own VP function library (VPU UDF) for List and Extract for the programming language AutoIt3. This library was then used by several - mostly internal - tools, including "WCS Base Auto Extract" and "VPU" (never published), a script-capable tool for listing and unpacking VP archives. We also integrated VPU into TC by means of MA. So you could open VP's in the TC, list and unpack. {Note: TC is the default file manager of our team's two programmers.} Already at that time (2014), VPU mastered unpacking with a file list as a parameter, file list from a file, file patterns, and RegEx. With the combination of VPMAKE and VPU I had all the essential functions to be able to handle script-controlled with VP archives. However, the functionality of VPMAKE was too limited for me and I wanted to combine all the functions in just one tool. So at the end of 2016 I started to expand the function library and VPU so that VP's could be created, like with VPMAKE. However, with the advantages of VPU (file pattern and RegEx). The tool was renamed to "VPT" and the function library (UDF) to "VPPU". At the beginning of 2017, the Add and Delete functions were also added to allow the subsequent addition and deletion of files.

Thus, VPT now offers (2017) more than the combination VPMAKE and VPU. VPT has become a universal VP Tool and will replace VPMAKE in our production system.

Hidden Text: 6.2 Acknowledgments • Show

Derek Meek - for VPMAKE which inspires me to create VPU and then VPT
Rob Saunders - for his UnixTime UDF
Malkey - for his ArrayMultiSort UDF
Harold Siebenküttel - for testing
Jonathan Bennett - for AutoIt
My wife - for her incredible patience ^^

7. Download

Download VPT from WCSD forum

« Last Edit: August 11, 2018, 09:48:27 am by Luke »

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
placeholder
« Last Edit: March 17, 2017, 05:59:30 pm by Luke »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
Now, that's what I call a drop  :yes:

Any chance of releasing the source, or a way for this to be usable on other platforms such as macOS?
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

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
Hi chief1983

Well, VPT is written in a language that exists only on Windows, so the source would not help. And i am working and developing only in the Windows environment, i gave up all other platforms long long ago. With other words: i have no time for other platforms. In my sparse free time i write tools only in Windows. Sorry. :-(

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
That's ok.  This will still be useful to any team except for very small teams without access to Windows :P
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

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
Yeah, well, as i know is that under Linux the users have access to several Volition Package CLI tools. The Windows users have much less CLI tools for that duty, the most Windows tools are GUI tools. So i simply fill this gap a bit.  :p

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
Hmm, I only knew of one CLI-based VP editor and I thought the code was cross-platform or Windows-specific already.  But, with Total Commander, I don't know of another tool on any platform that could be this easy to use and functional.  It's awesome.  Have to try it out this weekend.
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

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
I mean the following:

http://www.hard-light.net/forums/index.php?topic=88759.0
http://www.hard-light.net/forums/index.php?topic=88177.0

And there is one or two more VP tools i found in Google i think. But i forgot the URLs.

You are also a TC user then? Yes, TC is extremely powerful and flexible, i work with it since more than 20 years. And so i made VPT fully compatible to MultiArc to get the best possible functionality. I made a howto for VPT+MA+TC but it's currently only in german available. But if you are a TC user you will understand what is to do if you see the pictures. Look in my german topic at point 5.2.

A question about the forum here: is there a design element to hide text so the user can open the text separately? Like the special spoiler BBcode i built in on our own forum? If you have a look at my german topic you can see what i mean. The spoiler BBcode here is not suited for that what i want to do. That's was the cause why i created a second post to keep the main post compact.

 

Offline Axem

  • Administrator
  • 211
Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
This is super neat.

Also you can use [ hidden ] to hide your text like

Hidden Text: This • Show
Hi!!!

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
Hi Axem

Also you can use [ hidden ] to hide your text like

Yes, this is exactly what i need, thanks!

edit: much better now.  :)
« Last Edit: March 17, 2017, 06:01:39 pm by Luke »

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
Added now APPENDIX B.2 INTEGRATION INTO TOTAL COMMANDER USING MULTIARC, the english version of my MultiArc howto.

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
New version 0.9.2.1497, appendix A updated.
« Last Edit: May 25, 2017, 07:11:49 am by Luke »

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
New version 0.9.3.1513 (RC1), appendix A updated.

 

Offline Luke

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander
New version 1.0.0.1521 (Release), appendix A updated, topic title changed.

 

Offline technopredator

  • Does not compute
  • 27
  • Don't get mad, consequences are revenging you.
Re: [Windows] Volition Package Tool (CLI) - with MultiArc Addon for Total Commander
Sticky it!
I use Total Commander too from long ago, from the times it was Windows Commander, and before it, Norton Commander :D
Luke: If you want you could release the code anyway and wait for others to adapt it to Linux and MacOS, for greater good.
I suppose this only works on 32-bit TC, I can't register the .vp extension, always got the Not Registered in TC, I can get inside the .vp file with Ctrl+PgDwn tho
« Last Edit: September 04, 2017, 01:26:05 am by technopredator »

 

Offline Luke

Re: [Windows] Volition Package Tool (CLI) - with MultiArc Addon for Total Commander
Hi technopredator

I use Total Commander too from long ago, from the times it was Windows Commander, and before it, Norton Commander :D

Same here ^^

Quote
I suppose this only works on 32-bit TC, I can't register the .vp extension, always got the Not Registered in TC, I can get inside the .vp file with Ctrl+PgDwn tho

It works with both TCMD 32 and TCMD 64. My colleague and main betatester (Harold Siebenküttel) works only with TCMD 64. Personally i use mainly TCMD 32 because there are several extensions i need but they exist only as 32 bit. Two things:

  • Have you followed exactly the installation process in appendix B.2? For VPT MultiArc MVV is needed. VPT don't work with the original MultiArc, it is designed for MultiArc MVV. And especially the point with "Run as Administrator" on installation is important.
  • If you use both, TCMD 64 and TCMD 32 you must install MA+VPT with TCMD 32. If you use only TCMD 64 then install MA+VPT with TCMD 64.

  

Offline Luke

Re: [Windows] Volition Package Tool (CLI) - with MultiArc Addon for Total Commander
  • New version 1.1.0.1646
  • Much has happened in the last 14 months since release. All changes are listed as usual in the attached changelog.
  • The article in the starting post has been extensively revised. Among other things, the subsection 2.2 has been added and 4 more points in section 4.
Note: In order to keep content differences of the forum article in the three forums HLP, FSG and WCSD as small as possible, the starting post has now been replaced completely by the translation of the german forum article in the WCSD Forum. The most part was translated by google, sorry for that. ;)