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 »

Thankyou. I don't want illegal things on my computer thanks.

An SVN client is what I'm going for.
Last edited by Benbo on 21 Jan 2006 09:40, edited 1 time in total.
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

When im under Windows I use cygwin quite happily, it does the job
We Am De Best

Host of ThroughTheTube site
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

See I don't know much about these sort of apps and so that is why I am asking this question:

Is this it?
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

Yeah, sorry :)

It's big load of Linux programs and tools compiled to work on windows, not as good as true linux, but better than windows
We Am De Best

Host of ThroughTheTube site
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

So, I've got this running... What do I need to do?

What do I type in?

Is there a tutorial for this thing?
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

Yeah, http://www.wikibooks.org has tutorials, most standard linux books are fine. Also the OpenTTD Wiki has information on compiling http://wiki.openttd.org/index.php/Cygwin
We Am De Best

Host of ThroughTheTube site
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

I can't seem to find a tutorial on the stuff I want to do. I don't want to compile, but what I've just found has just pulled me one step closer to getting patches on my OpenTTD.

I was searching a little bit for an SVN client that was free, and I found this page.

I'll probably take a look through a couple until I find the right one for me.

If I don't find one there, then I think I'll have lost the battle...

Edit: Forgot to say that you need to sroll down to 'Clients And Plugins'
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

Sacro wrote:When im under Windows I use cygwin quite happily, it does the job
Yeh... I was just using this (I hadn't used it before).

What I did was cd to the corect directory where I had downloaded the patch to. Then, I did:

Code: Select all

patch -p0 -i patch.diff
The problem is, that when I entered that in, it cam up with the following:
Cygwin wrote:BASH: patch: command not found
What am I doing wrong? BTW, yes I have Cygwin in the directory where the patch is.
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

all the answers are here : http://wiki.openttd.com/index.php/Development:Main_Page

Use Tort.SVN to apply the patches ;).

I have a question. Once I apply the patch and then update to newer revision, do I have to apply the patch again?
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

No, but you may have to resolve conflicts. (The update window will tell you how many files were conflicted, and which ones.)
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
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

Benbo wrote:I can't seem to find a tutorial on the stuff I want to do. I don't want to compile, but what I've just found has just pulled me one step closer to getting patches on my OpenTTD.

I was searching a little bit for an SVN client that was free, and I found this page.

I'll probably take a look through a couple until I find the right one for me.

If I don't find one there, then I think I'll have lost the battle...

Edit: Forgot to say that you need to sroll down to 'Clients And Plugins'
If you don't want to compile I don't really see what use an SVN client is, but ok; that's perhaps besides the point. Just read what MeusH said on page#1 about TortoiseSVN (yes, the client in your link) and you are all set.
Note however that if you want any patches running in openttd you DO NEED to compile it.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Post by Leviath.NL »

hmm i did every thing and tryd to apply the Scenario editor bitmap overlay patch (http://www.tt-forums.net/viewtopic.php?t=20886)

every thing went ok I compiled etc. but when i try yo run openttd.exe in Cygwin or just in explorer it says no data/sample.cat found

I thought ok I'll copy that for you in that folder, but it now gives an error can't finr data/TRG1R.GRF

plz help
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

You'll need to copy all of the OpenTTD files to that directory, and then it hopefully won't bug you. If you copy the files one-by-one, then it'll ask you for each and every file.
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

you need the sample.cat and 5 GRF files IIRC
also the GM folder if you want music.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Post by Leviath.NL »

i still get an error : (visual C++ runtime library)

program: \trunk\openttd.exe
file: gfxinit.c
line: 88

expression: b
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

Weird. I cannot help you there, but back to my case.

Firstly, people are refering back to TortoiseSVN, so you obviously ignored the rest of the posts I made in this topic saying that I can't use that because I am on 98. I know yeh, sad, but life is that way.

Anyway, I'm using Cygwin, and am thankful to this link. I had already installed it, and I've so far got to step 13, but I don't understand that...

Could someone explain step 13 a bit more to me. I don't understand where you write make clean and all that :x.

Thanks. :wink:

Ben.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Benbo wrote:Firstly, people are refering back to TortoiseSVN, so you obviously ignored thethe rest of the posts I made in this topic saying that I can't use that because I am on 98.
http://tortoisesvn.tigris.org/download.html wrote:NOTE: If you need to use TortoiseSVN with Windows 95/98/Me/NT4 then you will need to use a pre-1.2 version. The last release on the 1.1.x line was 1.1.7.
So 1.1.4 doesn't work. Why'd you use that one, and not 1.1.7?

And you did all of step 12 successfully, but now can't figure out where you type make clean?
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 »

type make clean where you typed cd /usr/src/openttd etc, in Cygwin

do i have to copy the original or the openttd files into the sourcedirectory?
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

DaleStan wrote:
Benbo wrote:Firstly, people are refering back to TortoiseSVN, so you obviously ignored thethe rest of the posts I made in this topic saying that I can't use that because I am on 98.
http://tortoisesvn.tigris.org/download.html wrote:NOTE: If you need to use TortoiseSVN with Windows 95/98/Me/NT4 then you will need to use a pre-1.2 version. The last release on the 1.1.x line was 1.1.7.
So 1.1.4 doesn't work. Why'd you use that one, and not 1.1.7?
Well, I went to the archives, went to 1.1.7 and clicked on the second .msi installer. I downloaed, and started to install, and as soon as I get to the part where it starts to install, then it says:
Tortoise SVN Installer wrote:The installer needs an NT based OS
Hang on, I thought that it said that 1.17 worked on 98??? Oh well, there is another installer available, so let's try that one.
So, I click on the second installer, download, and run. Oooh... it looks like it's installing, and it has the progress bar and is actually installing. But wait. What now?

Now it says:
Tortoise SVN Installer wrote:The cabinet file 'TSVN.cab' required for this installation is corrupt abd cannot be used. This could indicate a network error, and error reading from the CD-ROM, or a problem with this package.
It has a button for continuing, and so I click it, not knowing what to expect. Then it comes up with:
Tortoise SVN Installer wrote:The installer has an unexpected error installing this package
No... really? I would've never have guessed :roll: ...
This Installer Carried On And wrote:This may indicate a problem with this package. The error code is 2350.
I suspect that I should try another server and see what happens. I used kent.dl.sourceforge.net.

DaleStan wrote:And you did all of step 12 successfully, but now can't figure out where you type make clean?
Yes.

Leviath.NL wrote: do i have to copy the original or the openttd files into the sourcedirectory?
Yes. I'm pretty sure. There's no harm in doing more anyway. See what the others say too.
Leviath.NL wrote:type make clean where you typed cd /usr/src/openttd etc, in Cygwin
I did this, and I don't see what it does. I see that in the tutorial, it says that it will come up with some error messages. I'm not sure that mine are the right ones though
:? . It says:
Cygwin wrote:BASH: make: command not found
:? :( :cry: :x
Last edited by Benbo on 30 Jan 2006 18:05, edited 1 time in total.
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Post by Leviath.NL »

go to Cygwin
if you have the source in
.....\Cygwin\usr\src\ttd\trunk

type
cd \usr\src\ttd\trunk

type
make clean

looks clear to me
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests