Portability? - Page 2

Portability?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

Oh, and while we're at it: what is the code in SpringClient/SpringClient actually used for? Because I can't help noticing that it is written in C#, which is not necessarily very portable. There is a free implementation of .Net for linux, but I'm not sure the full C# specification is implemented or usable.

Is this just the client for getting a game set up, which then launches taspring (as a completely separate prog), or is this a part of the actual game program?
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

it create a text file wich is used to transfer parametre when you lauch Spring
look at "Spring start.txt" in the source
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

Okay, no problem then.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

I wouldn't mind redoing 'SpringClient.exe' using GTK+ as the Window API. I am pretty sure GTK can be used in Windows right?

I have worked with GTK before using Libglade. (I used to work on porting "gens" emulator to Linux)

This would be after finals though....2 weeks left. :wink:
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

Gtk would be okay, though I'll admit I don't know if it'll behave well in C++. For C++ you'd be better of using WxWidgets, which can use gtk+ as a backend, but will use the native win32 api on windows.
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

Right, as I don't have any version of Visual Studio handy, I'm going to need some input: are the VC++ projects set up to ignore missing explicit casts when compiling? There are a *lot* of these floating around, so many that I'm tempted to find the gcc option to shut that warning up. Is this acceptable (ie. what is being done in vc++) ?

Okay, as a purely coding matter, shutting up a legitimate warning is evil, but I'd like to get to the actual compile problems, rather than being tied up in adding ten thousand "(int)", "(float)" and "(unsigned char)".
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Hm yes the temptation to turn of that warning became to great at some point.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Ace07 wrote:... I am pretty sure GTK can be used in Windows right? ...
It does. I'm using it right now with the messenger program GAIM.

It is also used by the Windows/Linux grafics manipulation program GIMP. (although this one crashes somewhat often and it is said to be of GTK's responsability...)

There are many other programms out there for Win32 that use GTK.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Dave wrote:Gtk would be okay, though I'll admit I don't know if it'll behave well in C++. For C++ you'd be better of using WxWidgets, which can use gtk+ as a backend, but will use the native win32 api on windows.
I am pretty sure that you can use C++ with GTK, but I do have more experience with C myself. The gens project is all C with a bit of assembly.

This is the C++ interface to GTK:
http://www.gtkmm.org/
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

After a few hours hacking, work on the port of 'rts' ploughs on.

Code: Select all

Revision 4:

 * Switched to using Code::Blocks for MingW compatibilisation
 * archdef.h does compiler/platform detection and exports symbols and compiler-specific definitions.
 * StdAfx.h uses archdef.h for all compiler-specific stuff
 * Started porting the other .h files to using archdef.h and removing MSVC-specific preprocessor stuff.

The code in the current state *should* still compile on MSVC. No success in MingW yet, let alone linux. Long path ahead, only 65 files out of 431 are switched to using archdef :(
Gah. Anyone want to try the code on VC++ and confirm that it actually doesn't work at all any more? :(
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

I doubt that it would work anymore, although I haven't used VC++ extensively. I use Anjuta in Linux. =)
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

I want to help

Post by coryrc »

Dave,
My abilities at managing software projects are ... nonexistant. I am a Linux programmer and want to help. I do not have experience with OpenGL nor anything Windows. [edit: I do know C/C++ very well] If you know some part of the project I could redo without wasting effort with what someone else is doing, please let me know. I do not have a Windows machine.

Thanks

[edit: Guess I should mention I have tons of Python experience too.]
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

Hi coryrc,

Of course, you're most welcome to help out. This enterprise is big enough for a few people to join in on the fun :)

The current porting effort is running off an OpenSVN site. I'm working on the rts code, which is basically a windows-only task for now (removing the MSVCisms). Ace07 is working on a C++/Gtk version of SpringClient. All the rest is currently up for grabs, we won't touch it until our currently assigned items are completed :)

If you feel like picking up and porting another piece of the source (I'd see server and lobby as important targets), contact me by PM, and I'll set you up an account to give you edit access to the wiki and commit access to the repository.

BTW, for others the repository can be anonymously checked out. Once (if) the port is complete, hopefully TAspring as a whole will have a public project management system where we can merge the port.
renrutal
Posts: 84
Joined: 28 Apr 2005, 16:45

Post by renrutal »

Please, while you do that, remember to keep the code modularized. Also try to use codes from projects available in multiple OSs. However, if that kind of code is too innefficient comparable to OS-specific features, the modularization will still be able to provide us an easy "lightswitch"-like kind of porting. #ifdefs and all.
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

For the time being, the code will be as modular as it was before the port. There is too much work on brute force porting to start thinking about altering the structure of the code too much.

Ideally, there would be very little #ifdef portability code, the rest being wrapped behind libraries that do that kind of switching for us. I'm not very partial to a linux-kernel solution (which is #ifdef hell) myself.

As you say, we are trying to use libraries and code that are as portable as possible (SDL, OpenAL...). There are areas where we'll have to get down to OS-specific code, but hopefully we can keep those areas down to the barest minimum.
slick_rick
Posts: 5
Joined: 08 Oct 2004, 06:18

HPI Util

Post by slick_rick »

Which HPI util should I port? The OTA one or the one that works with TA:K?
Fnordia
Former Engine Dev
Posts: 425
Joined: 13 Aug 2004, 16:11

Post by Fnordia »

Our project registration on berlios was denied.. I don't think the project violates any of their requirements though, so perhaps a revised project description will do. I wish the "denied" message at least gave a hint as to why though. :) Guess we will have to try sourceforge otherwise.
el_muchacho
Posts: 201
Joined: 30 Apr 2005, 01:06

Post by el_muchacho »

Fnordia, maybe you can also look at :
http://www.alioth.debian.org (I'm not sure they use svn, though)
http://savannah.nongnu.org (they use cvs, I believe)
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Post by Dave »

Savannah works off GForge, the free fork of the sourceforge software, so they're still working off cvs.

Another alternative is to register at OpenSVN. It is a fairly minimalistic service:
- a subversion repository
- trac environment, which groups:
- a wiki (can configure permissions to disallow editing by non-dev team members)
- a source code browser (though SVN does integrate a basic browser, trac's is *much* better)
- a bug/feature request tracking system (just about the simplest you can find, which I think is great!)
- a roadmap that allows you to define what the objectives for future versions are, assign bugs and feature requests to certain milestones, and generally track where the project is going
- a timeline that gives a chronology in terms of edited pages, commited code, submitted/resolved bugs, milestones reached etc.

Registration is free, all based on free tools, etc. etc. https://opensvn.csie.org/

Now, to what OpenSVN doesn't provide: you don't get a "project classification" (each project registered is independant and there is no "catalog"), you don't get mailing lists, you don't get forums. The forum shouldn't be a problem if you keep this site open and still make it the "front page" of the project, just using OpenSVN for developer info (in the wiki), bug/feature tracking and source code storage. The only real problem I see is that if you wanted to get onto a big hoster for the publicity, then that's more or less down the drain with OpenSVN :)
Dave
Posts: 56
Joined: 28 Apr 2005, 01:44

Re: HPI Util

Post by Dave »

slick_rick wrote:Which HPI util should I port? The OTA one or the one that works with TA:K?
I honestly have no idea. Input from SY on this one?
Post Reply

Return to “Engine”