.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Utility: Dom3 Unit Maker v1.07 (http://forum.shrapnelgames.com/showthread.php?t=33819)

lch April 28th, 2007 10:04 PM

Re: Dom3 Unit Maker
 
I have now tested this with Mono 1.2.2.1 and it works fine for one negligible unimplemented method:
<font class="small">Code:</font><hr /><pre>Unimplemented: Control::set_AutoSize(bool)</pre><hr />
and one shortcoming: You seem to be using the backslash as directory seperator which gives problems with non-Windows systems, of course. Since Windows is POSIX-conform since WinNT and takes a slash "/" instead of a backslash "\", too, could you change your program to use slashes instead, or find out what the right character to use is? I think the trouble is just that you have the backslash hardcoded so far. So far, it saves the files under weird filenames (in the parent directory where you want to save it, with the filename "dir\file.dm" for the file.

paradoxharbinger April 29th, 2007 12:10 AM

Re: Dom3 Unit Maker
 
yeah, those slashes are hardcoded. i believe windows will take either the back- or forward slash, so should be an easy fix. ive been waiting for my new lappy to arrive before starting to play with new software, my old pc is barely limping along. so after i get that i'll experiment with mono and get that multiplatform release out.

Gandalf Parker April 29th, 2007 01:00 AM

Re: Dom3 Unit Maker
 
Will MapGen come out multiplatform also?
Id like to program a basic program to run batches of daily maps off of my server. Something like I did for Dom2 with DomMap (which I might resurrect)
http://www.dom2minions.com/~dominion...andomMaps.html

I was thinking of having it run at night on my Windows machine then automate transfering them to the linux server. But Id much rather it all ran on linux

Juzza April 29th, 2007 04:15 AM

Re: Dom3 Unit Maker
 
so, when can we expect the next version of the unit gen?

I love this thing! saves me tons of time modding!

lch April 29th, 2007 07:10 AM

Re: Dom3 Unit Maker
 
Quote:

paradoxharbinger said:
yeah, those slashes are hardcoded. i believe windows will take either the back- or forward slash, so should be an easy fix.

Yes, that's what I meant with WinNT and successors being POSIX-compliant. I had a quick look and it seems that there is a Path I/O class in System.IO which gives you the directory separator char via (Alt)DirectorySeparatorChar. This should give the right character to use on non-Windows environments, too. I just had a try with DirectorySeparatorChar and AltDirectorySeparatorChar and both output a slash ("/") for me: <font class="small">Code:</font><hr /><pre>using System;
using System.IO;
public class Test {
public static void Main(string[] args) {
Console.WriteLine("This is the DirectorySeparatorChar: " + Path.DirectorySeparatorChar);
}
}</pre><hr />

Quote:

Gandalf Parker said:
Will MapGen come out multiplatform also?

Mono does not recognize the assembly because of the depency on Microsoft DLLs. Wine chokes on MSVCP80.dll and MSVCR80.dll, even after installing them, I guess that's because my wine version is too old (I'm using wine 0.9.29). I can run it with Cedega 5.1.1, however. So if you want to run the MapGen then either get Cedega or a newer wine version than I'm using, then you can use the MapGen on Linux.

Gandalf Parker April 29th, 2007 11:51 AM

Re: Dom3 Unit Maker
 
Thanks for the info. Or a vmware to run an emulation of winxp.

But no Id rather not. My 2 linux boxes are internet servers so I try to avoid gui and emulated environments. As kludgy as it sounds, Id rather do a nightly transfer from my desktop. Its more serverish (thats not a word)

paradoxharbinger April 29th, 2007 10:31 PM

Re: Dom3 Unit Maker
 
eventually i will try and get mapgen to be multi-os. think i mentioned this before, maybe not.

lch April 30th, 2007 10:57 AM

Re: Dom3 Unit Maker
 
P.S.: Since I'm getting the Dom3 server monitor tool ready for Linux / Mono, too, and there is the same trouble as here: Probably the best way of getting the full path for a file is to use Path.Combine. Example code:

<font class="small">Code:</font><hr /><pre>using System;
using System.IO;
public class Test {
public static void Main(string[] args) {
string s = Path.Combine(Environment.GetEnvironmentVariable("H OME"), "test");
Console.WriteLine(s);
Console.WriteLine(File.Exists(s));
Console.WriteLine(Directory.Exists(s));
}
}</pre><hr />

I didn't have any experience with C# so far, but it sure is nice, I must admit. http://forum.shrapnelgames.com/images/smilies/happy.gif

Gandalf Parker April 30th, 2007 01:12 PM

Re: Dom3 Unit Maker
 
For some reason that doesnt work on my linux system.

Personally, since you have a config file asking for a path to a file, Id just add another option for the path seperator.

Or if I were to do a test I think it would be something like this.
can I see
./program.cfg
or do I have to look at
.\program.cfg

lch April 30th, 2007 01:19 PM

Re: Dom3 Unit Maker
 
Gandalf, have you installed Mono? What does "mono --version" tell you?

If you have installed it, then running "mono Dom3UnitMaker.exe" should work for you without problems, except for lots of "Unimplemented: Control::set_AutoSize(bool)" messages.


All times are GMT -4. The time now is 08:38 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.