OpenTTD 1.7.1 RC 1 with daylight

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
samsunix
Engineer
Engineer
Posts: 3
Joined: 30 May 2017 07:18

OpenTTD 1.7.1 RC 1 with daylight

Post by samsunix »

Hi!

I am trying to setup OpenTTD 1.7.1 dedicated Linux server with daylenght -patch and it looks like I may need some help (please?).

What I have done so far:

Downloaded OpenTTD 1.7.1 RC 1 source code from here:
https://binaries.openttd.org/releases/1 ... rce.tar.gz

Another daylenght patch from here:
download/file.php?id=121720

I setup and compiled the game by using fallowing commands:

./configure

./sudo make

./sudo make install

and finally ran the patch by a command:

./sudo patch day_lenght_r18598.patch

...and the screen been on hold now almost 24h - What I am doing wrong?
Auge
Director
Director
Posts: 633
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: OpenTTD 1.7.1 RC 1 with daylight

Post by Auge »

Hello
samsunix wrote: I am trying to setup OpenTTD 1.7.1 dedicated Linux server with daylenght -patch and it looks like I may need some help (please?).
Be aware of the fact, that this version will not be compatible to OpenTTD 1.7.1 RC1.
samsunix wrote: Downloaded OpenTTD 1.7.1 RC 1 source code from here:
https://binaries.openttd.org/releases/1 ... rce.tar.gz

Another daylenght patch from here:
download/file.php?id=121720

I setup and compiled the game by using fallowing commands:

./configure
./sudo make
./sudo make install
So you compiled OpenTTD 1.7.1 RC1 (without any patch).
samsunix wrote: and finally ran the patch by a command:

./sudo patch day_lenght_r18598.patch

...and the screen been on hold now almost 24h - What I am doing wrong?
You have to patch the sources of OpenTTD 1.7.1 RC1 with the patch before compiling the resulting code. Because the patch was made compatible with a particular nightly version, it is truly possible, that the soruces of OpenTTD 1.7.1 RC1 are incompatible with the patches sources. Try it for yourself, the wiki has a few notices about patching.

Tschö, Auge
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: OpenTTD 1.7.1 RC 1 with daylight

Post by Alberth »

the patch command uses standard input to read the patch file.
You didn't redirect standard input to read from the file, so as normal in Unix, it falls back to reading standard input from the console, ie your keyboard.
In other words, it's waiting for you to enter the patch file lines manually.

It won't work though, as you also forgot to supply a -p option with the proper skip level.


Trying to apply a patch to a release is a common mistake. It's not useful in any way, you're much better off starting from trunk or a nightly.
For patching, the simplest solution is to use the exact same revision as what was used to make the patch (which is usually indicated together with the patch, a number between about 25000 and 28000, give or take a few thousand).


Last but not least, installing stuff as root is a good way to mess up your package management system for no good reason. Unlike Windows, Unix is perfectly fine with users installing software in their home directory, there is no need to install it system-wide.


In short, do:
1. Get a trunk revision or a nightly with a revision close to the patch you want to apply.
2. Run a compile and test step without patching to confirm your compiler is setup correctly (which is usually ok at Unix as package managers are good at it).
3. Apply the patch to the source code with a command like "patch -p1 < mypatchfile.patch"
4. Compile again.
5. Test new compiled version
6. ???
7. Profit!
Being a retired OpenTTD developer does not mean I know what I am doing.
samsunix
Engineer
Engineer
Posts: 3
Joined: 30 May 2017 07:18

Re: OpenTTD 1.7.1 RC 1 with daylight

Post by samsunix »

Thank you Guys for the tips. I'll try again asap. ^_^
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 9 guests