Any more information on how to build NewGRFs with nmlc??
Posted: 24 Apr 2021 11:28
I feel like I want to strangle a bunny. Want to look into how GRFs are put together and the information is so sparse and distributed amongst 20 defunct websites and people linking to pages that no longer exist. I downloaded and built, as best I can tell, nml from the OpenTTD repo. So I then downloaded FIRS source to use as reference, which states a few prerequisites that need to be installed, which I have ostensibly done. I finally got 'make' working, and tried to build it and just want to cry after bashing my head off it for like 4 hours. I think nmlc is failing to load because 'ply' doesn't exist, but I installed ply via pip and python is convinced 'requirements are already satisfied' yet I just get these confusing errors insinuating it doesn't.
Traceback (most recent call last):
File "nmlc", line 3, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\main.py", line 21, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\parser.py", line 16, in <module>
ModuleNotFoundError: No module named 'ply'
[43728] Failed to execute script nmlc
I'm hoping this is all that is wrong because the makefile seems to be saying every 'CreateProcess' has failed and the output is not clear as to whether there are fails before this or the traceback shown at the end is the reason for those 10 fails above it.
PS D:\OpenTTD\firs> make
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.pynml --ext=.lng src, ...) failed.
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.pynml --ext=.pt --ext=.lng src, ...) failed.
process_begin: CreateProcess(NULL, which dot, ...) failed.
process_begin: CreateProcess(NULL, which gvpr, ...) failed.
process_begin: CreateProcess(NULL, which gvpr, ...) failed.
process_begin: CreateProcess(NULL, which dot, ...) failed.
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.pynml src, ...) failed.
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.png src, ...) failed.
nmlc -c -l generated/lang --verbosity=4 --grf=generated/firs.grf generated/firs.nml
Traceback (most recent call last):
File "nmlc", line 3, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\main.py", line 21, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\parser.py", line 16, in <module>
ModuleNotFoundError: No module named 'ply'
[37136] Failed to execute script nmlc
make: *** [generated/firs.grf] Error 1
This unix style makefile stuff always feels so obtuse and vague like you're just meant to innately understand how to do it all, I don't think I've ever managed to successfully build something with a makefile without these kinds of cascading problems (that wasn't cmake) and is one reason I've shied away from being involved with open source stuff in the past god bless lovely visual studio projects where you just load it up and click compile.
Traceback (most recent call last):
File "nmlc", line 3, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\main.py", line 21, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\parser.py", line 16, in <module>
ModuleNotFoundError: No module named 'ply'
[43728] Failed to execute script nmlc
I'm hoping this is all that is wrong because the makefile seems to be saying every 'CreateProcess' has failed and the output is not clear as to whether there are fails before this or the traceback shown at the end is the reason for those 10 fails above it.
PS D:\OpenTTD\firs> make
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.pynml --ext=.lng src, ...) failed.
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.pynml --ext=.pt --ext=.lng src, ...) failed.
process_begin: CreateProcess(NULL, which dot, ...) failed.
process_begin: CreateProcess(NULL, which gvpr, ...) failed.
process_begin: CreateProcess(NULL, which gvpr, ...) failed.
process_begin: CreateProcess(NULL, which dot, ...) failed.
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.pynml src, ...) failed.
process_begin: CreateProcess(NULL, env python3 D:\OpenTTD\firs\bin\find-files --ext=.py --ext=.png src, ...) failed.
nmlc -c -l generated/lang --verbosity=4 --grf=generated/firs.grf generated/firs.nml
Traceback (most recent call last):
File "nmlc", line 3, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\main.py", line 21, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "nml\parser.py", line 16, in <module>
ModuleNotFoundError: No module named 'ply'
[37136] Failed to execute script nmlc
make: *** [generated/firs.grf] Error 1
This unix style makefile stuff always feels so obtuse and vague like you're just meant to innately understand how to do it all, I don't think I've ever managed to successfully build something with a makefile without these kinds of cascading problems (that wasn't cmake) and is one reason I've shied away from being involved with open source stuff in the past god bless lovely visual studio projects where you just load it up and click compile.