Page 14 of 40
Re: Howto apply a patch/diff file
Posted: 03 Sep 2008 14:16
by maxentropy
Hi,
I'm learning how to use TortoiseSVN using MeusH's instructions on page 1. I have followed the steps to 'Checkout SVN' and I am trying to apply PhilSophious' realistic timetables patch using right-click->TortoiseSVN->Apply patch. I select 'patch all' as in attachment 2 at which point TortoiseMerge loads up and displays two columns, 'source.list: original' and source.list: patched.' What do I do now in order to play OpenTTD with the patch applied?
I have previously used BuildOTTD and after pressing 'Update and Compile' a build of the patched game would appear in 'My OTTD Builds.' Does TortoiseSVN have an equivalent feature?
I hope that this is clear and would appreciate any advice you can offer.
Thanks
Re: Howto apply a patch/diff file
Posted: 03 Sep 2008 18:52
by tigerface
What are you using to compile? TortoiseSVN won't do that.
Re: Howto apply a patch/diff file
Posted: 04 Sep 2008 11:32
by maxentropy
Ah, a compiler would help!
Anyway, installed Cygwin and successfully followed the wiki to the end of step 12, with no problems (as far as I can tell). I decided to start with a clean, unpatched version of the source code.
However, when I type 'run openttd.exe' into Cygwin (or indeed just double-click the icon in the binaries folder) the program loads up with the normal title in the window bar (OpenTTD rxxxxx) but it then freezes and I am left with just a black screen (sometimes with the OpenTTD mouse pointer) before the dreaded 'not responding' Windows dialogue box appears. The original TTD data files and Cygwin files are in place.
To check it wasn't some sort of bug in the latest nightly, I changed the revision using TortoiseSVN to the last revision I compiled using BuildOTTD - still no functioning binary. Also, my BuildOTTD binaries still work.
Any suggestions on what might be the problem?
Thanks for your help
Re: Howto apply a patch/diff file
Posted: 04 Oct 2008 11:02
by wojteks86
gives an error after compiling, see screenshot
what i was trying to do is to implement new_oil.patch
there was no errors after previous commands
no openttd.exe created
any ideas?
Re: Howto apply a patch/diff file
Posted: 04 Oct 2008 11:12
by Alberth
You've got a C++ compiler error, according to the report, _reachable_tracks is used, but does not exist.
Do the revision numbers of 'trunk' and the 'new_oil.patch' match?
Re: Howto apply a patch/diff file
Posted: 04 Oct 2008 11:51
by wojteks86
what does that mean and how to do it?

im a noob
Re: Howto apply a patch/diff file
Posted: 04 Oct 2008 15:57
by Alberth
Unlike what you may think, there is not one set of source files to build OpenTTD, there are over 14000 of them. Each time on of the devs makes a change in trunk (where you copied your source files from with SVN or TortoiseSVN), we get a new set of files. In order not to get confused, each set of source files is given a number, the so called revision number.
You can ask the number from your trunk directory by typing 'svnversion' in your /home/Administrator/trunk directory.
A patch is a description of what lines must be changed (and how) in a set of files in order to make the patch work. Since with each revision, the source files are different, a patch is always made against against a specific revision, and this number is known as the patch revision number.
The only guaranteed working way to apply a patch is to use the same set of sources as were used to create the patch. In other words, you need to get the patch revision number of new_oil.patch, and get that exact same set of sources (with eg 'svn update -r', see the end of the
BuildOTTD thread) before you can apply the patch.
Alternatively, you can try to update the patch to a newer revision, but you need C++ knowledge to do that.
Re: Howto apply a patch/diff file
Posted: 04 Oct 2008 21:12
by DaleStan
Alberth wrote:the only guaranteed working way
Inasmuch as anything released under the GPL is either warranted or guaranteed to anything at all.
Re: Howto apply a patch/diff file
Posted: 05 Oct 2008 11:20
by wojteks86
I dont really understand it (not the language but instructions)
I think I will give up for now

and enjoy stable 0.6.3

Re: Howto apply a patch/diff file
Posted: 26 Oct 2008 18:11
by XxInNOutxX
Just a quick qn, once i patch the source files... how do i play it?
Re: Howto apply a patch/diff file
Posted: 26 Oct 2008 18:34
by planetmaker
XxInNOutxX wrote:Just a quick qn, once i patch the source files... how do i play it?
you compile it
After having successfully compiled you can start your binary the usual way.
Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 02:12
by XxInNOutxX
How do u compile then? BuildOTTD doesnt work

Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 03:54
by Lilman424
by using a compiler?
Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 04:55
by XxInNOutxX
I have tried cygwin and all sorts of compilers, but they give all sorts of errors and are too complicated. Pls help

Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 06:54
by planetmaker
XxInNOutxX wrote:I have tried cygwin and all sorts of compilers, but they give all sorts of errors and are too complicated. Pls help

You may notice that we can help, if you have a specific error.
But going here and stating "doesn't work" simply won't get you anywhere and is likely to give no helpful response as simply it cannot be given. Especially if you come with an attitude of "I think it's compilicated" showing no effort of your part to solve your
problem with your computer. Why should we do your work?
General guidelines on how to install and setup compilers are sufficiently around in the net and in this very sticky topic. Yes, it may require you to do some reading. Yes, it may not be everything quite straight forward. Yes, may not even be a piece of cake. But also yes, our crystal balls are broken.
Enough of this rant now.
So, please, if you tell us what you tried on which system and
where exactly
what error exactly
happend. That's fine and we might be able to give a hint.
Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 09:31
by XxInNOutxX
Quote from cygwin article from openttd wiki "Now you need to launch Cygwin, so use the start menu icon or run cygwin.bat in C:\cygwin. You then need to move to the folder where the source is, so type cd /usr/src/openttd/trunk."
This is the step that confused me.
What error does it indicate?
Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 09:42
by Rubidium
XxInNOutxX wrote:What error does it indicate?
That either your space bar is broken or that you haven't exactly (character-by-character) copied what was written you should type.
Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 09:47
by XxInNOutxX
hmm there are spaces to be put in?
Edit: uploaded a new picture with correct words typed in.
Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 10:10
by Yexo
XxInNOutxX wrote:Quote from cygwin article from openttd wiki "Now you need to launch Cygwin, so use the start menu icon or run cygwin.bat in C:\cygwin. You then need to move to the folder where the source is, so type cd_space_/usr/src/openttd/trunk."?
Re: Howto apply a patch/diff file
Posted: 27 Oct 2008 10:29
by XxInNOutxX
Doesnt work for me still getting the same error. Wait, do i have to get the source FIRST before doing this?