Page 9 of 40

Re: Howto apply a patch/diff file

Posted: 06 Aug 2007 20:11
by konrado345
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?

Re: Howto apply a patch/diff file

Posted: 06 Aug 2007 20:25
by DaleStan
I'm guessing your checkout is toast. If so, the best solution I know is

Code: Select all

$ rm -rf *
$ svn co svn://svn.openttd.org/trunk .
If you typoed the file path, and airport_movement.h is really in the src directory, do this instead

Code: Select all

$ rm -rf src
$ svn up
Similar 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.

Re: Howto apply a patch/diff file

Posted: 07 Aug 2007 14:38
by konrado345
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

Posted: 07 Aug 2007 22:21
by DaleStan
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.

Re: Howto apply a patch/diff file

Posted: 08 Aug 2007 19:36
by konrado345
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

Posted: 08 Aug 2007 19:43
by DaleStan
No. If they were 100% right, they'd be in trunk.

Re: Howto apply a patch/diff file

Posted: 09 Aug 2007 21:29
by athanasios
If they are considered to add something usefull...

Re: Howto apply a patch/diff file

Posted: 11 Aug 2007 15:33
by MJS
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

Posted: 10 Sep 2007 00:19
by sobo
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)

Re: Howto apply a patch/diff file

Posted: 10 Sep 2007 02:06
by DaleStan
sobo wrote:Then something happened and it also finished (despite giving me 4 errors IIRC)
What happened? "something" can describe anything from Mom calling you for dinner to smoke emerging from your PSU.
What were the error messages?
sobo wrote:What am I supposed after that in order to actually play with the patch ?
I think you need to try that question again.

Re: Howto apply a patch/diff file

Posted: 10 Sep 2007 07:45
by sobo
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 ?

Re: Howto apply a patch/diff file

Posted: 10 Sep 2007 20:06
by ThePenguin
@sobo: You can use Visual C++ Express Edition. There are some docs on the OpenTTD wiki.

Re: Howto apply a patch/diff file

Posted: 11 Sep 2007 00:02
by kaan
If you are on a windows platform that is supported I will suggest that you use BuildOTTD. See the sticky thread for more info.

Re: Howto apply a patch/diff file

Posted: 11 Sep 2007 05:46
by DaleStan
sobo wrote:I get several 'still unresolved errors' like this one
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"?)

If there are conflicts, you have to know enough C++ to resolve them before you can compile, regardless of which compiler you use.

Re: Howto apply a patch/diff file

Posted: 11 Sep 2007 06:10
by kilo.dollar
I've had problems with BuildOTTD which were not resolved. Is there anyone willing to assist, through PM?

Re: Howto apply a patch/diff file

Posted: 22 Oct 2007 10:56
by Benbo
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

Posted: 22 Oct 2007 13:04
by Bjarni
Benbo 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?
I do :wink:

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.

Benbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy :wink:
Don't be too sure. Nobody managed to port the newGRF codec to OSX yet :(

Re: Howto apply a patch/diff file

Posted: 22 Oct 2007 14:03
by Benbo
OK thanks. I'll try it.
Bjarni wrote:
Benbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy :wink:
Don't be too sure. Nobody managed to port the newGRF codec to OSX yet :(
Sorry, its meant to come across as sarcastic. Obviously didn't work :x

Re: Howto apply a patch/diff file

Posted: 22 Oct 2007 16:56
by DaleStan
Bjarni wrote:
Benbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy :wink:
Don't be too sure. Nobody managed to port the newGRF codec to OSX yet :(
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.

Re: Howto apply a patch/diff file

Posted: 22 Oct 2007 17:09
by Bjarni
DaleStan wrote:
Bjarni wrote:
Benbo wrote:Am hoping to learn some NFO and GRF making with my Mac - that'll be easy :wink:
Don't be too sure. Nobody managed to port the newGRF codec to OSX yet :(
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.
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.

Code: Select all

[STRIP/UPX] grfmrgc.bin
make: upx: Command not found
I don't recall this error. I think it was more like it compiled, but was unable to produce working grf files, so just solving this is not the same as it just works (would be nice though)

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