Page 3 of 4
Posted: 31 Aug 2007, 23:34
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.
Posted: 13 Sep 2007, 05:22
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
Posted: 22 Sep 2007, 22:20
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.
Posted: 22 Sep 2007, 23:17
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)
Posted: 22 Sep 2007, 23:27
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.

Posted: 22 Sep 2007, 23:40
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.
Posted: 23 Sep 2007, 01:12
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.
Posted: 23 Sep 2007, 02:24
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?
Posted: 23 Sep 2007, 13:33
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.
Posted: 23 Sep 2007, 14:59
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).
Posted: 23 Sep 2007, 15:23
by AF
A file in the spring folder would suffice
Posted: 24 Sep 2007, 02:56
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?
Posted: 26 Sep 2007, 03:25
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...
Posted: 07 Oct 2007, 21:27
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?
Posted: 08 Oct 2007, 00:38
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?
Posted: 08 Oct 2007, 08:13
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?
Posted: 08 Oct 2007, 10:32
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
Posted: 08 Oct 2007, 13:51
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.)
Posted: 08 Oct 2007, 14:33
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).
Posted: 08 Oct 2007, 18:50
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.