Skip to content

Instantly share code, notes, and snippets.

View mhutch's full-sized avatar

Mikayla Hutchinson mhutch

View GitHub Profile
#!/bin/sh
MONO_ASM_DIR=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5
# need at least NuGet 3, Mono 4.1 ships 2.8.4
if [ ! -e nuget.exe ]; then
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe || exit 1
fi
# for some reason Mono doesn't even build mono-api-html or mono-api-diff
@mhutch
mhutch / StartProcess.cs
Last active October 4, 2015 11:38
Taskified StartProcess
using System;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
//MIT license, from MonoDevelop ProcessUtils.cs
public static Task<int> StartProcess (ProcessStartInfo psi, TextWriter stdout, TextWriter stderr, CancellationToken cancellationToken)
{
var tcs = new TaskCompletionSource<int> ();
@mhutch
mhutch / gist:2625243
Created May 7, 2012 01:03
Copy Unity addins into upstream MonoDevelop
cp -r /Applications/Unity/MonoDevelop.app//Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.Debugger.Soft.Unity/ /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/
cp -r /Applications/Unity/MonoDevelop.app//Contents/MacOS/lib/monodevelop/AddIns/BackendBindings/UnityScript/ /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/BackendBindings/
@mhutch
mhutch / gist:2253141
Created March 30, 2012 17:27
Possible fix for Gtk.Container resurrection bug
--- /c/Users/Michael/Desktop/Container.custom.txt Fri Mar 30 13:16:00 2012
+++ /c/Users/Michael/Desktop/Container.custom.txt-mod Fri Mar 30 13:26:24 2012
@@ -124,6 +124,7 @@
}
}
+//FIXME: fix this too
static void ForallOld_cb (IntPtr container, bool include_internals, IntPtr cb, IntPtr data)
{
try {
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Novell\GtkSharp]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Novell\GtkSharp\InstallFolder]
@="C:\\Program Files (x86)\\GtkSharp\\2.12\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Novell\GtkSharp\Version]
@="2.12.10"
@mhutch
mhutch / gist:1714726
Created February 1, 2012 02:36
Convert NSObjects to .NET primitives
class NSObjectConverter
{
static IntPtr selObjCType = MonoMac.ObjCRuntime.Selector.GetHandle ("objCType");
static IntPtr clsNSCFBoolean = Class.GetHandle ("NSCFBoolean");
public static object ConvertNumber (NSNumber num)
{
char kind;
unsafe {
kind = (char) *((byte *) MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend (num.Handle, selObjCType));
@mhutch
mhutch / MSBuild targets
Created September 26, 2011 11:58
PLP Info
/c/Program Files (x86)/MSBuild/Microsoft/Portable/
/c/Program Files (x86)/MSBuild/Microsoft/Portable/v4.0
/c/Program Files (x86)/MSBuild/Microsoft/Portable/v4.0/Microsoft.Portable.Common.targets
/c/Program Files (x86)/MSBuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets
/c/Program Files (x86)/MSBuild/Microsoft/Portable/v4.0/Microsoft.Portable.VisualBasic.targets
commit ba3b54264bb1ef30593235a31c17ee75485d75da
Author: Harsimran Singh Bath <harsimranbath@gmail.com>
Date: Sun Jul 27 17:56:23 2014 -0700
[JavaScript] Added reference to SOurce Editor. Updated AddinInfo.cs file. Added conditional context menu option for "Go to Declaration".
commit 50ef01270dd71dc0876c98e22f4d4f4728126a73
Author: Harsimran Singh Bath <harsimranbath@gmail.com>
Date: Sun Jul 27 17:38:07 2014 -0700
--- a 2014-06-27 14:01:34.000000000 -0400
+++ b 2014-06-27 14:02:03.000000000 -0400
@@ -3,11 +3,9 @@
Copyright (C) 2005-2013 Various Mono authors
Loading default tasks for ToolsVersion: 2.0 from /Users/michael/Mono/bockbuild/profiles/xs-mac-dev-32/build-root/_install/lib/mono/2.0/Microsoft.Common.tasks
-Build started 6/27/2014 2:01:34 PM.
+Build started 6/27/2014 2:01:26 PM.
__________________________________________________
Loading default tasks for ToolsVersion: 4.0 from /Users/michael/Mono/bockbuild/profiles/xs-mac-dev-32/build-root/_install/lib/mono/4.5/Microsoft.Common.tasks
diff --git a/configure b/configure
index 8db98f5..669b70b 100755
--- a/configure
+++ b/configure
@@ -271,11 +271,14 @@ if [ x$select == xyes -o ! -a profiles/$profile ]; then
fi
if test `uname` = "Darwin"; then
+ # if building on bots or in default environment, fix up paths to use system Mono
if test "x$BUILD_REVISION" != "x" -o "x$DYLD_FALLBACK_LIBRARY_PATH" = "x"; then