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

Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Howto apply a patch/diff file

Post by Conditional Zenith »

The term is common place for both binary and source code patches. Of course most non-programmers who aren't experienced with open source don't know about source code patches, and it needs to be made clear that these are source code patches and not binary patches.
flowover
Engineer
Engineer
Posts: 61
Joined: 24 Jun 2008 05:51

Re: Howto apply a patch/diff file

Post by flowover »

True. I didn't mean to imply it wasn't common on both sides.
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: Howto apply a patch/diff file

Post by XeryusTC »

MS2009 wrote:HELP!!!

Followed the instructions on page 1, but I must be doing something wrong???

Whenever I try to install the patch it does not work, as shown below.

Which folder do you install the patch into as I am getting very confused. And sorry for being thick but when it says source codes, which files are these? :oops: ?( :?: :bow:
Somehow the first thing I thought when I saw those screenshots was that your windows UI must be in the wrong palette :o
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: Howto apply a patch/diff file

Post by dihedral »

flowover wrote:Most people come here with the inclination that a patch is the same as patching any other commercial game they've bought. I don't blame them. The term is common place. I think a sticky should be made explaining this in big bold letters.
but then they are not very familiar with the term _development_ ... uh ... what forum are we in? hmmm....
Zeyes
Engineer
Engineer
Posts: 4
Joined: 21 Feb 2009 04:22

Re: Howto apply a patch/diff file

Post by Zeyes »

And another newbie with a compiling problem rather than a patching problem per se - I originally tried to integrate cargodest (no problems with that in Turtoise, for what it's worth), and when that didn't go through I tried a clean trunk compile for comparison to see if that works, which didn't either. So, apologies for bringing it up in this thread, but it's a re-run of sorts: Anyone have an idea how to fix the "neverending dependency check" problem in Cygwin, previously mentioned byMJS (almost two years ago) and by stevenh (a few months back)? I eventually halted the whole thing when it was still doing it after a couple of hours without any apparent progress, under the assumption that compiling OpenTTD can't possibly take this long. (Or does it? Sorry, absolutely no experience with compilers here, so I'm lacking any frame of reference for these things.)

Anyway, there wasn't really any resolution in those cases, other than MJS "fixing" it by reinstalling Cygwin eventually, but unfortunately that's something I already tried a couple of times even before finding those posts... Thanks for any and all assistance!

Edit: D'oh, if I'm asking for a frame of reference on the time issue I should probably mention my system specs: 1.5 GHz notebook with 512 MB RAM and Win XP. Not terribly highpowered, I suppose.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2857
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Howto apply a patch/diff file

Post by ChillCore »

I had the same thing on my pII win98 machine.
I solved it by getting a p4 xp.
Installed MinGW-MSYS... problem solved.

As for time it takes...

First(clean) compile:
Something like five to ten minutes. Depends what i am doing in the meantime.

Patched compile(after first compile):
Anywhere from thirty seconds to the same time as a first compile.Depends on how many files were changed
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Howto apply a patch/diff file

Post by ostlandr »

I really admire anybody with the technical ability to find and successfully install all the needed software, apply a patch to the OTTD source code and successfully compile it. I worked on it this morning, as I really want the cutting-edge version of Cargodest. Will take another run at tonight once I get rid of my usual "code migraine". :? I think I have the same odds of successfully generating a win32 binary as hitting the lottery.
Who is John Galt?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4765
Joined: 09 Sep 2007 05:03
Location: home

Re: Howto apply a patch/diff file

Post by Alberth »

I admire you for trying it at a Windows machine. I would get crazy in minutes probably.
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Howto apply a patch/diff file

Post by ostlandr »

Even worse- Vista. :evil:

Going to move all the dev software over to the XP box now that we upgraded the memory and start over.
Alberth wrote:I admire you for trying it at a Windows machine. I would get crazy in minutes probably.
Who is John Galt?
User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Howto apply a patch/diff file

Post by snowie »

Now I can compile trunk (thank you!!), but I still don't know how to apply a patch.
I add it in Tortoise. Some patches got errors, some not. Then i compile it, and what next?? In folder with the trunk is no openttd.exe file, so I copy everything to (copy of) game folder, but when I run the game there is everything like it was before.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Howto apply a patch/diff file

Post by Conditional Zenith »

Well did you see if the patch applied cleanly, and then if it compiled successfully? If it compiled successfully, you will have an openttd.exe in the bin directory of the source tree. Then you just need to copy this binary (and maybe lang files) across.
User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Howto apply a patch/diff file

Post by snowie »

Here's the config.log
Attachments
config.txt
(5.46 KiB) Downloaded 96 times
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Howto apply a patch/diff file

Post by Conditional Zenith »

That isn't what I asked for, and it doesn't help at all.

It sounds like you are trying to apply more than one patch. Make sure you can successfully apply a single patch before you try that. If you apply a patch and you get an error, you need to either unapply the patch, or to fix the conflicts.
User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Howto apply a patch/diff file

Post by snowie »

I want some patch which allows to control vehicle departure times, and one of them doesn't make errors. So i'm trying to add that one. God, why it is so complicated :/ But I must do it, i'm determined, because it will be a lot of fun for me. I've already projected timetables for 59 trains in my network (without 117 regional trains and 28 city trains yet) :)
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Howto apply a patch/diff file

Post by Conditional Zenith »

snowie wrote:God, why it is so complicated :/
Because no one has come up with a simpler system that works cross platform and is as flexible as source code patches.
User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Howto apply a patch/diff file

Post by snowie »

I compile without any patch added. All looks good, but there is no openttd.exe anywhere.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Howto apply a patch/diff file

Post by Yexo »

snowie wrote:I compile without any patch added. All looks good, but there is no openttd.exe anywhere.
Then either the compile failed or you didn't look properly. Most likely place is in the bin/ directory. That depends however on the compiler you're using.
User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Howto apply a patch/diff file

Post by snowie »

How to check if compile is failed?
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 »

make should issue an error. or the linker
User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Howto apply a patch/diff file

Post by snowie »

There's an error: .../svn.openttd.org/src/fontcache.cpp:17:22 ft2build.h: No such file or directory
And then a lot of errors with fontcache.cpp
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Baidu [Spider] and 11 guests