News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Reading simuconf.tab on singleuser installs

Started by Roboron, June 05, 2024, 09:43:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Roboron

I am not sure if this is a bug, or it is actually the intended behavior. I was trying to configure the Simutrans Public Server for Simutrans 124.1, when I noticed my configuration in BASE_DIR/config/simuconf.tab was not being read.

Looking at the code, this seems to be intended, as ancient comments point that the configuration will be read from BASE_DIR/simuconf.tab on singleuser installs, and not from BASE_DIR/config/simuconf.tab.

However, I am pretty sure Simutrans 123.0.1 was reading config from BASE_DIR/config/simuconf.tab, so that has changed, intentionally or not. I am a little confused.

TurfIt

I don't think anything has changed there; I'm still getting base_dir/config/simuconf.tab being read/applied in portable mode.

Actually looking at code, it appears it's the -singleuser arg that's questionable.
In base_dir/config/simuconf.tab set singleuser_install = 1  and it uses that simuconf. tab for the rest of the settings. I always use this.
If you run 'sim -singleuser' then it instead uses base_dir/simuconf.tab.

That makes no sense. base_dir/config/simuconf.tab should always be read IMHO.

Roboron

Quote from: TurfIt on June 05, 2024, 07:47:55 PMIf you run 'sim -singleuser' then it instead uses base_dir/simuconf.tab.

That makes no sense. base_dir/config/simuconf.tab should always be read IMHO.

That's my case. I am using the -singleuser option, and I was expecting base_dir/config/simuconf.tab to be read, as it is part of the installation...

makie

I look and  :o
My simuconf.tab is in /home/userxxxx/simutrans/

I think a lot other User has the config also there.

Of cause in the installation dir i have never see a config file.

TurfIt

Quote from: makie on June 05, 2024, 08:00:25 PMMy simuconf.tab is in /home/userxxxx/simutrans/
I think a lot other User has the config also there.
Of cause in the installation dir i have never see a config file.
This is about the portable installation, aka singleuser install.
The base dir is the same as the user dir is the same as the install dir. i.e. everything is under simutrans/  configs, paks, addons, savegames, etc.  This way you have multiple different versions without them conflicting with each other - they're all self contained.

makie

Quote from: TurfIt on June 05, 2024, 08:16:44 PMThis is about the portable installation, aka singleuser install.
The base dir is the same as the user dir is the same as the install dir. i.e. everything is under simutrans/  configs, paks, addons, savegames, etc.  This way you have multiple different versions without them conflicting with each other - they're all self contained.
Yes, I can´t see why singleuser change the location or order in which the config is read.
1. installation config/simuconf.tab
2. pak  config/simuconf.tab
3. user dir  simuconf.tab
If everything is in the same directory, I still see no reason to do anything differently.

prissi

It should read BASE_DIR/config/simuconf.tab first, then pak's, and then user's (which is BASE_DIR/simuconf.tab for portable).

Skipping the BASE_DIR/config/simuconf.tab with "-single_user" makes no sense and is indeed an errors and is corrected in r11277.

Roboron

Thank you. My future me will appreciate not being confused by this again.

TurfIt

pak_file_path=pak/  is not being applied correctly from BASE_DIR/config/simuconf.tab
Attached patch fixes, however why is PATH_SEPARATOR being appended to env_t::pak_name everywhere?  You end up with 'pak/\' which screws up several windows.  The append is also with 'sim -objects pak/' requiring 'sim -objects pak' to work contrary to the instructions of 'sim -h'  --> " -objects DIR_NAME/  load the pakset in specified directory\n"

prissi

Please submit your pacth.

I am not against having also "-objects pak" working, it reduces another error source