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

arbr2
Engineer
Engineer
Posts: 12
Joined: 11 Jan 2019 14:23

Re: JGR's Patch Pack

Post by arbr2 »

Ro(V)eO wrote:Well actually, after compiling (which runs with several errors, but seems to finish) I was able to make the bundle. But when trying to start the file, i got an error telling me that OpenTTD wouldn't run on my Mac...

edit:

Code: Select all

./configure --enable-static --cpu-type=64 LDFLAGS="-stdlib=libstdc++"
That's my configuration. I'll try with C++11, maybe THIS works...

e2: Compiling seemed to work, but still the same message when trying to run

with "make run", i get this:

Code: Select all

...$ sudo make run
/Applications/Xcode.app/Contents/Developer/usr/bin/make reconfigure
make[1]: `reconfigure' is up to date.
/bin/sh: ./openttd: Permission denied
make: *** [run] Error 126
Are you sure the compiling actually succeeds? I also have a lot of warnings, but these are not critical. As soon as compiling for cocoa_v.mm starts, the compiler runs into errors and simply quits. Cocoa is an Apple-specific API, so I assume this issue is strictly mac-only.

I have tried you ./configure, but run into the exact same problems. Too bad that the real experts here don't have access to a Mac :cry:
Ro(V)eO
Engineer
Engineer
Posts: 33
Joined: 01 Mar 2005 12:25
Location: Frankfurt / Germany

Re: JGR's Patch Pack

Post by Ro(V)eO »

arbr2 wrote: Are you sure the compiling actually succeeds? I also have a lot of warnings, but these are not critical. As soon as compiling for cocoa_v.mm starts, the compiler runs into errors and simply quits. Cocoa is an Apple-specific API, so I assume this issue is strictly mac-only.

I have tried you ./configure, but run into the exact same problems. Too bad that the real experts here don't have access to a Mac :cry:
DID IT!!!
Deleted the PP-Folder and re-downloaded it.
I have installed MacPorts to install libiconv (see the wiki for instructions)

Code: Select all

./configure --enable-static
make -j4
make bundle
works for me now... 8)
arbr2
Engineer
Engineer
Posts: 12
Joined: 11 Jan 2019 14:23

Re: JGR's Patch Pack

Post by arbr2 »

Ro(V)eO wrote:works for me now... 8)
Cool! You're on MacOS 10.14.2 right?

Also: how did you install liblzo2? It seems this is not available for mac, so I would expect you to have to use --without-liblzo2 to get the configure to work.
Ro(V)eO
Engineer
Engineer
Posts: 33
Joined: 01 Mar 2005 12:25
Location: Frankfurt / Germany

Re: JGR's Patch Pack

Post by Ro(V)eO »

arbr2 wrote:
Ro(V)eO wrote:works for me now... 8)
Cool! You're on MacOS 10.14.2 right?

Also: how did you install liblzo2? It seems this is not available for mac, so I would expect you to have to use --without-liblzo2 to get the configure to work.
I think I read that liblzo was merged into xz IIRC :?

Yep, 14.2
arbr2
Engineer
Engineer
Posts: 12
Joined: 11 Jan 2019 14:23

Re: JGR's Patch Pack

Post by arbr2 »

Ro(V)eO wrote:
arbr2 wrote:
Ro(V)eO wrote:works for me now... 8)
Cool! You're on MacOS 10.14.2 right?

Also: how did you install liblzo2? It seems this is not available for mac, so I would expect you to have to use --without-liblzo2 to get the configure to work.
I think I read that liblzo was merged into xz IIRC :?

Yep, 14.2
Interesting, I'm on the same OS version and did exactly like you did. Except... the compile still fails at the exact same point as it did before. I'm especially interested if you have done something to select another compiler? If possible, would you mind sharing the log of your ./configure?

For my benefit (and those of others who might end up here via Google), would you mind to also share the exact steps you did to make the compiling work and put the binary up on Dropbox or Google Drive, so that other Mac users can use it?

Thanks!
Ro(V)eO
Engineer
Engineer
Posts: 33
Joined: 01 Mar 2005 12:25
Location: Frankfurt / Germany

Re: JGR's Patch Pack

Post by Ro(V)eO »

arbr2 wrote:
Interesting, I'm on the same OS version and did exactly like you did. Except... the compile still fails at the exact same point as it did before. I'm especially interested if you have done something to select another compiler? If possible, would you mind sharing the log of your ./configure?

For my benefit (and those of others who might end up here via Google), would you mind to also share the exact steps you did to make the compiling work and put the binary up on Dropbox or Google Drive, so that other Mac users can use it?

Thanks!
I followed the guide for XCode, Homebrew AND (yes, weird) MacPorts, installed the libraries (including libiconv...) and then compiled via terminal.

Code: Select all

./configure --enable-static
log:
[+] Spoiler
checking awk... awk
detecting OS... OSX
checking build system type... x86_64-apple-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking universal build... no
checking build cc... clang
checking host cc... clang
checking build c++... clang++
checking host c++... clang++
checking strip... disabled
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 64 bits
detecting SSE... found
checking static... yes
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 Uniscribe text layout... not Windows, skipping
checking libxdg-basedir... not found
checking libpng... found
checking freetype2... found
checking libfontconfig... OSX, skipping
checking icu-lx... OSX, skipping
checking icu-i18n... OSX, skipping
checking libtimidity... not found
checking fluidsynth... not found
checking direct-music... not Windows, skipping
checking xaudio2... not Windows, skipping
checking sort... sort
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
checking bitmath builtins... no
using CFLAGS_BUILD... -fno-strict-aliasing -Wall -W -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-multichar -Wno-self-assign -Wno-parentheses-equality -DCUSTOM_ALLOCATOR -DOSX -O1
using CXXFLAGS_BUILD... -std=c++11
using LDFLAGS_BUILD... -rdynamic
using CFLAGS... -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -W -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-multichar -Wno-self-assign -Wno-parentheses-equality -DCUSTOM_ALLOCATOR -DOSX -DWITH_SSE -isystem/opt/local/include -DNO_QUICKTIME -DUNIX -DWITH_COCOA -DENABLE_COCOA_QUARTZ -DWITH_ZLIB -I/opt/local/include -DWITH_LZMA -I/opt/local/include -DLZMA_API_STATIC -DWITH_LZO -D_SQ64 -I/Users/Benjamin/Downloads/OpenTTD-PP/src/3rdparty/squirrel/include -DWITH_PNG -I/opt/local/include/libpng16 -I/opt/local/include -DWITH_FREETYPE -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -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... -std=c++11
using LDFLAGS... -lstdc++ -lc -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -L/opt/local/lib -lz -L/opt/local/lib -llzma -D_THREAD_SAFE -pthread -llzo2 -L/opt/local/lib -lpng16 -lz -L/opt/local/lib -lfreetype -lbz2 -lpng16 -lz -lfreetype -liconv -rdynamic -framework Cocoa
Generating Makefile...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...
After configuring, I simply used make as superuser (-j4 to use four threads on my dual core CPU)

Code: Select all

sudo make -j4
Uploaded the whole bundle folder onto my Google Drive, let me know whether it works for you ;)
https://drive.google.com/open?id=1TP0SN ... Q-cR9SqbRX
arbr2
Engineer
Engineer
Posts: 12
Joined: 11 Jan 2019 14:23

Re: JGR's Patch Pack

Post by arbr2 »

Ro(V)eO wrote: Uploaded the whole bundle folder onto my Google Drive, let me know whether it works for you ;)
https://drive.google.com/open?id=1TP0SN ... Q-cR9SqbRX
Thanks ever so much, you've been a great help. I'll try to figure out what's blocking on my side and come back with the results.
arbr2
Engineer
Engineer
Posts: 12
Joined: 11 Jan 2019 14:23

Re: JGR's Patch Pack

Post by arbr2 »

As promised, my feedback:

First off: the bundle didn't work out-of-the box, but with some tinkering I did manage to make it work on my Mac. It's really stable and seems to work great. Thanks again for sharing that!

Compiling
I have compared our ./configure and there are identical except for one line.

Yours:
checking revision... source release version

Mine:
checking revision... git detection

There is also a minor difference in these:
using CFLAGS_BUILD
using CXXFLAGS_BUILD
using LDFLAGS_BUILD
using CFLAGS
using CXXFLAGS
using LDFLAGS

All these flags are exactly the same, but there is a double-space between arguments on my side and just a single space on your end. For example:

Code: Select all

using LDFLAGS... -lstdc++ -lc -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -L/opt/local/lib -lz -L/opt/local/lib -llzma -D_THREAD_SAFE -pthread -llzo2 -L/opt/local/lib -lpng16 -lz -L/opt/local/lib -lfreetype -lbz2 -lpng16 -lz -lfreetype -liconv -rdynamic -framework Cocoa 

Code: Select all

using LDFLAGS... -lstdc++ -lc -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -L/opt/local/lib -lz  -L/opt/local/lib -llzma -D_THREAD_SAFE -pthread  -llzo2 -L/opt/local/lib -lpng16 -lz  -L/opt/local/lib -lfreetype -lbz2 -lpng16 -lz  -lfreetype -liconv   -rdynamic -framework Cocoa 
But this shouldn't really matter as double-spaces are probably just treated as single spaces (right?)

Bottom line
- We have the exact same OS and subversion
- We have installed identical packages
- We have an almost identical configure
- Compiling works for you, fails for me

I don't know enough about compiling to know if the spaces in the FLAGS are an issue. I also don't know what the impact of the 'checking revision' is. Any thoughts on this?

Thanks again!
maxiecool2
Engineer
Engineer
Posts: 31
Joined: 28 Feb 2013 00:20

Re: JGR's Patch Pack

Post by maxiecool2 »

maxiecool2 wrote:hey jdr
i would like to ad a patch request to add on

industry filter
http://bugs.openttd.org/task/5455
useful for sorting industries

wait for cargo patch
(spring didnt have a link)
useful for partial cargo pick up

i have no idea how to make a patch but heres an idea for those smarter than me
auto payback loan
a check box in the budget window when enabled, when the bank balance hits $10,000 it automatically pays it into to loan, either manually uncheck or automatically when loan hits zero!
thanks mat
i donk know if this is possible, to when you save a gam it saves your open windows too!
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

Re: JGR's Patch Pack

Post by Trond »

This is such a fantastic patch-pack, I just wanne say THANK YOU for making and updating this! :bow: :bow:
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
Denswillow
Engineer
Engineer
Posts: 25
Joined: 01 May 2016 12:56

Re: JGR's Patch Pack

Post by Denswillow »

Hey! I had a bug with 29.0:
Attachments
crash.sav
(5.11 MiB) Downloaded 49 times
crashreport.txt
(24.89 KiB) Downloaded 55 times
User avatar
Expresso
Tycoon
Tycoon
Posts: 1760
Joined: 09 Aug 2004 00:14
Location: Gouda, the Netherlands

Re: JGR's Patch Pack

Post by Expresso »

Denswillow wrote:Hey! I had a bug with 29.0:
Great! What are the steps to reproduce the bug?
Denswillow
Engineer
Engineer
Posts: 25
Joined: 01 May 2016 12:56

Re: JGR's Patch Pack

Post by Denswillow »

Train 59 of National Railways(Company 3) is stuck behind an unelectrified track. If you try to electrify the track in front, the game crashes.
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Denswillow wrote:Hey! I had a bug with 29.0:
Thanks for reporting this issue, it has been fixed and will be in the next release.
The issue was due to incorrect handling of the case where a train is reversed due to attempting to enter a bridge from a sloped bridge head, where the bridge is one-way signalled in the opposite direction.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Fairyfloss
Traffic Manager
Traffic Manager
Posts: 159
Joined: 03 Aug 2011 14:10
Location: Yes

Re: JGR's Patch Pack

Post by Fairyfloss »

I really enjoy using this patchpack, but I have a question. Is there a chance that the Group Liveries patch ( https://github.com/PeterN/OpenTTD/tree/group-livery ) will be added? If not, could anyone point me to some guides on how to merge the two myself? I'd quite like to be able to play around with both
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Darthrafael wrote:I really enjoy using this patchpack, but I have a question. Is there a chance that the Group Liveries patch ( https://github.com/PeterN/OpenTTD/tree/group-livery ) will be added? If not, could anyone point me to some guides on how to merge the two myself? I'd quite like to be able to play around with both
This feature has now been merged into trunk, and the most recent trunk has been merged into this patchpack, so it's now included and you don't need to do any merging.
Ex TTDPatch Coder
Patch Pack, Github
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: JGR's Patch Pack

Post by Auge »

Hello
JGR wrote:
Darthrafael wrote:… Group Liveries patch ( https://github.com/PeterN/OpenTTD/tree/group-livery ) …
This feature has now been merged into trunk, and the most recent trunk has been merged into this patchpack, so it's now included and you don't need to do any merging.
Is there a new release of JGRPP or does one need to compile the jgrpp branch?

Tschö, Auge
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Auge wrote:Hello
JGR wrote:
Darthrafael wrote:… Group Liveries patch ( https://github.com/PeterN/OpenTTD/tree/group-livery ) …
This feature has now been merged into trunk, and the most recent trunk has been merged into this patchpack, so it's now included and you don't need to do any merging.
Is there a new release of JGRPP or does one need to compile the jgrpp branch?

Tschö, Auge
The latter. However, a new release will be made in due course and the first post will be updated accordingly.
Ex TTDPatch Coder
Patch Pack, Github
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: JGR's Patch Pack

Post by mak »

Hi JGR

First thank you for the new version (0.29.1)

Just one thing (so far ) opening screen is informing me that "The currently selected base graphice is missing 4 sprites. Please check fo updates for the baseset."

I use abase but still get the same with zbase and OpenGFX

No idea if this is your problem all OK before update.

Thanks again for new version
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: JGR's Patch Pack

Post by kamnet »

mak wrote:"The currently selected base graphics is missing 4 sprites. Please check for updates for the baseset." I use abase but still get the same with zbase and OpenGFX.
OpenTTD's master branch has added new sprites over the years. If you download the latest development version of OpenGFX, this error will go away. zBase is slow in its development, but it will be updated eventually. Unfortunately, aBase is no longer being developed, it was abandoned by its author.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 42 guests