But I only have to recompile once!. I can then distribute the executable with all the TCs. That's not the same thing as having to recompile 10 times and distribute. And the reason why the launcher text doesn't change is precisely because it requires a recompile to do it and I'm the only person who has bothered (at least with a released version).
Is it really once? As far as I can tell Linux got only two official releases, FS2 and BTRL. Each of them has different home config dir (~/.fs2_open and ~/.btrl_demo) and they are hardcoded. WCS and TBP doesn't have any, but I made compilations of them for myself and hardcoded their dirs as well (~/.tbp, ~/.wcsaga). So the binaries differ in the same way launcher one would.
A big trend in the SCP is moving hardcoded options into tables so that developers can get at them. This is just more of the same.
Then please, make me an option that would give me current binary home config dir :-)
WMC has presented an explanation along the lines of what I was thinking of. There are some differences but I like his way better.
I get the idea of WMC, the thing is its impossible to be done now with current SCP. The reason is above. Every TC (fs2/btrl at least) got different home config dir and putting configs of btrl to ~/.fs2_open wouldn't be the best option IMO. More about it below.
I'll take a look at it. Although 3.6.9 official does use that stuff so unless you're planning to make your launcher only support 3.6.10+ you might need to set it.
Let's just say I'm planning on making it OGL only. It would still work on pre 3.6.10 (as long as we dont complicate the following too much).
So going back to topic. My proposition is following: I get developing it further as it is now until we can solve the following:
1. Launcher is in game dir. Lets assume I will be able to find the gamedir statting symlink somehow.
2. Launcher has two config files (hard/soft). One per TC (in game dir), one per user (in home config dir).
3. Launcher has to be able to find home config dir. And this is to be taken care of by SCP developers somehow. Like I wrote above for now every TC gets another home config dir. Every TC should have different place to store its config files IMO (for diffent mods, for different flags etc, f.e. -tbp). For the above reasons let's change the UID thing into home config dir value stored in hard config. Then its possible. But this could lead to breaking the launcher by breaking its config (or making the launcher not working at all by removing the hard config file) and I dont like it. The easiest way IMO would be to give SCP a cmd line switch that would return current binary home config dir. If I run onto a binary that doesn't (pre 3.6.10) I assume its ~/.fs2_open. This way launcher doesn't need hard config file provided at all to work (in a limited way of course, without welcome text etc, but still). Comments?
EDIT: Ok, I've read WMC's post once more and found a thing I missed first time. FS2 binary uses hard config file as well to see which home config dir it should use. This is much better then above (another cmd line flag). I suppose that if it wont find it it assumes HOME/.fs2_open (or any other thing on other platforms, where launcher would assume the same). So if devs would agree on that please implement it in SVN, so I could move one. Additionally I'd like dev to speak on hard config file name and its content. (still launcher6.ini with additional section? this could be good as TC could provide defaults for flags f.e.).
This way we really could have one fs2 and one launcher binary for all the TC's.