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
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

See the bottom of my post, above yours. :lol:
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Post by Leviath.NL »

first type cd trunk
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Yeah, except that, at least last time I checked, on 98, Cygwin's PATH is ./

Exactly ./, and nothing else. So you have to explicitly specify the path to any binary not in ./

eg /usr/bin/make clean
or /bin/make clean
or something like that.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Post by Leviath.NL »

When I download a patch its most of the time a patch/diff file with an exefile what to do with the exe?

for instance:
http://www.tt-forums.net/viewtopic.php?t=23165

I managed to make openttd work with this patch by deleting the old openttd.exe and replacinging it with the one from the link, did the same with the files in the /lang map.

but how to aplly multiple patches with more than 1 .exe file?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Download the source, download and apply the patch files, compile the patched source.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Post by Leviath.NL »

but if i got for example 3 opentdd.exe's and 3 times the map lang what to do with them?
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

There's only 1 language-map appropriate to 1 openttd.exe (in most cases as the language files are updated frequently).

Just copy your fresh compiled openttd.exe to your C:\$games\openttd (in my case), copy the language files to C:\$games\openttd\lang\ and start your game?

Otherwise, I can't figure out where it goes wrong at yours' :?
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Post by Leviath.NL »

ok, one last question is it possible to support png sceenshots in your own compiled (Cygwin) openttd?
egladil
OpenTTD Developer
OpenTTD Developer
Posts: 188
Joined: 07 Nov 2005 17:10
Location: Sweden

Post by egladil »

Yes, if you have libpng and its headers installed.
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

It used to be no, due to cygwins libpng not being totally compatible, though that might have changed, and the Wiki may need updating.
We Am De Best

Host of ThroughTheTube site
comrade-max
Engineer
Engineer
Posts: 49
Joined: 26 Mar 2006 14:57

Post by comrade-max »

i have some experience of modding and patching games and their assosiated communities, first id like to say that ottd is an awsome ideal, as are these patches, but to make them more accesable a simpler way of applying them is needed, whether it be by a batch file or similar or a whole third party program
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2566
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Trouble with that is that totally different batch files or programs would be required for every platform that the game is supported by. Batch files only work on DOS and NT based operating systems, for example.

As they are, diffs are about as portable a solution as we have.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
egladil
OpenTTD Developer
OpenTTD Developer
Posts: 188
Joined: 07 Nov 2005 17:10
Location: Sweden

Post by egladil »

And if you meant patching the binaries, that would be even harder as the binaries are completly different on different platforms and would force a whole lot of extra work on the patch author. Then he might as well release binaries directly. (Which some do.) But it really is a lot more work to build a copy for each supported platform than to just type svn diff in the source dir. And as diffs are much more portable and really not that hard to use (Three commands if your computer is setup properly before: svn co, patch, make) it really isn't to much to expect people to manage to do that themselves.
darkpella
Engineer
Engineer
Posts: 9
Joined: 20 Apr 2006 08:59
Location: Correggio, Italy

Problem with Tortoise

Post by darkpella »

Hi,
I'm trying to checkout OTTD to my pc, but when I try connecting to svn.openttd.org I get the following error: "Error: Can't connect to host 'svn.openttd.org': Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato. " It's Italian, and the trasnlation should read as "Unable establish connection. Wrong reply on connected side after time interval or connection timed out".
I can access svn.openttd.org through FireFox and http though.
any idea about hat might be wrong?

Thanks

darkpella
darkpella
Engineer
Engineer
Posts: 9
Joined: 20 Apr 2006 08:59
Location: Correggio, Italy

Further

Post by darkpella »

I also tried with svn://us.svn.openttd.org/trunk and svn://nl.svn.openttd.org/trunk but got the same error message.

Now another problem is, I tried downloading the latest release src from sourceforge and then tried using Tortoiseto patch it, but it then tries to fetch (from the inernet?) a certain revision of the files to be patched. I get told that it cant retriev such revisions, hence parching is not possible, and that the dir where I put the src i downloaded is not a working copy
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

you tried "svn://svn.openttd.org/trunk" or "http://svn.openttd.org/trunk" and not only "svn.openttd.org" ?

edit: writen to slow :(
darkpella
Engineer
Engineer
Posts: 9
Joined: 20 Apr 2006 08:59
Location: Correggio, Italy

Post by darkpella »

Tried with the proper url (ie. svn://....)
darkpella
Engineer
Engineer
Posts: 9
Joined: 20 Apr 2006 08:59
Location: Correggio, Italy

Post by darkpella »

Ooops, looks like PerrGuardian blocks taffic to svn.openttd.org :oops: . Added it into an allowed ip list and everything now works fine,excpet that I have to make my way through conflicts :lol: .
Do you know whether I can find good docs about OTTD source (at least the offial src, guess I't will be a bit more difficult for patches) :?:
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

the nightly source doc http://nightly.openttd.org/devs/docs/ but if they are good is another question. The best doc is IMO the source itself with it comments, but the source ist quite big and so you've got a lot to read. But reading the code is not the same like working with the code, at least for me. :)
Loop
Engineer
Engineer
Posts: 72
Joined: 10 Apr 2006 21:05
Location: Poznan, Poland

Post by Loop »

When I try to compile the source with cygwin I get this error.

Why? What's the problem?
Attachments
Error
Error
error.jpg (6.93 KiB) Viewed 11837 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 22 guests