trying to apply a patch to open ttd

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

trying to apply a patch to open ttd

Post by dante »

hi, i'm trying to apply an downloaded patch to open ttd, but i can't get it to work.

it is the patch thats making you able to turn off the opening/closing of industries.

i folowed the instruction in the ottd development forum for windows (i use win xp)

guess i'm doing something wrong or something?

is there any1 thet could help me please?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: trying to apply a patch to open ttd

Post by DaleStan »

You say you followed the instructions. After which step did something unexpected happen, and what exactly happened?
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
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: trying to apply a patch to open ttd

Post by dante »

i did got some errors about saving files at the moment i sayed Patch all.

but that couldn't be the problem.

here is a screenshot of the errormessage.

and should the folder you apply patch to or download the files to be somwhere in ttd or ottd folder? it is in my documents now somewhere.

Image
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: trying to apply a patch to open ttd

Post by Yexo »

Try to get the revision of OTTD that patch is made against. You're having trouble now because that patch changed some lines that were also changed in a later revision of OTTD. So you can either look at the source yourself and solve the problem or get the correct revision.
andrewas
Engineer
Engineer
Posts: 115
Joined: 03 Oct 2005 19:14

Re: trying to apply a patch to open ttd

Post by andrewas »

The patch in question is intended for revision 11199. Not sure on how to do it in Tortoise, but tell it to use that revision and it apply the patch without problem. Alternately, you can always try and merge it manually, 11199 isn't all that old, and it may be possible to do it even without significant C++ experience.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: trying to apply a patch to open ttd

Post by Yexo »

It was really easy to update as this patch was around 10 lines :). Anyway, I've posted an updated version that'll work with r11781 in the original thread.
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: trying to apply a patch to open ttd

Post by dante »

so it should work on 0.6 beta2 ?

just tryed to patch that latest version. still getting errors (different and less :P ) and still it aint working.

i did folow the exact steps as the guide tells me to do in the toping "how to apply a patch" and i use the one for windows xp
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: trying to apply a patch to open ttd

Post by Yexo »

dante wrote:so it should work on 0.6 beta2 ?

just tryed to patch that latest version. still getting errors (different and less :P ) and still it aint working.

i did folow the exact steps as the guide tells me to do in the toping "how to apply a patch" and i use the one for windows xp
No, the updated patch will not work with 0.6 beta2. You should check out the latest source from svn.

Can you post the exact error message again?
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: trying to apply a patch to open ttd

Post by dante »

ok this error message pups up a few times:

Image
i just click ja (= yes) and go on.

now i also got this error message:

Image
followed by this one:

Image

and after patching the list looks like this now:"

Image
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: trying to apply a patch to open ttd

Post by Yexo »

dante wrote: now i also got this error message:

Image
followed by this one:

Image
Looking at these error messages makes me think there is a problem with checking out the newest revision from svn. Have you tried throwing your entire source directory away and start over?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: trying to apply a patch to open ttd

Post by DaleStan »

Yexo wrote:Looking at these error messages makes me think there is a problem with checking out the newest revision from svn.
Yes, there is a problem with checking out the newest revision. The newest revision is not the correct revision.
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
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: trying to apply a patch to open ttd

Post by dante »

DaleStan wrote:
Yexo wrote:Looking at these error messages makes me think there is a problem with checking out the newest revision from svn.
Yes, there is a problem with checking out the newest revision. The newest revision is not the correct revision.
that explains a lot :)

so there is no way to apply the patch on 0.6 beta2 at the moment if i am correct?


**edit**

i made a new source folder as yexo surgested. no errors poped up, but still not working on 0.6beta2 win xp :)
andrewas
Engineer
Engineer
Posts: 115
Joined: 03 Oct 2005 19:14

Re: trying to apply a patch to open ttd

Post by andrewas »

The patch should apply cleanly to revision 11871, and there haven't been any changes to the file in question since 11776. Beats me why tortoise can't apply the patch. In any case, its possible to merge it by hand. Go to line 203 of settings_type.h, and add the line

Code: Select all

bool allow_random_industry;
after the line

Code: Select all

bool enable_signal_gui;  ///< Show the signal GUI when the signal button is pressed
Save it, and compile it.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: trying to apply a patch to open ttd

Post by Yexo »

dante wrote:
DaleStan wrote:
Yexo wrote:Looking at these error messages makes me think there is a problem with checking out the newest revision from svn.
Yes, there is a problem with checking out the newest revision. The newest revision is not the correct revision.
that explains a lot :)

so there is no way to apply the patch on 0.6 beta2 at the moment if i am correct?


**edit**

i made a new source folder as yexo surgested. no errors poped up, but still not working on 0.6beta2 win xp :)
You can't apply the patch to beta2 as the patch is written for r11781, and beta2 and r11781 differ too much.

If svn doesn't work for some reason, you can still try to get the r11780 by hand (http://nightly.openttd.org/source/OTTD- ... r11780.zip) That revision will work with the patch.
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: trying to apply a patch to open ttd

Post by dante »

i tryed changing code, nothing happend.

but something i still do not understand. why isn't there anywhere i need to link tortoise to my openttd directory or openttd to tortoise directory.
becouse i guess the problem is, ottd doent even know it has to use the other files tortoise downloaded and applyed the patch to.

did i do something wrong? help me understand this please
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: trying to apply a patch to open ttd

Post by Yexo »

dante wrote:i tryed changing code, nothing happend.

but something i still do not understand. why isn't there anywhere i need to link tortoise to my openttd directory or openttd to tortoise directory.
becouse i guess the problem is, ottd doent even know it has to use the other files tortoise downloaded and applyed the patch to.

did i do something wrong? help me understand this please
Can you post EXACTLY what you do when trying to patch openttd?
Did you follow Howto apply a patch/diff file from the OpenTTD Development section?
Download the source files:
Make a new folder
Right click on it
Choose "SVN Checout..." from the menu
Set data fields like on attachement 1
Hit OK, wait 5-20 minutes for all files to download
And after this follow the other steps from that howto.
[img=http://www.tt-forums.net/download/file.php?id=39645]Attachement 1 from that post[/img]
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: trying to apply a patch to open ttd

Post by dante »

ok all from the start on.

- Transport delux installed on pc.
- downloaded open ttd (can remember version)
- downloaded the latest patc (0.6 beta2)
- aded some new grf files
was getting anoyed by industries colsing on the huge maps so i wanted to download a patch.

i found 3 different patched 1 was a .patch file and 2 others a .diff (or it was 2 patc and 1 diff, doesn't matter anyway)

i didn't know how to make it work so i read the forum you also just linked.
i'm using windows XP so i did go straight to post nr 4. the one by meush on how to apply on windows xp.

i downloaded and installed TortoiseSVN.
- after that i made a folder in the MyDocuments directory (i just called it some like Tor), right clicked on it and used the checkout button.
i put the setting just like on the printschreen as in the post. only mine looks just a bit different (button of this post img 1.)
checkout only tooks about 1 to 2 minutes.

after done this i rightclick on the folder (called Tor) again and click the Apply Patch button.
the new window pops up and i click patch all.

last time i did it all wit a new folder and all the steps as described here i didn't got any errors, but....

after this it should be ok i thought, so i started openddt again and opend a savegame. but nowhere to be able to turn off or on the industry opening/closing. and after a few minutes i get a ingame messege that a coalmine has closed....

so i'm stil wondering why it does not word, and how open ttd can know that it has to use files that are in the MyDocuments/Tor cuz i didn't linked the folder in openttd, and didnt link it any other way. so i think openttd doesn't even know there should be a link between the Tor folder and the game itself.

if you need to know any more info let me know, cuz i really want this patch to work :)


Image
img 1. the checkout window
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: trying to apply a patch to open ttd

Post by Yexo »

dante wrote: after done this i rightclick on the folder (called Tor) again and click the Apply Patch button.
the new window pops up and i click patch all.

last time i did it all wit a new folder and all the steps as described here i didn't got any errors, but....
Until here everything goes ok, but you still have to compile! If you don't know how to do that, the easiest thing is to download BuildOTTD (see thread in development section). And yes, that means starting over again.
andrewas
Engineer
Engineer
Posts: 115
Joined: 03 Oct 2005 19:14

Re: trying to apply a patch to open ttd

Post by andrewas »

dante wrote: but something i still do not understand. why isn't there anywhere i need to link tortoise to my openttd directory or openttd to tortoise directory.
becouse i guess the problem is, ottd doent even know it has to use the other files tortoise downloaded and applyed the patch to.
That sticky needs to be clarified.. this isn't patching as you understand it from commercial applications. With OpenTTD, you modify the source code and build your own openttd.exe. The tricky part of this is applying the patch, which is why the sticky and the people you asked concentrated on that part. Building the binary is very easy, at least it is if you know how - check the wiki for various ways to compile. On linux OSes, you need only two commands if all the tools are installed. ./configure to set it up, then make to build it.

On Windows, if all you want to do is apply one patch unmodified, BuildOTTD is the simplest solution, pretty much idiot proof. Point it at the patch, force the revision to match the patch, hit 'update and compile', and copy the resulting binary to your ottd folder. The only major problem with buildottd is that it doesnt work on Vista. Under Vista, or if you want to apply multiple patches, or modify an existing patch to work on more recent versions of the source, then cygwin is probably the way to go - however, you will have to find at least a basic tutorial on C++ in order to do any but the most trivial modifications.
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: trying to apply a patch to open ttd

Post by dante »

Yexo wrote:
dante wrote: after done this i rightclick on the folder (called Tor) again and click the Apply Patch button.
the new window pops up and i click patch all.

last time i did it all wit a new folder and all the steps as described here i didn't got any errors, but....
Until here everything goes ok, but you still have to compile! If you don't know how to do that, the easiest thing is to download BuildOTTD (see thread in development section). And yes, that means starting over again.
tnx for this one :) i followed the steps here and got it to work now :) tnx again everyone
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: Google [Bot], peter1138 and 3 guests