View topic - For those guys porting Spring...


All times are UTC + 1 hour


Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: 26 May 2005, 13:29 
User avatar

Joined: 12 Sep 2004, 23:25
Location: Barranquilla, Colombia
http://www.eweek.com/article2/0,1759,1819422,00.asp

Apparently hits allows the Visual Studio .NET stuff to be coded in Linux now. I think that's what the client is built on right? Just to let yall know if its of any help :)
Top
 Offline Profile  
 
 Post subject:
PostPosted: 26 May 2005, 16:55 
User avatar

Joined: 21 Apr 2005, 19:46
Its currently being written in C++. The problem with running visual studio programs in Linux is that they are EXE files. Linux can't natively run EXE files, which is why we are going to use a more portable language like C++.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 04 Jun 2005, 23:43 
User avatar

Joined: 26 Apr 2005, 23:00
Location: The Netherlands
If you write plain C# (without windows-specific stuff), it's even more portable (using Mono) than C++ as it's JIT compiled, so you don't need to recompile for Linux.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 05 Jun 2005, 00:17 

Joined: 01 May 2005, 22:09
Location: MI, USA
Unfortunately, from the stuff I've explored, it contains lots of windows-specific stuff.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 06 Jun 2005, 23:36 
User avatar

Joined: 26 Apr 2005, 23:00
Location: The Netherlands
Hmm, took a quick look at it and I think it shouldn't be too hard to make it cross platform (now Mono has Windows.Forms support), but C++ will do the job too 8)

btw. .NET .exe files are just MS Intermediate Language assemblies, not native windows ones.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Jun 2005, 03:53 

Joined: 01 May 2005, 22:09
Location: MI, USA
Have you used Mono before? Would you try it and tell me how many changes need to be made?
What about dll's?
Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Jun 2005, 22:42 
User avatar

Joined: 26 Apr 2005, 23:00
Location: The Netherlands
I've been playing a bit with Mono. I just tried to build the SpringClient on Mono 1.1.7 and using the very latest System.Windows.Forms.dll (from http://mwf.mono-project.com) only the RichTextBox throws errors. It compiled fine when I replaced them with a normal TextBox. However I am working on the resources right now as Mono seems to have a bit different naming scheme. Besides that I don't know the behaviour of the Microsoft.Win32.Registry and you would have to port the C++ dlls in SpringClient/Utilty to linux.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 00:20 
User avatar

Joined: 21 Apr 2005, 19:46
Mono builds an exe right? Can it output a Linux executable file?
Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 00:38 

Joined: 07 Jun 2005, 00:37
It's not because they are .exe that they don't run natively on linux. Beagle is a native linux app that runs via mono and it is a .exe

.exe is only the extension, nothing else.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 02:05 

Joined: 01 May 2005, 22:09
Location: MI, USA
SeaEagle1 wrote:
I've been playing a bit with Mono. I just tried to build the SpringClient on Mono 1.1.7 and using the very latest System.Windows.Forms.dll (from http://mwf.mono-project.com) only the RichTextBox throws errors. It compiled fine when I replaced them with a normal TextBox. However I am working on the resources right now as Mono seems to have a bit different naming scheme. Besides that I don't know the behaviour of the Microsoft.Win32.Registry and you would have to port the C++ dlls in SpringClient/Utilty to linux.

Hey, cool. I already mostly ported /Utility, available at https://lolut.utbm.info/svn/taspring_li ... t/Utility/
Also, go ahead and ignore anything registry... That's what we are doing in the rest of the program.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 12:16 
User avatar

Joined: 26 Apr 2005, 23:00
Location: The Netherlands
Mono builds an Intermediate Language .exe, just like Java builds bytecode .class files. It gets compiled to machinecode the first time you run it by either the MS .NET framework or Mono ( or another Mono-like project ). You do have to run it like ">mono SpringClient.exe" because linux doesn't call mono "under the hood" like Windows does with the .NET framework. efbie is right, MS probably just called it .exe's and .dll's so the average Windows user would feel comfortable, but they're more comparable to Java's .class files than C++ .exe's.

I'm ignoring the registry calls right now too, but they're there for a reason, to store config settings, that I might need to implement another way, through some XML file or something.

Edit:
I just found out that .resx resources need to be converted for Mono, so now it's running fair enough to provide you with a screenshot...
Image

Edit II:
And please whoever wrote this thing, use "/" instead of " \\" in your paths next time, Windows doesn't care what you use, but linux really does not like "\\"...
Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 19:40 

Joined: 01 May 2005, 22:09
Location: MI, USA
SeaEagle1 wrote:
I'm ignoring the registry calls right now too, but they're there for a reason, to store config settings, that I might need to implement another way, through some XML file or something.

Edit:
I just found out that .resx resources need to be converted for Mono, so now it's running fair enough to provide you with a screenshot...

Is that you connected to the real Spring server? What do you do about loading dll's(curiosity's sake)? If the code speaks for itself, go ahead and send me patches!
Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 21:50 
User avatar

Joined: 26 Apr 2005, 23:00
Location: The Netherlands
That's me connected to the real Spring server yes... I was even able to do some chatting :-) I hope though that Mono will soon come with a new version as I needed to hack around some NotImplemented Exceptions from the Winforms.

C# can import native .dll or .so files with PInvoke (those [DllImport ...] lines), but I haven't looked into them yet.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Jun 2005, 15:16 
User avatar

Joined: 26 Apr 2005, 23:00
Location: The Netherlands
These are the changes I made so far.

I'm now a bit stuck as I need to import the ported c++ libs and your libUtility doesn't really work yet...
Mono-INFO: DllImport error loading library './libUtility.so: undefined symbol: _ZN10CSunParserC1Ev'.
I don't know if you can do something with that :-P. Also for the actual starting of the game we'll need a ported unitsync.dll (and game ofcourse). And I don't know what the progress is on a c++ client? It's quite useless if we're trying to adapt the .NET client when someone is also writing another port.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Jun 2005, 16:36 
User avatar

Joined: 21 Apr 2005, 19:46
Well, the client that me and coryrc are writing won't be done for a while yet. We are just getting done designing the GUI, but the coding hasn't actually started yet. I think coryrc thinks that if we can get a working mono port, then people can play it in Linux while we wait for the real thing to be done.
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.