Howto apply a patch/diff file
Moderator: OpenTTD Developers
Re: Howto apply a patch/diff file
The stuff is all in the right place according to what your write.
I made a new SVN checkout and moved the patch file into trunk. (I can't use patch anywhere in cmd just where the patch.exe actually is)
I have attached screenshots of the process
EDIT: clutter screenshots removed as issue is resolved
I made a new SVN checkout and moved the patch file into trunk. (I can't use patch anywhere in cmd just where the patch.exe actually is)
I have attached screenshots of the process
EDIT: clutter screenshots removed as issue is resolved
Last edited by zedd on 31 Oct 2009 23:20, edited 1 time in total.
Re: Howto apply a patch/diff file
The files and folders look quite good, but your patch.exe is broken. It crashes and throws an assertion. Obviously this is not the one which will accept patches from git.
The guy on the picture is not me, it's Alonso.
Re: Howto apply a patch/diff file
And if you need one, then try MinGW and MSYS.
Re: Howto apply a patch/diff file
Gnuwin32 patch can apply patches from git correctly (I use it for smallmap zoom out), but is very picky regarding end of line characters. To use patches created in UNIX, you must convert them to Windows format first. Any good text editor (which of course excludes Notepad) will allow you to change the EOL format to Windows: for example Notepad++.
Edit: Also you can use the Gnuwin32 version of unix2dos called u2d, that can be found at the Cygutils package.
Edit: Also you can use the Gnuwin32 version of unix2dos called u2d, that can be found at the Cygutils package.
Code: Select all
u2d patch.diff
patch -p[0|1] -i patch.diff
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Howto apply a patch/diff file
Finally there is the problem. I should have remembered that from my 1 credit UNIX usage class at uniTerkhen wrote:unix2dos

Thanks a lot.
Now lets just hope this stuff compiles too...
Re: Howto apply a patch/diff file
Hi, I'm lost applying a patch.
Wiki sais:
Popop menu appears, I select TortoiseSVN --> Apply patch...
The following menu appears: Then what? I cannot choose a file here, it asks for a directory.
Choosing the trunk directory, the window disappears, and I'm left with Uhhhh... I guess I completely miss the hang of how patches are applied ::deep sigh::
Anyone, please?
Wiki sais:
OK, so I right-click on trunk-capacities.diffWindows: Make sure you have TortoiseSVN installed.
Right-click on the folder with the OpenTTD source code, open the TortoiseSVN submenu and select 'Apply Patch...'. Browse to the patch file and select it. Then, right click on the 'File Patches' window and click on 'Patch All'. After you're done, close the TortoiseMerge window.
Popop menu appears, I select TortoiseSVN --> Apply patch...
The following menu appears: Then what? I cannot choose a file here, it asks for a directory.
Choosing the trunk directory, the window disappears, and I'm left with Uhhhh... I guess I completely miss the hang of how patches are applied ::deep sigh::
Anyone, please?
A game worth playing is a game worth modding 

Re: Howto apply a patch/diff file
Highlighted the important part for you.griffin71 wrote:Wiki sais:Windows: Make sure you have TortoiseSVN installed.
Right-click on the folder with the OpenTTD source code, open the TortoiseSVN submenu and select 'Apply Patch...'. Browse to the patch file and select it. Then, right click on the 'File Patches' window and click on 'Patch All'. After you're done, close the TortoiseMerge window.
That's not a folder but the patch file.OK, so I right-click on trunk-capacities.diff
Hope this helps.
Re: Howto apply a patch/diff file
You can start by using a proper patch program, TortoiseSVN can't patch git patches.
Re: Howto apply a patch/diff file
Yexo, thanks. Indeed quite a stupidity of mine -- one should right-click on the directory holding the source files. Unfortunately, this won't help me in this case, see through.
Petert, thanks to you too. I hadn't noticed this, but the cargo distribution branch uses git, and SVN does not support that.
It seems that git is primarily unix based, which forces me to use an emulator. Do you have any suggestions which program running under winxp directly will apply the git-style patch?
Petert, thanks to you too. I hadn't noticed this, but the cargo distribution branch uses git, and SVN does not support that.
It seems that git is primarily unix based, which forces me to use an emulator. Do you have any suggestions which program running under winxp directly will apply the git-style patch?
A game worth playing is a game worth modding 

Re: Howto apply a patch/diff file
See this tutorial: http://wiki.openttd.org/MSYS#Setting_up_MinGW
Note: if you only want to patch with MinGW, you only need to follow these steps:
Note: if you only want to patch with MinGW, you only need to follow these steps:
- Setting up MinGW
- Setting up MSYS
- Install SVN
- Testing the MinGW installation
Re: Howto apply a patch/diff file
Not true, and also not relevant.griffin71 wrote:It seems that git is primarily unix based,
The program "patch" will apply git patches just fine. There is a gnuwin32 patch but I think it crashes on unix newlines, so it's better to install the one from msys or cygwin (just install msys or cygwin itself). The wiki page petert linked should get you started.Do you have any suggestions which program running under winxp directly will apply the git-style patch?
Before you're trying to apply a patch, try compiling OpenTTD without any patches first. If that succeeds only then add a patch and try to compile that.
Re: Howto apply a patch/diff file
Hello again,
Thanks for the suggestions. Patching and compiling succeeded. I followed the steps Petert suggested.
I'm now much enjoying the cargodist patch.
I'm considering to develop an AI fot it.
Edit: [offtopic]Can it be that with the cargodist patch the game is significantly slower?[/offtopic]
Thanks
Thanks for the suggestions. Patching and compiling succeeded. I followed the steps Petert suggested.
I'm now much enjoying the cargodist patch.
I'm considering to develop an AI fot it.
Edit: [offtopic]Can it be that with the cargodist patch the game is significantly slower?[/offtopic]
Thanks
A game worth playing is a game worth modding 

Re: Howto apply a patch/diff file
That's possible, but it's just as likely that you build a debug build and not a release build. Are you compiling with msvc or with msys/cygwin? In case of msvc set the solution configuration at the top (it's a dropdown box) from "Debug" to "Release". In case of cygwin/msys you you should build a release binary by default,just don't configure with --enable-debug=x.griffin71 wrote:Edit: [offtopic]Can it be that with the cargodist patch the game is significantly slower?[/offtopic]
Re: Howto apply a patch/diff file
If Yexo's suggestions don't help, please post a report with a savegame in the cargodist thread. Slowness is a bug and I'll fix it.griffin71 wrote:Edit: [offtopic]Can it be that with the cargodist patch the game is significantly slower?[/offtopic]Thanks
The guy on the picture is not me, it's Alonso.
Re: Howto apply a patch/diff file
Aha, thanks again.
Yesterday I found cargodist is now available for nightly 18748, so I recompiled everything (as release), and it's got the speed which is normal for my system.
I use MSVC. Why would a debug compile be much slower?
Yesterday I found cargodist is now available for nightly 18748, so I recompiled everything (as release), and it's got the speed which is normal for my system.
I use MSVC. Why would a debug compile be much slower?
A game worth playing is a game worth modding 

Re: Howto apply a patch/diff file
A debug build is built for debugging, not playing. It (probably) checks everything, makes logs and so-on.griffin71 wrote:I use MSVC. Why would a debug compile be much slower?
Re: Howto apply a patch/diff file
after following this guide,in the last step how do you make that bundle in VS2008?
installed all the required software.
got the required svn branch and the DIFF and successfully applied it.
add the aditional library's to the project as shown.
compiled, build successful, now how do i make the bundle or where is that excitable i built?
(sorry for all the questions but its been almost a decade since i touched VS last)
installed all the required software.
got the required svn branch and the DIFF and successfully applied it.
add the aditional library's to the project as shown.
compiled, build successful, now how do i make the bundle or where is that excitable i built?
(sorry for all the questions but its been almost a decade since i touched VS last)
Re: Howto apply a patch/diff file
Open MSYS, type "cd <dir_of_trunk>", then type the code given at that section. The bundle will be in /bundle, so you can make a zip.
Re: Howto apply a patch/diff file
yes i read this part but its also says "The purpose of this article is to get the equivalent of a "make bundle" for MSVC builds. "
which implies that there is a "make bundle" option in VS itself, so if i got the full version and not the express version is it there or do i still need to get MSYS?
which implies that there is a "make bundle" option in VS itself, so if i got the full version and not the express version is it there or do i still need to get MSYS?
Re: Howto apply a patch/diff file
I should've rephrased that. I meant "The equivalent of a 'make bundle' for binaries created with MSVC". You will still need MSYS no matter what to obtain a bundle feature.
Who is online
Users browsing this forum: No registered users and 20 guests