L1nkZ / rpatchur

A customizable, cross-platform patcher for Ragnarok Online clients.
https://l1nkz.github.io/rpatchur/
Apache License 2.0
50 stars 34 forks source link

Add grf_path option in patch definition #33

Closed vstumpf closed 3 years ago

vstumpf commented 3 years ago

I'd like a way to change the path of the file I want to add to the generated .thor file.

For example, if this is my client directory:

data/
    resmapnametable.txt
    sclientinfo.xml
data-release/
    sclientinfo.xml
data.grf
rdata.grf
client.exe

data/sclientinfo.xml is my development file, it has a server connection to localhost instead of the release server.

data-release/sclientinfo.xml is the file I want to be merged into the grf.

I'd like to add an option to the patch definition file, grf_path, that will be the path used to write into the thor file, like so:

# Definition of the actual patch content
entries:
  - relative_path: data-release\sclientinfo.xml
    grf_path: data\sclientinfo.xml
vstumpf commented 3 years ago

The alternative is to have relative_path as the path into the grf, and a source_path variable pointing to the real path on the system:

# Definition of the actual patch content
entries:
  - relative_path: data\sclientinfo.xml
    source_path: data-release\sclientinfo.xml
L1nkZ commented 3 years ago

@vstumpf Thanks for the PR!

Yeah I felt another field would eventually be needed. I like the idea of an optional grf_path field to specify the destination in the final archive.

I think you should update the example patch definition file to show that feature exists.

Other than that, I'll gladly merge 👍

L1nkZ commented 3 years ago

Perfect, thanks!