Author Topic: Patching on Linux and Mac OS X made simpler  (Read 21473 times)

Offline Albireo

  • Closet Otaku
  • *
  • Posts: 1
  • Karma: +0/-0
  • I'm new here!
    • View Profile
Patching on Linux and Mac OS X made simpler
« on: April 25, 2012, 05:33:20 pm »
The patches you release require Wine (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

This script is completely stand-alone, the only external commands it uses are wget or curl 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) 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.

Offline firefish5000

  • Closet Otaku
  • *
  • Posts: 1
  • Karma: +0/-0
  • Your Argument Is Invalid.
    • View Profile
Re: Patching on Linux and Mac OS X made simpler
« Reply #1 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.
~FireFish5000
Kyon / $:Syncing with server...
Kyon / $:Rejecting it's reality, Substituting it with your own...
Kyon / $:Error 13: Permission denied, are you Haruhi?

Offline ixlone

  • Loli Collector
  • Administrator
  • Nekomimi
  • *****
  • Posts: 1,105
  • Karma: +68/-4
  • Mmm... Miku!
    • View Profile
Re: Patching on Linux and Mac OS X made simpler
« Reply #2 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.