News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Problem with nightly built pak128.sweden-ex

Started by Ves, April 01, 2019, 05:30:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ves

I am experiencing a very weird behavior from the nightly built pak128.sweden-ex. While my local copy of the pakset, as well as a vanilla version downloaded as a zip from the Github repository compiles fine using the included batch file (from the Github repository), the nightly compilations doesnt compile certain dat-files.

I can think of two different reasons:
* The Makeobj I am using (which is about a year old) compiles the files fine, while the new Makeobj compiled by the nightlies are more sensible. (Side question: Can you download a Makeobj for Windows in the nightlies?)
* The pakset "Makefile" (or the makefile that the nightlies uses) interprets *something differently (*read below)

Let me explain what I have done that put me in this position:
Recently, I have been adding some new buildings to the pakset, among others some new townhalls. During this process I have also renamed one of the folders containing the graphics. I believe I have found and corrected every single instance of reference to the old folder structure.

The specific objects in question are some buildings located in this folder: https://github.com/VictorErik/Pak128.Sweden-Ex/tree/master/Buildings/City%20buildings.
If you take a look in the nightly built pak128.sweden-ex (found here: http://bridgewater-brunel.me.uk/downloads/nightly/pakset/) you can see that it contains only "building.Se_1890_RES_City_House_1_City.pak" as well as "building.se_cityhall_small_1900.pak", and the cityhall is 1kb so it has not compiled properly. That suggests that the compiler read through and compiled the datfile called "building.RES.1890_City House_1.dat" completely (it contains only one building) but stopped trying to read through "townhall.dat", where the small cityhall is indeed the first object. It appears it has not attempted to compile the two other datfiles ("building.RES.1850_brick_house.dat" and "building.RES.1700_red_wooden_house.dat") as there are no traces of those buildings in the compiled pakset.

What makes this REALLY frustrating is that it compiles fine when I compile it on my computer. As written above, I have only compiled it with my 1 year old makeobj and with the batchfile. I have not come around to compile my own new makeobj as I get some new linker error (error LNK2001: unresolved external symbol _png_set_longjmp_fn)...

Would any of you be able to see if I have done anything wrong in the Makefile (which I believe the nightlies uses) or have any other clue as to what might be happening?
In the meanwhile, I can only trial and error once a day, since I need to wait for the nightly compiled pakset to see if my tweaks have worked or not...  :o :coffee:

jamespetts

There should be an up to date Windows Makeobj in the Bridgewater-Brunel's download repository.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

The only Makeobj I can find is in the folder "linux-x64". Isnt that only for Linux? When I try with that one (adding ".exe" at the end of filename) it pops up a window telling me that it cannot work in my 64 bit environment.
In the "Windows" folder there is no file called "makeobj" or with that in its name. When downloading the complete package, there is no makeobj included either.

Are you sure it is compiling a windows makeobj?

jamespetts

The Makeobj is manually compiled and so is not in the nightly folders. It can be found here.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

With that Makeobj it does indeed compile as it did with the Makeobj I had, which rule out that it is the fault of the Makeobj. Then it must be something that interferes when the nightly build attempts to compile it. May I ask, what file specifically does the nightly use to locate all relevant datfiles? Is it the "Makefile" in the Github repository?
In which case, would you be able to attempt to compile it manually on your Linux computer using that file, so we can see wether that has any succes, and if not, perhaps an error.txt could be generated to see what file is disturbing the process?

jamespetts

Quote from: Ves on April 01, 2019, 08:39:11 PM
With that Makeobj it does indeed compile as it did with the Makeobj I had, which rule out that it is the fault of the Makeobj. Then it must be something that interferes when the nightly build attempts to compile it. May I ask, what file specifically does the nightly use to locate all relevant datfiles? Is it the "Makefile" in the Github repository?
In which case, would you be able to attempt to compile it manually on your Linux computer using that file, so we can see wether that has any succes, and if not, perhaps an error.txt could be generated to see what file is disturbing the process?

Yes, it is the makefile that does this. You can test the makefile on Windows using a VM or MinGW.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

#6
the problem is in townhall.dat. It uses backslashes \ for directory delimiter, and therefore it does not work on Linux. Use forward slash / and ti will be OK.
Also I was surprised why you use path .././something.  the single dot is redundant ../something means the same path.

I also tried to set build_time (0,100,1000) to the halls so that they appear in appropriately sized towns, but then only the smallest town hall was used. I reduced the values to 0,10,100 and it did not help. Towns have population >1000 and still only the smallest hall is used. Is there also some scaling with tiles/km involved?

DrSuperGood

Quotethe problem is in townhall.dat. It uses backslashes \ for directory delimiter, and therefore it does not work on Linux. Use forward slash / and ti will be OK.
You mean that is still a problem in 2019?! I mean Windows has accepted both by default for decades now...
Changing the dat files to fix this is not really a good solution. One needs to fix path resolution from the makeobj side so that it accepts both kinds of path delimiters and interprets them appropriately for the platform.

prissi

makefile does not accept path delimiters at all. People happily used shift-JIS in filenames on Windows98 and it worked on windows. But backlash is a special character for C and can result in strange parsing of characters, hence using "/" is the bettter way out.

Ves

Thank you guys, I had not thought of that! It is now corrected, so lets see what the nighlies are saying tomorrow!

As to the "./", that is something I found in the british pakset, and I just never questioned it. Is it possible to omit that part (so the line now would read =../Images/Modular Buildings/Brick Buildings/brick_buildings_cityhall_1900.7.0)?

Vladki

Yes,    ./  can be omitted. It just says stay in the same directory.

Ves

Ok thanks!
And now the nightlies have compiled fine the buildings, so thank you much for that as well! I will try to keep remembering that part :P