📓 Update documentation

This commit is contained in:
C-3PO 2018-09-14 02:31:35 +02:00
parent 5aa0091fd6
commit 498b20deda
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
3 changed files with 12 additions and 4 deletions

View file

@ -1,4 +1,8 @@
This tool installs a patch, assuming the patch files are already downloaded, and if not patching from -1, that the previous patch is already installed.
```patcher-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.
In all cases, the extracted file is written to stdout. From there, you can either dump it to disk or process it in memory.
# Usage
@ -11,7 +15,10 @@ To compile:
To use:
```
./patcher-installer --disk /tmp/patcher/cdn-patch.swtor.com/patch/assets_swtor_main/assets_swtor_main_-1to0/assets_swtor_main_-1to0.z08 --offset 267071107 --size 165738618 --keys 3393608425,2820264972,3930508185 > ../swtor_main_gfx_1.tor
wget http://cdn-patch.swtor.com/patch/assets_swtor_main/assets_swtor_main_-1to0/assets_swtor_main_-1to0.z08 &&
./patcher-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
```
# Dependencies
@ -19,6 +26,7 @@ To use:
## Miniz <[https://github.com/richgel999/miniz](https://github.com/richgel999/miniz)>
Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
All Rights Reserved.

View file

@ -1 +1 @@
gcc -m64 -o patcher-installer lib/miniz/*.c src/*.c src/*/*.c && chmod +x patcher-installer
gcc -Wall -m64 -o patcher-installer lib/miniz/*.c src/*.c src/*/*.c && chmod +x patcher-installer

View file

@ -34,7 +34,7 @@ void initFileReader(char path[], unsigned long offset) {
//Reads the given amount of bytes from the file and writes them into the given buffer. Automatically opens next file if EOF is reached.
void getBytes(uint8_t* buffer, unsigned long numBytes) {
char* bufferPosition = buffer;
uint8_t* bufferPosition = buffer;
unsigned long remainingBytes = numBytes;
//As long as we still need to read bytes