Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: penguin on August 05, 2002, 07:48:26 am

Title: Launcher and config management
Post by: penguin on August 05, 2002, 07:48:26 am
I am starting to think that we need a launcher, if for no other reason than to "install" and manage the fs2_open configuration in the registry.

I think we should use a new registry key (rather than the existing "HKEY_LOCAL_MACHINE\Software\Volition\Freespace2") so we don't muck up anyone's retail build settings.

Initially, the launcher would have these capabilities:
Later features might include:
Title: Launcher and config management
Post by: penguin on August 05, 2002, 07:54:40 am
Also, post any suggestions about new config params we might need.

DTP was kind enough to post the current ones in this thread (sorry, I don't know how to like to a specific post) http://www.hard-light.net/forums/index.php/topic,8838.0.html

The first one that comes to mind is the patch RandomTiger did: http://www.hard-light.net/forums/index.php/topic,9014.0.html  It fixed awful-looking text on GF4 cards, but makes text look awful on my ATI RAGE.    We want both versions (so text looks nice for everyone), but need a way to specify the formula to use... a registrty setting would be perfect for this.
Title: Launcher and config management
Post by: Bobboau on August 05, 2002, 09:21:24 am
also this launcher thing would be good for updateing when ever we have a new version up
Title: Launcher and config management
Post by: penguin on August 05, 2002, 12:50:12 pm
Quote
Originally posted by Bobboau
also this launcher thing would be good for updateing when ever we have a new version up
Hmm, well, open source projects tend to release updates more than commercial software... (people don't necessarily want to D/L a new version every week ;))

But your point is well taken -- maybe a link to the "official" fs2_open page, maybe even a MOTD type of thing, displaying what the currently-released version is... the player can D/L or not at their discretion.
Title: Launcher and config management
Post by: phreak on August 05, 2002, 02:20:59 pm
I can work on this because i will be out of town for about a week on saturday.  it will give me something to do.
Title: Launcher and config management
Post by: penguin on August 05, 2002, 02:34:18 pm
My request: keep it simple, please :)

Try to keep the UI separate from the logic and the back-end (the registry), it will make it so much easier to port to another platform.  If you could avoid MFC entirely, that would be nice :nod:
Title: Launcher and config management
Post by: phreak on August 05, 2002, 08:42:02 pm
sounds like fun...


nothing spells fun like windows
Title: Launcher and config management
Post by: penguin on August 05, 2002, 09:00:44 pm
BTW when I mean simple, let's get it to work first ;)  I think it would be adequate to have a dialog box with 2 or three buttons on it, kinda like the launcher for FS:TGW, but they were fancy and had a image on it too.

Keeping it simple means no MFC crap as I've posted already (but it bears repeating... ;))  A simple WinMain routine and its callbacks should be all we need for a UI this simple.

I think our registry key in Windows should be HKEY_LOCAL_MACHINE\Software\fs2_open  -- any objections?
Title: Launcher and config management
Post by: WMCoolmon on August 05, 2002, 11:46:19 pm
Quote
Originally posted by penguin
I think our registry key in Windows should be HKEY_LOCAL_MACHINE\Software\fs2_open  -- any objections?

HKEY_LOCAL_MACHINE\Software\FSSCP\fs2_open :nod:
Title: Launcher and config management
Post by: penguin on August 05, 2002, 11:51:22 pm
Quote
Originally posted by WMCoolmon

HKEY_LOCAL_MACHINE\Software\FSSCP\fs2_open :nod:
Oh yeah, forgot our "company name" ;7
Title: Launcher and config management
Post by: phreak on August 06, 2002, 09:15:45 pm
what registry keys do you want?

right now there is only a dword "installed" set to 1.

and i have a simple version running



edit: clarification
Title: Launcher and config management
Post by: penguin on August 06, 2002, 09:38:39 pm
See DTP's post in the other thread -- I think he dumped all the keys under Freespace2.  We should (for starters) copy all of that to our key.  Or fire up regedit.exe on your machine and poke around...

Alternatively, grep through the source and see what values are actually being read from the registrty... this might be preferrable, since we wouldn't inherit any "cruft" that's no longer needed.
Title: Launcher and config management
Post by: penguin on August 06, 2002, 09:41:45 pm
Quote
Originally posted by PhReAk
and i have a basic version running
...and I hope you're using that word in the generic sense -- please don't tell me you wrote it in VB :eek:

;)
Title: Launcher and config management
Post by: phreak on August 06, 2002, 09:44:58 pm
Quote
Originally posted by penguin
...and I hope you're using that word in the generic sense -- please don't tell me you wrote it in VB :eek:

;)


heh.. generic sense
Title: Launcher and config management
Post by: LtNarol on August 06, 2002, 10:40:45 pm
how bout putting the new exe in the same folder as the regular fs2 only with the file name different? the launcher can run that engine instead of the regular and still use the same data files without the need to copy and paste everything, user can still play the regular fs2 as well without needing to reinstall or anything.
Title: Launcher and config management
Post by: WMCoolmon on August 06, 2002, 11:04:12 pm
I like...then from the launcher you can choose which Freespace you want to start, as well as version-specific command line options :nod:
Title: Launcher and config management
Post by: phreak on August 08, 2002, 10:08:14 am
anyway we could put the launcher code in CVS so whoever else wants to work on it can?
Title: Launcher and config management
Post by: Inquisitor on August 08, 2002, 12:07:03 pm
Yes, have some :)
Title: Launcher and config management
Post by: phreak on August 09, 2002, 12:18:22 am
i have a zip file up if anyone wants to take a look what i've done so far.. code included along with a release build.  I'm going to be gone for a week so if anyone wants to add to it, go ahead.

http://xphr34kx.tripod.com/fs2_open_launcher.zip

edit: right click and do "save as..." for it to work
Title: Launcher and config management
Post by: EdrickV on August 09, 2002, 09:18:47 pm
With Borland C++ Builder I can make a working launcher without too much trouble. Below is a screenshot of an incomplete one I put together in a couple hours. It can copy over all the data from the original FS2 registry key to a seperate one (the same key the other launcher here uses) if that key doesn't exist. It also doesn't need an "Installed" value to tell if it's been "installed." It checks for the fs2_open key itself. The version I have can change between the 4 graphic modes I know of (Glide low res, glide high res, d3d low res, d3d high res) and lets you chose between DirectSound and No Sound. Other options could be typed in and are added to the list when you hit enter within the field. It can store those two settings to the registry and retrieve them.

(http://members.aol.com/ArisKalzar/Launcher.jpg)

In addition to adding stuff for the other registry options I think I could add support for storing arbitrary data in the registry for use while testing new options or for changing options that aren't normally listed. I am sure I can add support for running multiple exe's from the same launcher. (Including exe files not in the launcher's folder.)

The one thing that could be problematic is that I don't know what all the possible values are for the various registry entries. (Videocard and soundcard in particular.) That's one reason why it would start by copying over the original FS2 data.

One thing I know I can't do is integrate support for something like the Update feature in the original launcher as BCB 1 doesn't have any controls I know how to use for things like FTP access or file downloading.
Title: Launcher and config management
Post by: penguin on August 09, 2002, 09:29:49 pm
I suspect (not sure about this) that there's a way to launch a DirectX setup dialog (ever notice that most games have the same DX config screens?)  Some digging around in the DX documentation would probably reveal how to do this.  Then I assume you would just take the settings you're interested in (videocard, etc.) and store those.

AFAIK no one has compiled a definitive list of all the registry keys used by FS2, but it wouldn't be too difficult.
Title: Launcher and config management
Post by: EdrickV on August 09, 2002, 09:45:17 pm
I haven't seen any games that looked like they used the same config screen for DirectX stuff. I know FS1, FS2, and Descent 3 look similar, but not the same. Don't have any really new games so don't know about them.
Title: Launcher and config management
Post by: RandomTiger on August 11, 2002, 11:09:54 am
Might be worth taking a look at the AppWizard in DX8.1 SDK. Provides you with some some basic directX detection stuff.
Title: Launcher and config management
Post by: EdrickV on August 11, 2002, 03:58:17 pm
I can't use AppWizard. That is for VC++ 6.0. I only have 4.0 and don't even use it. (I have Borland C++ Builder 1.0 which is what I built my program with. It's really old, but it works.)
I also can't compile the original release of the FS2 code because, like I said above, I don't have VC++ 6.0. I can do the GCC port, (aka fs2_open) but that doesn't have ports for FRED2 or ModelViewer so I can't compile them which, in turn, limits what I can do myself with the source code.
Title: Launcher and config management
Post by: Fozzy on August 16, 2002, 04:07:18 pm
is there any way you can make it so you can possision the buttons and replace the pictures.

example:

skins

skins could work off a custom file called .fss or freespace skin(e.g. yourskinname.fss)

the .fss file will contain the names of all the pictures and .ini's needed in a sequential text file .

you can posision the buttons using an ini file (e.g. yourskinnname.ini)
Title: Launcher and config management
Post by: penguin on August 16, 2002, 04:45:25 pm
Quote
Originally posted by Fozzy
is there any way you can make it so you can possision the buttons and replace the pictures.

example:

skins

skins could work off a custom file called .fss or freespace skin(e.g. yourskinname.fss)

the .fss file will contain the names of all the pictures and .ini's needed in a sequential text file .

you can posision the buttons using an ini file (e.g. yourskinnname.ini)
This is planned :)
Title: Launcher and config management
Post by: RandomTiger on September 25, 2002, 02:47:50 pm
Just for the record the DX8 branch has its own built in mini launcher for selecting a mode.