Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: sanmadjack on August 20, 2009, 04:51:10 pm

Title: [RELEASE] fs2_open#Launcher (Linux, Windows, with installers and debs)
Post by: sanmadjack on August 20, 2009, 04:51:10 pm
I know there's supposed to be an official cross-platform launcher somewhere down the line, but I wanted a launcher now. I'm impatient. So far it works on Windows and Linux (tested on Ubuntu anyway). The Linux build technically might work on OS X, but I have no way of verifying it. I've created packages:

Windows (now using NSIS, but still requires .NET and includes Gtk# for .Net)
http://sourceforge.net/projects/fs2openlauncher/files/v.0.2/fs2open-sharp-launcher-0.2-1.exe/download (http://sourceforge.net/projects/fs2openlauncher/files/v.0.2/fs2open-sharp-launcher-0.2-1.exe/download)
Note: If you installed 0.1 or 0.2, you should uninstall them before installing this, just so you don't have two different uninstallers pointing to the same place.

Ubuntu Jaunty (requires Mono and Gtk# for Mono)
http://sourceforge.net/projects/fs2openlauncher/files/v.0.2/fs2open-sharp-launcher_0.2_all.deb/download (http://sourceforge.net/projects/fs2openlauncher/files/v.0.2/fs2open-sharp-launcher_0.2_all.deb/download)

Other Linux (ditto)
http://sourceforge.net/projects/fs2openlauncher/files/v.0.2/fs2open-sharp-launcher-0.2.tar.gz/download (http://sourceforge.net/projects/fs2openlauncher/files/v.0.2/fs2open-sharp-launcher-0.2.tar.gz/download)

It supports all the switches listed in the wiki as well as providing a spot for custom switches, and can change resolution and colour depth on both Windows and Linux. It mimics how the Windows launcher records Antialiasing and Anistropic filtering settings, so when fs2_open finally rolls out it's support for those settings it should be ready. And probably most importantly, it detects mods in the install folder and gives you a convenient drop-down list to pick from, respecting all the mod.ini settings. Also featured is an Output tab with two text boxes, one that displays errors outputted by fs2_open, and the other non-error output. Quite helpful while running release candidates on Windows, where a console isn't quite as convenient as other platforms.

[0.2 Changes]

* To make The E's life easier I added 1440x900 to the resolution list. I know manually adding resolutions is not a long-term solution, but it's all I got right now.
* Made the unix mouse grabbing switch not appear on Windows. Were there any other that didn't apply to Windows? I didn't notice any...
* Added a sound device picker, but it doesn't populate yet, so it's just Generic Software
* Added controls for the Speech Synthesis, but the voice picker doesn't populate yet so just Default Voice
* Added General Graphic Settings. Not sure if it really does anything anymore, but it's there
* Added Joystick settings, but (again) the joystick list doesn't populate, so it's None or first detected joystick.
* Added Network options
* Added a text box to the Done! tab showing the resulting command line arguments
* Bundled the Gtk libraries with the installer, so as long as you at least have .NET you're good to go
* Various bug fixes and behind the scenes cleanup

Some screens:

(http://i913.photobucket.com/albums/ac337/sanmadjack/start.jpg)
The Start Tab
(http://i913.photobucket.com/albums/ac337/sanmadjack/video.jpg)
The Video Tab
(http://i913.photobucket.com/albums/ac337/sanmadjack/mods.jpg)
The Mods Tab
Title: Re: [RELEASE] fs2_open#Launcher
Post by: The E on August 20, 2009, 05:11:35 pm
Hey, good one.

Here are some notes:
1. During the install process, I get this message:
(http://i659.photobucket.com/albums/uu320/FabianW/Installerclarityfail.jpg)
I would appreciate it if you would tell the user where link is leading him or her before I say yea or nay.
Second, external framework dependency is bad.
Third, compared to the old installer's "Download, unzip, drop in FS2 directory" install method, this is slightly unwieldy.
2. The Launcher itself: Good job on the design, I really like the layout. Now, the bad:
(http://i659.photobucket.com/albums/uu320/FabianW/Launcherresolutionfail.jpg)
Why can't I choose my native resolution? 1440x900, in this case?
Why do I get options that are not applicable for my OS?
Why doesn't it use the polling mechanism the standard Launcher uses to get the flags supported by this build?
Could you please remove the emoticons from the sound page? Sometimes, disabling the sound is a necessity, and although I'm not happy about it, I don't need the Launcher to tell me that this is not awesome.
Also, please remove your personal opinions from the flag descriptions.
Why don't I get to see the command line the Launcher generates? I would like to see what this thing does? On the same note, why doesn't it read the cmdline_fso.cfg file?
Why is it missing several options present in .11 builds?

So, all in all, a good start. But it needs refinement in a few critical areas before I would consider it a full replacement for the standard Launcher.
Title: Re: [RELEASE] fs2_open#Launcher
Post by: sanmadjack on August 20, 2009, 05:33:02 pm
Many good points, thank you for the prompt feedback.

The external dependency probably isn't going anywhere. I'm primarily writing this for Linux, specifically Ubuntu, and using the GTK framework is the more convenient option for users there. Plus I enjoy working with it more than WinForms. As I'm writing this I'm realizing that I could just bundle the required libraries. Hmm.

Resolution detection is one of the goals I would like to meet, but documentation in that area has so far eluded me short of including OpenGL and asking the adapter. So, I made a list of common resolutions, and allowed users to enter a resolution in the tragic case that theirs is not among the list. If you know of any resources that could help me detect resolutions, I would be quite happy to implement it.

As I stated, I supported every switch in the wiki, which looks to only be up to about .9 or .10. The wiki doesn't have a switch for listing supported switches, and I did not determine how the official launcher checks the available switches. Is there a reference I can consult, or can I know the magic trick to get them out of the executable?
Title: Re: [RELEASE] fs2_open#Launcher
Post by: The E on August 20, 2009, 05:46:34 pm
Ask Goober or the other SCP people where you can find the Launcher's sourcecode? I would love to tell you how to do this, but unfortunately, I have no idea where to find it either.
All I know is that the Launcher reads the command line info from the executable. That's how you get differing feature lists for 3.6.9, 3.6.10 and 3.6.11 builds.
Title: Re: [RELEASE] fs2_open#Launcher
Post by: Galemp on August 20, 2009, 09:58:22 pm
NICE!!! I've been wanting a good FS2 Ubuntu launcher!!
Title: Re: [RELEASE] fs2_open#Launcher
Post by: chief1983 on August 20, 2009, 10:15:39 pm
Windows launcher source is in the main SVN repo.  Also, YAL has worked for some time I think.  It's also open source, if you know where to look.  Qt instead of GTK based though.  My only complaint is that cross platform really needs to mean all three platforms, otherwise it's not much better than 3 different launchers.
Title: Re: [RELEASE] fs2_open#Launcher
Post by: sanmadjack on August 20, 2009, 11:01:31 pm
OS X support is something I will work toward, there's a Mac at work I can use in the off hours to work on it. I spent the afternoon working on improving the windows support, adding a bunch of windows-specific (right now, anyways) options. I updated the first post with the information on 0.2. I'll do more work on this after I've hammered out some outstanding bugs in my other project, MASGAU, but that'll probably be some time next week.
Title: Re: [RELEASE] fs2_open#Launcher
Post by: portej05 on August 20, 2009, 11:25:38 pm
I really like the UI on this one - it's down the same track I was thinking, but significantly more refined.
Keep up the good work.
Title: Re: [RELEASE] fs2_open#Launcher
Post by: Talon 1024 on August 21, 2009, 10:53:19 am
It doesn't seem to work for me on Windows XP...
Title: Re: [RELEASE] fs2_open#Launcher
Post by: sanmadjack on August 21, 2009, 01:56:35 pm
It doesn't seem to work for me on Windows XP...

I've identified the problem, and am working on a fix for it. Should be done within the hour.
Title: Re: [RELEASE] fs2_open#Launcher
Post by: sanmadjack on August 21, 2009, 06:45:15 pm
All fixed, and tested in an XP VM. I switched from MSI to NSIS for the installer, something I am much more comfortable with. As such, anyone with any previous versions should uninstall the MSI installed version before installing the NSIS installed version. I will be using NSIS from now on (and I'm probably going to start using it for MASGAU as well), so this should not be an  issue in the future.