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
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Which step are you having troubles with?
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
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

If your not a programmer, you better forget about adding diff/patch files because you need to compile the source yourself. Ok that should not be hard. But if there are problems in the source which must be fixed before you can compile, you should own programming knowledge.

For me it was clear after i read the post of MeusH, how to work with TortoiseSVN. Maybe the wiki helps in addition. See http://wiki.openttd.org/index.php/Categ ... ng_OpenTTD
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Post by MagicBuzz »

The biggest problem with compiling isn't really eventual bugs.
Most of the time you can get an older version of the source code that can compile, or find easy ways to fix the bugs (adding comments and deactiating the concerned patch).

The big deal comes with external libs and links you need to compile the game.
Documentation isn't really clear on wiki, and I remember spending like 3 hours to be able to compile the game for the first time.
After this, I had to find where the help my compiled binary was (in the middle of thousands useless pre-compiled files), and thinking about compiling languages files at the same time.

May be the wiki documentation should be improved to help people compiling with VS 2005 C++ Express, as it's free and a project file is compatible with this GUID.
Fee
Engineer
Engineer
Posts: 11
Joined: 11 Jan 2007 22:12

Post by Fee »

DaleStan wrote:Which step are you having troubles with?
I have no clue...

Let's say I want to apply a patch, any patch to MiniIN, and I can only find a .diff or .patch file. Will I be able, stupid as I am, to apply this patch to the game, if so, how?

So far the only thing I got was that I have to compile it, but where do that file go?

Looked at the wiki, but it seemed to be just a lot of links to god knows where.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

The patch file goes wherever you please.

And you follow the directions; there are several sets at the beginning of this thread. Which one is correct depends on which other software you have. Which one are you using?
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
Fee
Engineer
Engineer
Posts: 11
Joined: 11 Jan 2007 22:12

Post by Fee »

DaleStan wrote:The patch file goes wherever you please.

And you follow the directions; there are several sets at the beginning of this thread. Which one is correct depends on which other software you have. Which one are you using?
I am using windows, and just dlled tortoiseSVN, I'll follow one of the instructions for that, saw it on page one on this thread.

Is it posible to install a patch if I don't have any programming exp at all?
Donoteat
Engineer
Engineer
Posts: 90
Joined: 04 Feb 2007 19:10

Post by Donoteat »

Patch files aren't working for me.
TortoiseSVN keeps giving me errors for every .patch or .diff I give it. I've been following MeusH's instructions, but it keeps saying "C:\...ai\trolly is not a working entry. Can't open file C:\...ai\trolly\.svn\entries. The system cannot find the files specified.[/quote]
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

You need to apply the patch to an SVN checkout, not just any arbitrary directory.

EDIT: Now I'm suddenly getting that error for no good reason. I think my TSVN install got Ideas™ from you. Please don't do that.
I'll post again if I figure out what's going on.
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
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

It seems like TortoiseSVN messes up sometimes. You may have to do a cleanup. If all is right, then the cleanup should succeed (it shows "clean-up successful" or something similar). Then do a checkout and all should be okay.
If the cleanup fails (which happens sometimes), you'll have to fix it manually, for instance by deleting the file or folder that is causing the problems, and then attempt to check out again. If there are more files or folders with problems, then you may have to repeat these steps.
If that doesn't help either, then it may be better to delete the folder entirely and to do a new checkout.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Another trick that sometimes works is to kill the TSVNCache.exe process. Sometimes the cache just breaks, and this is the only way to reset it.

I noticed that my cache was broken not long after I got that error. cum hoc, ergo propter hoc, right?
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
Aerond
Traffic Manager
Traffic Manager
Posts: 169
Joined: 18 Jan 2003 12:51
Location: Spain

Post by Aerond »

For non-programming users, could anybody add a few steps to Meush post with screenies from a clean OpenTTD install??
matrixs
Engineer
Engineer
Posts: 55
Joined: 17 Mar 2007 20:18
Location: LV
Contact:

Post by matrixs »

maybe for programers beginers too can be made the small "how to do it"
because Im learning just 1 year C# an we havent told yet how to create
something.exe :cry:
Last edited by matrixs on 05 Apr 2007 13:37, edited 1 time in total.
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Post by belugas »

http://wiki.openttd.org/index.php/Categ ... ng_OpenTTD

Tadidimm... tadidammmm

All that you may need...
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 25 Apr 2006 10:22
Location: Bucharest

Post by ColdIce »

Hy... I want to add tramroads patch to openttd! now: I`ve downloaded Patch: drive trough road stops, the exe version wich I supose is already patched. I want to use both patches: tramroads and road stops! Can I do that? and if I can, do I need the sourcecode of the game ( THIS one ) ?
The rest is confetti!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Yes, Yes, and Not that. You want the nightly source. [url]svn://svn.openttd.org/trunk[/url].
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
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 25 Apr 2006 10:22
Location: Bucharest

Post by ColdIce »

Ok.. that link doesn`t work ! I`ve tried openttd.org : http://www.openttd.org/downloads.php Can I use something from here??
The rest is confetti!
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

that link is to download the sources by a subversion client, like tortoiseSVN under windows
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 25 Apr 2006 10:22
Location: Bucharest

Post by ColdIce »

I haved installed TurtoiseSVN ! Followed steps from page 1, but I have a major problem and it looks like this: Image

Does this mean I did something wrong, the patch is wrong ? and what can I do because I really want to use tramroads.
The rest is confetti!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

ColdIce wrote:Does this mean I did something wrong, the patch is wrong ?
You need the revision specified by the patch file. It's not guaranteed to apply to any other revision. Update to that revision. (The "Update to revision..." option.)

That, or this is the second patch you're applying, in which case you need to learn C/C++, so you can determine the correct resolution for that conflict.
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
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 25 Apr 2006 10:22
Location: Bucharest

Post by ColdIce »

ok I did that thx... now the big question: how can I make the thing .exe ? :roll: Only thing I konow is that I have to compile the entire folder, but I don't know what program does that and what should I do! I'm using Windows
The rest is confetti!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 23 guests