Howto apply a patch/diff file
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 11
- Joined: 02 Aug 2007 11:12
Re: Howto apply a patch/diff file
I have a problem in Tortoise SNV during compiling open TTD:
"... path.../Open TTD Nightly/airport_movement.h" has no URL.
What does it mean? What should I do?
"... path.../Open TTD Nightly/airport_movement.h" has no URL.
What does it mean? What should I do?
Re: Howto apply a patch/diff file
I'm guessing your checkout is toast. If so, the best solution I know is
If you typoed the file path, and airport_movement.h is really in the src directory, do this insteadSimilar solutions apply for other directories.
Note that these will blow away any local changes, either in the entire checkout or in the src directory. If svn diff works, then save its output and apply patch after rebuilding the checkout. If it does not, and you don't have the necessary patch files already, you might want to wait and see if someone else has a better solution.
Code: Select all
$ rm -rf *
$ svn co svn://svn.openttd.org/trunk .
Code: Select all
$ rm -rf src
$ svn up
Note that these will blow away any local changes, either in the entire checkout or in the src directory. If svn diff works, then save its output and apply patch after rebuilding the checkout. If it does not, and you don't have the necessary patch files already, you might want to wait and see if someone else has a better solution.
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Engineer
- Posts: 11
- Joined: 02 Aug 2007 11:12
Re: Howto apply a patch/diff file
I rebuilded the checkout and the problem is again, some files are right and some are wrong, but when I patch the files must I save them or I can close the TortoiseSVN without any saving?
Re: Howto apply a patch/diff file
Sure you can close Tortoise without saving. But only if you don't want to save the changes. If you do want to save the changes, then you need to save.
Tortoise is a bit stupid about applying patches. You have to open the patch, and then you have to tell Tortoise that you actually want to apply the patch by right-clicking on the file list and selecting "Patch All". This may automatically save, I don't remember.
Tortoise is a bit stupid about applying patches. You have to open the patch, and then you have to tell Tortoise that you actually want to apply the patch by right-clicking on the file list and selecting "Patch All". This may automatically save, I don't remember.
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Engineer
- Posts: 11
- Joined: 02 Aug 2007 11:12
Re: Howto apply a patch/diff file
Are there any patches for Open TTD Nightly r10737 on windows which are in 100 percent right? Names and links, please.
Re: Howto apply a patch/diff file
No. If they were 100% right, they'd be in trunk.
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Howto apply a patch/diff file
If they are considered to add something usefull...
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Howto apply a patch/diff file
Well, how do you define 100% right? Some patches will never crash OTTD, and their coding style is wonderful - but if the GUI is worthless, they probably are still on hold. In most cases, however, it is the principle and the GUI that are done first, followed by being crash-free and in the end being coded nicely. Or don't you folks agree?
Re: Howto apply a patch/diff file
Hi.
got a question:
I downloaded a patch file and clicked 'Patch all' in Tortoise window.
Then something happened and it also finished (despite giving me 4 errors IIRC)
What am I supposed after that in order to actually play with the patch ?
(sorry if thats a stupid question but its not mentioned in the guide on page 1, and Ive never done anything alike)
got a question:
I downloaded a patch file and clicked 'Patch all' in Tortoise window.
Then something happened and it also finished (despite giving me 4 errors IIRC)
What am I supposed after that in order to actually play with the patch ?
(sorry if thats a stupid question but its not mentioned in the guide on page 1, and Ive never done anything alike)
Re: Howto apply a patch/diff file
What happened? "something" can describe anything from Mom calling you for dinner to smoke emerging from your PSU.sobo wrote:Then something happened and it also finished (despite giving me 4 errors IIRC)
What were the error messages?
I think you need to try that question again.sobo wrote:What am I supposed after that in order to actually play with the patch ?
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Howto apply a patch/diff file
Thanks for your interest, DaleStan.
Ok Im trying (and documentating) again:
I did the SVN Checkout on a folder which "Completed at revision 11082"
Then I tried to add the patch in the attachment.
Some files in the list are shown red, but according to post on page 1, this can be normal. So i proceed.
I patch all:
I get several 'still unresolved errors' like this one (this is the first one in roadveh_gui.cpp at line 129)
Other errors occur in train.h, traingui.cpp, tunnelbridge_cmd.cpp
I ignored these by clicking Yes (I would fix them in another editor) in the Tortoise error box.
Then the "it finished" from me previous post happened
.
I have a folder of uncompiled game files, which hopefully have a patch applied, but how do I compile them and with which app, in order to get the program files ?
Ok Im trying (and documentating) again:
I did the SVN Checkout on a folder which "Completed at revision 11082"
Then I tried to add the patch in the attachment.
Some files in the list are shown red, but according to post on page 1, this can be normal. So i proceed.
I patch all:
I get several 'still unresolved errors' like this one (this is the first one in roadveh_gui.cpp at line 129)
Other errors occur in train.h, traingui.cpp, tunnelbridge_cmd.cpp
I ignored these by clicking Yes (I would fix them in another editor) in the Tortoise error box.
Then the "it finished" from me previous post happened

I have a folder of uncompiled game files, which hopefully have a patch applied, but how do I compile them and with which app, in order to get the program files ?
- Attachments
-
- patch_physics_r11037_02-09-2007.patch
- This is a physics patch, supposed to remove maximum train speeds
- (161.41 KiB) Downloaded 101 times
-
- Engineer
- Posts: 40
- Joined: 15 May 2007 16:49
Re: Howto apply a patch/diff file
@sobo: You can use Visual C++ Express Edition. There are some docs on the OpenTTD wiki.
Re: Howto apply a patch/diff file
If you are on a windows platform that is supported I will suggest that you use BuildOTTD. See the sticky thread for more info.
Code: Select all
if (YouAreHappyAndYouKnowIt) {
ClapYourHands();
}
Re: Howto apply a patch/diff file
Like which one? And are you quite sure it doesn't say "conflicts"? (And if it does, why'd you type "errors" instead of "conflicts"?)sobo wrote:I get several 'still unresolved errors' like this one
If there are conflicts, you have to know enough C++ to resolve them before you can compile, regardless of which compiler you use.
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- kilo.dollar
- Traffic Manager
- Posts: 161
- Joined: 02 Jul 2007 08:45
- Location: Harare
Re: Howto apply a patch/diff file
I've had problems with BuildOTTD which were not resolved. Is there anyone willing to assist, through PM?
I think that I may never see,
A billboard as lovely as a tree.
Perhaps, unless the billboards start to fall,
I may never see a tree at all.
A billboard as lovely as a tree.
Perhaps, unless the billboards start to fall,
I may never see a tree at all.
Re: Howto apply a patch/diff file
Since my ruuubbish understanding of computers nearly 2 years ago on the first page, I've bought a Mac. Anyone else got one and know how to get the patches running?
Re: Howto apply a patch/diff file
I doBenbo wrote:Since my ruuubbish understanding of computers nearly 2 years ago on the first page, I've bought a Mac. Anyone else got one and know how to get the patches running?

Basically you open the terminal (/Applications/Utilities/Terminal) and do it the linux way. You will like to add terminal to your dock for quick access because if you want to compile anything yourself then you will often need it.
Don't be too sure. Nobody managed to port the newGRF codec to OSX yetBenbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy![]()

Re: Howto apply a patch/diff file
OK thanks. I'll try it.

Sorry, its meant to come across as sarcastic. Obviously didn't workBjarni wrote:Don't be too sure. Nobody managed to port the newGRF codec to OSX yetBenbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy![]()

Re: Howto apply a patch/diff file
Patchman did that several months ago now. I still can't compile for MacOS, so you'll have to compile yourself before you can use GRFCodec, but if you're already compiling Open, that shouldn't be too much of a problem.Bjarni wrote:Don't be too sure. Nobody managed to port the newGRF codec to OSX yetBenbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy![]()
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Howto apply a patch/diff file
It wasn't the endian issue that prevented newGRF codec from working on OSX, it's something else... I just checked out the svn head revision (r1778) and it still fails.DaleStan wrote:Patchman did that several months ago now. I still can't compile for MacOS, so you'll have to compile yourself before you can use GRFCodec, but if you're already compiling Open, that shouldn't be too much of a problem.Bjarni wrote:Don't be too sure. Nobody managed to port the newGRF codec to OSX yetBenbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy![]()
Code: Select all
[STRIP/UPX] grfmrgc.bin
make: upx: Command not found
Note: this tend to go off topic from applying patch/diff files. If anybody wants to talk more about this then we should split it out and make it a thread of it's own
Who is online
Users browsing this forum: Semrush [Bot] and 17 guests