Howto apply a patch/diff file
Moderator: OpenTTD Developers
Re: Howto apply a patch/diff file
Hi, after long work i've finally managed to apply a patch using TortoiseSVN/Merge. I'm able to patch all the files without any problems. But now, i still have the problem how to actually play the game.
When I save the file when i have patched it and then try to play the game... nothing has changed.
If someone could help me with that I'd be very gratefull
When I save the file when i have patched it and then try to play the game... nothing has changed.
If someone could help me with that I'd be very gratefull
Re: Howto apply a patch/diff file
the additional keyword you are looking for is 'compile' or 'compiling' - using this keyword in the tt-forums search function, or that of wiki.openttd.org will lead you to some lovely additional information
Re: Howto apply a patch/diff file
Thanks, but it doesn't really help me.
I've done everything it says on the Wiki. Which did nothing with the patch I've downloaded.
For that information I went to this topic. Read that windows should use TortioseSVN, so I did.
But in the explanation it says how to apply the patch, but not what to do afterwards.
All those different programms are getting me a little confused.haha.
I've done everything it says on the Wiki. Which did nothing with the patch I've downloaded.
For that information I went to this topic. Read that windows should use TortioseSVN, so I did.
But in the explanation it says how to apply the patch, but not what to do afterwards.
All those different programms are getting me a little confused.haha.
Re: Howto apply a patch/diff file
after applying the patch you need to follow the steps on the wiki and compile.
you have the source code, you have patched the source code - now you need a binary, for that the source code must be compiled and you will in the end receive the openttd.exe in the bin/ directory of the source code you already have.
you have the source code, you have patched the source code - now you need a binary, for that the source code must be compiled and you will in the end receive the openttd.exe in the bin/ directory of the source code you already have.
Re: Howto apply a patch/diff file
Please have a question. I may install this patch
http://www.tt-forums.net/viewtopic.php?f=33&t=33137 but I do not know how to please simple instructions. I have no idea how to apply the patch. My English is bad simply because the very simple instructions.
http://www.tt-forums.net/viewtopic.php?f=33&t=33137 but I do not know how to please simple instructions. I have no idea how to apply the patch. My English is bad simply because the very simple instructions.
How do I install a patch
I have been looking on the forums and found patches that I would like to test. (example: the copy&paste patch, ProgSigs). They come in diff files.
I don't know wath I must do to install the patches. I think I need to compile the game using the patches. But i'm not sure and I don't know how I will need to do this.
Thanks.
I don't know wath I must do to install the patches. I think I need to compile the game using the patches. But i'm not sure and I don't know how I will need to do this.
Thanks.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Howto apply a patch/diff file
You might have found this sticky... yes, you'll need to compile OpenTTD's source code. Also see the wiki for that.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Howto apply a patch/diff file
Greetings everyone.
I have a question - to apply multiple patches intended for different revisions, is this the correct way?
Or updating to new version overwrites previously applied patches?
And is there a way to revert partially applied patch (which resulted in error)? Because
just says "Skipped <name>"
I have a question - to apply multiple patches intended for different revisions, is this the correct way?
Code: Select all
svn update -r 16200
patch -p0 < company_info_v3_r16200.patch
svn update -r 19990
patch -p0 < buy_area_r19990.diff
svn update -r 20180
patch -p0 < more-cond-orders.r20180.patch
And is there a way to revert partially applied patch (which resulted in error)? Because
Code: Select all
svn revert -r <name>
Re: Howto apply a patch/diff file
Generally yes, that is the correct way. However each "svn update -r x" after applying a patch might give trouble. In that case you'll have to fix the problems manually in the source code.
If you apply patches like this there is no way to revert things only partly. If you know the patch only changes files src/a.cpp and src/b.cpp and no other patch changed those you can run "svn revert src/a.cpp src/b.cpp". If other patches modified those files too you're out of luck.
If you apply patches like this there is no way to revert things only partly. If you know the patch only changes files src/a.cpp and src/b.cpp and no other patch changed those you can run "svn revert src/a.cpp src/b.cpp". If other patches modified those files too you're out of luck.
Re:
I tried doing this with the infrastructure sharing patch but it's not worked...I probably did something wrong though.MeusH wrote:If you're using windows, you can download TortoiseSVN, install and do the following:
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
Choose the diff file:
Right click on folder you've downloaded files to
Choose "TortoiseSVN > Apply Patch..." from the menu
Browse for .patch or .diff file
Apply the changes:
Usually, right clicking on filelist window (attachement 2) and clicking "Patch all" should work, but sometimes there is something wrong (attachement 2 - files marked red):
Don't worry, often application will download other revision and everything will work.
However, if you're experiencing problems (marked red) ask patch developer and tell him what's wrong. Tell him what diff file have you downloaded and what revision have you downloaded using "SVN Checkout"
Happy patching
What is the easiest method of patching, for someone who is completely inexperienced with this sort of thing?
Re: Howto apply a patch/diff file
That quoted text comes quite close, except that after download you should not apply any patch, but instead first build a binary from unmodified trunk sources.
That exercises the whole compiler chain, and if the built binary works, you know that parts works.
Then if you apply a patch and it breaks, you know that patching is the problem spot.
As for further assistance, we need more details than "I did something wrong."
That exercises the whole compiler chain, and if the built binary works, you know that parts works.
Then if you apply a patch and it breaks, you know that patching is the problem spot.
As for further assistance, we need more details than "I did something wrong."
Re: Howto apply a patch/diff file
I don't know if I did, I followed everything in the quoted text but hasn't gone through so I assume I've missed something out.Alberth wrote:That quoted text comes quite close, except that after download you should not apply any patch, but instead first build a binary from unmodified trunk sources.
That exercises the whole compiler chain, and if the built binary works, you know that parts works.
Then if you apply a patch and it breaks, you know that patching is the problem spot.
As for further assistance, we need more details than "I did something wrong."
Like I say, I'm completely new to this and there's just one patch I want to install, so what would be an easy method for a patching rookie like me to understand? How would I go about building a binary from trunk sources to install this patch?
Re: Howto apply a patch/diff file
Read the wiki about downloading SVN source, installing compilers, building the binary.
You may want to join IRC, as explaining it here is way too complicated.
(Also, as I don't have Windows, I am probably not the best person to ask how to do it, others may be in a better position to help you.)
You may want to join IRC, as explaining it here is way too complicated.
(Also, as I don't have Windows, I am probably not the best person to ask how to do it, others may be in a better position to help you.)
Re: Howto apply a patch/diff file
I've just had a look through and it's all too complicated for me.
Doesn't TortoiseSVN do the whole thing for you? I've applied the patches, I just need to know how to get them to work.
Doesn't TortoiseSVN do the whole thing for you? I've applied the patches, I just need to know how to get them to work.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Howto apply a patch/diff file
TortoiseSVN is only the tool which helps to apply patches to the source code. Which is the very first step.
But as others have said before: first compile without patches so that you confidently can say that you can build OpenTTD. Only if that succeeds it's worth to continue, and compile a patched OpenTTD.
But as others have said before: first compile without patches so that you confidently can say that you can build OpenTTD. Only if that succeeds it's worth to continue, and compile a patched OpenTTD.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Howto apply a patch/diff file
OK, well I've got BuildOTTD and I've followed the instructions on the Wiki but I'm unable to click 'Update and Compile'. Any ideas?
(Apologies if my n00bishness is getting annoying )
(Apologies if my n00bishness is getting annoying )
Re: Howto apply a patch/diff file
What operating system? I believe BuildOTTD doesn't work on Vista or Win7, unless that changed since the last time I checked.
Re: Howto apply a patch/diff file
I'm on Win7, so that must explain a lot.
What is the easiest method of compiling OpenTTD?
What is the easiest method of compiling OpenTTD?
Re: Howto apply a patch/diff file
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: Howto apply a patch/diff file
So if I used this method:
http://wiki.openttd.org/Compiler_sur_MinGW/Fr
Would I have to do everything mentioned or just the part under 'Compiling OTTD'?
Also, is there something I should put where it says 'cd ~/<path_to_source>'?
http://wiki.openttd.org/Compiler_sur_MinGW/Fr
Would I have to do everything mentioned or just the part under 'Compiling OTTD'?
Also, is there something I should put where it says 'cd ~/<path_to_source>'?
Who is online
Users browsing this forum: No registered users and 9 guests