Applying the patch should be straightforward, but I have unfortunately just confirmed the problem described by Commander_X. The patch utility that the development environment runs is an old version which seems to have problems with applying github formatted patches on Windows. Thankfully, the solution is very easy: Use a newer patch utility, and more specifically, the one that comes with the version of git distributed with the dev environment.
To fix the patch issue:
1. Go to <DevEnvInstallPath>/Msys_x2/1.0/bin, find the files patch.exe and patch.exe.manifest and rename them.
2. Go to <DevEnvInstallPath>/git/bin, find the files with the same name as above and right-click->Copy,
3. Return to <DevEnvInstallPath>/Msys_x2/1.0/bin, right-click->Paste. You now have the newer patch.exe version at the right location.
How to apply a patch (let's use pr153.diff as example):
Normally a pull request patch should be directly applicable to the master branch, unless the PR is too old and things on master have changed a lot compared to the time the PR was created. In any case, we will normally not make you patch incompatible branches, so #153 can be safely merged with current 1.85 master.
1. Go to https://github.com/OoliteProject/oolite/pull/153.diff
select everything with Ctrl+A, copy to clipboard and paste in a new file in your text editor; let's call it pr153.diff. Save the file at the top level of your Oolite checkout, i.e. the folder that has src, Docs, Resources etc. directly below it.
-- Bonus Tip: You can obtain the patch diff for any pull request or specific revision in github, by navigating to the appropriate github page and adding
at the end of the link appearing on yout browser's url box.
2. Using the dev environment shell, go to <OoliteSourcePath>. You will need to be at the top level folder of your Oolte checkout in order for the patch to be able to find the paths of the files it works with.
patch -p1 < pr153.diff
. If you are using the new version of patch.exe, it should be able to execute without errors.
Hopefully this helps. If you feel it's too much work or too much hassle to go through, don't worry, I fully agree with you