Howto apply a patch/diff file
Moderator: OpenTTD Developers
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Howto apply a patch/diff file
First: Setup the Visual C++ and necessary dependencies according to the article in wiki. Then try to compile it. Only after you get unmodded OTTD executable, you can try to play with it more and do some changes or apply some pathes.
Re: Howto apply a patch/diff file
No, patches in OpenTTD are source code patches.Engineer Mars wrote:I do understand that basically all computer data is made up of 0's and 1's. Does anyone suggest a very east patch or diff to try out
You'll need to download the source with a matching revision number of the patch, compile, and try to run it. If that works, apply the patch, compile again, and run it.
Otherwise, wait until somebody uploads a patched binary for you to the forum.
-
- Engineer
- Posts: 37
- Joined: 30 Aug 2008 14:31
Re: Howto apply a patch/diff file
Okay tried TortoiseSVN and it not merging anything. I'm using the cargodist patch on page 73.
Re: Howto apply a patch/diff file
TortoiseSVN won't be able to apply CargoDist patches, try the steps from Setting up MinGW to Testing the MinGW installation. Then, open MSYS and type:Engineer Mars wrote:Okay tried TortoiseSVN and it not merging anything. I'm using the cargodist patch on page 73.
Code: Select all
svn co svn://svn.openttd.org/trunk -rXXXX cargodist
Then, type:
Code: Select all
cd cargodist
Code: Select all
patch -p1 -i <filename>.diff
If you need some help, I'm on #openttd (OFTC).
-
- Engineer
- Posts: 37
- Joined: 30 Aug 2008 14:31
Re: Howto apply a patch/diff file
I just spent 2 hours trying to find the problem for nothing. BEEP!!!!!! Plus I can't chat or I get a BSOD.
EDIT: I get too confused with code.
EDIT: I get too confused with code.
Re: Howto apply a patch/diff file
Well, I really can't help you if you're not willing to do some work and follow some instructions. Just download one of my old builds: http://users.tt-forums.net/petert/dev/Engineer Mars wrote:I just spent 2 hours trying to find the problem for nothing. BEEP!!!!!! Plus I can't chat or I get a BSOD.
EDIT: I get too confused with code.
-
- Engineer
- Posts: 37
- Joined: 30 Aug 2008 14:31
Re: Howto apply a patch/diff file
For 0.7.5 what number is it?
Re: Howto apply a patch/diff file
You cannot play CargoDist on 0.7.5. rXXXXX is the revision number, just pick the latest one (bottom one).Engineer Mars wrote:For 0.7.5 what number is it?
To install, just unzip them to a folder and make sure you have the data files in the shared directory.
Re: Howto apply a patch/diff file
Hy,
I am having trouble applying some patches with TortoiseSVN
the best way to show you I think is a video
http://www.youtube.com/watch?v=n30ZHUCxdYY
I also have this problem with automated-timetables-and-separation-v0.7_trunk_svn_r19152
I used Upgrade aiport patch revision(19171) and still having the problem.
I am having trouble applying some patches with TortoiseSVN
the best way to show you I think is a video
http://www.youtube.com/watch?v=n30ZHUCxdYY
I also have this problem with automated-timetables-and-separation-v0.7_trunk_svn_r19152
I used Upgrade aiport patch revision(19171) and still having the problem.
The rest is confetti!
Re: Howto apply a patch/diff file
I'm not sure what happened to the first two patches, you just closed the window without doing anything.ColdIce wrote:I also have this problem with automated-timetables-and-separation-v0.7_trunk_svn_r19152
I used Upgrade aiport patch revision(19171) and still having the problem.
With the last one, you need to Right Click -> Patch All:
http://www.tt-forums.net/viewtopic.php?p=376459#p376459
I'll watch your video again to see if I can understand some more of it.
Re: Howto apply a patch/diff file
I used only 2 patches: upgrade airport and station build GUI
made a new folder OTTD -> right click -> dowloaded last revision
right click on folder->Tortoise->Apply patch->Chosed upgrade airport patch => tortoise opens and nothing happens/shows
then i dragged the patch with right click over the folder, chosed apply patch and still nothing happened. i used the same thing with station build gui to show you that it works with that patch.
made a new folder OTTD -> right click -> dowloaded last revision
right click on folder->Tortoise->Apply patch->Chosed upgrade airport patch => tortoise opens and nothing happens/shows
then i dragged the patch with right click over the folder, chosed apply patch and still nothing happened. i used the same thing with station build gui to show you that it works with that patch.
The rest is confetti!
-
- Engineer
- Posts: 37
- Joined: 30 Aug 2008 14:31
Re: Howto apply a patch/diff file
Yah, I've also tried a couple of patches, and they turn out like that along with my own experiment. Doesn't work at all.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Howto apply a patch/diff file
Did you ever compile successfully OpenTTD without a patch?
And did you ever consider that other people's crystal ball might be broken, thus they might not figure what technical problem you have besides the articulation problem which transforms all the detailed technical description of what you tried where in what exact sequence into a mere "does not work"? Have you ever considered that such behaviour is annoying, especially keeping to continue this after having asked to provide details in a technical discussion thread like this?
And did you ever consider that other people's crystal ball might be broken, thus they might not figure what technical problem you have besides the articulation problem which transforms all the detailed technical description of what you tried where in what exact sequence into a mere "does not work"? Have you ever considered that such behaviour is annoying, especially keeping to continue this after having asked to provide details in a technical discussion thread like this?
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
planetmaker, I hope your post isnt for me
I dare to ask if someone can spare 5 minutes to apply that patch (upgrade airports) with mingw. I only want an answer if it works or not. i wouldn t dare to ask if mingw was simple for me. It will take ages and many stupid questions for me to learn to work with mingw. I tried once, but i got all mixed up.
here is a link to patch http://www.tt-forums.net/download/file.php?id=124510

I dare to ask if someone can spare 5 minutes to apply that patch (upgrade airports) with mingw. I only want an answer if it works or not. i wouldn t dare to ask if mingw was simple for me. It will take ages and many stupid questions for me to learn to work with mingw. I tried once, but i got all mixed up.
here is a link to patch http://www.tt-forums.net/download/file.php?id=124510
The rest is confetti!
Re: Howto apply a patch/diff file
That patch will work fine with any decent patch program, but it won't work (as you already noticed) with tortoisesvn. If you open the file in a text editor you can see that line 3 and 4 (the lines starting with +++ and ---) both start with "a/" and "b/" before "src/". You need to apply those patches with "patch -p1 < patchname.diff". Tortoisesvn only accepts a very limited subset of patches: those created with svn.ColdIce wrote:here is a link to patch http://www.tt-forums.net/download/file.php?id=124510
Re: Howto apply a patch/diff file

tonight will be a veeeery long night for me
Learning mingw

thank you Yexo for your answer
The rest is confetti!
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Howto apply a patch/diff file
Nah, I wasn't targeting youColdIce wrote:planetmaker, I hope your post isnt for me![]()

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
Good luck, I'm on IRC if you need me or other help. (OFTC, #openttd, nick: PeterT)ColdIce wrote:"great" news
tonight will be a veeeery long night for me
Learning mingw![]()
thank you Yexo for your answer
Re: Howto apply a patch/diff file
I have this kind of error when i'm trying to patch files on MinGW. I'm using cargodist.diff file, revision 19289. I think that solution is very simple 

- Attachments
-
- Error.JPG (94.13 KiB) Viewed 4213 times
Re: Howto apply a patch/diff file
Could it be that you have not checked out the correct revision of the source before trying to patch?
When a diff/patch is made it is done so against the revision the creator had installed at that moment.
When a diff/patch is made it is done so against the revision the creator had installed at that moment.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Who is online
Users browsing this forum: No registered users and 16 guests