diff options
Diffstat (limited to 'SparkleShare/Mac/SparkleController.cs')
-rwxr-xr-x | SparkleShare/Mac/SparkleController.cs | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/SparkleShare/Mac/SparkleController.cs b/SparkleShare/Mac/SparkleController.cs index 3b4f0e4..9c9b066 100755 --- a/SparkleShare/Mac/SparkleController.cs +++ b/SparkleShare/Mac/SparkleController.cs @@ -42,20 +42,25 @@ namespace SparkleShare { public SparkleController () : base () { string content_path = - Directory.GetParent (System.AppDomain.CurrentDomain.BaseDirectory) - .ToString (); + Directory.GetParent (System.AppDomain.CurrentDomain.BaseDirectory).ToString (); string app_path = Directory.GetParent (content_path).ToString (); string growl_path = Path.Combine (app_path, "Frameworks", "Growl.framework", "Growl"); + // Needed for Growl Dlfcn.dlopen (growl_path, 0); NSApplication.Init (); + // Let's use the bundled git first SparkleBackend.DefaultBackend.Path = Path.Combine (NSBundle.MainBundle.ResourcePath, - "git", "bin", "git"); + "git", "libexec", "git-core", "git"); + + SparkleGit.ExecPath = + Path.Combine (NSBundle.MainBundle.ResourcePath, + "git", "libexec", "git-core"); } @@ -161,13 +166,13 @@ namespace SparkleShare { get { string resource_path = NSBundle.MainBundle.ResourcePath; string html_path = Path.Combine (resource_path, "HTML", "event-log.html"); - - StreamReader reader = new StreamReader (html_path); - string html = reader.ReadToEnd (); - reader.Close (); + string html = File.ReadAllText (html_path); + + string jquery_file_path = Path.Combine (NSBundle.MainBundle.ResourcePath, + "HTML", "jquery.js"); - html = html.Replace ("<!-- $jquery-url -->", "file://" + - Path.Combine (NSBundle.MainBundle.ResourcePath, "HTML", "jquery.js")); + string jquery = File.ReadAllText (jquery_file_path); + html = html.Replace ("<!-- $jquery -->", jquery); return html; } |