News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

makeobj versions info to console

Started by Frank, October 08, 2017, 02:20:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frank

Since version 120 ( makeobj 55.4 ), no version information is output at Makeobj.

This is less good, because you can no longer understand with which version a pak file was created.

With the online data, the console output is packed into the zip file.

Makeobj version 49 for simutrans 101.1 Nightly and higher
(c) 2002-2006 V. Meyer , Hj. Malthaner, M. Pristovsek ...
...


Makeobj version 50 for simutrans 102.2.1 Release candidate and higher
(c) 2002-2006 V. Meyer , Hj. Malthaner, M. Pristovsek ...
...


Makeobj version 55.1 for Simutrans 112.1 and higher

(c) 2002-2012 V. Meyer, Hj. Malthaner, M. Pristovsek & Simutrans development team
...


55.4 and 60 not this output

makie

QuoteMakeobj version 60.0 for Simutrans 120.2.2 and higher
writing file flos.pak
   reading file ./flos.dat
      packing vehicle.Flos
      packing vehicle.Flos_Anhaenger
makeobj from OpenSUSE Game Repo

Frank

#2
The version info is output on the console. However, it is no longer redirected to the file with.

Compare the following views

./makeobj

./makeobj >info.txt


Ters

This changed way back in 2013, r6888. When run without arguments, version information is only written to stderr. You only redirected stdout in your examples above. If run with "verbose" or "debug", it also prints version information to stdout.

There is however an oddity in the code. Printing version information to stdout happens if log level is 2 or higher. 2 is the default, "quiet" sets it to 1, "verbose" to 2 and "debug" to 3. However, the logging happens inside the loops looking for "debug", "verbose" and "quiet", so it is never done on default log level after all.

Frank

#4
The additional outputs of debug and verbose appear again only on the console and not in the redirected file.

Therefore, they are useless if, as with the online-dat, the console is not visible.

Quote from: Ters on October 09, 2017, 08:14:16 PM
...
There is however an oddity in the code. Printing version information to stdout happens if log level is 2 or higher. 2 is the default, "quiet" sets it to 1, "verbose" to 2 and "debug" to 3. ...

This is not quite true.

debuglevel=1 - quiet
debuglevel=2 - default
debuglevel=3 - verbose
debuglevel=4 - debug


So the default=2 should output the version info since after this code.
makeobj.cc line 45-48
if(  debuglevel>1  ) {
puts( "\nMakeobj version " MAKEOBJ_VERSION " for Simutrans " VERSION_NUMBER " and higher\n" );
puts( "(c) 2002-2012 V. Meyer, Hj. Malthaner, M. Pristovsek & Simutrans development team\n" );
}


Only this code is within the evaluation for the parameters that are not executed if none of these 3 parameters are specified.

Therefore, quiet is superfluous because the default causes the same.

Ters

You cut my quote too short. I went on to state the same things you did. Default and quiet does not log version to stdout, although the former probably was intended. Debug and verbose does log to stdout. It is always logged to stderr.

makie

May be this helps
Quotestdout and stderr -> Datei umleiten

programm &> Datei.txt
makeobj PAK128 &> into.txt

Frank

i moved the copyright if out of while and compile new and works


prissi