Linux Settings Tool - Page 3

Linux Settings Tool

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Tim thats the default windows program with the controls renamed to chinese. Its an MFC app, its not portable or it would have been ported a very long time ago.
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

Hi I am not sure, but i get the Message,

Code: Select all

./settings/Settings++: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by ./settings/Settings++)
So is there a possibility to compile it on other glibc Systems?

bye bert
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post by koshi »

Would it be possible running Settings++ on windows using the gtk+ runtime? Anybody tried it? It sure would be nice to have a cross-plattform settings tool included in the spring distribution instead of the windows-only one.

If it hasn't been tried yet and someone would give me some pointers as to how compile it for windows I'm willling to try.

edit: oops, seems I'm a little confused if you're using gtk+ directly or wxwidgets. possible substituting wxwidgets for gtk+ my posts remains.
Scram80
Posts: 16
Joined: 02 Jun 2007, 22:17

Post by Scram80 »

AFAIK there is a difference in the way the settings are stored:

Windows uses the registry, Linux does use a dotrc file (.springrc)

I Assume (i haven't looked at the code) support for windows registry spring settings must be put into the client as well - then it should work.

(Read: No, not at the moment)
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Possible yes, but there'd be no real point
(Settings++ doesn't contain code to read
or write registry keys, it was meant as a
counterpart to settings.exe rather than a
replacement).

@rudi: Settings++ doesn't impose a font
size restriction, so things may not always
display correctly depending on your WM
setup.

@bert: yes, the source is included. ;)
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post by koshi »

Kloot wrote: it was meant as a
counterpart to settings.exe rather than a
replacement
But it could be a replacement if one would implement an abstraction layer for parsing and storing the options? I haven't looked at your sourcecode yet, do you think it would be feasible?
I would even be tempted to try that if it does not mean rewriting huge chunks of the app.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Actually I think the time would be better invested in packing up the registry config class and shipping it over to the recycle bin.

There are a lot of things that the linux method has that would make lobby integration far easier, and would allow me to implement profile type systems etc.

It would also be a lot more flexible.

The registry class uses the same interface as the Linux file class, and IIRC is separated using compiler preprocessor statements so that the registry code is compiled on windows and the other way around under Linux, something which should be unified as soon as possible. Converting the MFC settings program under windows would be trivial.

I've thought about doing this for a long while but I've never gotten around to actually doing it.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post by koshi »

Alright, after looking through the sourcecode of both Settings++ and the settings handling in the engine may I conclude:
- there already is an abstraction layer with rts/System/ConfigHandler.cpp
- it differentiates mac/linux/win using conditional compiles
- were Settings++ to use this interface instead of its own FileParser.cpp it could be used on all three plattforms (disregarding possible wxwidgets issues)

Am I right? Missing something?
AF wrote:something which should be unified as soon as possible.
I agree. A single file placed in windows user "home" directory appears much more user-friendly to me than some regkeys you have to use regedit for to change.
AF wrote:Converting the MFC settings program under windows would be trivial.
This part I don't get. Converting it to what?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

converting it to use the file based rather than the registry based system. After all we don't want to force windows users to download th GTK API installer just to run a tiny program.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

I presume you've heard of static linking.

@koshi: yep, pretty much. The only problem is
that Windows doesn't have a unified concept of
/home as does Linux, hence why Spring still
depends on the registry (that, and because it
started out as a Win32 app).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

A file in the spring folder would suffice
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post by koshi »

I started to adept Settings++ to use the generic ConfigHandler instead of linux specific FileParser (that's alright with you Kloot?).

Couple of problems I've run into sofar:
- expected path issues (corrected with tips from this thread)
- my compiler (g++ 4.1.2) didn't like some implicit type conversions (right term?) from char arrays to wxString. So I wrapped all of them in appropiate functions as proposed in the wxWidgets wiki (should also avoid unicode issues).

I'm now at a point where I've successfully implemented a test call to ConfigHandler.GetInt(key,defaultValue). To fully use this I'll add the default values as fields to the Control struct.

Comments?
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post by koshi »

The adaption is somewhat complete. The code compiles ok, but I'm having problems while linking it to the relevant engine code. I've put the source in spring/trunk under tools/Settings++ and wanted to add it to the scons script. I thought that was the easiest way.
Well that was before I learned how complex that script really is (never used scons before). Anyway, after some reading in various documentations I got the source compiled via scons. That's when my trouble with said linking begins.

Here is an archive containing the source plus a diff of the SConstruct file.

The scons part for wxwidgets libs is adapted from here.

If someone could take a look at it and help that would be great. Of course I'm not set on using scons, just thought it would be easiest.

Also please tell me if I'm completely wasting my time here...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Code: Select all

tarendai@tarendai-desktop:~$ ./Settings++ 
./Settings++: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
tarendai@tarendai-desktop:~$ 
Any ideas?
obrouni
Posts: 2
Joined: 07 Oct 2007, 17:18

Post by obrouni »

koshi: yep, pretty much. The only problem is
that Windows doesn't have a unified concept of
/ home as does Linux, hence why Spring still
depends on the registry (that, and because it
started out as a Win32 app).
Surely the "c:\document and settings" folder suffices as this?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

AF wrote:

Code: Select all

tarendai@tarendai-desktop:~$ ./Settings++ 
./Settings++: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
tarendai@tarendai-desktop:~$ 
Any ideas?
Do you have that library?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I have the libwxgtk 2.8, and 2.6 libraries and I tried installing 2.4 and running all to no avail.

Ubuntu 7.04 64bit
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Do you have the 64 bit Settings++ then (if that is online somewhere) or the 32 bit versions of the libraries installed?

Do you have a file/symlink libgtk-x11-2.0.so.0 in /usr/lib? (or /usr/lib32 maybe, I dont recall exctaly what the 32 bit library directory is called on 64 bit systems.)
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

The pre-compiled Settings++ is linked against
the 32-bit (wx)GTK library, so you might want to
build it from source (there's IMO not much point
in keeping two versions of each library around
on a 64-bit system).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

nope, I have all the libraries I can find thatre related to wx.

Compiling from source gives me veyr similar errors to agon. I cant see agon ever finding a solution or if he did he never posted it in this thread.
Post Reply

Return to “Linux”