M4nfo installation problem.
Moderator: Graphics Moderators
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
M4nfo installation problem.
Can anyone explain me how to install modules in m4nfo and how to start the work. I'm already have code with m4 syntax, but I don't know how to create newGRF.
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
Re: M4nfo installation problem.
Never worked with m4nfo, but presumably it uses m4 to convert the source to NFO.
m4 is macro processor, that you can find at many Unix systems. Alternatively, you can use a port like MingW which should include m4 as well. (Not checked nor tested, as I don't have a Windows system.) Another option is running Ubuntu natively at Windows 10, which was introduced by Microsoft recently. If that is not enough, a search like "m4 Windows" will likely give you some other starting points.
By running m4 on the grf source, you should get an NFO file. That file can be processed by grfcodec, the standard tool for creating GRFs from NFO.
m4 is macro processor, that you can find at many Unix systems. Alternatively, you can use a port like MingW which should include m4 as well. (Not checked nor tested, as I don't have a Windows system.) Another option is running Ubuntu natively at Windows 10, which was introduced by Microsoft recently. If that is not enough, a search like "m4 Windows" will likely give you some other starting points.
By running m4 on the grf source, you should get an NFO file. That file can be processed by grfcodec, the standard tool for creating GRFs from NFO.
Being a retired OpenTTD developer does not mean I know what I am doing.
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: M4nfo installation problem.
Did you check out this page?Tony Pixel wrote:Can anyone explain me how to install modules in m4nfo and how to start the work. I'm already have code with m4 syntax, but I don't know how to create newGRF.
HTH
Michael
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
Yes, but I didn't know where enter these commands and which test.nfx use. Michael, can you pm me and explain all steps?michael blunck wrote: Did you check out this page?
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
Re: M4nfo installation problem.
You enter text commands normally in the command program that comes with Windows. If you downloaded a Unix version like MingW, it comes with a shell named bash or sh which does the same thing.
test.nfx is the input file of m4, ie the main file of your grf source
test.nfx is the input file of m4, ie the main file of your grf source
Being a retired OpenTTD developer does not mean I know what I am doing.
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
Where I must create these file? I'm already have code text and sprites.
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: M4nfo installation problem.
Well, depends. For every set you should create a "working directory" with all the needed files, code and sprites.Tony Pixel wrote: Where I must create these file? I'm already have code text and sprites.
Are you on windows or on Unix/OSX?
What TTD feature is your GRF for? trains? rvs? stations? objects? ...
Did you install the proper m4nfo module for that feature?
Did you install M4?
Did you install grfcodec?
Did you set path variables to use M4 and grfcodec from your working directory?
Do you really want to type in single commands, or do you want to use a batch file, or do you even want to use "make"?
...
regards
Michael
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
I'm already have work directory;michael blunck wrote:Well, depends. For every set you should create a "working directory" with all the needed files, code and sprites.Tony Pixel wrote: Where I must create these file? I'm already have code text and sprites.
Are you on windows or on Unix/OSX?
What TTD feature is your GRF for? trains? rvs? stations? objects? ...
Did you install the proper m4nfo module for that feature?
Did you install M4?
Did you install grfcodec?
Did you set path variables to use M4 and grfcodec from your working directory?
Do you really want to type in single commands, or do you want to use a batch file, or do you even want to use "make"?
...
regards
Michael
My GRF is a train set for ~20 vehicles;
I'm already instal grfcodec and M4, but I don't understand how to install module, path variables and what the difference have "make", batch
files and commands.
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: M4nfo installation problem.
You need to use the shell (command line interpreter) to enter commands (or running batch files including such commands) by use of the keyboard.Tony Pixel wrote: [...] I don't understand how to install module, path variables and what the difference have "make", batch files and commands.
I.e., entering
Code: Select all
M4 -R m4nfo_trains.m4 < test.nfx > test.nfo
Likewise, you might also start grfcodec from the shell.
O/c, the better solution would be to use a batch file like this:
Code: Select all
M4 -R m4nfo_trains.m4 < test.nfx > test.nfo
copy count.m4 + test.nfo test.tt
M4 < test.tt > test.nfo
grfcodec -e test.grf
HTH
Michael
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
Thanks. One small question: where I must set trains module?
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: M4nfo installation problem.
Where it can be found by M4, depending on your path settings.Tony Pixel wrote: One small question: where I must set trains module?
E.g., for my DBXL train set, directory structure is like this:
Code: Select all
- m4nfo (modules)
- newvehicles
-- DBXL09 (dbxl.m4, names.m4, templates, dbxl09*.grf)
--- sprites (bmp, png, nfx and nfo files)
Code: Select all
include(dbxl.m4)
include(dbxl_templates.m4)
include(names.m4)
setfeature(_TRAIN)
setpath(C:\eigene~1\mb\ttdlx\sprites\newvehicles\DBXL09\sprites)
HTH
Michael
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
Oh, I don't understand anything:
-I loaded m4nfo source from http://ftp.gnu.org/gnu/m4/ (1.4.18);
-I created dir D:\m4nfo and loaded files from arhive;
-I downloaded m4nfo_trains and loaded files from arhive to dir too;
-Now I go at cmd and type : but system "can't find the file";
What I made wrong?
-I loaded m4nfo source from http://ftp.gnu.org/gnu/m4/ (1.4.18);
-I created dir D:\m4nfo and loaded files from arhive;
-I downloaded m4nfo_trains and loaded files from arhive to dir too;
-Now I go at cmd and type :
Code: Select all
M4 -R m4nfo_trains.m4 < test.nfx > test.nfo
What I made wrong?
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
Re: M4nfo installation problem.
That looks wrong, gnu,org is not distributing m4nfo, that code is distributed by michael blunck.Tony Pixel wrote:-I loaded m4nfo source from http://ftp.gnu.org/gnu/m4/ (1.4.18);
gnu.org does host the M4 project, a generic macro processor, that is used by micheal for converting m4nfo to nfo. That is, m4nfo is a set macro's for m4. "m4" and "m4nfo" are very different things!
However, "host a project" means they maintain the source code of M4. That is also what they distribute, by the looks of it, or did they include a "m4.exe" or "m4.com" file?
You can create an m4.exe from that source code (probably), but you likely need a C compiler for that.
You better find an m4 executable, eg at mingw, but there may be others, as I said a few posts ago.
[quote="Tony Pixel"-Now I go at cmd and type :
Code: Select all
M4 -R m4nfo_trains.m4 < test.nfx > test.nfo
Which file? There are 4 files named in that line. Please be precise. My guess is "M4", but don't know without proper error message.
Try stating the full path to m4.exe as first argument (and if you have spaces in that path, surround it with double quotes, or change it to a path without spaces!!)
EDIT: Start with getting a version number from m4, with "m4 --version".
That should give something like
Code: Select all
m4 (GNU M4) 1.4.17
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Rene' Seindal.
Being a retired OpenTTD developer does not mean I know what I am doing.
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
Ok, where I can download m4NFO?
P.S. I haven't file test.nfx.
P.S. I haven't file test.nfx.
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: M4nfo installation problem.
You told me that you checked out this page which explains where and how to download the needed software.Tony Pixel wrote: Ok, where I can download m4NFO?
P.S. I haven't file test.nfx.
"test.nfx" is just a placeholder in the example given above. In fact, it is your m4nfo source file, which you may name whatever you like.
HTH
Michael
Re: M4nfo installation problem.
I think there's some confusion here because that install.html page doesn't actually link to any downloads. I would start with the top level manual,
http://www.ttdpatch.de/grfspecs/m4nfoManual/
and work through the installation pages.
For convience, the page with download links for the tools is http://www.ttdpatch.de/grfspecs/m4nfoManual/Basic.html
The m4nfo downloads are at http://www.ttdpatch.de/grfspecs/m4nfoMa ... nload.html
http://www.ttdpatch.de/grfspecs/m4nfoManual/
and work through the installation pages.
For convience, the page with download links for the tools is http://www.ttdpatch.de/grfspecs/m4nfoManual/Basic.html
The m4nfo downloads are at http://www.ttdpatch.de/grfspecs/m4nfoMa ... nload.html
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: M4nfo installation problem.
Thanks, you´re definitely right. I did link to said page since the OP initially reported about having problems with "installing" and how to "start the work":rowdog wrote: I think there's some confusion here [...]
and later reported problems with "entering commands", etc.Tony Pixel wrote: Can anyone explain me how to install modules in m4nfo and how to start the work
In fact, it seems that he has more problems than with a proper installation. Hopefully now the given links will be of any help.
regards
Michael
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
I think is better if I will learn NML.
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: M4nfo installation problem.
Good luck with installing all the Python stuff and with the usual make problems.Tony Pixel wrote: I think is better if I will learn NML.
regards
Michael
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: M4nfo installation problem.
I didn't think what m4 is bad, I have so many problems with it.michael blunck wrote:Good luck with installing all the Python stuff and with the usual make problems.Tony Pixel wrote: I think is better if I will learn NML.
regards
Michael
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
Who is online
Users browsing this forum: No registered users and 19 guests