Page 8 of 40

Problem installing patch

Posted: 25 Jun 2007 23:33
by mathijsjansen
I've just discovered openTTD recently and like it really much, but I've got one problem, oil refineries can only be build close to the edge (while using fund new industry). For large maps, this is insane. Now I've found a .diff file to solve this problem, but I cannot instal it.

I am a total noob when it comes to installing patches for openTTD, so I followed the instructions given by MeusH. When I follow this method I get the message that there are unresolved conflicts. I tried to solve them by indicating which version (theirs or mine in SVNTortoise) I prefer.
Now I think I did it right, but still it doesn't work in openTTD. Is there some final step which should be made, because I can't inmagine how openTTD knows that it should check this new made folder. Is there a way to update the instal files used by openTTD

Thanks, Mathijs Jansen

Re: Problem installing patch

Posted: 25 Jun 2007 23:35
by Digitalfox
mathijsjansen wrote:I've just discovered openTTD recently and like it really much, but I've got one problem, oil refineries can only be build close to the edge (while using fund new industry). For large maps, this is insane. Now I've found a .diff file to solve this problem, but I cannot instal it.

I am a total noob when it comes to installing patches for openTTD, so I followed the instructions given by MeusH. When I follow this method I get the message that there are unresolved conflicts. I tried to solve them by indicating which version (theirs or mine in SVNTortoise) I prefer.
Now I think I did it right, but still it doesn't work in openTTD. Is there some final step which should be made, because I can't inmagine how openTTD knows that it should check this new made folder. Is there a way to update the instal files used by openTTD

Thanks, Mathijs Jansen
Have you tried with this:

BuildOTTD

http://www.tt-forums.net/viewtopic.php?t=31823&start=0

Posted: 26 Jun 2007 09:19
by mathijsjansen
I've tried this program and it works easily, but when I try to patch openTTD I get the following error message:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: industry_cmd.c
|===================================================================
|--- industry_cmd.c (revision 1787)
|+++ industry_cmd.c (working copy)
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored



I got the patch from:
http://sourceforge.net/tracker/index.ph ... tid=636367

Thanks, Mathijs

Posted: 27 Jun 2007 02:23
by DaleStan
Probably you are applying the patch in the wrong directory

What's the output of:

Code: Select all

$ ls industry_cmd.c

Posted: 27 Jun 2007 02:33
by glx
DaleStan wrote:Probably you are applying the patch in the wrong directory
Or the wrong revision (r1787 is very very old)

Posted: 27 Jun 2007 02:56
by DaleStan
Ah. Yes. That could be a problem too.

Re: Howto apply a patch/diff file

Posted: 23 Jul 2007 02:53
by Mattastic
I just can't figure this out. I can't use TortoiseSVN (something about not having the right version to install it with or something) and every other SVN thing seems impossible to work out. Tutorials aren't helpful, because they're written by people who know how to use it and expect everyone else to know what they're talking about. And typing that code in the console doesn't seem to work at all. In fact, whether the patch I'm trying to install exists or not (I tried with non-existant ones just to see) I get this message:

Code: Select all

- Change patch variables for all players. Usage: 'patch <name> [<value>]'
- Omitting <value> will print out the current value of the patch-setting.
And then nothing happens. In fact, I even get that message if I just type "patch". So I tried the following:

Code: Select all

patch filename.patch [-p0]
No meaningless message there, but still, no working patch. So then I tried to see if the second line of that message was true and tried:

Code: Select all

patch filename.patch
Turns out that...

Code: Select all

'filename.patch' is an unknown patch setting.
Isn't that nice. Do I just have my .patch file in the wrong folder? I put it in the root of my OTTD installation.

Re: Howto apply a patch/diff file

Posted: 23 Jul 2007 03:30
by Bilbo
Mattastic wrote:I just can't figure this out. I can't use TortoiseSVN (something about not having the right version to install it with or something) and every other SVN thing seems impossible to work out. Tutorials aren't helpful, because they're written by people who know how to use it and expect everyone else to know what they're talking about. And typing that code in the console doesn't seem to work at all. In fact, whether the patch I'm trying to install exists or not (I tried with non-existant ones just to see) I get this message:

Code: Select all

- Change patch variables for all players. Usage: 'patch <name> [<value>]'
- Omitting <value> will print out the current value of the patch-setting.
And then nothing happens. In fact, I even get that message if I just type "patch". So I tried the following:

Code: Select all

patch filename.patch [-p0]
No meaningless message there, but still, no working patch. So then I tried to see if the second line of that message was true and tried:

Code: Select all

patch filename.patch
Turns out that...

Code: Select all

'filename.patch' is an unknown patch setting.
Isn't that nice. Do I just have my .patch file in the wrong folder? I put it in the root of my OTTD installation.
You have wrong "patch.exe" binary.

First, the correct syntax is "patch -p0 <filename.patch"

Second - you need to get different patch frogram. Rename patch.exe to something else, then get MSYS from http://www.mingw.org/download.shtml#hdr8 - it includes the correct patch you need

Re: Howto apply a patch/diff file

Posted: 23 Jul 2007 10:45
by Mattastic
Well, I never had a patch.exe anyway. No such file comes with OTTD. But I got MSYS and copied over the patch.exe from that. Since I didn't have any reference as to where it goes, I placed it under my root OTTD folder. However, the same problems persist. :?

Re: Howto apply a patch/diff file

Posted: 23 Jul 2007 12:22
by Rubidium
Looks to my as if you are running patch from the OpenTTD console. Am I right about that?

Re: Howto apply a patch/diff file

Posted: 23 Jul 2007 14:57
by Mattastic
Yeah. That's what the tutorial on the wiki said to do, and the one here doesn't specify.

Re: Howto apply a patch/diff file

Posted: 23 Jul 2007 20:04
by DaleStan
If so, the wiki's tutorial is wrong. Which page says that, please?

Re: Howto apply a patch/diff file

Posted: 26 Jul 2007 15:04
by Mattastic
The offending page is here. The bit in question is at the bottom.

Right, I'm now guessing I'm meant to put the text in the config file. First I tried putting it at the extreme top of the file, which got me the message: "ini: 'patch -p0 < filename.patch' outside of group" on loading and closing OTTD, after which the addition was removed by the program. I've tried putting it under the groups in the config file, but so far none of those have seemed appropriate and failed to achieve any result.

I ask only this: where do I put that one line of text, and what folder does the actual patch file go in. Those seem to be the only questions that never get answered anywhere.

Re: Howto apply a patch/diff file

Posted: 26 Jul 2007 15:16
by glx
wiki wrote:Linux: Type the following line into a console (replace patch_name with the filename of the patch):
Well "a console" means a terminal, not the openttd ingame console.

Re: Howto apply a patch/diff file

Posted: 02 Aug 2007 12:12
by Mattastic
Okay. What console/terminal/whatever do I type this into?

Re: Howto apply a patch/diff file

Posted: 02 Aug 2007 18:35
by DaleStan
The same one where you'd type "./configure && make" to build OpenTTD.

Re: Howto apply a patch/diff file

Posted: 03 Aug 2007 10:56
by kilo.dollar
I seem unable to proceed. What should I do in this instance?
See attached error message.

Re: Howto apply a patch/diff file

Posted: 03 Aug 2007 13:54
by kilo.dollar
What files are modified by applying a patch, and if I get someone's patched files and replace mine, is my game already patched that way?

Re: Howto apply a patch/diff file

Posted: 03 Aug 2007 15:42
by rav
please avoid double posting kilo.dollar..

to answer your questions:
1) the correct url is (IIRC) svn://svn.openttd.org
2) yes, if you replace your files with the files you've received/copied n' pasted your game will be patched

Re: Howto apply a patch/diff file

Posted: 04 Aug 2007 11:50
by kilo.dollar
Thanks, Rav, since I am failing is anyone willing to patch for me with the do_not_build_inconnective_roads_r10722.patch?