[Mono-dev] Problem cross compiling for windows

2012-02-05 Thread Jeff Ward
I'm attempting to build the trunk source for windows on an ubuntu system
but I keep running into an error:

This is the command I'm running:
./build-mingw32.sh -d /usr/i586-mingw32msvc -m i586-mingw32msvc

And the error:
checking build system type... Invalid configuration `dist-bzip2': machine
`dist' not recognized
configure: error: /bin/bash ../config.sub dist-bzip2 failed

Any idea how I can fix this?

--
Jeff
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Problem cross compiling for windows

2012-02-05 Thread Jeff Ward
So, I figured this out (there's an issue detecting Mono Version on the
master branch).  However, trunk is currently crashing when the .dll loads
(I believe).  I can't tell if this is an issue with MinGW or with trunk.

Anyone have any ideas?

--
Jeff

On Sun, Feb 5, 2012 at 3:53 PM, Jeff Ward j...@fuzzybinary.com wrote:

 I'm attempting to build the trunk source for windows on an ubuntu system
 but I keep running into an error:

 This is the command I'm running:
 ./build-mingw32.sh -d /usr/i586-mingw32msvc -m i586-mingw32msvc

 And the error:
 checking build system type... Invalid configuration `dist-bzip2': machine
 `dist' not recognized
 configure: error: /bin/bash ../config.sub dist-bzip2 failed

 Any idea how I can fix this?

 --
 Jeff

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-list] C# predefined libraries source code reference?

2012-02-05 Thread Bojan Rajkovic
MonoDevelop has Vim bindings.

—Bojan

On Feb 4, 2012, at 1:59 PM, ctje wrote:

 Thanks for replying!
 I know about MonoDevelop and I think it is a good alternative to visual 
 studio.
 But it lacks the awesome vimbindings, without I just can't program 
 comfortable.
 
 
 On Sat, Feb 4, 2012 at 6:26 PM, Ian Norton 
 ian.norton-bad...@thales-esecurity.com wrote:
 Chiel92 ctj...@gmail.com wrote:
 
 Hi all,
 
 I am a C# programmer and I'm eager to set up a vim IDE in which I can
 program C# on linux :)
 I want to create a tags file containing all classes, methods,
 namespaces,
 etc that are included in mono, using ctags. Then I will be able to have
 auto
 completion in vim and more cool stuff. As far as I know I need the
 source
 code from all these libraries for creating such a tags file.
 Where can I get the source from these libraries (if available)?
 
 Thanks in advance for any reply!
 
 Chiel
 
 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/C-predefined-libraries-source-code-reference-tp4357209p4357209.html
 Sent from the Mono - General mailing list archive at Nabble.com.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list
 
 Ctags and vim do sort of with with c#, but monodevelop works about 100 times 
 better, plus you get a debugger.
 
 On the other hand, someone could write a simple program to create ctags 
 output from an assembly without source.
 
 Ian
 
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] XmlWriter does not accept Text at Prolog

2012-02-05 Thread Snowl
I am trying to save an xml document, and I have been trying to get my code to
work but mono is spitting out a very strange error. I have given the file it
is trying to save to full ownership.

An example would be group.test.test to Hello world!

Here is the code:

http://pastebin.com/GLVnYneU http://pastebin.com/GLVnYneU 

Here is the error it gives me:

Unhandled Exception: System.InvalidOperationException: This XmlWriter
does not accept Text at this state Prolog.
at System.Xml.XmlTextWriter.ShiftStateContent (System.String occured,
Boolean allowAttribute) [0x0] in filename unknown:0 
at System.Xml.XmlTextWriter.WriteString (System.String text) [0x0]
in filename unknown:0 
at System.Xml.DefaultXmlWriter.WriteString (System.String text)
[0x0] in filename unknown:0 
at System.Xml.Linq.XText.WriteTo (System.Xml.XmlWriter w) [0x0] in
filename unknown:0 
at System.Xml.Linq.XDocument.WriteTo (System.Xml.XmlWriter w) [0x0]
in filename unknown:0 
at System.Xml.Linq.XDocument.Save (System.Xml.XmlWriter w) [0x0] in
filename unknown:0 
at System.Xml.Linq.XDocument.Save (System.String filename, SaveOptions
options) [0x0] in filename unknown:0 
at System.Xml.Linq.XDocument.Save (System.String filename) [0x0] in
filename unknown:0 
at Classic6.XmlSettings.set_Item (System.String key, System.String
value) [0x0] in filename unknown:0 
at Classic6.CmdSettings.Use (Classic6.RemoteClient c, System.String
message) [0x0] in filename unknown:0 
at Classic6.ClassicServer.HandleCommand (Classic6.RemoteClient c,
System.String msg) [0x0] in filename unknown:0 
at Classic6Server.Program.ParseInput (System.String input) [0x0] in
filename unknown:0 
at Classic6Server.Program.Main () [0x0] in filename unknown:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException:
This XmlWriter does not accept Text at this state Prolog.
at System.Xml.XmlTextWriter.ShiftStateContent (System.String occured,
Boolean allowAttribute) [0x0] in filename unknown:0 
at System.Xml.XmlTextWriter.WriteString (System.String text) [0x0]
in filename unknown:0 
at System.Xml.DefaultXmlWriter.WriteString (System.String text)
[0x0] in filename unknown:0 
at System.Xml.Linq.XText.WriteTo (System.Xml.XmlWriter w) [0x0] in
filename unknown:0 
at System.Xml.Linq.XDocument.WriteTo (System.Xml.XmlWriter w) [0x0]
in filename unknown:0 
at System.Xml.Linq.XDocument.Save (System.Xml.XmlWriter w) [0x0] in
filename unknown:0 
at System.Xml.Linq.XDocument.Save (System.String filename, SaveOptions
options) [0x0] in filename unknown:0 
at System.Xml.Linq.XDocument.Save (System.String filename) [0x0] in
filename unknown:0 
at Classic6.XmlSettings.set_Item (System.String key, System.String
value) [0x0] in filename unknown:0 
at Classic6.CmdSettings.Use (Classic6.RemoteClient c, System.String
message) [0x0] in filename unknown:0 
at Classic6.ClassicServer.HandleCommand (Classic6.RemoteClient c,
System.String msg) [0x0] in filename unknown:0 
at Classic6Server.Program.ParseInput (System.String input) [0x0] in
filename unknown:0 
at Classic6Server.Program.Main () [0x0] in filename unknown:0

and in the xml file it overwrites it completely and only leaves this:

?xml version=1.0 encoding=utf-8?

which is a lot different from this:

?xml version=1.0 encoding=utf-8 ?
Classic6
  group
   testWill I change/test
   wellI hope so/well
  /group
/Classic6

The code works 100% on windows, and I tried upgrading to 2.10.1 and that
didn't work so i compiled the latest source... that still didn't work...
help!

--
View this message in context: 
http://mono.1490590.n4.nabble.com/XmlWriter-does-not-accept-Text-at-Prolog-tp4358178p4358178.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] How to add .java file class to my mono on android c# project ?

2012-02-05 Thread Chocolade
I have this activity1.cs code:

using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Speech.Tts;
using System.Collections.Generic;
using MonoAndroidApplication1;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
using System.Threading;
using Android.Media;



namespace SayItAndroid{ [Activity (Label = SayItAndroid, MainLauncher =
true)]
public class Activity1 : Activity, TextToSpeech.IOnInitListener
{
int count = 1;
TextToSpeech mTts;
AudioRecord ar;
MediaRecorder recorder;

public void OnInit (int status)
{
Console.WriteLine (Listening to text to speech);
}
protected override void OnCreate (Bundle bundle)
{

base.OnCreate (bundle);// Set our view from the main layout
resource
SetContentView (Resource.Layout.Main);
Intent checkIntent = new Intent();
checkIntent.SetAction(TextToSpeech.Engine.ActionCheckTtsData);
StartActivityForResult(checkIntent, 100);   // Get 
our button from
the layout resource,// and attach an event to it

Button button = FindViewByIdButton (Resource.Id.MyButton);
button.Click += delegate
{


string myText1 = Did you sleep well?;
string myText2 = Hi;
mTts.SetSpeechRate((float)0.5);
mTts.Speak(myText1, QueueMode.Add, new Dictionarystring,
string());
mTts.Speak(myText2, QueueMode.Flush, new Dictionarystring,
string());
};
}
protected override void OnActivityResult (int requestCode, Result
resultCode, Intent data)
{
base.OnActivityResult (requestCode, resultCode, data);
if(requestCode == 100)
{
mTts = new TextToSpeech(this, this);
}
}
}}


Now i did FileOpen and selected from my hard disk: ExtAudioRecorder.java

Now i need somehow to use this class in my Activity1.cs code but couldnt
find how i googled for it and didnt find how.

I took this example from here:
http://i-liger.com/article/android-wav-audio-recording
I saw the example and i saw other examples in the comments and the used the
class somehow.

I have visual studio c# 2010 pro and mono on android trial.


This is the java file content if its needed:


import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;

import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.media.MediaRecorder.AudioSource;
import android.util.Log;

public class ExtAudioRecorder 
{
private final static int[] sampleRates = {44100, 22050, 11025, 8000};

public static ExtAudioRecorder getInstanse(Boolean recordingCompressed)
{
ExtAudioRecorder result = null;

if(recordingCompressed)
{
result = new ExtAudioRecorder(  false, 

AudioSource.MIC, 

sampleRates[3], 

AudioFormat.CHANNEL_CONFIGURATION_MONO,

AudioFormat.ENCODING_PCM_16BIT);
}
else
{
int i=0;
do
{
result = new ExtAudioRecorder(  true, 

AudioSource.MIC, 

sampleRates[i], 

AudioFormat.CHANNEL_CONFIGURATION_MONO,

AudioFormat.ENCODING_PCM_16BIT);

} while((++isampleRates.length) amp; 
!(result.getState() ==
ExtAudioRecorder.State.INITIALIZING));
}
return result;
}

/**
* INITIALIZING : recorder is initializing;
* READY : recorder has been initialized, recorder not yet started
* RECORDING : recording
* ERROR : reconstruction needed
* STOPPED: reset needed
*/
public enum State {INITIALIZING, READY, RECORDING, ERROR, STOPPED};

public static final boolean RECORDING_UNCOMPRESSED = true;
public static final boolean RECORDING_COMPRESSED = false;

// The 

[Mono-list] Mono-Only XDocument.Save Error

2012-02-05 Thread Drew DeVault
I can duplicate this problem on Linux Mint 12 and Ubuntu 11.10, but 
Microsoft.NET on Windows 7 does not have the issue. The issue is that my 
XDocument becomes corrupted the moment it loads, and cannot be saved. 
Strangely, I am able to traverse it and manipulate it in memory. The 
following code:


Stream s = File.Open(example.xml, FileMode.Open);
XDocument d = XDocument.Load(s);
s.Close();
d.Save(example.xml);

Produces the following exception:

[23:19:05] PartyCraft.CurrentDomain_UnhandledException: Error: 
InvalidOperationException: This XmlWriter does not accept Text at this 
state Prolog.
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: 
This XmlWriter does not accept Text at this state Prolog.
at System.Xml.XmlTextWriter.ShiftStateContent (System.String occured, 
Boolean allowAttribute) [0x0] in filename unknown:0
at System.Xml.XmlTextWriter.WriteString (System.String text) [0x0] 
in filename unknown:0
at System.Xml.DefaultXmlWriter.WriteString (System.String text) 
[0x0] in filename unknown:0
at System.Xml.Linq.XText.WriteTo (System.Xml.XmlWriter w) [0x0] in 
filename unknown:0
at System.Xml.Linq.XDocument.WriteTo (System.Xml.XmlWriter w) [0x0] 
in filename unknown:0
at System.Xml.Linq.XNode.ToString (SaveOptions options) [0x0] in 
filename unknown:0

at System.Xml.Linq.XNode.ToString () [0x0] in filename unknown:0
at PartyCraftServer.XmlSettings.set_Item (System.String key, 
System.String value) [0x0] in filename unknown:0
at PartyCraftServer.Commands.SettingCommand.ExecuteCommand 
(LibMinecraft.Server.RemoteClient client, System.String[] parameters) 
[0x0] in filename unknown:0
at PartyCraftServer.Commands.Command.Execute 
(LibMinecraft.Server.RemoteClient client, System.String command) 
[0x0] in filename unknown:0

at PartyCraftServer.PartyCraft.Run () [0x0] in filename unknown:0
at PartyCraftServer.Program.Main (System.String[] args) [0x0] in 
filename unknown:0


The same exception occurs on d.ToString();

The XML that is being loaded looks like this:

?xml version=1.0 encoding=utf-8 ?
partyCraft
server maxplayers=100
motdPartyCraft Test Server/motd
messages
death
!--TODO--
suicide§e{0} killed themselves./suicide
creeper§e{0} looked at a creeper funny./creeper
/death
/messages
/server

command
alias
settings/setting
/alias
/command

plugins
!--TODO--
pluginTestPlugin.dll/plugin
/plugins
/partyCraft

And when saved, even though an exception occurs, the document is 
overwritten with this:


?xml version=1.0 encoding=utf-8 ?

This is the output from mono --version:

Mono JIT compiler version 2.10.5 (Debian 2.10.5-1)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. 
www.mono-project.com

TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

Any help would be appreciated.

--
Drew Sir Cmpwn DeVault
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono-Only XDocument.Save Error

2012-02-05 Thread Atsushi Eno
I have one doubt that I think is likely the cause of the problem and 
also that prevents me from verifying it: you seem to have non-ASCII 
character in your XML you pasted in the message. This could be cause of 
the error e.g. inconsistent encoding input/output. A reproducible test 
case that everyone can examine is appreciated.


Atsushi Eno


I can duplicate this problem on Linux Mint 12 and Ubuntu 11.10, but 
Microsoft.NET on Windows 7 does not have the issue. The issue is that 
my XDocument becomes corrupted the moment it loads, and cannot be 
saved. Strangely, I am able to traverse it and manipulate it in 
memory. The following code:


Stream s = File.Open(example.xml, FileMode.Open);
XDocument d = XDocument.Load(s);
s.Close();
d.Save(example.xml);

Produces the following exception:

[23:19:05] PartyCraft.CurrentDomain_UnhandledException: Error: 
InvalidOperationException: This XmlWriter does not accept Text at this 
state Prolog.
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: 
This XmlWriter does not accept Text at this state Prolog.
at System.Xml.XmlTextWriter.ShiftStateContent (System.String occured, 
Boolean allowAttribute) [0x0] in filename unknown:0
at System.Xml.XmlTextWriter.WriteString (System.String text) [0x0] 
in filename unknown:0
at System.Xml.DefaultXmlWriter.WriteString (System.String text) 
[0x0] in filename unknown:0
at System.Xml.Linq.XText.WriteTo (System.Xml.XmlWriter w) [0x0] in 
filename unknown:0
at System.Xml.Linq.XDocument.WriteTo (System.Xml.XmlWriter w) 
[0x0] in filename unknown:0
at System.Xml.Linq.XNode.ToString (SaveOptions options) [0x0] in 
filename unknown:0

at System.Xml.Linq.XNode.ToString () [0x0] in filename unknown:0
at PartyCraftServer.XmlSettings.set_Item (System.String key, 
System.String value) [0x0] in filename unknown:0
at PartyCraftServer.Commands.SettingCommand.ExecuteCommand 
(LibMinecraft.Server.RemoteClient client, System.String[] parameters) 
[0x0] in filename unknown:0
at PartyCraftServer.Commands.Command.Execute 
(LibMinecraft.Server.RemoteClient client, System.String command) 
[0x0] in filename unknown:0

at PartyCraftServer.PartyCraft.Run () [0x0] in filename unknown:0
at PartyCraftServer.Program.Main (System.String[] args) [0x0] in 
filename unknown:0


The same exception occurs on d.ToString();

The XML that is being loaded looks like this:

?xml version=1.0 encoding=utf-8 ?
partyCraft
server maxplayers=100
motdPartyCraft Test Server/motd
messages
death
!--TODO--
suicide§e{0} killed themselves./suicide
creeper§e{0} looked at a creeper funny./creeper
/death
/messages
/server

command
alias
settings/setting
/alias
/command

plugins
!--TODO--
pluginTestPlugin.dll/plugin
/plugins
/partyCraft

And when saved, even though an exception occurs, the document is 
overwritten with this:


?xml version=1.0 encoding=utf-8 ?

This is the output from mono --version:

Mono JIT compiler version 2.10.5 (Debian 2.10.5-1)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. 
www.mono-project.com

TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

Any help would be appreciated.

--
Drew Sir Cmpwn DeVault
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono-Only XDocument.Save Error

2012-02-05 Thread Drew DeVault
I've narrowed the issue down - it only occurs when XDocument.Load is 
used with LoadOptions.PreserveWhitespace.  I've uploaded an example 
demonstrating this error.  The relevant XML file is in /bin/Debug.

http://sircmpwn.users.sf.net/uploads/0TestXDocument.tar.gz

--
Drew Sir Cmpwn DeVault

On 02/06/2012 12:14 AM, Atsushi Eno wrote:
I have one doubt that I think is likely the cause of the problem and 
also that prevents me from verifying it: you seem to have non-ASCII 
character in your XML you pasted in the message. This could be cause 
of the error e.g. inconsistent encoding input/output. A reproducible 
test case that everyone can examine is appreciated.


Atsushi Eno


I can duplicate this problem on Linux Mint 12 and Ubuntu 11.10, but 
Microsoft.NET on Windows 7 does not have the issue. The issue is that 
my XDocument becomes corrupted the moment it loads, and cannot be 
saved. Strangely, I am able to traverse it and manipulate it in 
memory. The following code:


Stream s = File.Open(example.xml, FileMode.Open);
XDocument d = XDocument.Load(s);
s.Close();
d.Save(example.xml);

Produces the following exception:

[23:19:05] PartyCraft.CurrentDomain_UnhandledException: Error: 
InvalidOperationException: This XmlWriter does not accept Text at 
this state Prolog.
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: 
This XmlWriter does not accept Text at this state Prolog.
at System.Xml.XmlTextWriter.ShiftStateContent (System.String occured, 
Boolean allowAttribute) [0x0] in filename unknown:0
at System.Xml.XmlTextWriter.WriteString (System.String text) 
[0x0] in filename unknown:0
at System.Xml.DefaultXmlWriter.WriteString (System.String text) 
[0x0] in filename unknown:0
at System.Xml.Linq.XText.WriteTo (System.Xml.XmlWriter w) [0x0] 
in filename unknown:0
at System.Xml.Linq.XDocument.WriteTo (System.Xml.XmlWriter w) 
[0x0] in filename unknown:0
at System.Xml.Linq.XNode.ToString (SaveOptions options) [0x0] in 
filename unknown:0

at System.Xml.Linq.XNode.ToString () [0x0] in filename unknown:0
at PartyCraftServer.XmlSettings.set_Item (System.String key, 
System.String value) [0x0] in filename unknown:0
at PartyCraftServer.Commands.SettingCommand.ExecuteCommand 
(LibMinecraft.Server.RemoteClient client, System.String[] parameters) 
[0x0] in filename unknown:0
at PartyCraftServer.Commands.Command.Execute 
(LibMinecraft.Server.RemoteClient client, System.String command) 
[0x0] in filename unknown:0

at PartyCraftServer.PartyCraft.Run () [0x0] in filename unknown:0
at PartyCraftServer.Program.Main (System.String[] args) [0x0] in 
filename unknown:0


The same exception occurs on d.ToString();

The XML that is being loaded looks like this:

?xml version=1.0 encoding=utf-8 ?
partyCraft
server maxplayers=100
motdPartyCraft Test Server/motd
messages
death
!--TODO--
suicide§e{0} killed themselves./suicide
creeper§e{0} looked at a creeper funny./creeper
/death
/messages
/server

command
alias
settings/setting
/alias
/command

plugins
!--TODO--
pluginTestPlugin.dll/plugin
/plugins
/partyCraft

And when saved, even though an exception occurs, the document is 
overwritten with this:


?xml version=1.0 encoding=utf-8 ?

This is the output from mono --version:

Mono JIT compiler version 2.10.5 (Debian 2.10.5-1)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. 
www.mono-project.com

TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

Any help would be appreciated.

--
Drew Sir Cmpwn DeVault
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list