kubuntUO - RunUO linux for human beings

Tuesday, February 27, 2007

How to open Port 2593 with iptables - Update

Greeting,

I recently posted how to change your iptables. This did not work last night when I tested it. I cannot connect to the server from another computer. What really makes me mad is the fact that I had the command and now I cannot find them. I would suggest installing a program called nmap, it is used to show open ports.

I think I will try the following...(I got the information from help.ubuntu.com.)

$ sudo iptables -L
$ sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$ sudo iptables -A INPUT -p tcp -i eth0 --dport 2593 -j ACCEPT
$ sudo iptables-save
I will let you know how this works in tomorrow.

-Ravon

Monday, February 26, 2007

GMCS - The compile command

Greetings,

Here is the command I use to compile RunUO.

$ gmcs -out:../runuo.exe -d:MONO -optimize+ -unsafe -r:System,System.Configuration.Install,System.Data,
System.Drawing,System.EnterpriseServices,System.Management,
System.Security,System.ServiceProcess,System.Web,
System.Web.Services,System.Windows.Forms,System.Xml
-nowarn:219 -recurse:*.cs

The -r: is very long so here it is in a readable format. (Just in case you can't see it all.)

System
System.Configuration.Install
System.Data
System.Drawing
System.EnterpriseServices
System.Management
System.Security
System.ServiceProcess
System.Web
System.Web.Services
System.Windows.Forms
System.Xml

Remember they are case senitive.

-Ravon

Thursday, February 22, 2007

Updated Files 22FEB2007

Greetings,

Here is another list to the latest changes I have made.

I will admit that I have not tested the "world save" and I have a good feeling it will not load a saved world once you add an account. Changes to the serialization.cs file have not been completed.

I will not be able to work on it this weekend, but perhaps the following.

kubuntUO-22FEB2007.tar.gz

-Ravon

NOTE: kubuntUO-21FEB2007.tar.gz - is BAD

Wednesday, February 21, 2007

How to open Port 2593 with iptables

Greetings,

Just a quick note, if your having problems connecting maybe you need to open the port on your Linux PC. Here is the command I use.

$ sudo iptables -I INPUT -p tcp --dport 2593 -j ACCEPT
$ sudo iptables -I OUTPUT -p tcp --dport 2593 -j ACCEPT
$ sudo iptables-save
-Ravon

Current Issues 21FEB2007

Greetings,

21FEB2007

serialization.cs - gmcs (part of MONO compiler) doesn't understand the different between Function() and Function in derived classes. So, you should rename methods ReadItem, ReadMobile and ReadGuild to smth different. I use ReadItemG, ReadMobileG, ReadGuildG. (it is in Serialization.cs). This effect world save after creating an active user account.
See post651115 STATUS: fixed

zlib32.dll - cannot find file when a gump is used. Server crashes.
See post652113 STATUS: fixed

-Ravon

Saturday, February 17, 2007

List of modified files - 16FEB2007

Greetings,

Here is a list of the files that I am modifing so far...

Server/Serialization.cs
Server/ScriptCompiler.cs
Server/Utility.cs
Server/Persisence/SaveMetrics.cs
Server/Network/Listener.cs

Scripts/Misc/AutoSave.cs
Scripts/Misc/DataPath.cs
Scripts/Misc/AccountPrompt.cs

-Ravon

Thursday, February 15, 2007

World Saves

Greetings,

I had two snow days this week, so I was able to get world save to work correctly. Unfortunately, I left the files at home. I will update everything this weekend.

I am still working on getting gumps to work. They cause the server to crash. I recieved more information on this, however, I have not been able to test the fix. I will continue to keep you updated and hopefully update the documentation so far.

-Ravon

Sunday, February 11, 2007

It kinda works!

Greetings,

Here is as far as I have gotten. The server loads, I can log in. I am down to three things I can't seem to work around. Do you have any suggestions?


ERRORS:
You must have a "SAVE" folder and an account already created. Mono does not seem to support console.Read commnads. One included has an account call ADMIN with a password of ADMIN. (OK, sorta fixed).

GUMPS do not work because it cannot find zlib32.dll, even if it is in the same directory (not sure why not).

WORLDSAVES cause the server to crash on restart - see below. I have tried with and without groboclown's Serialization.cs changes.

Stacktrace:
at Server.Mobile.Deserialize (Server.GenericReader) <0xffffffff>
at Server.Mobile.Deserialize (Server.GenericReader) <0x002ee>
at Server.Mobiles.PlayerMobile.Deserialize (Server.GenericReader) <0x000bd>
at Server.World.Load () <0x016bd>
at Server.ScriptCompiler.Compile (bool,bool) <0x00320>
at Server.Core.Main (string[]) <0x0086d>
at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>
Click here for my current set of files.

-Ravon

Friday, February 09, 2007

Will RunUO work on Linux? YES!

Greetings,

It works, it works! Ok, I have one last test to confirm that it does work and I will do that tonight. For now it works!

Thanks to groboclown & seirge for help with the script changes and the MONO development team releasing a new version of mono.

I will leave you hanging for just a little bit longer, I want to test everything on a fresh box and verify that I can log in to the server. Here is a peek...


-Ravon

Friday, February 02, 2007

-d:MONO

Greetings,

I think I have narrowed down the current problem. The server will compile now. When I run the server.exe, I get an error. From the look of it server.exe is not sending the "define:MONO" command when it tries to compile the script and data folders. It will compile only to scripts before it crashes.

If I modify ScriptCompiler.cs I can see what file it stops on...

using( CSharpCodeProvider provider = new CSharpCodeProvider() )
{
string path = GetUnusedPath( "Scripts.CS" );

CompilerParameters parms = new CompilerParameters( GetReferenceAssemblies(), path, debug );

string defines = GetDefines();

if( defines != null )
parms.CompilerOptions = string.Format( "-d:{0}", defines );
Console.Write( "What is Defined(224): -d:{0}", defines );
if( Core.HaltOnWarning )
parms.WarningLevel = 4;

Console.Write (" CompilerResults(228) Reading {0} {1}" + parms, files);
CompilerResults results = provider.CompileAssemblyFromFile( parms, files );

Not sure how to fix this or where to go next. Good thing it's Friday.

-Ravon

Thursday, February 01, 2007

main.cs

Greetings,

I am back to mass rambling here, so bare with me. If I make/add all of the script changes from previous post, I do end up with a main.cs error as seen here...

test@test1MXL6090BN2:~/runuo/RunUO-v2.0-SVN$ mono --debug runuo.exe
RunUO - [www.runuo.com] Version 2.0, Build 2588.27556
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...Error:
System.Exception: Compiler failed to produce the assembly. Stderr='', Stdout=''
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00255] in /home/test/mono/mono-1.2.20070131/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:235
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00012] in /home/test/mono/mono-1.2.20070131/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:138
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00015] in /home/test/mono/mono-1.2.20070131/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs:127
at Server.ScriptCompiler.CompileCSScripts (Boolean debug, Boolean cache, System.Reflection.Assembly& assembly) [0x00197] in /home/test/runuo/RunUO-v2.0-SVN/Server/ScriptCompiler.cs:227
at Server.ScriptCompiler.Compile (Boolean debug, Boolean cache) [0x00034] in /home/test/runuo/RunUO-v2.0-SVN/Server/ScriptCompiler.cs:529
at Server.Core.Main (System.String[] args) [0x002ac] in /home/test/runuo/RunUO-v2.0-SVN/Server/Main.cs:427
This exception is fatal, press return to exit

** (runuo.exe:12405): WARNING **: exception inside UnhandledException handler: Cannot cast from source type to destination type.

Line 427 of main.cs looks like this...

while( !ScriptCompiler.Compile( m_Debug, m_Cache ) )
{
Console.WriteLine( "Scripts: One or more scripts failed to compile or no script files were found." );
Console.WriteLine( " - Press return to exit, or R to try again." );

if( Console.ReadKey( true ).Key != ConsoleKey.R )
return;
}

Hopefully, that will help. Now if we can just figure it out.

-Ravon

File or Console Issues

Greetings,

Well I think the TInput & TOutput has been fixed in Mono 1.2.2007.01.31 (which is the SVN). So, for the rest of you will need to wait for Mono v1.2.3 to be released.

I also think it fixes all the other modification excpet for "savemetrics.cs" in the /server/Persistence folder.

However, that does not solve our problems. After it compiles, I get two errors. This one I get with RunUO.exe in the folder along with server, scripts and data. It appears it is either not finding our scripts folder or there is problem with the console command. Let me know what you think...

$ mono --debug RunUO.exe
RunUO - [www.runuo.com] Version 2.0, Build 2588.25999
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...Error:
System.Exception: Compiler failed to produce the assembly. Stderr='', Stdout=''
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00255] in /home/test/mono/mono-1.2.20070131/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:235
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00012] in /home/test/mono/mono-1.2.20070131/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:138
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00015] in /home/test/mono/mono-1.2.20070131/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs:127
at Server.ScriptCompiler.CompileCSScripts (Boolean debug, Boolean cache, System.Reflection.Assembly& assembly) [0x00000]
at Server.ScriptCompiler.Compile (Boolean debug, Boolean cache) [0x00000]
at Server.Core.Main (System.String[] args) [0x00000]
This exception is fatal, press return to exit

** (runuo.exe:7472): WARNING **: exception inside UnhandledException handler: Cannot cast from source type to destination type.



If I put the file RunUO.exe in it's own folder, without server, scripts, and data and run it, I should get an error that says it cannot find the files. However, I get this error which looks like a console write error in "main.cs"...

$ mono --debug RunUO.exe
RunUO - [www.runuo.com] Version 2.0, Build 2588.26130
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...no files found.
Scripts: Compiling VB.NET scripts...no files found.
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Error:
System.InvalidCastException: Cannot cast from source type to destination type.
at System.TermInfoDriver.WriteConsole (System.String str) [0x00007] in /home/test/mono/mono-1.2.20070131/mcs/class/corlib/System/TermInfoDriver.cs:119
at System.TermInfoDriver.Init () [0x00062] in /home/test/mono/mono-1.2.20070131/mcs/class/corlib/System/TermInfoDriver.cs:168
at System.TermInfoDriver.ReadKey (Boolean intercept) [0x0000b] in /home/test/mono/mono-1.2.20070131/mcs/class/corlib/System/TermInfoDriver.cs:858
at System.ConsoleDriver.ReadKey (Boolean intercept) [0x00000] in /home/test/mono/mono-1.2.20070131/mcs/class/corlib/System/ConsoleDriver.cs:202
at System.Console.ReadKey (Boolean intercept) [0x00000] in /home/test/mono/mono-1.2.20070131/mcs/class/corlib/System/Console.cs:620
at Server.Core.Main (System.String[] args) [0x00000]
This exception is fatal, press return to exit

** (runuo.exe:7564): WARNING **: exception inside UnhandledException handler: Object reference not set to an instance of an object

OK, this one doesn't say anything about main.cs, hmmm...Any ideas?

-Ravon