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
Captain Rand
Engineer
Engineer
Posts: 105
Joined: 28 Jan 2012 07:35

Re: JGR's Patch Pack

Post by Captain Rand »

Kruemelchen wrote:
25 Jul 2020 00:30
.....
I'll be setting up a Linux machine soon. I'll try it then. Thanks!

Pete.
There's nothing like a deadline to hone the concentration.

Good manners cost nothing, but earn respect.

" 'Impossible' is not in our vocabulary." Jack Chrichton, Farscape

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

Re: JGR's Patch Pack

Post by JGR »

Kruemelchen wrote:
25 Jul 2020 00:30
Captain Rand wrote:
24 Jul 2020 20:36
Is this all the code needed to compile JGRPP in Linux?
Is anything else needed?
Compiling should be the same as regular OTTD. So here are the packages you need. They are all in the repository and can be installed automatically.

After dependencies are installed, you can simply compile it with:
cd path/of/the/unzipped/directory
./configure
make
sudo make install

(though I always run a "make bundle" and then just run the game from there)
That wiki page and this list of commands are out of date.
Upstream OpenTTD (and consequently, this branch) has moved to CMake.

I'd suggest following this document: https://github.com/JGRennison/OpenTTD-p ... MPILING.md
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

User avatar
Captain Rand
Engineer
Engineer
Posts: 105
Joined: 28 Jan 2012 07:35

Re: JGR's Patch Pack

Post by Captain Rand »

JGR wrote:
25 Jul 2020 11:09

That wiki page and this list of commands are out of date.
Upstream OpenTTD (and consequently, this branch) has moved to CMake.

I'd suggest following this document: https://github.com/JGRennison/OpenTTD-p ... MPILING.md
Thanks. I think. I've looked at your link, and quite honestly don't know where to begin.
I have ZERO experience with C++
I've never compiled anything before - don't know where to start - don't know what to use.
I've never used the shell in Linux.

Kruemelchens instructions looked simple. Yours, I'm afraid, do not.
So. bearing in mind I haven't yet installed Linux, so I can't look myself (I'll be going with a flavour of Ubuntu), do you know if all of the following (from your document) are available in the repository?


zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads, heightmaps
liblzo2: (de)compressing of old (pre 0.3.0) savegames
liblzma: (de)compressing of savegames (1.1.0 and later)
libpng: making screenshots and loading heightmaps
libfreetype: loading generic fonts and rendering them
libfontconfig: searching for fonts, resolving font names to actual fonts
libicu: handling of right-to-left scripts (e.g. Arabic and Persian) and natural sorting of strings (Linux only)
libSDL2: hardware access (video, sound, mouse) (not required for Windows or macOS)

And, is this the complete set of instructions for compiling:-

mkdir build
cd build
cmake ..
make

Because it doesn't look like it. How does it know what to compile?

Also, what compiler (from the repository) should I use? And how?
I really would like to learn how to do this myself, but need a head start. I really don't know where to begin.
I just need a clear, simple, up to date, step by step, set of instructions.

Pete.
There's nothing like a deadline to hone the concentration.

Good manners cost nothing, but earn respect.

" 'Impossible' is not in our vocabulary." Jack Chrichton, Farscape

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

Re: JGR's Patch Pack

Post by JGR »

Captain Rand wrote:
25 Jul 2020 20:11
JGR wrote:
25 Jul 2020 11:09

That wiki page and this list of commands are out of date.
Upstream OpenTTD (and consequently, this branch) has moved to CMake.

I'd suggest following this document: https://github.com/JGRennison/OpenTTD-p ... MPILING.md
Thanks. I think. I've looked at your link, and quite honestly don't know where to begin.
I have ZERO experience with C++
I've never compiled anything before - don't know where to start - don't know what to use.
I've never used the shell in Linux.

Kruemelchens instructions looked simple. Yours, I'm afraid, do not.
So. bearing in mind I haven't yet installed Linux, so I can't look myself (I'll be going with a flavour of Ubuntu), do you know if all of the following (from your document) are available in the repository?


zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads, heightmaps
liblzo2: (de)compressing of old (pre 0.3.0) savegames
liblzma: (de)compressing of savegames (1.1.0 and later)
libpng: making screenshots and loading heightmaps
libfreetype: loading generic fonts and rendering them
libfontconfig: searching for fonts, resolving font names to actual fonts
libicu: handling of right-to-left scripts (e.g. Arabic and Persian) and natural sorting of strings (Linux only)
libSDL2: hardware access (video, sound, mouse) (not required for Windows or macOS)

And, is this the complete set of instructions for compiling:-

mkdir build
cd build
cmake ..
make

Because it doesn't look like it. How does it know what to compile?

Also, what compiler (from the repository) should I use? And how?
I really would like to learn how to do this myself, but need a head start. I really don't know where to begin.
I just need a clear, simple, up to date, step by step, set of instructions.

Pete.
Try:

Code: Select all

sudo apt-get install build-essential cmake git
sudo apt-get build-dep openttd
git clone https://github.com/JGRennison/OpenTTD-patches.git jgrpp
cd jgrpp
git checkout jgrpp-0.35.1
mkdir build
cd build
cmake ..
make
./openttd
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

Kruemelchen
Traffic Manager
Traffic Manager
Posts: 166
Joined: 18 Feb 2017 17:47

Re: JGR's Patch Pack

Post by Kruemelchen »

JGR wrote:
25 Jul 2020 11:09
That wiki page and this list of commands are out of date.
Upstream OpenTTD (and consequently, this branch) has moved to CMake.
Thank you!
And I sillily thought it was a bug with version 35.0 that I cannot compile it anymore! :lol:

Anyways, it compiled like a charm with cmake. But is there a way to make a bundle, or has this been removed? (sorry to ask this unrelated question)

User avatar
Captain Rand
Engineer
Engineer
Posts: 105
Joined: 28 Jan 2012 07:35

Re: JGR's Patch Pack

Post by Captain Rand »

JGR wrote:
25 Jul 2020 22:28
......
Thanks. I'm hopefully setting up my Linux machine in the next few days and will try then.
I even think I understand what parts of the code actually do, which is great. It's a jumping off point to learning more (always helps when you have a context).
Kruemelchen wrote:
25 Jul 2020 23:25
.....sillily.....
I'll be adding this to my vocabulary. :D
Kruemelchen wrote:
25 Jul 2020 23:25
..... But is there a way to make a bundle.......
Bundle?

Pete.
There's nothing like a deadline to hone the concentration.

Good manners cost nothing, but earn respect.

" 'Impossible' is not in our vocabulary." Jack Chrichton, Farscape

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

Re: JGR's Patch Pack

Post by ino »

You don't need to do make bundle anymore: the build directory is the complete bundle. (Unless you want to build macOS .app, which I am not sure how to do other than make package and extract that from .dmg generated)

Kruemelchen
Traffic Manager
Traffic Manager
Posts: 166
Joined: 18 Feb 2017 17:47

Re: JGR's Patch Pack

Post by Kruemelchen »

ino wrote:
26 Jul 2020 07:14
You don't need to do make bundle anymore: the build directory is the complete bundle. (Unless you want to build macOS .app, which I am not sure how to do other than make package and extract that from .dmg generated)
Thank you for the clarification! Now I see it. I think the cmake files in the build directory did confuse me. I'll wrap my mind around it :)
Captain Rand wrote:
26 Jul 2020 06:07
I'll be adding this to my vocabulary. :D
It's been a pleasure :D

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

Re: JGR's Patch Pack

Post by JGR »

Kruemelchen wrote:
25 Jul 2020 23:25
But is there a way to make a bundle, or has this been removed? (sorry to ask this unrelated question)
No problem.
Running `cpack` after building should generate a bundle zip.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

d0mi3l
Engineer
Engineer
Posts: 22
Joined: 16 Aug 2013 18:04
Location: Poland

Re: JGR's Patch Pack

Post by d0mi3l »

I have problem with language options. New version of your pack (35.1) has fewer languages to choose.
Attachments
OTTD 35.1 vs 35.0.jpg
(457.5 KiB) Not downloaded yet

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

Re: JGR's Patch Pack

Post by JGR »

d0mi3l wrote:
28 Jul 2020 15:39
I have problem with language options. New version of your pack (35.1) has fewer languages to choose.
Looks like another CMake issue. Try the attached language files instead (replace your existing language files with the ones in the zip).
This will be resolved in the next release.
Attachments
jgrpp-0.35.1-lang.zip
(3.4 MiB) Downloaded 50 times
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

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

Re: JGR's Patch Pack

Post by MagicBuzz »

d0mi3l wrote:
28 Jul 2020 15:39
I have problem with language options. New version of your pack (35.1) has fewer languages to choose.
With Visual Studio I have this issue times to time when "Build all".

If I use "Clean up" then "Rebuild All" this works again.

d0mi3l
Engineer
Engineer
Posts: 22
Joined: 16 Aug 2013 18:04
Location: Poland

Re: JGR's Patch Pack

Post by d0mi3l »

JGR :bow:

Diesel Power
Traffic Manager
Traffic Manager
Posts: 214
Joined: 18 Jun 2016 19:05

Re: JGR's Patch Pack

Post by Diesel Power »

Found a bug with the "load/unload by cargo type" menu. if you are using a GRF with a large amount of cargos, the list goes off the bottom of the screen and you can't select the ones at the bottom. See screen shot, there is one more cargo off the bottom. (ignore the the undefined strings, this is a bug with another GRF).
Attachments
Arctic Trucks, 24th Apr 1881.png
(169.32 KiB) Not downloaded yet

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

Re: JGR's Patch Pack

Post by JGR »

Diesel Power wrote:
08 Aug 2020 22:34
Found a bug with the "load/unload by cargo type" menu. if you are using a GRF with a large amount of cargos, the list goes off the bottom of the screen and you can't select the ones at the bottom. See screen shot, there is one more cargo off the bottom. (ignore the the undefined strings, this is a bug with another GRF).
Thanks for letting me know about this, I'll see what I can do.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 8 guests