The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Roboron on June 05, 2024, 09:43:31 AM

Title: Reading simuconf.tab on singleuser installs
Post by: Roboron on June 05, 2024, 09:43:31 AM
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.
Title: Re: Reading simuconf.tab on singleuser installs
Post by: TurfIt on June 05, 2024, 07:47:55 PM
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.
Title: Re: Reading simuconf.tab on singleuser installs
Post by: Roboron on June 05, 2024, 07:56:41 PM
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...
Title: Re: Reading simuconf.tab on singleuser installs
Post by: makie on June 05, 2024, 08:00:25 PM
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.
Title: Re: Reading simuconf.tab on singleuser installs
Post by: TurfIt on June 05, 2024, 08:16:44 PM
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.
Title: Re: Reading simuconf.tab on singleuser installs
Post by: makie on June 05, 2024, 08:27:58 PM
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.
Title: Re: Reading simuconf.tab on singleuser installs
Post by: prissi on June 06, 2024, 03:31:29 AM
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.
Title: Re: Reading simuconf.tab on singleuser installs
Post by: Roboron on June 07, 2024, 06:05:14 AM
Thank you. My future me will appreciate not being confused by this again.
Title: Re: Reading simuconf.tab on singleuser installs
Post by: TurfIt on June 09, 2024, 03:47:55 AM
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"
Title: Re: Reading simuconf.tab on singleuser installs
Post by: prissi on June 09, 2024, 08:02:52 AM
Please submit your pacth.

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