[patch] Clipboard (a/k/a "Copy and Paste")

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

McDeffice
Engineer
Engineer
Posts: 6
Joined: 26 May 2012 23:13

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by McDeffice »

kamnet wrote:
03 Feb 2020 05:26
You're attempting to apply a patch written for OpenTTD 1.8.0 (over 2 years ago) against OpenTTD 1.9.3 (several months ago). Source code is continually updated. In order to successfully apply this patch you will first need to update the patch to match the changes in the source code. The failed lines will give you a clue as to what's changed. You'll probably need to analyze the 1.8.0 code to figure that out.

Also, if you apply a patch against OpenTTD 1.9.3, it no longer is technically version 1.9.3, and it will not be compatible with other 1.9.3 clients. It's best to apply it against a nightly, so at least you get the benefits of game improvements and bug fixes.
Thank you for your response and this information.
I have some knowledge of English, sorry if I misunderstand or speak poorly. excuse me.
Indeed the code is updated continuously. An OpenTTD version 1.10.0-beta2 is available. https://www.openttd.org/downloads/opent ... sting.html

I understand that if I modify the code - with a patch - The client is that technically it no longer has the same version, an improvement is to be made. does this mean that this version is no longer compatible with other Openttd Clients of the same original version?

I am thinking of communities such as n-ice or btpro which modify the connection interface as well as some aspects of the client side of the game. This client remains recognized as version 1.9.3 and allows connection to servers 1.9.3. No verification of checksums is carried out.


The patch I'm trying to apply is for version 1.8.0 at least two years ago.

In the meantime, some lines that the patch trying to match may have moved or been changed. This explains why the patch does not know how to carry out the insertion of code to implant the clipboard in several files.

Is the solution to look at the lines that the patch can no longer find and modify so that it can return to where the modifications are to be made?

Or is it some more complicated things because between 1.8.0 and 1.9.3 the coding style to change and functionality have been completely replaced? Perhaps dependencies that have evolved and the way of typing to change?

User avatar
jfs
Tycoon
Tycoon
Posts: 1081
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by jfs »

There's been several changes to code style standards since 1.8, which will make most old patches unable to apply. There's also many new features that have touched files and functions all across the code, which patches will need to be adjusted to. Making it work again might need rewriting large parts of the code.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests