1 click is also over the top. But now you need 6-7 tools?! For me, that's the other end... There must exist one program, so you can patch a game with one program? That's a lot easier. Now you have to learn 6-7 programs before you can patch a game. That must be a joke?!

Just looked at the programs:Microsoft Visual C++ 2008/2010 -> Link to Microsoft Visual C++ 2012 for windows 8?! Sorry, but i'm running at windows 7...The link to the source doesn't works and for me is it not clear if you have to download openttd-useful.zip or openttd-useful.zip and the source.Subversion command line version -> Broken link.

Repairing a car with exactly one kind of wrench is also a lot easier than having to use the required tools in the required order. Right.

1 click is also over the top. But now you need 6-7 tools?! For me, that's the other end... There must exist one program, so you can patch a game with one program? That's a lot easier. Now you have to learn 6-7 programs before you can patch a game. That must be a joke?!

Just looked at the programs:Microsoft Visual C++ 2008/2010 -> Link to Microsoft Visual C++ 2012 for windows 8?! Sorry, but i'm running at windows 7...The link to the source doesn't works and for me is it not clear if you have to download openttd-useful.zip or openttd-useful.zip and the source.Subversion command line version -> Broken link.

Repairing a car with exactly one kind of wrench is also a lot easier than having to use the required tools in the required order. Right.

If you have a specialized dealer, he has specific tools with work better and faster for that kind of cars. Maybe as back-up he has the universal tools, but mostly he don't need them. The programs that are listed are some universal tools, in my eyes. They will work in every case, but are a lot harder.

Alberth wrote:

You don't need to learn those programs, you need to install them and set them up. It is not our fault that Windows does not come with a complete development environment out of the box.

It's just like you need to install office before you can read and write documents.

Learning how those programs actually work and can be used for development is a very different problem, and it takes a much longer time to do.

As sais in previeus post: 3/6 of the tools are not clear to me / not available / ... So it is also impossible for me to try the way that's described...

If you have a specialized dealer, he has specific tools with work better and faster for that kind of cars. Maybe as back-up he has the universal tools, but mostly he don't need them. The programs that are listed are some universal tools, in my eyes. They will work in every case, but are a lot harder.

yes, you do have a specialized dealer, he's called openttd.org and he has all the tools in a ready-to-use fashion to provide you with a "just pick it up and go" version of the game.

but you don't want the off-the-shelves version, instead you want to tamper with it yourself, and then you bother us with the complaint that you need tools to work on it?

_________________You might not exactly be interested in Ferion, but if you are, have fun

And now you start to understand all of the hard work that goes into developing software!

I am pretty lazy when it comes to having to do things, but earlier this year I decided to learn how to install patches. I hit a few bumps as well, but if you carefully read the instructions, you can install all the various programs and learn how to compile the patches. And once you have the software installed, the most difficult part is over, and you never have to deal with that again.

yes, you do have a specialized dealer, he's called openttd.org and he has all the tools in a ready-to-use fashion to provide you with a "just pick it up and go" version of the game.

but you don't want the off-the-shelves version, instead you want to tamper with it yourself, and then you bother us with the complaint that you need tools to work on it?

I see openttd as the factory, not as dealer. But i think, we will continu disagree with this and don't come to a agreement.

As i said, not all tools are clear / available, so i can't give it i try by my self.

Quote:

Microsoft Visual C++ 2008/2010 -> Link to Microsoft Visual C++ 2012 for windows 8?! Sorry, but i'm running at windows 7...The link to the source doesn't works and for me is it not clear if you have to download openttd-useful.zip or openttd-useful.zip and the source.Subversion command line version -> Broken link.

Is Microsoft Visual C++ 2012 also okay and can it run on windows 7? Will it works the samen as 2008/2010?What is the link to the source, at the wiki is a dead link. And have I download the openttd-usefil.zip and the source, or only opentt-usefull.zip? Where can I found Subversion command line version, since the link is broken.

What link are you talking about? Please be more precise in your statements. "link does not work" is difficult to decode when there are several links at many wiki pages, and where some of those links are not supposed to be viewed with a browser.

For now, I assume you mean "svn://svn.openttd.org/trunk". That link is not dead, you need subversion (svn == subversion) to access it, your browser does not speak "svn:". When you click at the link it is telling you that.

MisterX wrote:

And have I download the openttd-usefil.zip and the source, or only opentt-usefull.zip?

The source is useful if you want to build the libraries from source code. If you don't want to do that, use the zip with the pre-build libraries (at least I hope that's it, I never looked in the file).

MisterX wrote:

Where can I found Subversion command line version, since the link is broken.

You know of this thing called Internet right?It has very nice services to find sites, if you don't mind telling commercial companies what you kind of commercials you want to view.

Good luck with continuing your adventure.It may be useful to join the #openttd irc channel for help, there are several people there that know about windows and compiling OpenTTD. It's often easier to interactively talk someone through the process.

What link are you talking about? Please be more precise in your statements. "link does not work" is difficult to decode when there are several links at many wiki pages, and where some of those links are not supposed to be viewed with a browser.

Bjarni wrote:

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.

From first post of this topic. Since I run on windows, i clicked on Compiling on Windows using Microsoft Visual C++ 2005 and Compiling on Windows using Microsoft Visual C++ 2008/2010. For both, a list of some programs is listed. I'm talking about that list. Compiling on Windows using MinGW was also a option, but that list is way bigger, so it seems to me much difficult to do.

For now, I assume you mean "svn://svn.openttd.org/trunk". That link is not dead, you need subversion (svn == subversion) to access it, your browser does not speak "svn:". When you click at the link it is telling you that.

Quote:

MisterX wrote:

And have I download the openttd-usefil.zip and the source, or only opentt-usefull.zip?

The source is useful if you want to build the libraries from source code. If you don't want to do that, use the zip with the pre-build libraries (at least I hope that's it, I never looked in the file).

I only want to patch the game. So the answer is in that case only openttd-usefil.zip?

Quote:

MisterX wrote:

Where can I found Subversion command line version, since the link is broken.

You know of this thing called Internet right?It has very nice services to find sites, if you don't mind telling commercial companies what you kind of commercials you want to view.

It seems to me some general name and i wasn't sure that I take the right program.

Quote:

Good luck with continuing your adventure.It may be useful to join the #openttd irc channel for help, there are several people there that know about windows and compiling OpenTTD. It's often easier to interactively talk someone through the process.

Thanks. I think, tonight i will have a closer look. So maybe i join that irc channel.

You compile the source code to an executable The collection of .h and .cpp files are the human-readable form of the program, commonly referred to as "source code". A computer cannot execute it in this form. To make it executable by a computer, you need to convert the source code to binary form, ie a .exe file.

If you have never done this before, it is recommended to do this with an unmodified version (that is, without applying a patch) first. That code is known to compile, so any errors you get are in your setup, and not in the modifications introduced by the patch.

Once you've got the setup working, you can apply a patch, and run the procedure again.

Probably; That topic says "v6: Updated against r23729.", while "svn://svn.openttd.org/trunk" is at this moment r25266, if you don't specify a revision while getting the source code from svn.Since each change in the source code increments the number by 1, you try to apply a patch written for OpenTTD about 1500 changes earlier. That may give some trouble

A way that should work is to specify to svn that you are interested in revision 23729 (svn update -r 23729). The patch should apply cleanly to that set of sources.

Initially it worked fine, I was able to compile trunk, installed OpenGFX and everything ran fine.

I played around with some patches figuring out how to get them to compile, all looked good, tried running, hit a few errors, tried to debug, failed. So thought I'd be better off starting from scratch.

So, completely deleted my trunk download folder and did another get with SVN. Compiled ok (no patches, vanilla trunk), but now when I run the executable it immediately crashes on load. I've tried reboots, and I've tried cleaning out my MinGW install and re-starting the entire thing from scratch, but still no luck.

It crashes immediately with the following error. I don't know if this is the right information for anyone to deduce what the issue might be, or if there's any different info/logs that might shed a bit more light on this.

Hi all. Im trying to patch older/newer revision patches versus a trunk version, and Its going fairly well. I kind of use notepad ++ (side by side) to compare and try to find the exact spot on where the new lines should be, or which ones should be removed.

Is there some easier way to do this? Or am i doing it right? Is this the proper way to do it?

Hi all. Im trying to patch older/newer revision patches versus a trunk version, and Its going fairly well. I kind of use notepad ++ (side by side) to compare and try to find the exact spot on where the new lines should be, or which ones should be removed.

Is there some easier way to do this? Or am i doing it right? Is this the proper way to do it?

If by "patching" you mean, apply a *.patch or *.diff file (which is basically the same), the process is far more straightforward and you can do that automatically, without even opening your source code. At least under linux environment (but there probably is some way to do similar thing under windows): you just go in the base directory of your source (here: openttd's trunk directory) and you issue the command:

Code:

patch -p0 < file.patch

(the choice of -p0 or -p1, or eventually more, depending by the way the patch is built)

With that, all the modifications are automatically applied on your source, without you needing to even touch to the source file.

BUT: also note that - depending on the respective version (actual trunk version and trunk version against which the patch has been built) - the patch will or will not apply (or, will or will not apply correctly). If you apply an old patch on a recent version of OTTD, there is a chance that the new code just doesn't work.

So, if you apply several different patches, and specially for old ones, you should check if OTTD still behaves normally (by compiling and testing).

Hi all. Im trying to patch older/newer revision patches versus a trunk version, and Its going fairly well. I kind of use notepad ++ (side by side) to compare and try to find the exact spot on where the new lines should be, or which ones should be removed.

Is there some easier way to do this? Or am i doing it right? Is this the proper way to do it?

If by "patching" you mean, apply a *.patch or *.diff file (which is basically the same), the process is far more straightforward and you can do that automatically. At least under linux environment (but there probably is some way to do similar thing under windows): you just go in the base directory of your source (here: openttd's trunk directory) and you issue the command:

Code:

patch -p0 < file.patch

(the choice of -p0 or -p1, or eventually more, depending by the way the patch is built)

With that, all the modifications are automatically applied on your source, without you needing to even touch to the source file.

But thati snt the case if a patch isnt made for a specific revision other then the one it was made for. I can patch fine, i mean the actual editing because lines shift up or down because source got slightly changed etc. My question was based on that really, do I do it the right way when editing, or is there an easier way other then having two notepads open and manually insert/remove lines

there are also programs for "three-way diffs", which also compare the current trunk version with the trunk version the patch was made for, which can save you from doing some of the editing. but eventually you probably have to touch some code manually, when updating or combining patches.

_________________You might not exactly be interested in Ferion, but if you are, have fun

Hi all. Im trying to patch older/newer revision patches versus a trunk version, and Its going fairly well. I kind of use notepad ++ (side by side) to compare and try to find the exact spot on where the new lines should be, or which ones should be removed.

Is there some easier way to do this? Or am i doing it right? Is this the proper way to do it?

No, probably not, mostly.

Assuming those answers made little sense, a somewhat longer answer

A source file is "a work under construction". A revision is a point in time for the work. A patch is a proposed change for the work under construction, at a given revision.It is pretty likely that the patch will work for the given revision.

When you change the revision, the work under construction changes. 'Physically', lines of text get added, moved, changed, or even removed. The more important changes are the semantical changes. These are however not always visible in the file that you change. The set of allowed values in a variable gets smaller or bigger. Enumerations get additional values. New variables are added that have to be taken into account as well. Variables change meaning, or its unit changes.

To make it more concrete, a somewhat contrived example

Code:

int f(int x, y) { y = x + y;+ y /= x; return y; }

The patch line (indicated with "+") scales y w.r.t x. In one revision this works. Say that in the next revision, variable 'x' is extended with the value "0", meaning "x is not relevant". In the unpatched version, nothing has to change, y+x == y when x == 0, which nicely matches "x does not play".However if you add the patch line in the new revision, you will cause a crash of the program.

So conceptually, to apply a line with a change, you have to check that the change will work under every condition in the current revision, in particular taking all changes since the patch was created, into account.This is pretty close to actually programming the patch again.

Your approach of just finding the point to insert the changed line will thus fail in the general case, if you don't take care of the semantical changes that happen with each change.However, if you look at the changes made from revision to revision, and they do not touch the area of your patch (say your patch is about towns, and the revisions do stuff in cargo packets), it is fairly safe to assume the patch will still work. (Often it will even apply cleanly in such a case.)

There is thus no easier way, in fact the really proper way is like normal programming the patch again.Your approach is more risky, but may work in a lot of cases.

_________________Being a OpenTTD developer does not mean I know what I am doing.Also, other OpenTTD developers may have different opinions.

# Compile the source code in the following 2 (or 3) steps3. Configure4. Make5. (optional) Make install6. Test the created binary# If it runs, you know the compiler setup is fine

# Patching is best post-poned until this point. If you patch before the first compile test, you don't know if your compiler setup is wrong, or the patch is wrong.7. Patch the source code8. Compile again (like steps 3, 4, 5)

_________________Being a OpenTTD developer does not mean I know what I am doing.Also, other OpenTTD developers may have different opinions.

Who is online

Users browsing this forum: No registered users and 4 guests

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