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

lyarenei
Engineer
Engineer
Posts: 22
Joined: 21 Dec 2015 15:36

Re: JGR's Patch Pack

Post by lyarenei »

JGR wrote:Can you post here what the output of running `./findversion.sh` is.

Code: Select all

lyarenei@vm19390:~/ottd-j# ./findversion.sh
jgrpp-0.13.3    27599   0       jgrpp-0.13.3
JGR wrote:Which method did you use to get the source, and what is in your .ottdrev-vc and/or .ottdrev files?

Code: Select all

lyarenei@vm19390:~/ottd-j# cat .ottdrev-vc
jgrpp-0.13.3    27599   0       jgrpp-0.13.3
f2109340c203da2a77b55311d4aed046090973c00505229b64ab488d82437eb9  -
I downloaded released source of 0.13.3 version from Github.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

lyarenei wrote:... I downloaded released source of 0.13.3 version from Github.
Well, those all look OK. How about the output of running `./configure` ?
Ex TTDPatch Coder
Patch Pack, Github
lyarenei
Engineer
Engineer
Posts: 22
Joined: 21 Dec 2015 15:36

Re: JGR's Patch Pack

Post by lyarenei »

JGR wrote:Well, those all look OK. How about the output of running `./configure` ?
[+] Spoiler

Code: Select all

lyarenei@vm19390:~/ottd-j# ./configure --enable-dedicated
checking awk... awk
detecting OS... UNIX
checking build system type... x86_64-linux-gnu
checking host system type... x86_64-linux-gnu
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++
checking host c++... g++
checking strip... disabled
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 64 bits
detecting SSE... found
checking static... no
checking unicode... no
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... not OSX, skipping
checking Allegro... dedicated server, skipping
checking SDL... dedicated server, skipping
checking COCOA... dedicated server, skipping
checking GDI video driver... dedicated server, skipping
checking dedicated... found
checking console application... not Windows, skipping
checking network... found
checking squirrel... found
checking translator... no
checking assert... enabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking libxdg-basedir... not found
checking libpng... found
checking freetype2... dedicated server, skipping
checking fontconfig... dedicated server, skipping
checking icu-lx... dedicated server, skipping
checking icu-i18n... dedicated server, skipping
checking psp-config... not PSP, skipping
checking libtimidity... dedicated server, skipping
checking direct-music... not Windows, skipping
checking sort... sort
checking endianness... AUTO
suppress language errors... no
checking stripping... skipped
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking grfcodec... not found
checking nforenum... not found
checking OSX application bundle... not OSX, skipping
checking revision... source release version
checking iconv... not OSX, skipping
personal home directory... .openttd
shared data directory... none
installation directory... /
icon theme directory... share/icons/hicolor
manual page directory... share/man/man6
menu item directory... share/applications
checking libdl... found
checking libbfd... no
checking dbg gdb... found
checking dbg gdb (prctl)... found
checking sigaction... found
checking ucontext... found
checking abi::__cxa_demangle... found
using CFLAGS_BUILD...  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -O 1
using CXXFLAGS_BUILD...  -std=gnu++11 -Wno-narrowing
using LDFLAGS_BUILD...  -rdynamic
using CFLAGS... -O2 -fomit-frame-pointer  -DCUSTOM_ALLOCATOR -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object - rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -DWITH_SSE -DWITH_DL -DWITH_DBG_GDB -DWITH_PRCTL_PT -g1 -DWITH_SIGACTION -DWITH_UCONTEXT -DWITH_DEMANGLE -DWITH_ZLIB   -DWITH_LZMA   -DWITH_LZO -D_SQ64 -I/root/ottd-j/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/include/libpng12   -DDEDICATED -DENABLE_NETWORK -DWITH_PERSONAL_DIR - DPERSONAL_DIR=\\".openttd\\" -DGLOBAL_DATA_DIR=\\"/usr/local/share/games/openttd\\"
using CXXFLAGS...  -std=gnu++11 -Wno-narrowing
using LDFLAGS... -lstdc++ -lpthread -ldl -lc -L/usr/lib/x86_64-linux-gnu -lz   -   llzma   -llzo2 -lpng12    -rdynamic
Generating Makefile...
Generating menu item...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...
lyarenei@vm19390:~/ottd-j#
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

lyarenei wrote:- llzma
lyarenei wrote:-O 1
Are the spaces in the middle of these in the original output, or are these line wrapping issues?
Other than that I can't see anything wrong with the output you've posted.

Are the other replacements in /src/rev.cpp OK?
Which distro are you running this on, is this a standard environment?
Ex TTDPatch Coder
Patch Pack, Github
lyarenei
Engineer
Engineer
Posts: 22
Joined: 21 Dec 2015 15:36

Re: JGR's Patch Pack

Post by lyarenei »

JGR wrote:
lyarenei wrote:- llzma
lyarenei wrote:-O 1
Are the spaces in the middle of these in the original output, or are these line wrapping issues?
Other than that I can't see anything wrong with the output you've posted.
Probably are. I tried to make it just more readable. I attached original output directly copied from putty.
JGR wrote:Are the other replacements in /src/rev.cpp OK?
I made no other changes to the files. After adding the value I was able to successfully compile sources.
JGR wrote:Which distro are you running this on, is this a standard environment?
Debian 8.5 x64 without GUI
Attachments
jgrpp-configure.txt
(5.92 KiB) Downloaded 69 times
ele
Engineer
Engineer
Posts: 3
Joined: 11 Aug 2016 13:55

Re: JGR's Patch Pack

Post by ele »

Hey,

I'm aware I have to compile this for linux from the source code, but I don't even know how to begin to do that. Would anyone mid quickly walking me though?

I did ./configure but I'm not sure where to go from there?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: JGR's Patch Pack

Post by Alberth »

Being a retired OpenTTD developer does not mean I know what I am doing.
ele
Engineer
Engineer
Posts: 3
Joined: 11 Aug 2016 13:55

Re: JGR's Patch Pack

Post by ele »

I assume https://wiki.openttd.org/Compiling_on_( ... led_binary Is what I want?

When I do this I hit a configure error on the ./configure : configure: error: no video driver development files found

And then make --jobs=9 gives "make: *** No targets specified and no makefile found. Stop."

Am I going about this wrong?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: JGR's Patch Pack

Post by Alberth »

You just skipped to section 3 about compiling and missed the set of packages listed in one of the 1.x sections that you need to install first?
Since ./configure creates the Makefile, if that fails, 'make' won't find that Makefile, so it fails too :)
Being a retired OpenTTD developer does not mean I know what I am doing.
ele
Engineer
Engineer
Posts: 3
Joined: 11 Aug 2016 13:55

Re: JGR's Patch Pack

Post by ele »

Alberth wrote:You just skipped to section 3 about compiling and missed the set of packages listed in one of the 1.x sections that you need to install first?
Since ./configure creates the Makefile, if that fails, 'make' won't find that Makefile, so it fails too :)
Aha, that's where I was going wrong, I assumed they'd been installed when I installed the main openTTD through the package manager. Thanks for the help, I know I'm an idiot.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

package managers usually only install libraries that are needed to run the program, but they should have a mode where they can install "build dependencies"
selli69
Engineer
Engineer
Posts: 6
Joined: 13 Aug 2016 18:35

Re: JGR's Patch Pack

Post by selli69 »

Hi JGR!

I really appreciate your patch, it makes playin openttd a lot more comfortable and interesting for me. Thank you for all the work and for keeping it up to date.

Your patch covers most of the wishes I have to the game, but it misses only ONE thing: Cargo Type Orders / Partial loading-unloading. There is an existing patch, but i am not able to integrate, my knowledge in programming and compiling isnt as good as needed for this task. The patch is viewtopic.php?f=33&t=62692

Please have a look at it and if it is possible and not that many work, please integrate it in the actual JGR patch. I think many of the JGR Users will appreciate this function as I do.

Thanks forward!

Selli

edit: I've tried to patch the files in the diff by hand. this works fine for most of the files. the only file, that causes problems is economy.cpp. there are collisions with the Auto Refit patch.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

selli69 wrote:Hi JGR!

I really appreciate your patch, it makes playin openttd a lot more comfortable and interesting for me. Thank you for all the work and for keeping it up to date.

Your patch covers most of the wishes I have to the game, but it misses only ONE thing: Cargo Type Orders / Partial loading-unloading. There is an existing patch, but i am not able to integrate, my knowledge in programming and compiling isnt as good as needed for this task. The patch is viewtopic.php?f=33&t=62692

Please have a look at it and if it is possible and not that many work, please integrate it in the actual JGR patch. I think many of the JGR Users will appreciate this function as I do.

Thanks forward!

Selli

edit: I've tried to patch the files in the diff by hand. this works fine for most of the files. the only file, that causes problems is economy.cpp. there are collisions with the Auto Refit patch.
This is something that I've thought about before (but not got around to doing any work on).
The biggest problem is the GUI, the backend stuff is fairly straightforward (edit: though I'd be inclined to change the storage format to make it less wasteful of memory). I'm not all that convinced about trying to cram everything onto one line in the order list. I think it'd be better to split things onto multiple lines as necessary.
I'll take a closer look into it.
Ex TTDPatch Coder
Patch Pack, Github
selli69
Engineer
Engineer
Posts: 6
Joined: 13 Aug 2016 18:35

Re: JGR's Patch Pack

Post by selli69 »

Thanks for the quick reply!

After posting my request yesterday, I couldnt stop thinking about the whole cargo loading/unloading issue. It keeps me the half night from sleep and things got worse, the longer I thought about.. ?(

Probably, my conclusions are of interest to you.

1. A change of this scale in the ecosystem would change the whole gameplay completely. So, is a "patchpack" the right place to alter the game completely or it's maybe wiser to do it in the openttd main trunk?
2. The patch, I posted yesterday does not the whole thing. It only makes possible to load/unload a specific cargo. It should be possible to load/unload a specific AMOUNT of cargo.
3. Concerning the GUI and the whole organization of the function it might be a good idea to introduce "suborders" where either the currently availible load/unload options are part of (the suborder list) or the suborder-list is referenced as a load/unload order. I hope you understand what i mean, sry for my english...
4. Refitting cargotypes could also be done as suborder, so manual refitting at a station is not limited to one cargo.

As of writing this, I will be not upset when you tell me that a change in such scale is too much work and if I want those features I may do them by myself.. :wink:
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

selli69 wrote:Thanks for the quick reply!

After posting my request yesterday, I couldnt stop thinking about the whole cargo loading/unloading issue. It keeps me the half night from sleep and things got worse, the longer I thought about.. ?(

Probably, my conclusions are of interest to you.

1. A change of this scale in the ecosystem would change the whole gameplay completely. So, is a "patchpack" the right place to alter the game completely or it's maybe wiser to do it in the openttd main trunk?
2. The patch, I posted yesterday does not the whole thing. It only makes possible to load/unload a specific cargo. It should be possible to load/unload a specific AMOUNT of cargo.
3. Concerning the GUI and the whole organization of the function it might be a good idea to introduce "suborders" where either the currently availible load/unload options are part of (the suborder list) or the suborder-list is referenced as a load/unload order. I hope you understand what i mean, sry for my english...
4. Refitting cargotypes could also be done as suborder, so manual refitting at a station is not limited to one cargo.

As of writing this, I will be not upset when you tell me that a change in such scale is too much work and if I want those features I may do them by myself.. :wink:
I wouldn't stress about this sort of thing if I were you. There's no rush and it's not worth losing sleep over.

To answer your points:
1. I don't see how it is such a significant change? The gameplay mechanics are not fundamentally different. I would doubt that trunk would be interested but you're free to approach the devs if you like.
2. That seems a bit too much like scope creep to me. How often is that sort of thing really useful, when how much to unload is generally handled by cargodist anyway?
3. That sounds a bit overkill to actually implement. I was thinking more along the lines of adding lines like: "Full/load/transfer/etc. all cargo of type(s): LIST" however many times is necessary.
4. This also seems a bit like scope creep to me.
The main reason why I thought about this previously was for distribution of cargoes like FIRS Engineering Supplies (which often move in the opposite direction to bulk cargoes). In particular doing transfer orders when on the same train as the bulk cargo, and preventing the cargodist graph from gaining unintentional edges in the "wrong" direction, which can also cause problems.
Ex TTDPatch Coder
Patch Pack, Github
selli69
Engineer
Engineer
Posts: 6
Joined: 13 Aug 2016 18:35

Re: JGR's Patch Pack

Post by selli69 »

JGR wrote: I wouldn't stress about this sort of thing if I were you. There's no rush and it's not worth losing sleep over.

To answer your points:
1. I don't see how it is such a significant change? The gameplay mechanics are not fundamentally different. I would doubt that trunk would be interested but you're free to approach the devs if you like.
2. That seems a bit too much like scope creep to me. How often is that sort of thing really useful, when how much to unload is generally handled by cargodist anyway?
3. That sounds a bit overkill to actually implement. I was thinking more along the lines of adding lines like: "Full/load/transfer/etc. all cargo of type(s): LIST" however many times is necessary.
4. This also seems a bit like scope creep to me.
The main reason why I thought about this previously was for distribution of cargoes like FIRS Engineering Supplies (which often move in the opposite direction to bulk cargoes). In particular doing transfer orders when on the same train as the bulk cargo, and preventing the cargodist graph from gaining unintentional edges in the "wrong" direction, which can also cause problems.
After thinking about your points, I completly agree. I've probably saw problems where are none.. ;)

I hope you find time and leisure to integrate the feature in one of the next updates.

Thanks forward!
User avatar
Valle
Transport Coordinator
Transport Coordinator
Posts: 284
Joined: 15 May 2007 11:35
Location: Germany

Re: JGR's Patch Pack

Post by Valle »

I just suffered an error (and numerous warnings) trying to compile the latest committed version straight from the GitHub repository on Mac OS X El Capitan 10.11.6 on an early 2015 rMBP 13". Has anyone got an idea how this one could be solved? Error, ./findversion.sh and ./configure log are attached. If my download method is the error, please provide instructions on how to retrieve the "correct" version 0.14.0. Thanks in advance.

Error:

Code: Select all

[SRC] Compiling music/cocoa_m.cpp
/Users/Val/Downloads/OpenTTD-patches-jgrpp/src/music/cocoa_m.cpp:76:4: error: 
      no matching function for call to 'AUGraphNodeInfo'
                        AUGraphNodeInfo(graph, node, &desc, &unit);
The output of ./configure:
[+] Spoiler

Code: Select all

Valentins-MBP:OpenTTD-patches-jgrpp Val$ ./configure
checking awk... awk
detecting OS... OSX
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++
checking host c++... g++
checking strip... disabled
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 64 bits
detecting SSE... found
checking static... no
checking unicode... no
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... no (use system default)
checking Allegro... OSX, skipping
checking SDL... OSX, skipping
checking COCOA... found
checking whether to enable the Quartz window subdriver... yes
checking Quickdraw window subdriver... disabled (64 bits)
checking GDI video driver... not Windows, skipping
checking dedicated... not selected
checking console application... not Windows, skipping
checking network... found
checking squirrel... found
checking translator... no
checking assert... enabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking libxdg-basedir... found
checking libpng... found
checking freetype2... found
checking libfontconfig... OSX, skipping
checking icu-lx... not found
checking icu-i18n... not found
checking psp-config... not PSP, skipping
checking libtimidity... not found
checking direct-music... not Windows, skipping
checking sort... sort
checking endianness... PREPROCESSOR
suppress language errors... no
checking stripping... skipped
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking grfcodec... not found
checking nforenum... not found
detecting ppc970 (G5)... no
checking revision... source release version
checking iconv... found
checking if iconv has non-const inbuf... yes
checking whether to link to iconv... yes
personal home directory... Documents/OpenTTD
shared data directory... /Library/Application\ Support/OpenTTD
installation directory... /
icon theme directory... none
manual page directory... share/man/man6
menu item directory... none
clang: error: unsupported option '-dumpspecs'
clang: error: no input files
clang: error: unsupported option '-dumpspecs'
clang: error: no input files
using CFLAGS_BUILD...  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -DOSX -D_FORTIFY_SOURCE=2 -O1
using CXXFLAGS_BUILD... 
using LDFLAGS_BUILD... 
using CFLAGS...  -O2 -fomit-frame-pointer  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -DOSX -D_FORTIFY_SOURCE=2 -DWITH_SSE -isystem/opt/local/include -DNO_QUICKTIME -mmacosx-version-min=10.5 -DUNIX -DWITH_COCOA -DENABLE_COCOA_QUARTZ -DWITH_ZLIB   -DWITH_LZMA -I/usr/local/Cellar/xz/5.2.2/include  -DWITH_LZO -DWITH_XDG_BASEDIR -I/usr/local/Cellar/libxdg-basedir/1.2.0/include  -D_SQ64 -I/Users/Val/Downloads/OpenTTD-patches-jgrpp/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/local/Cellar/libpng/1.6.19/include/libpng16  -DWITH_FREETYPE -I/usr/local/Cellar/freetype/2.6_1/include/freetype2  -DWITH_ICONV -DENABLE_NETWORK -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\"Documents/OpenTTD\" -DWITH_SHARED_DIR -DSHARED_DIR=\"/Library/Application\ Support/OpenTTD\" -DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\"
using CXXFLAGS... 
using LDFLAGS... -lstdc++ -lc -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -lz  -L/usr/local/Cellar/xz/5.2.2/lib -llzma  -llzo2 -L/usr/local/Cellar/libxdg-basedir/1.2.0/lib -lxdg-basedir  -L/usr/local/Cellar/libpng/1.6.19/lib -lpng16  -L/usr/local/Cellar/freetype/2.6_1/lib -lfreetype  -liconv   -framework Cocoa
Generating Makefile...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...
The output of ./findversion.sh, just for the record:

Code: Select all

Valentins-MBP:OpenTTD-patches-jgrpp Val$ ./findversion.sh
jgrpp-0.14.0	27623	1	jgrpp-0.14.0
Posting the entire log of Terminal for compiling and making would be almost 3 times the limit of what I can post in a single message here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

'cocoa_m.cpp' implies an Apple-specific issue, can you whether trunk builds correctly with your setup?
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Valle
Transport Coordinator
Transport Coordinator
Posts: 284
Joined: 15 May 2007 11:35
Location: Germany

Re: JGR's Patch Pack

Post by Valle »

Oh, snap. Thanks for that hint. I went right ahead with r27632 and got the same error while compiling that one, so that error seems unrelated to your patchpack. Sorry for the inconvenience.
tlpwka
Engineer
Engineer
Posts: 16
Joined: 09 Feb 2015 17:12

Re: JGR's Patch Pack

Post by tlpwka »

Got a weird error while building signals:
Attachments
2016-09-10_10-24-21.png
(835.29 KiB) Not downloaded yet
crash.txt
(26.29 KiB) Downloaded 58 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 9 guests