Howto apply a patch/diff file

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Howto apply a patch/diff file

Post by planetmaker »

Loiner wrote:So if I used this method:

http://wiki.openttd.org/Compiler_sur_MinGW/Fr

Would I have to do everything mentioned or just the part under 'Compiling OTTD'?

Also, is there something I should put where it says 'cd ~/<path_to_source>'?
If you've never done one of the preceeding steps, you'll have to complete each step, i.e. install a complete development environment and all the dependencies which OpenTTD needs installed in order to compile successfully. Guess why that page is named as it is ;-)
Loiner
Engineer
Engineer
Posts: 56
Joined: 28 Mar 2010 17:48

Re: Howto apply a patch/diff file

Post by Loiner »

OK, I've compiled everything except Libfreetype which couldn't be found - so would I still be able to compile OpenTTD without it?
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Howto apply a patch/diff file

Post by FooBar »

You should be able to compile OpenTTD without that, but then you cannot use a custom font setting in openttd.cfg.
Loiner
Engineer
Engineer
Posts: 56
Joined: 28 Mar 2010 17:48

Re: Howto apply a patch/diff file

Post by Loiner »

OK, no problem. :)

Next step however - How do I go about this?

Code: Select all

cd ~/<path_to_source>
./configure
make
Like I say this is all new to me but I assume I'll have to enter something where it says 'cd ~/<path_to_source>'?
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: Howto apply a patch/diff file

Post by Lord Aro »

Loiner wrote:OK, I've compiled everything except Libfreetype which couldn't be found - so would I still be able to compile OpenTTD without it?
"which can't be found"
?
works for me
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Howto apply a patch/diff file

Post by FooBar »

First make sure you actually have the source. It's easiest if you place it in (a subdirectory of ) C:\MinGW\msys\1.0\home\<user_name>
Then replace <path_to_source> with the actual path to the source, counting from C:\MinGW\msys\1.0\home\<user_name>. Say that the source is in C:\MinGW\msys\1.0\home\<user_name>\openttd, the command becomes:

Code: Select all

cd ~/openttd
Loiner
Engineer
Engineer
Posts: 56
Joined: 28 Mar 2010 17:48

Re: Howto apply a patch/diff file

Post by Loiner »

FooBar wrote:First make sure you actually have the source. It's easiest if you place it in (a subdirectory of ) C:\MinGW\msys\1.0\home\<user_name>
Then replace <path_to_source> with the actual path to the source, counting from C:\MinGW\msys\1.0\home\<user_name>. Say that the source is in C:\MinGW\msys\1.0\home\<user_name>\openttd, the command becomes:

Code: Select all

cd ~/openttd
OK, cheers!

But the next problem is, it tells me to enter this:

Code: Select all

./configure
And when I do, it says 'No such file or directory'.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Howto apply a patch/diff file

Post by Eddi »

what does "ls -l" say? (those are lower case letters L)
Loiner
Engineer
Engineer
Posts: 56
Joined: 28 Mar 2010 17:48

Re: Howto apply a patch/diff file

Post by Loiner »

It says:

Code: Select all

total 61
-rw-r-r--r-- 1 Home Administrators 62150 Jul  8 23:38 openttd-is2-r20009-15820.svn.diff
Does this mean anything significant?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Howto apply a patch/diff file

Post by planetmaker »

Loiner wrote:It says:

Code: Select all

total 61
-rw-r-r--r-- 1 Home Administrators 62150 Jul  8 23:38 openttd-is2-r20009-15820.svn.diff
Does this mean anything significant?
Obviously you then have only the diff in that directory and not OpenTTD's source.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Howto apply a patch/diff file

Post by Alberth »

You have to do the steps under 'getting the source code' to get all source files in that directory.
A .diff or .patch file is just a set of instructions of how to modify the source code to add the functionality of the patch.
In your case, it looks like you want to get revision 20009 of the source code as the patch has been written against that version.

(svn checkout -r20009 svn://svn.openttd.org/trunk)
User avatar
REDBOOK7
Engineer
Engineer
Posts: 80
Joined: 20 Oct 2007 13:41
Location: IRELAND

How to apply a patch ( idiots guide )

Post by REDBOOK7 »

Hi there ,

After several unsuccessfull attempts to apply a patch , I have failed . Is there anywhere you have an ( idiots guide ) for doing this . I am trying to apply infrstructure sharing to the latest working version of open ttd . Could anyone explain this for me line by line , For example , i dont know what to open , where or how and would greatly apreciate a complete , simple set of instructions . Looking at ( how to apply a patch diff ) is a complete mystery to me as it does not tell what to open and where .

Thanks .
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Howto apply a patch/diff file

Post by planetmaker »

Did you already compile an unpatched OpenTTD version so far? If the answer is 'no', please go for that first.
User avatar
REDBOOK7
Engineer
Engineer
Posts: 80
Joined: 20 Oct 2007 13:41
Location: IRELAND

Re: Howto apply a patch/diff file

Post by REDBOOK7 »

Thanks for the reply.

To be brutaly honest , i am hopeless at compling anything except my sandwiches in the moprning before i trudge out to work . So heres my request . Since i will probably never , ever be able to do this , would it be possible for you to just comple it for me . What i want to do is be able to play the latest working version and have infrastructure sharing enabled . Would be forever grateful if you could as i would love to have all the latest featueres and be able to play with sharing as it forms the core part of how i play the game . If you can my e-mail addres is sphelanjml@eircom.net . If you cant or wont then you cant or wont :(
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Howto apply a patch/diff file

Post by FooBar »

I woudn't disclose my e-mail address like that... Unless you're interested in a boatload of spam.

Maybe you should take a look at "Chill's Patch Pack". I believe that includes infrastructure sharing (and a lot more), with precompiled Windows binaries available in the thread.

The "idiots guide" on compiling that you are looking for is this: http://wiki.openttd.org/Compiling_on_MinGW
User avatar
REDBOOK7
Engineer
Engineer
Posts: 80
Joined: 20 Oct 2007 13:41
Location: IRELAND

Re: Howto apply a patch/diff file

Post by REDBOOK7 »

Well , thnks for any help but after a frustrating night to be honest its all far too technical for me and i dont have a hope of compiling anything ,myself . So as a last desperate question . Is it possible to use the console window to apply an infrastructure sharing patch file . If not then i will have to give up i guess . :cry:
User avatar
Level Crossing
Tycoon
Tycoon
Posts: 1187
Joined: 07 Feb 2011 22:04
Location: East Coast, United States

Re: Howto apply a patch/diff file

Post by Level Crossing »

REDBOOK7 wrote:Well , thnks for any help but after a frustrating night to be honest its all far too technical for me and i dont have a hope of compiling anything ,myself . So as a last desperate question . Is it possible to use the console window to apply an infrastructure sharing patch file . If not then i will have to give up i guess . :cry:
No, it is not.

I would seriously suggest you try Chill's Patchpack. Clicky the Linky :D
Like my avatar? See my screenshot thread
Loiner
Engineer
Engineer
Posts: 56
Joined: 28 Mar 2010 17:48

Re: Howto apply a patch/diff file

Post by Loiner »

Would I need to download all those patches that Chilli has put up?

I'm also a very un-technical guy. I've done everything the Wiki says, so what would I need to do from there?

Really want to use the infrastructure sharing thing, I have great plans to be used with it. :cry:
User avatar
Level Crossing
Tycoon
Tycoon
Posts: 1187
Joined: 07 Feb 2011 22:04
Location: East Coast, United States

Re: Howto apply a patch/diff file

Post by Level Crossing »

Loiner wrote:Would I need to download all those patches that Chilli has put up?

I'm also a very un-technical guy. I've done everything the Wiki says, so what would I need to do from there?

Really want to use the infrastructure sharing thing, I have great plans to be used with it. :cry:
No, go to pg. 85 and look for the post with the word binary. It will have relevant instructions.
Like my avatar? See my screenshot thread
Loiner
Engineer
Engineer
Posts: 56
Joined: 28 Mar 2010 17:48

Re: Howto apply a patch/diff file

Post by Loiner »

Level Crossing wrote:
Loiner wrote:Would I need to download all those patches that Chilli has put up?

I'm also a very un-technical guy. I've done everything the Wiki says, so what would I need to do from there?

Really want to use the infrastructure sharing thing, I have great plans to be used with it. :cry:
No, go to pg. 85 and look for the post with the word binary. It will have relevant instructions.
I really am coming across as naive and feel like I've skipped something, but the files related to binaries on that page just seem to link to the download of OTTD.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 8 guests