Author Topic: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).  (Read 63545 times)

0 Members and 1 Guest are viewing this topic.

Offline Havner

  • 26
[RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
OUTDATED, new release here: http://www.hard-light.net/forums/index.php?topic=68413.0

===========================================================

svn://vega.livecd.pl/yal/trunk

----------------------------------------

Yes, I know there is going to be new portable launcher for 3.7 and I know about old Linux GTK based but it wasn't portable, had less functionality and the download seems to be lost.
In general it drove me crazy that we don't have anything nice for Linux now. So I started to write a new launcher with two assumptions:

- copy look&feel&functionality from the windows one
- make it as much portable as possible
(using QT4, splitting non-portable code to platform specific files, etc), this way maybe one day (if 3.7 will get delayed) we could have one coherent 3.6.x launcher for all platforms with one code base (but still much remains to achieve that).

This is the first public version. For now it works only on Linux (though I think it should run on Mac OS X with minor changes), and only first 3 tabs (Welcome/Features/MOD) are implemented, but still it allows Linux people to select flags/mods in convienient way, no more command line or editing cmdline_fso.cfg by hand.

Enjoy :-) and make sure to read README.

If someone would like to help with its development (f.e rewriting some windows specific things when I'll make GUI for the rest of the tabs) send me a note.



More screenshots:
http://vega.livecd.pl/~havner/yal

Code: [Select]
Yet Another Launcher.
FreeSpace 2 portable launcher.

1. Linux

Before you start you need to let the launcher know where your game is
located. This is hardcoded compile time. This way we can have the
launcher anywhere we want, f.e. in some bin/ dir and it will still work.
To do this edit src/unix/FilePaths_unix.cpp and modify GAMEDIR define.
You can uncomment the top most GAMEDIR define as well. In such case the
launcher will behave like windows one, it assumes that game is in its
current run directory and ignore any compile time paths.

If you want to have browser functionality you need to define BROWSERCMD
in src/unix/System_unix.cpp. You can leave as it is now and f.e. make
some browser script like I do and put it inside PATH dir:

#!/bin/sh
exec firefox "@"

Launcher requires QT4. Probably 4.2 or even 4.3 (I think I did use
some 4.2 functions, maybe even 4.3).

If you want to compile launcher for another game edit your yal.pro file
and ucomment _one_ of the CONFIG lines at the top of it.

To compile type:
./autogen.sh
make

If everything went fine you should have fs2_open/btrl_demo/tbp/wcsaga
binary in the current dir. Put it anywhere you want (if you compiled
with hardcoded GAMEDIR). To the game dir, to some bin/ dir included in your
PATH. You can rename it as well.

Make sure you DON'T have GAMEDIR/data/cmdline_fso.cfg file. FS2_open
merges flags from system wide and user wide files so if you do have
one all flags from it will be forced and yal won't reflect this in
features tab. Handling this is in TODO.

3. Windows
Yal for windows is distributed in binary form.
Put the appriopriate launcher to game dir and run from there.
You can put all the dll's to some System32 windows dir or just keep them
in current dir.

If you want to recompile windows version you need MinGW and GPL version
of QT. Basically its done the same way as for Linux: qmake; make;

3. MacOSX
Coming soon...

4. Common

For now launcher uses the following files:
1. ~/.fs2_open/launcher6.ini
2. ~/.fs2_open/data/cmdline_fso.cfg
3. GAMEDIR/MOD/mod.ini
4. TEMPDIR/flags.lch

ad 1. This file is read on start if it exist. If it contains proper
  exe_filepath the latter is executed inside temporary dir and flags
  are read from flags.lch (ad 4).
ad 2. If launcher6.ini does not exist or does not contain game_flags or
  they are empty there is an attempt to read cmdline_fso.cfg to fill
  initiall flags.
ad 3. This file is read from inside the active_mod dir or any other dir
  selected using GUI. Including game root dir used when actual mod name
  is empty.

Code: [Select]
yal-0.1.3
        - windows version of launcher
        - better unix/win code separation
        - cosmetics

yal-0.1.2
        - small bugfixes
        - seperate resource files and target names for all launchers
        - GAMEDIR can be current dir to behave like windows launcher
        - new Select MOD dialog window

yal-0.1.1
        - small bugfixes
        - project file included

yal-0.1
        - Initial release

For full changelog see 'svn log'.
« Last Edit: March 03, 2010, 08:43:54 pm by Havner »
Need a linux launcher? Check here.

 

Offline ni1s

  • 26
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
 :jaw:
This is awesome! Keep it up!

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
Damn sexy.

Thanks for choosing QT

EDIT

Hey, what are the dependencies for this?
« Last Edit: April 07, 2008, 04:01:11 pm by Mars »

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
Hey, what are the dependencies for this?

Dependencies in term of libs? QtGui and QtCore. Later there will be SDL and OpenAL for some HW detection. For now if you have QT >= 4.2 you should be fine.
« Last Edit: April 07, 2008, 04:12:19 pm by Havner »
Need a linux launcher? Check here.

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
I'm getting an error when I try to compile this

Code: [Select]
[email protected]:/home/ursa/Desktop/yal-0.1/yal-0.1# make
g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -Isrc -Isrc/gui -I/usr/include/qt3 -o IniParser.o src/IniParser.cpp
In file included from src/IniParser.cpp:1:
src/IniParser.h:4:18: error: QtCore: No such file or directory
In file included from src/IniParser.cpp:1:
src/IniParser.h:8: error: ‘QString’ does not name a type
src/IniParser.h:9: error: ‘QString’ does not name a type
src/IniParser.h:19: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.h:19: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.h:20: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.h:20: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.h:22: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.h:22: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.h:23: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.h:23: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.h:24: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.h:24: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.h:25: error: ‘QString’ does not name a type
src/IniParser.h:28: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.h:28: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.h:31: error: ISO C++ forbids declaration of ‘QList’ with no type
src/IniParser.h:31: error: expected ‘;’ before ‘<’ token
src/IniParser.cpp:15: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.cpp:15: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.cpp: In member function ‘bool IniParser::loadIni(int)’:
src/IniParser.cpp:17: error: ‘list’ was not declared in this scope
src/IniParser.cpp:19: error: ‘QFile’ was not declared in this scope
src/IniParser.cpp:19: error: expected `;' before ‘file’
src/IniParser.cpp:20: error: expected `;' before ‘section’
src/IniParser.cpp:20: warning: statement has no effect
src/IniParser.cpp:22: error: ‘file’ was not declared in this scope
src/IniParser.cpp:22: error: ‘QIODevice’ has not been declared
src/IniParser.cpp:25: error: ‘file’ was not declared in this scope
src/IniParser.cpp:27: error: expected `;' before ‘line’
src/IniParser.cpp:27: warning: statement has no effect
src/IniParser.cpp:30: error: ‘line’ was not declared in this scope
src/IniParser.cpp:34: error: ‘line’ was not declared in this scope
src/IniParser.cpp:37: error: ‘section’ was not declared in this scope
src/IniParser.cpp:44: error: ‘section’ was not declared in this scope
src/IniParser.cpp:48: error: ‘line’ was not declared in this scope
src/IniParser.cpp:50: error: ‘line’ was not declared in this scope
src/IniParser.cpp:53: error: expected `;' before ‘key’
src/IniParser.cpp:53: warning: statement has no effect
src/IniParser.cpp:54: error: ‘key’ was not declared in this scope
src/IniParser.cpp:54: error: ‘section’ was not declared in this scope
src/IniParser.cpp:57: error: ‘val’ was not declared in this scope
src/IniParser.cpp:61: error: ‘file’ was not declared in this scope
src/IniParser.cpp: At global scope:
src/IniParser.cpp:74: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.cpp:74: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.cpp: In member function ‘bool IniParser::dumpIni(int)’:
src/IniParser.cpp:77: error: ‘list’ was not declared in this scope
src/IniParser.cpp:80: error: ‘QFile’ was not declared in this scope
src/IniParser.cpp:80: error: expected `;' before ‘file’
src/IniParser.cpp:81: error: expected `;' before ‘section’
src/IniParser.cpp:81: warning: statement has no effect
src/IniParser.cpp:83: error: ‘file’ was not declared in this scope
src/IniParser.cpp:83: error: ‘QIODevice’ has not been declared
src/IniParser.cpp:86: error: ‘QTextStream’ was not declared in this scope
src/IniParser.cpp:86: error: expected `;' before ‘out’
src/IniParser.cpp:88: error: ‘list’ was not declared in this scope
src/IniParser.cpp:90: error: ‘section’ was not declared in this scope
src/IniParser.cpp:93: error: ‘lastSection’ was not declared in this scope
src/IniParser.cpp:94: error: ‘out’ was not declared in this scope
src/IniParser.cpp:94: error: ‘endl’ was not declared in this scope
src/IniParser.cpp:100: error: ‘out’ was not declared in this scope
src/IniParser.cpp:100: error: ‘endl’ was not declared in this scope
src/IniParser.cpp:103: error: ‘file’ was not declared in this scope
src/IniParser.cpp: At global scope:
src/IniParser.cpp:112: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.cpp:112: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.cpp: In member function ‘bool IniParser::addEntry(int)’:
src/IniParser.cpp:115: error: ‘key’ was not declared in this scope
src/IniParser.cpp:118: error: expected `;' before ‘keySection’
src/IniParser.cpp:118: warning: statement has no effect
src/IniParser.cpp:119: error: ‘keySection’ was not declared in this scope
src/IniParser.cpp:119: error: ‘key’ was not declared in this scope
src/IniParser.cpp:123: error: ‘list’ was not declared in this scope
src/IniParser.cpp:131: error: ‘section’ was not declared in this scope
src/IniParser.cpp:134: error: ‘lastSection’ was not declared in this scope
src/IniParser.cpp:138: error: ‘lastSection’ was not declared in this scope
src/IniParser.cpp:149: error: ‘struct IniEntry’ has no member named ‘key’
src/IniParser.cpp:150: error: ‘struct IniEntry’ has no member named ‘val’
src/IniParser.cpp:150: error: ‘val’ was not declared in this scope
src/IniParser.cpp:151: error: ‘dumpable’ was not declared in this scope
src/IniParser.cpp:153: error: ‘list’ was not declared in this scope
src/IniParser.cpp: At global scope:
src/IniParser.cpp:162: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.cpp:162: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.cpp: In member function ‘bool IniParser::modEntry(int)’:
src/IniParser.cpp:164: error: ‘list’ was not declared in this scope
src/IniParser.cpp:165: error: ‘key’ was not declared in this scope
src/IniParser.cpp:166: error: ‘val’ was not declared in this scope
src/IniParser.cpp: At global scope:
src/IniParser.cpp:162: warning: unused parameter ‘QString’
src/IniParser.cpp:177: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.cpp:177: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.cpp: In member function ‘bool IniParser::delEntry(int)’:
src/IniParser.cpp:179: error: ‘list’ was not declared in this scope
src/IniParser.cpp:180: error: ‘key’ was not declared in this scope
src/IniParser.cpp: At global scope:
src/IniParser.cpp:177: warning: unused parameter ‘QString’
src/IniParser.cpp:192: error: ‘QString’ does not name a type
src/IniParser.cpp: In member function ‘void IniParser::setDumpable(bool)’:
src/IniParser.cpp:206: error: ‘list’ was not declared in this scope
src/IniParser.cpp: At global scope:
src/IniParser.cpp:214: error: expected ‘,’ or ‘...’ before ‘&’ token
src/IniParser.cpp:214: error: ISO C++ forbids declaration of ‘QString’ with no type
src/IniParser.cpp: In member function ‘bool IniParser::setDumpable(int)’:
src/IniParser.cpp:216: error: ‘list’ was not declared in this scope
src/IniParser.cpp:217: error: ‘key’ was not declared in this scope
src/IniParser.cpp:218: error: ‘dumpable’ was not declared in this scope
src/IniParser.cpp: At global scope:
src/IniParser.cpp:214: warning: unused parameter ‘QString’
make: *** [IniParser.o] Error 1

I'm using Ubuntu Hardy

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
I'm getting an error when I try to compile this

[email protected]:/home/ursa/Desktop/yal-0.1/yal-0.1# make
g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -Isrc -Isrc/gui -I/usr/include/qt3 -o IniParser.o src/IniParser.cpp

/usr/share/qt3/mkspecs/default
^^^^^^^^^^^^^^^^^^^

Your system tries to compile it using QT3, this wont work. Make sure you got QT4 installed. I think the package should be named 'libqt4-dev'.
Get yal-0.1.1 (it includes generated project file) and run 'qmake-qt4' instead of ./autogen.sh

If this wont work you might need to select your actual QT version to QT4 using alternatives system (I see ubuntu uses it for QT).
« Last Edit: April 07, 2008, 09:52:14 pm by Havner »
Need a linux launcher? Check here.

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
Much obliged

 

Offline shiv

  • Don't forget Poland!
  • 211
  • FRED me!
    • http://freespace.pl
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
Awesome! I'll test it when I install Linux.
http://www.sectorgame.com/vega
The Apocalypse Vega - Join the battle! A campaign for FreeSpace 2 Open

http://www.game-warden.com/earthdefence
Earth Defense project - Coming soon...

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux for now, more to come)
Awesome! I'll test it when I install Linux.

Nice to see some polish blood :-)
Need a linux launcher? Check here.

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
Update: Windows version released. MacOSX next.

Then I'm going to implement graph/sound detection and setting (SDL/OpenAL).
Need a linux launcher? Check here.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
I hope you've implemented the graphics on the welcome screen as bitmaps loaded from disk (as with the Mod image) rather than having to include them at compile time.

Apart from that :yes:
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
I hope you've implemented the graphics on the welcome screen as bitmaps loaded from disk (as with the Mod image) rather than having to include them at compile time.

No, they are compiled as resource inside binary. Why shouldn't be they? Copyright issues? Windows launcher got them included as well.
Need a linux launcher? Check here.

 

Offline Cobra

  • 212
  • Snake on a Cain
    • Minecraft
    • Skype
    • Steam
    • Twitter
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
I personally don't like how you used buttons. I prefer the tabs, myself.
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
I personally don't like how you used buttons. I prefer the tabs, myself.

Thats because I didn't manage to wrap tabs in QT. You'd have to scroll one line of them left<>right which was even worse. I'll get back to that at some point. For now its just cosmetics.
Need a linux launcher? Check here.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
No, they are compiled as resource inside binary. Why shouldn't be they? Copyright issues? Windows launcher got them included as well.

Just cause the Windows launcher made a bad choice doesn't mean you have to copy it. :p

Ideally the Welcome text, the URLs the buttons go to and the images should all be controlled from an ini file same as they are for the mod tab. That way TBP, Wing Commander and BtRL aren't forced to recompile for Linux, Windows and Mac OS X just cause they want the launcher to take people to their readme, etc
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
Ideally the Welcome text, the URLs the buttons go to and the images should all be controlled from an ini file same as they are for the mod tab. That way TBP, Wing Commander and BtRL aren't forced to recompile for Linux, Windows and Mac OS X just cause they want the launcher to take people to their readme, etc

I made launchers for all 4 games (FS2, BTRL, WC, TBP). They are selected by CONFIG var in project file. In case that wont be enough its just a few secs to add another game. Making config file for graphics/readme etc would be very easy. The thing I dont like about it is that you have to put those files (config and graphics) somewhere making it harder to install/distribute for people. Anyway, if there will be a need for the solution you described I'll make it so :-). For now its not that important IMO. There are I think two or three more total conversion but the ones mentioned before and none of those is released afair (correct me if I'm wrong, I'll add any other game thats already released).
Need a linux launcher? Check here.

 

Offline captain-custard

  • previously known as andicirk
  • 210
  • one sandwich short of a picnic
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
has anyone managed to do this on ubuntu,im using ubuntu studio and am stupid so if some one could give me a step by step guide id be so happy ........;
"Duct tape is like the force. It has a light side, a dark side, and it holds the universe together."

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
has anyone managed to do this on ubuntu,im using ubuntu studio and am stupid so if some one could give me a step by step guide id be so happy ........;

Ok, this is blind, I dont have Ubuntu. But if it will fail just paste me the output.

Unpack tgz to some dir.
Open src/unix/System_unix.cpp and edit BROWSERCMD (described in README)
Open src/unix/FilePaths_unix.cpp and edit GAMEDIR for the game you're interested in.
Open Terminal:
Enter the dir you've unpacked tgz to (you need to be in a dir with yal.pro file)

$ sudo apt-get install libqt4-dev

$ qmake-qt4
or
$ qmake-qt4 "CONFIG+=btrl"
or
$ qmake-qt4 "CONFIG+=tbp"
or
$ qmake-qt4 "CONFIG+=wcsaga"

then:
$ make
« Last Edit: April 12, 2008, 10:42:11 pm by Havner »
Need a linux launcher? Check here.

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
use qmake-qt4 instead of make, make will give you errors if you have a qt 3 dev package about

 

Offline Havner

  • 26
Re: [RELEASE] Yet Another Launcher (Linux, Windows, OSX soon).
use qmake-qt4 instead of make, make will give you errors if you have a qt 3 dev package about

You mean qmake-qt4 instead of qmake, not make. You can't use any qmake instead of make, those give totally different functionality. qmake* generates Makefile which make uses next.
Need a linux launcher? Check here.