|
||
|
|||||||
| Server Support on Mono Forum dedicated to RunUO 2.0 on Mono. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Jul 2006
Posts: 22
|
Hi there,
a few days ago a new mono version was released and it solves many Problems. My System is a Suse 10.2 running mono 2.5. In the Fixes for Linux threat are some hints how to modify Scripts... I use latest RunUO SVN with the modified Server Scripts collected by RavenTUS without his Utility.cs, that one works nativly. The Server runs stable and there are no crashes, but the dropping into the tiles problem still exists. If anyone got an Idea how to solve, or is interested in solving with me, let me know! I figured out that all if mono lines in the tilematix.cs and tilematrixpatch.cs aren't needed anymore except the "private static byte[] m_Buffer;" line. If you would like to join me in building up a runnable version on linux add me on icq: 74-591-632 so far Saba I attached my working runuo.exe file, start with "mono runuo.exe" Last edited by Sabaoth; 09-03-2007 at 03:39 PM. |
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
|
Greetings,
I think the problem is in TileMatrixPatch (PatchLand & PatchStatics) and TileMatrix (ReadStaticBlock & ReadLandBlock). I think Mono does not like way it is using ".get_SafeFileHandle()". There is a "IF MONO" section, however, I wonder if it might be coded incorrectly... Code:
fixed (Tile* pTiles = tiles)
{
#if !MONO
_lread( fsData.SafeFileHandle.DangerousGetHandle(), pTiles, 192 );
#else
if (m_Buffer == null || 192 > m_Buffer.Length)
m_Buffer = new byte[192];
fsData.Read(m_Buffer, 0, 192);
fixed (byte* pbBuffer = m_Buffer)
{
Tile* pBuffer = (Tile*)pbBuffer;
Tile* pEnd = pBuffer + 64;
Tile* pCur = pTiles;
while (pBuffer < pEnd)
*pCur++ = *pBuffer++;
}
#endif
}
matrix.SetLandBlock(x, y, tiles);
}
I think it is this section of code because of the Moma report... -Ravon
__________________
|
|
|
|
|
|
#5 (permalink) | |
|
Newbie
Join Date: Jul 2006
Posts: 22
|
Using this Scripts I get compile error during .exe compilation:
Quote:
|
|
|
|
|
|
|
#6 (permalink) | ||
|
Newbie
Join Date: Jul 2006
Posts: 22
|
So I am still learning in coding, but I don't understand this line:
Quote:
Quote:
Last edited by Sabaoth; 09-12-2007 at 06:26 PM. |
||
|
|
|
|
|
#7 (permalink) |
|
Forum Expert
|
Greetings,
The IF MONO code is used to determine what OS you are using. It works like this... Code:
#if MONO
SAY ("This is a Linux PC with MONO");
#else
SAY ("This is a Windows PC with .NET");
#endif
Code:
#if !MONO
SAY ("This is a Windows PC with .NET");
#else
SAY ("This is a Linux PC with MONO");
#endif
NOW, let us put it to good use and try these two files I updated. I still have not tested them (I have not had time still to setup my Linux PC). Replace your current TileMatrix.cs and TileMatrixPatch.cs and then recompile. -Ravon
__________________
|
|
|
|
|
|
#8 (permalink) |
|
Forum Expert
Join Date: Mar 2004
Location: Germany
Age: 22
Posts: 298
|
Usually it is as simple as compiling with the -d:MONO parameter .... (or something like this) ....
__________________
RunUO RemoteAdmin - Control your shard remotely and keep an eye on the page queue MulEditor - Modify gump, art, tiledata, multimap, localization files and map/statics. CentrED - A Client/Server based multi-user map editor. |
|
|
|
|
|
#9 (permalink) |
|
Forum Expert
|
Greetings,
I have my Linux PC us and running now - kubutu 7.04 with Mono 1.2.5. When I compile I get the following error, which I had not gotten before. Any one know if it is a bug, or something I am doing wrong... NetState.cs Code:
CS1502: Line 535: The best overloaded method match for `Server.Utility.Intern(string)' has some invalid arguments m_Address = Utility.Intern(((IPEndPoint)m_Socket.RemoteEndPoint).Address); -Ravon NEVERMIND, Something bad in one of my scripts.
__________________
Last edited by RavonTUS; 09-06-2007 at 12:13 PM. Reason: FIGURED IT OUT |
|
|
|
|
|
#11 (permalink) |
|
Forum Administrator
Join Date: Jan 2003
Location: Northern Virginia
Posts: 1,528
|
The server is playable with the latest stable mono release with only a handful of changes. There are still some problems however (particularly with code that uses emitter and anonymous methods).
I will commit some changes to SVN when I have the time and post a few tips. EDIT: Looks like mono has some serious flaws with some Deserialize calls. It will take some hacking to make them work. Last edited by Mark; 09-07-2007 at 12:35 AM. |
|
|
|
|
|
#12 (permalink) |
|
Forum Administrator
Join Date: Jan 2003
Location: Northern Virginia
Posts: 1,528
|
SVN 231 'works' with mono without modification.
There are several points to keep in mind: 1. gmcs must be in your path when you start the server. 2. If the core executable changes, the Scripts/Output/ folder must be deleted (or the cached library must be invalidated). It appears when Mono builds the script library it has a hard dependancy on the core that built it. 3. Conditional commands are hit or miss due to their advanced use of Emitter. 4. Deserialize fails on ReadStrongMobileList() 5. You will need to add a line to your etc/mono/config file: Code:
<dllmap dll="zlib32" target="libz.so" /> At revision 231. $ ~/mono-1.2.5/bin/gmcs -d:MONO -unsafe+ -optimize+ -t:exe -out:RunUO.exe -recurse:Server/*.cs $ PATH=~/mono-1.2.5/bin ~/mono-1.2.5/bin/mono RunUO.exe Last edited by Mark; 09-07-2007 at 04:55 PM. |
|
|
|
|
|
#13 (permalink) |
|
Forum Administrator
Join Date: Jan 2003
Location: Northern Virginia
Posts: 1,528
|
Regarding the deserialize issue:
Code:
$ PATH=~/mono-1.2.5/bin ~/mono-1.2.5/bin/mono RunUO.exe RunUO - [www.runuo.com] Version 2.0, Build 2806.28250 Core: Running on .NET Framework Version 2.0.50727 Core: Optimizing for 4 processors Scripts: Compiling C# scripts...done (cached) Scripts: Compiling VB.NET scripts...no files found. Scripts: Verifying...done (2107 items, 500 mobiles) Enter the Ultima Online directory: > /home/mark/uo/ Regions: Loading...done World: Loading... ** ERROR **: file mini.c: line 4661 (mono_method_to_ir): assertion failed: (mono_method_signature (cmethod)->is_inflated) aborting... Stacktrace: at (wrapper managed-to-native) System.Object.__icall_wrapper_compile_generic_method (object,intptr,intptr,intptr) <0x00004> at (wrapper managed-to-native) System.Object.__icall_wrapper_compile_generic_method (object,intptr,intptr,intptr) <0xffffffff> at Server.BinaryFileReader.ReadStrongMobileList () <0x00020> at Server.Mobile.Deserialize (Server.GenericReader) <0x002d2> at Server.Mobiles.PlayerMobile.Deserialize (Server.GenericReader) <0x00034> at Server.World.Load () <0x016c5> at Server.ScriptCompiler.Compile (bool,bool) <0x002d8> at Server.Core.Main (string[]) <0x00865> at (wrapper runtime-invoke) Server.Core.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff> Regardless, it shouldn't be much trouble to get this working on your own. It isn't something I want to modify in the repository yet. |
|
|
|
|
|
#17 (permalink) |
|
Forum Administrator
Join Date: Jan 2003
Location: Northern Virginia
Posts: 1,528
|
Yes, but with /d:MONO it removes ReadItem<T>() call and replaces with ReadItemG<T>() which must be accounted for in other Deserialize methods (like ChampionSpawn.cs and GauntletSpawner.cs).
|
|
|
|
|
|
#19 (permalink) |
|
Newbie
Join Date: Jul 2006
Posts: 22
|
so here are modified ChampionSpawn.cs and GauntletSpawner.cs, should also work on windows and works fine on mono...
compile with: gmcs -out:../runuo.exe -d:MONO -optimize+ -unsafe -r:System,System.Configuration.Install,System.Data, System.Drawing,System.EnterpriseServices,System.Ma nagement,System.Runtime.Remoting,System.Runtime.Se rialization.Formatters.Soap,System.Security,System .ServiceProcess,System.Web,System.Web.Services,Sys tem.Windows.Forms,System.Xml -nowarn:219 -recurse:Server/*.cs Last edited by Sabaoth; 09-07-2007 at 07:11 PM. |
|
|
|
|
|
#22 (permalink) |
|
Newbie
Join Date: Jul 2006
Posts: 22
|
so plz post your fixed tilematrix.cs, thats easier than doing the svn thing for me.
Here are some files fixed for mono that might cause errors. Every file should work fine on windows as well! rename Common.map to common.map, because of case sensitivy. So I got no probs with my admin gump right now, what are the problems? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |