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

Post Reply
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

iNVERTED wrote:No, the source I have is called 0.4.8-RC2.
Ah, you're going to need trunk code - a recent nightly should work. The 0.4 branch hasn't been updated, aside from bugfixes, for quite a while. :)
iNVERTED
Route Supervisor
Route Supervisor
Posts: 387
Joined: 24 Apr 2005 21:21
Location: Torquay, England
Contact:

Post by iNVERTED »

Okay, I downloaded the latest nightly and it works. But it won't compile.

Code: Select all

rob@ubuntu:~/Desktop/OTTD-source-nightly-r5929$ make
Makefile:203: *** You need to have SDL installed in order to run OpenTTD on UNIX. Use DEDICATED if you want to compile a CLI based server.  Stop.
rob@ubuntu:~/Desktop/OTTD-source-nightly-r5929$
Any idea how I can install this SDL?
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

No-one's more important than the earthworm.
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

apt-cache search sdl
iNVERTED
Route Supervisor
Route Supervisor
Posts: 387
Joined: 24 Apr 2005 21:21
Location: Torquay, England
Contact:

Post by iNVERTED »

Okay, so it compiled. But it refuses to run :?

I moved it from the folder with the source code to the folder with my savegames etc. Are there other files I need to move too?

If I try to run it from the terminal it says command not found O_o
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Try ./openttd instead of openttd. It's at least my common mistake
iNVERTED
Route Supervisor
Route Supervisor
Posts: 387
Joined: 24 Apr 2005 21:21
Location: Torquay, England
Contact:

Post by iNVERTED »

Code: Select all

rob@ubuntu:~/openttd/OTTD-linux-i386-nightly-r5431$ ./openttd
MD5 of TRG1R.GRF is ****INCORRECT**** - File Corrupt.
MD5 of TRGIR.GRF is ****INCORRECT**** - File Corrupt.
MD5 of TRGCR.GRF is ****INCORRECT**** - File Corrupt.
MD5 of TRGHR.GRF is ****INCORRECT**** - File Corrupt.
MD5 of TRGTR.GRF is ****INCORRECT**** - File Corrupt.
Error: Invalid version of language packs
openttd: openttd.c:84: error: Assertion `0' failed.
Aborted
rob@ubuntu:~/openttd/OTTD-linux-i386-nightly-r5431$
Hmm, so what's that all about? :?

The version I used before gave the same MD5 errors, but played just fine.

BTW: It's version 5929. The folder name is 5431 because that's where my savegames are and I cba'd to rename it ;)
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

don't forget to copy lang files with executable
iNVERTED
Route Supervisor
Route Supervisor
Posts: 387
Joined: 24 Apr 2005 21:21
Location: Torquay, England
Contact:

Post by iNVERTED »

Hurray! It works! And for some reason this fixed the sound effects (but not the music)! :D:D
Shaq_1k
Engineer
Engineer
Posts: 4
Joined: 08 Nov 2006 20:25

HI, got a problem

Post by Shaq_1k »

Hello,
I got a problem with TortoiseSVN
I try to SVN Checkout and
then Type http://www.tt-forums.net/files/terragen ... _458.patch at URL type
and I press okay
this is what I got
Error PROPFIND request failed on '/file/terrgenesis_v3_458.patch'
Error PROPFIND on '/files/terragenesis_v3_458.patch': 403 Forbidden (http://www.tt-forums.net)
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

You need to put svn://svn.openttd.org/trunk for url.

Then download the patch you want from the forum, apply it to your working copy and finally compile the source.
Shaq_1k
Engineer
Engineer
Posts: 4
Joined: 08 Nov 2006 20:25

Post by Shaq_1k »

Um... okay...thank
Sorry I ask again
I'm stuck at how do u download it?
Do u download to the Folder that put svn://svn.openttd.org/trunk for url?
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

for downloading the patch file, use "wget" rather than "svn"
We Am De Best

Host of ThroughTheTube site
Shaq_1k
Engineer
Engineer
Posts: 4
Joined: 08 Nov 2006 20:25

Post by Shaq_1k »

Um...
I'm not too bright
How do I download it, using Wget?
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

Just download the patch as you download any other files from internet.
Shaq_1k
Engineer
Engineer
Posts: 4
Joined: 08 Nov 2006 20:25

Post by Shaq_1k »

How do I patch the one that I download to OpenTTD?
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

boys, read the whole thread

you need:
- the sources
- a diff merger
- a compiler

i have an idea: to simplify the patching there are programs which patch the executable directly, is like a binary diff, you can patch multiple files and every kind of file...
the only problem is that you need to patch a certain revision to this patch and all other files like grfs should be identic, because the diff method (all developers know when conflicts happen patching the sources)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Not only does it have to be the same revision, it has to be the same compiler, the same libraries, and the same target.

OK, technically, it doesn't have to be any of those things, but without all three, the chances of having a compatible binaries are minimal at best.
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
User avatar
Elukka
Engineer
Engineer
Posts: 88
Joined: 20 Apr 2006 20:47

Post by Elukka »

So... i did read MeusH's post on the first page, but i still don't quite understand what i need to do. More specifically, i'm trying to apply the post elrails-patch to this speed signs patch over here, using TortoiseSVN. I'd really appreciate it if someone could help.

Edit: Erm, yeah, the patch might not work with anything remotely resembling a new version, so nevermind, i suppose. I just read that a new version is underway, anyways.
Fee
Engineer
Engineer
Posts: 11
Joined: 11 Jan 2007 22:12

I'm lost

Post by Fee »

Hey,

I still don't know how to apply a patch or diff file to the game. I mean, when I click download on any of the files I get A LOT of code, but where am I supposed to put all this?

As you can see I am not the great programmer, could anyone dirrect through this step by step please?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 20 guests