AniDex Forums

Discussion Forums => General Discussions => Topic started by: Albireo on April 25, 2012, 05:33:20 pm

Title: Patching on Linux and Mac OS X made simpler
Post by: Albireo on April 25, 2012, 05:33:20 pm
The patches you release require Wine (http://www.winehq.org/) (a Windows emulator) to be run on Linux or Mac OS X, and I don't have it installed on my Mac, so I decided to write a simple script without external dependencies.

The outcome is the xdelta UNIX patcher, a script for all UNIX-compliant system (Linux, Mac OS X, BSD, etc), whose source code can be found on GitHub: https://github.com/kappa7194/xdelta-unix-patcher (https://github.com/kappa7194/xdelta-unix-patcher)

This script is completely stand-alone, the only external commands it uses are wget (http://www.gnu.org/software/wget/) or curl (http://curl.haxx.se/) to download the source code of xdelta, but almost UNIX system out there has at least one of them.

At the moment its usage is quite simple: ./patch.sh OLD_FILE PATCH_FILE [ NEW_FILE ], however it can be adapted to you current Linux script, with the file names hard-coded into the script.

If the system where the patcher is run does not have a native xdelta executable installed (as a Debian Linux system can (http://packages.debian.org/stable/xdelta3)) the current version of the script has a drawback: it will download and build xdelta for every patch, because the executable it builds is saved in the patch's folder.

However, if you're interested in using it, I can modify the script to run off pre-compiled executables distributed with the patch.
Title: Re: Patching on Linux and Mac OS X made simpler
Post by: firefish5000 on May 25, 2012, 06:57:42 am
Thanks, I will have to give it a try.
I am using Debian though,but I can easily adapt, (Ill just make a link to the xdelta it creates the first time, or possibly modify the script. It looks much cleaner than the unportable messes I create.)
Thanks again.
Title: Re: Patching on Linux and Mac OS X made simpler
Post by: ixlone on May 25, 2012, 02:26:14 pm
For linux you just need to put the patch and files in same location and "sh apply_linux_patch.sh" and it will patch. Assuming you have xdelta installed, if not just grab a copy via apt-get.

You don't need to have WINE installed to use the patches.