Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 18, 2017 8:37 pm

All times are UTC




Post new topic  Reply to topic  [ 790 posts ]  Go to page 1 2 3 4 540 Next
Author Message
PostPosted: Sat Oct 29, 2005 10:15 am 
Offline
Tycoon
Tycoon

Joined: Mon Mar 08, 2004 1:10 pm
Posts: 2088
Patching (applying a patch/diff file) is done to OpenTTD's sources. This implies that you have to get the sources to apply the patch/diff and compile OpenTTD yourself.


So the first step is acquiring the source code. It can be found in the same place you found the binary under "source".


Now you can start the patching:

first of all: .patch and .diff is the same. It doesn't matter. We could call them .this_is_my_patch_file too if we want to. It's just a name (ok, some app apart from patch might not like it)

on most systems:
Code:
patch -p0 -i file.diff

the -p option means how many leading dirs that you skip when patching. Usually it's 0, but sometimes some odd patch uses a different number. You can learn this by reading the first line of the diff file
Code:
Index: src/video/dedicated_v.cpp
this would be 0
Code:
Index: trunk/src/video/dedicated_v.cpp
this would be 1, because you need to skip the trunk part of it to get to the root dir of your local source folder

-i tells what file you want to patch from, in this case the file named file.diff

There are some other apps to do this on windows. I don't know them, so somebody else have to write how to use them. Patch works in cygwin too.


Top
   
 Post subject:
PostPosted: Sat Oct 29, 2005 12:03 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Feb 24, 2003 6:45 pm
Posts: 3053
Location: Hong Kong
I usually use
Code:
patch -p0 < file.diff
but it's personal :).
Usually however all patches are made from SVN so you would use TortoiseSVN to apply the diff.

patch.exe also exists on windows (look for gnu-tools); you only need to make sure that the patch file is in windows format. Eg CR/LF line-endings, otherwise patch will crash. You can do this with any decent text-editor like UltraEdit. Use File -> Conversions -> UNIX/MAC to DOS.

_________________
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."


Top
   
 Post subject:
PostPosted: Sun Oct 30, 2005 4:05 am 
Offline
Chief Executive
Chief Executive

Joined: Tue Jun 10, 2003 12:19 am
Posts: 697
Location: Australia
While there are more answers that just this one, this wiki page has this info.


Top
   
 Post subject:
PostPosted: Thu Nov 24, 2005 8:32 am 
Offline
Tycoon
Tycoon

Joined: Mon Oct 25, 2004 3:39 pm
Posts: 4349
Location: Mississauga
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 :)


Attachments:
File comment: Attachement 1
TortoiseSVN_Checkout.png
TortoiseSVN_Checkout.png [ 7.63 KiB | Viewed 100923 times ]
File comment: Attachement 2
TortoiseSVN_Merger.png
TortoiseSVN_Merger.png [ 4.32 KiB | Viewed 100933 times ]
Top
   
 Post subject: Patches...
PostPosted: Thu Jan 12, 2006 7:09 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Jan 09, 2006 6:51 pm
Posts: 380
Location: UK
I'm kind of new at doing this, (actully, it's my first time...) and I'm asking whether this kind of 'coding' is done in Command? I don't know where to write the stuff into. I presume it is Command.

When I say the 'code', I mean this...

Code:
patch -p0 -i file.diff

_________________
My Blog | MafiaDeath | MafiaDeath Info, Hints & Tips | Xbox 360 Store | PSP Store


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2006 7:24 pm 
Offline
Director
Director
User avatar

Joined: Thu Aug 11, 2005 8:22 am
Posts: 627
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
You have to type it in the linux commandline (also called Linux Box like Bash) in the current directory, otherwise it won't be able to apply the patch 'file.diff' :)

_________________
Quote:
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2006 8:31 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Nov 07, 2005 5:10 pm
Posts: 188
Location: Sweden
Or, if you are using windows, just read what MeusH wrote right above your post.


Top
   
 Post subject:
PostPosted: Wed Jan 18, 2006 7:18 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Jan 09, 2006 6:51 pm
Posts: 380
Location: UK
I seem to have endless problems with that and I just simply want to know, using Windows do I need to use command to do it or what? What program do I type that code in :?:

_________________
My Blog | MafiaDeath | MafiaDeath Info, Hints & Tips | Xbox 360 Store | PSP Store


Top
   
 Post subject:
PostPosted: Wed Jan 18, 2006 8:34 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Nov 07, 2005 5:10 pm
Posts: 188
Location: Sweden
If you are using windows, you don't type any code in anywhere. As I said, you do as MeusH said and download TortoiseSVN and follow his instructions.


Top
   
 Post subject:
PostPosted: Wed Jan 18, 2006 8:37 pm 
Offline
Tycoon
Tycoon

Joined: Mon Oct 25, 2004 3:39 pm
Posts: 4349
Location: Mississauga
*deleted*

Egladil was faster ;) Thx


Top
   
 Post subject:
PostPosted: Thu Jan 19, 2006 8:28 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Jan 09, 2006 6:51 pm
Posts: 380
Location: UK
See I've been searching the site for the download for Win 98 and I can't find it anywhere. I have downloaded different versions, but they have different problems, so if someone coud point me in the direction of the version for Win 98 and they know that it'll work on Win 98 then i would be very grateful :wink:

_________________
My Blog | MafiaDeath | MafiaDeath Info, Hints & Tips | Xbox 360 Store | PSP Store


Top
   
 Post subject:
PostPosted: Thu Jan 19, 2006 8:36 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Nov 07, 2005 5:10 pm
Posts: 188
Location: Sweden
http://tortoisesvn.tigris.org/download.html wrote:
NOTE: If you need to use TortoiseSVN with Windows 95/98/Me/NT4 then you will need to use a pre-1.2 version. The last release on the 1.1.x line was 1.1.7. Read the 1.2 Release Notes to find out why we have had to drop support for these older operating systems.


So either look in their archive, or even better, upgrade your OS if possible.


Top
   
 Post subject: Hmm...
PostPosted: Thu Jan 19, 2006 7:35 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Jan 09, 2006 6:51 pm
Posts: 380
Location: UK
I had read that, and gone through the archives and looked for version 1.2. Couldn't find it. So I decided that the versions before it would work on 98 too. I have tried several versions, and mostly come up with the same problems.

I just tried version 1.1.4 and when I went to install it, it said to me

SVN wrote:
The installer needs an NT based OS


What??? I thought that this was supposed to work on 98 too...

_________________
My Blog | MafiaDeath | MafiaDeath Info, Hints & Tips | Xbox 360 Store | PSP Store


Last edited by Benbo on Thu Jan 19, 2006 7:42 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Thu Jan 19, 2006 7:41 pm 
Offline
Director
Director
User avatar

Joined: Thu Aug 11, 2005 8:22 am
Posts: 627
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
WTF, why do you work on Win98(se)? Just install Win2000 then, much better, more stable and it does have a NT engine.

_________________
Quote:
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)


Top
   
 Post subject:
PostPosted: Thu Jan 19, 2006 7:57 pm 
Offline
Tycoon
Tycoon

Joined: Mon Oct 25, 2004 3:39 pm
Posts: 4349
Location: Mississauga
webfreakz.nl, win 98 has its advantages over 2000.

Benbo, we shall look for other SVN clients/tools. Google probably :)


Top
   
 Post subject:
PostPosted: Fri Jan 20, 2006 8:45 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat May 21, 2005 3:10 pm
Posts: 1850
Location: Hull, England
there are s*** of things you can't do in the NT engine.

for example, here at college, we've just had to make a bunch of MS-DOS boot disks to run out logic analyser software, because it doesn't run under windows 2000.

and this isn't exactly something you can just go out and buy a replacement for.

_________________
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]


Top
   
 Post subject:
PostPosted: Fri Jan 20, 2006 10:30 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Oct 15, 2003 10:00 pm
Posts: 2566
Location: Jarrow, UK
webfreakz.nl wrote:
Just install Win2000 then...

Are you offering to pay? Windows is hardly cheap.

_________________
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED


Top
   
 Post subject:
PostPosted: Fri Jan 20, 2006 11:59 am 
Offline
Director
Director
User avatar

Joined: Thu Aug 11, 2005 8:22 am
Posts: 627
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Brianetta wrote:
webfreakz.nl wrote:
Just install Win2000 then...

Are you offering to pay? Windows is hardly cheap.


Did I say he has to buy Win2k? :P

_________________
Quote:
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)


Top
   
 Post subject:
PostPosted: Fri Jan 20, 2006 2:48 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Jan 09, 2006 6:51 pm
Posts: 380
Location: UK
Well else do I get it then???

_________________
My Blog | MafiaDeath | MafiaDeath Info, Hints & Tips | Xbox 360 Store | PSP Store


Top
   
 Post subject:
PostPosted: Fri Jan 20, 2006 5:38 pm 
Offline
Tycoon
Tycoon

Joined: Mon Oct 25, 2004 3:39 pm
Posts: 4349
Location: Mississauga
Warez and illegal software is not tolerated here. I'd google for SVN client...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 790 posts ]  Go to page 1 2 3 4 540 Next

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.