JGR's Patch Pack

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

User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1263
Joined: 15 Feb 2003 17:32
Location: Villefranche-sur-Saône, France

Re: JGR's Patch Pack

Post by MagicBuzz »

Strange.

I got the issue with lastest commit, but it was partially fixed by reverting some versions : I got back all languages, but messages IDs were misaligned with the program : all texts were mixed.

I revert back to the lastest commit, then now everything is fine.

Probably some files VS decided to not recompile.

User avatar
nirasa
Engineer
Engineer
Posts: 61
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: JGR's Patch Pack

Post by nirasa »

JGR wrote:
13 Jul 2020 09:33
nirasa wrote:
13 Jul 2020 08:40
I have Linux and I compile this program. I can't make a package for 0.35 = missing ./configure - the package doesn't exist. Did you change anything?
Sorry for my english :-(
nirasa
Trunk recently adopted CMake. You'll need to use that instead of configure.
Run:

Code: Select all

mkdir build
cd build
cmake ..
make
or see here.
I am sorry. I'm not a programmer and these lines won't compile me. :-( I do not understand that. Can you help me please?

Error:
Attachments
error-log.zip
(8.47 KiB) Downloaded 37 times
Last edited by nirasa on 13 Jul 2020 16:16, edited 2 times in total.

_dp_
Traffic Manager
Traffic Manager
Posts: 182
Joined: 18 Dec 2013 12:32

Re: JGR's Patch Pack

Post by _dp_ »

nirasa wrote:
13 Jul 2020 15:59
I am sorry. I'm not a programmer and these lines won't compile me. :-( I do not understand that. Can you help me please?
It's literally "cmake .." not just "cmake".

User avatar
nirasa
Engineer
Engineer
Posts: 61
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: JGR's Patch Pack

Post by nirasa »

_dp_ wrote:
13 Jul 2020 16:02
nirasa wrote:
13 Jul 2020 15:59
I am sorry. I'm not a programmer and these lines won't compile me. :-( I do not understand that. Can you help me please?
It's literally "cmake .." not just "cmake".
Ok - I've already fixed the command, but there's a mistake - I attached files.

User avatar
JGR
Tycoon
Tycoon
Posts: 2110
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

nirasa wrote:
13 Jul 2020 16:13
_dp_ wrote:
13 Jul 2020 16:02
nirasa wrote:
13 Jul 2020 15:59
I am sorry. I'm not a programmer and these lines won't compile me. :-( I do not understand that. Can you help me please?
It's literally "cmake .." not just "cmake".
Ok - I've already fixed the command, but there's a mistake - I attached files.
It looks fine to me.
If you run make, does it work?
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

User avatar
nirasa
Engineer
Engineer
Posts: 61
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: JGR's Patch Pack

Post by nirasa »

JGR wrote:
13 Jul 2020 18:53
nirasa wrote:
13 Jul 2020 16:13
_dp_ wrote:
13 Jul 2020 16:02


It's literally "cmake .." not just "cmake".
Ok - I've already fixed the command, but there's a mistake - I attached files.
It looks fine to me.
If you run make, does it work?
No. The terminal writes that "...no targets are specified and no makefiles are found. End."
Attachments
error-make.png
(86.19 KiB) Not downloaded yet

User avatar
JGR
Tycoon
Tycoon
Posts: 2110
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

nirasa wrote:
13 Jul 2020 19:55
No. The terminal writes that "...no targets are specified and no makefiles are found. End."
The CMake error is shown in your last screenshot.
Helpfully CMakeErrors.log does not contain information about actual errors.

I've pushed an update, try it again.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

User avatar
nirasa
Engineer
Engineer
Posts: 61
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: JGR's Patch Pack

Post by nirasa »

JGR wrote:
13 Jul 2020 20:27
nirasa wrote:
13 Jul 2020 19:55
No. The terminal writes that "...no targets are specified and no makefiles are found. End."
The CMake error is shown in your last screenshot.
Helpfully CMakeErrors.log does not contain information about actual errors.

I've pushed an update, try it again.
HURA! It's alright! Thank you. :-D

User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1263
Joined: 15 Feb 2003 17:32
Location: Villefranche-sur-Saône, France

Re: JGR's Patch Pack

Post by MagicBuzz »

Hello,

I think I found a bug.

Probably related to this update :
Revision: 6d1535b90279287808f60087c7c325e59cbf807d
Author: Jonathan G Rennison <xxxxxxx>
Date: 12/07/2020 13:32:35
Message:
Also show destination on mouseover when vehicle waiting for PBS/routing restriction

----
Modified: src/vehicle_gui.cpp
When I stop a road vehicle, and buldoze the road in front of it, when I build it again, if I mouve over its status bar (when its written "stopped") then instead of simply showing its destination like the update is aimt to, the vehicle actually start again and run on my new road.

Most of the time I place my mouse there because I want to restart it, so I could admint "it's not a bug, it's a feature", but I'm not sure it's the way it should work ;)

-- Edit: I tried to reproduce the issue like described, but it looks like to me more random than this... I already noticed it several times, but I can't reproduce it :?

-- Edit2 : Or may I dreamed ? What about showing destination in red when the vehicle is stopped ? It should be less confusing, shouldn't it ?

User avatar
JGR
Tycoon
Tycoon
Posts: 2110
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

MagicBuzz wrote:
14 Jul 2020 08:13
Hello,

I think I found a bug.

Probably related to this update :
Revision: 6d1535b90279287808f60087c7c325e59cbf807d
Author: Jonathan G Rennison <xxxxxxx>
Date: 12/07/2020 13:32:35
Message:
Also show destination on mouseover when vehicle waiting for PBS/routing restriction

----
Modified: src/vehicle_gui.cpp
When I stop a road vehicle, and buldoze the road in front of it, when I build it again, if I mouve over its status bar (when its written "stopped") then instead of simply showing its destination like the update is aimt to, the vehicle actually start again and run on my new road.

Most of the time I place my mouse there because I want to restart it, so I could admint "it's not a bug, it's a feature", but I'm not sure it's the way it should work ;)

-- Edit: I tried to reproduce the issue like described, but it looks like to me more random than this... I already noticed it several times, but I can't reproduce it :?

-- Edit2 : Or may I dreamed ? What about showing destination in red when the vehicle is stopped ? It should be less confusing, shouldn't it ?
This is how it now is in trunk.
The red cross on the left hand side is still present when mousing over to see the destination.

The only change I made was to also do the same for trains when in the waiting for PBS/routing restriction state.

I was a bit surprised that it was merged upstream so readily. If I generates significant confusion I can put the feature behind a setting.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1263
Joined: 15 Feb 2003 17:32
Location: Villefranche-sur-Saône, France

Re: JGR's Patch Pack

Post by MagicBuzz »

More than a setting, IMO the order should remain red when the vehicle is stopped, or it give impression the vehicle actually restarted.

I reported this as an issue in the trunk as well:
https://github.com/OpenTTD/OpenTTD/issues/8272

User avatar
Gadg8eer
Engineer
Engineer
Posts: 68
Joined: 14 Dec 2019 14:22

Re: JGR's Patch Pack

Post by Gadg8eer »

JGR wrote:
14 Jul 2020 08:28
...
I know this patch pack was the first with 32 railtypes, but then again you used to work on the New Map Features project so maybe it was already made and this would be too much work for you... Is there a possibility of 128 roadtypes/tramtypes for this patch pack? The number of distinct roadtypes is well over 32 and combined with tramtypes I find that there's just not enough slots.

ino
Engineer
Engineer
Posts: 124
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

CMake is fast becoming THE standard over the usual autoconf (i.e. makefile). It is much easier to maintain, and the same config file can be used both for macOS, Windows, and Linux. It is also much easier to maintain than autoconf. Granted, it takes more time to set up.
(although am getting messages suggesting my cmake is out of date, which I think is unlikely).
What version you are using then? JGR requires at least 3.6. You'd be surprised at how many system shipped with outdated CMake.
Where is the configure script? Why the change?
Configure script is part of autoconf, and as I explained, CMake is becoming the new standard, and is much better in long run than dated autoconf.
Compiles just fine in the way we are used to,, and as your patch used to be. Why is this patch now suddenly so different to build?
The changes landed in vanilla OpenTTD on June 6. The latest stable 1.10.2 is released on June 1 before the changes. If you download nightly, it is also now requiring CMake.

If you don't post any error messages, no one can help you.

User avatar
JGR
Tycoon
Tycoon
Posts: 2110
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Gadg8eer wrote:
15 Jul 2020 23:59
JGR wrote:
14 Jul 2020 08:28
...
I know this patch pack was the first with 32 railtypes, but then again you used to work on the New Map Features project so maybe it was already made and this would be too much work for you... Is there a possibility of 128 roadtypes/tramtypes for this patch pack? The number of distinct roadtypes is well over 32 and combined with tramtypes I find that there's just not enough slots.
At the moment there is a maximum of 63 road/tram types. I don't think it's likely that the number will increase beyond that, 63 is already barely usable from a UI point of view.
hostwey wrote:
16 Jul 2020 07:35
Very disapointed to discover I can't compile the latest patch 0.35 on Fedora. Used to be easy! Cmake just doesn't work. Just comes up with errors, even when I point to the source. Compile instructions don't make much sense (although am getting messages suggesting my cmake is out of date, which I think is unlikely). Can't find the source. Point it to the src but still doesn't work .Where is the configure script? Why the change?

Thanks for your efforts over the years, but think I'll just stick on the last patch that I'm allowed compile which is 0.34-4. I want to play the game, not learn programming everytime there is an update!

To make sure I wasn't going nuts, I downloaded the very latest source code for the game from the official OpenTTD website. Compiles just fine in the way we are used to,, and as your patch used to be as does 0.34-4. Why is the latest version of your patch now suddenly so different and difficult to build, at least for Linux users?
CMake is new and unfamiliar to me as well. I'm not really fond of it either. The main upside is that the Windows/MSVC side is much more sensible than what was there before.

Prior to commit 68f216ca builds did not work with CMake versions less than 3.12. I'd recommend trying with the most recent commit in the jgrpp branch.
It should work with CMake 3.6 or later.
ino wrote:
16 Jul 2020 08:02
Configure script is part of autoconf, and as I explained, CMake is becoming the new standard, and is much better in long run than dated autoconf.
The configure script was not actually autoconf based.
It is a bit debatable whether CMake qualifies as a/the new standard.

I will see if I can add a shell script wrapper to make it more obvious what to do.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Auge
Route Supervisor
Route Supervisor
Posts: 417
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: JGR's Patch Pack

Post by Auge »

Hello

I am also not able to compile a version of JGRPP 0.35.0 for Ubuntu Linux. I got the same errors as nirasa.
JGR wrote:
13 Jul 2020 20:27
nirasa wrote:
13 Jul 2020 19:55
No. The terminal writes that "...no targets are specified and no makefiles are found. End."
I've pushed an update, try it again.
I updated my copy of your repository with git fetch upstream on the branch jgrpp to get the latest commits. After that I moved to the directory build but cmake .. quitted with the message, that no CMakeLists.txt was found in the repos base dir. I moved back to the base dir, made a checkout of the branch jgrpp-0.35.0, moved again to build and repeated the run of cmake ... I got the initial errors (same as nirasa) again.

What is the step I forgot or where I took the wrong way on a junction?

Tschö, Auge

User avatar
JGR
Tycoon
Tycoon
Posts: 2110
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Auge wrote:
16 Jul 2020 09:41
Hello

I am also not able to compile a version of JGRPP 0.35.0 for Ubuntu Linux. I got the same errors as nirasa.
JGR wrote:
13 Jul 2020 20:27
nirasa wrote:
13 Jul 2020 19:55
No. The terminal writes that "...no targets are specified and no makefiles are found. End."
I've pushed an update, try it again.
I updated my copy of your repository with git fetch upstream on the branch jgrpp to get the latest commits. After that I moved to the directory build but cmake .. quitted with the message, that no CMakeLists.txt was found in the repos base dir. I moved back to the base dir, made a checkout of the branch jgrpp-0.35.0, moved again to build and repeated the run of cmake ... I got the initial errors (same as nirasa) again.

What is the step I forgot or where I took the wrong way on a junction?

Tschö, Auge
`git fetch` retrieves commits from a remote, but does not change which commit you are currently using locally.

Try:

Code: Select all

git checkout jgrpp
git pull upstream jgrpp
or

Code: Select all

git checkout jgrpp
git reset --hard upstream/jgrpp
Running:

Code: Select all

git log -1
should return something like:

Code: Select all

commit d290fac2ad7034842729980a12ee792dda3538f4 (HEAD -> jgrpp, upstream/jgrpp)
Author: Jonathan G Rennison <j.g.rennison@gmail.com>
Date:   Wed Jul 15 17:10:05 2020 +0100

    Add hotkey to show link graph legend window
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Auge
Route Supervisor
Route Supervisor
Posts: 417
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: JGR's Patch Pack

Post by Auge »

Hello
JGR wrote:
16 Jul 2020 10:22
Auge wrote:
16 Jul 2020 09:41
I am also not able to compile a version of JGRPP 0.35.0 for Ubuntu Linux. I got the same errors as nirasa.

[I did …]
`git fetch` retrieves commits from a remote, but does not change which commit you are currently using locally.
You are right. Normally I compile a tag but now I have to compile upstream/jgrpp after only fetching or I have to pull your changes to my branches.
JGR wrote:
16 Jul 2020 10:22
Try:

Code: Select all

git checkout jgrpp
git pull upstream jgrpp
Running:

Code: Select all

git log -1
should return something like:

Code: Select all

commit d290fac2ad7034842729980a12ee792dda3538f4 (HEAD -> jgrpp, upstream/jgrpp)
Author: Jonathan G Rennison <j.g.rennison@gmail.com>
Date:   Wed Jul 15 17:10:05 2020 +0100

    Add hotkey to show link graph legend window
Thank you. The commands cmake .. and make ran successfully.

Tschö, Auge

User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1263
Joined: 15 Feb 2003 17:32
Location: Villefranche-sur-Saône, France

Re: JGR's Patch Pack

Post by MagicBuzz »

Hello JGR,

I'm realizing there are some parameters that are not translated into french.

How can I help you translating to french ?
Should I send you an updated french.txt file ?

User avatar
JGR
Tycoon
Tycoon
Posts: 2110
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

MagicBuzz wrote:
17 Jul 2020 08:12
Hello JGR,

I'm realizing there are some parameters that are not translated into french.

How can I help you translating to french ?
Should I send you an updated french.txt file ?
Sure, I'm happy to receive translations.

Most of the translations I receive are in the forms of PRs.
This would be preferable as it makes the process much smoother, but if you're not familiar with git just sending an updated french.txt file with a note as to which version you started from would be fine.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Denswillow
Engineer
Engineer
Posts: 13
Joined: 01 May 2016 12:56

Re: JGR's Patch Pack

Post by Denswillow »

I had a bug with 35.0, report below:
Attachments
crash-20200718T185545Z.png
(182 KiB) Not downloaded yet
crash.txt
(51.53 KiB) Downloaded 20 times
crash.sav
(8.05 MiB) Downloaded 15 times

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google Adsense [Bot] and 7 guests