From 94f4cb88c9f65c02f98b73a2463d42c53d2d5ab0 Mon Sep 17 00:00:00 2001 From: mildmojo Date: Thu, 14 Feb 2013 03:38:17 -0500 Subject: [PATCH] Fixes OSX by using `exec` instead of `open`. Sets `UseShellExecute` to false so that the editor binary is called directly with `exec` instead of being launched with `open`. This does mean the shim will only work with actual binaries, not OSX app bundles. --- UnityExternalScriptEditorHelper/Main.cs | 3 ++- .../UnityExternalScriptEditorHelper.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/UnityExternalScriptEditorHelper/Main.cs b/UnityExternalScriptEditorHelper/Main.cs index 4661557..2a43fa9 100644 --- a/UnityExternalScriptEditorHelper/Main.cs +++ b/UnityExternalScriptEditorHelper/Main.cs @@ -38,11 +38,12 @@ public static void Main(string[] args) launchArguments = launchArguments.Replace("*line*", launchLine); File.AppendAllText(logPath, "*****Launching*****"+Environment.NewLine); - File.AppendAllLines(logPath, new string[] {launchApplication, launchArguments}); + File.AppendAllLines(logPath, new string[] {launchApplication, " ", launchArguments}); // Launch the app System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false; + proc.StartInfo.UseShellExecute = false; proc.StartInfo.FileName = launchApplication; proc.StartInfo.Arguments = launchArguments; proc.Start(); diff --git a/UnityExternalScriptEditorHelper/UnityExternalScriptEditorHelper.xml b/UnityExternalScriptEditorHelper/UnityExternalScriptEditorHelper.xml index 32b9515..b509a35 100644 --- a/UnityExternalScriptEditorHelper/UnityExternalScriptEditorHelper.xml +++ b/UnityExternalScriptEditorHelper/UnityExternalScriptEditorHelper.xml @@ -2,8 +2,8 @@ -