From 132c36835f08d8bab2be0353593f02f0ed797d77 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 30 Sep 2018 16:09:51 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=93=20Improve=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++---- src/parseArguments.c | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index de1f917..112755a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -```patch-installer``` is a command-line application that can be used to extract a single file from the disk files (.z01, .z02 etc.). This tool is very low-level and assumes that you have already read the .zip file and know the location, size and decryption keys of the specific file you want to extract. +`patch-installer` is a command-line application that can be used to extract a single file from the disk files (.z01, .z02 etc.). This tool is very low-level and assumes that you have already read the .zip file and know the location, size and decryption keys of the specific file you want to extract. -If this is not a ```-1to0``` patch, the disk file may only contain the differences to the previous release. In this case, you can supply the location of this file's previous version, and this tool will generate the new version using VCDIFF/xdelta3. +If this is not a `-1to0` patch, the disk file may only contain the differences to the previous release. In this case, you can supply the location of this file's previous version, and this tool will generate the new version using VCDIFF/xdelta3. If a target location is specified, the extracted file is saved to that location, otherwise it is written to stdout. From there, you can either dump it to disk or process it in memory. @@ -8,19 +8,21 @@ If a target location is specified, the extracted file is saved to that location, To compile: -``` +```bash ./build.sh ``` To use: -``` +```bash wget http://cdn-patch.swtor.com/patch/assets_swtor_main/assets_swtor_main_-1to0/assets_swtor_main_-1to0.z08 && ./patch-installer --disk assets_swtor_main_-1to0.z08 --offset 267071107 --size 165738618 --keys 3393608425,2820264972,3930508185 > ../swtor_main_gfx_1.tor && stat swtor_main_gfx_1.tor rm assets_swtor_main_-1to0.z08 ``` +For a description of the command line arguments, see `src/errorAndExit.c`. + # Dependencies ## Miniz <[https://github.com/richgel999/miniz](https://github.com/richgel999/miniz)> diff --git a/src/parseArguments.c b/src/parseArguments.c index 5cac6fb..a6bf2d3 100644 --- a/src/parseArguments.c +++ b/src/parseArguments.c @@ -9,6 +9,7 @@ //Uses GNU's getopt_long_only(), see https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html +//For a description of these arguments, see errorAndExit.c static struct option long_options[] = { {"disk", required_argument, 0, 'd'}, {"offset", required_argument, 0, 'o'},