From 0cc28520dca53349fc88209e8312e1594e6f1de9 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 10 Sep 2017 13:12:24 +0100 Subject: [PATCH] build: Replace all MonoMac references --- SparkleShare/Mac/AppDelegate.cs | 4 ++-- SparkleShare/Mac/Controller.cs | 17 +++++++---------- SparkleShare/Mac/MainMenu.xib.designer.cs | 4 ++-- SparkleShare/Mac/UserInterface/About.cs | 6 +++--- SparkleShare/Mac/UserInterface/Bubbles.cs | 4 ++-- SparkleShare/Mac/UserInterface/EventLog.cs | 8 ++++---- SparkleShare/Mac/UserInterface/Note.cs | 6 +++--- SparkleShare/Mac/UserInterface/Setup.cs | 8 ++++---- SparkleShare/Mac/UserInterface/SetupWindow.cs | 6 +++--- SparkleShare/Mac/UserInterface/StatusIcon.cs | 4 ++-- SparkleShare/Mac/UserInterface/UserInterface.cs | 6 +++--- SparkleShare/Mac/Watcher.cs | 6 +++--- SparkleShare/Mac/packReleaseDist.sh | 3 +-- 13 files changed, 39 insertions(+), 43 deletions(-) diff --git a/SparkleShare/Mac/AppDelegate.cs b/SparkleShare/Mac/AppDelegate.cs index 3c4512d3..f68c695d 100755 --- a/SparkleShare/Mac/AppDelegate.cs +++ b/SparkleShare/Mac/AppDelegate.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ // along with this program. If not, see . -using MonoMac.AppKit; +using AppKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/Controller.cs b/SparkleShare/Mac/Controller.cs index 0bc168ae..c486cb76 100644 --- a/SparkleShare/Mac/Controller.cs +++ b/SparkleShare/Mac/Controller.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -20,13 +20,11 @@ using System.Collections.Generic; using System.IO; using System.Threading; -using Mono.Unix.Native; -using MonoMac.Foundation; -using MonoMac.AppKit; +using Foundation; +using AppKit; using Sparkles; using Sparkles.Git; -using System.Linq; namespace SparkleShare { @@ -91,11 +89,10 @@ namespace SparkleShare { } - public override void CreateStartupItem () - { - // There aren't any bindings in MonoMac to support this yet, so - // we call out to an applescript to do the job - + // There aren't any bindings in Xamarin.Mac to support this yet, so + // we call out to an applescript to do the job + public override void CreateStartupItem () + { string args = "-e 'tell application \"System Events\" to " + "make login item at end with properties " + "{path:\"" + NSBundle.MainBundle.BundlePath + "\", hidden:false}'"; diff --git a/SparkleShare/Mac/MainMenu.xib.designer.cs b/SparkleShare/Mac/MainMenu.xib.designer.cs index 1ce6227d..90e749cf 100755 --- a/SparkleShare/Mac/MainMenu.xib.designer.cs +++ b/SparkleShare/Mac/MainMenu.xib.designer.cs @@ -11,8 +11,8 @@ namespace SparkleShare { - // Should subclass MonoMac.AppKit.NSResponder - [MonoMac.Foundation.Register("AppDelegate")] + // Should subclass AppKit.NSResponder + [Foundation.Register("AppDelegate")] public partial class AppDelegate { } } diff --git a/SparkleShare/Mac/UserInterface/About.cs b/SparkleShare/Mac/UserInterface/About.cs index ba44355a..662a5f7d 100644 --- a/SparkleShare/Mac/UserInterface/About.cs +++ b/SparkleShare/Mac/UserInterface/About.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -18,8 +18,8 @@ using System; using System.Drawing; -using MonoMac.AppKit; -using MonoMac.Foundation; +using AppKit; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/Bubbles.cs b/SparkleShare/Mac/UserInterface/Bubbles.cs index 59701b66..369cda9c 100755 --- a/SparkleShare/Mac/UserInterface/Bubbles.cs +++ b/SparkleShare/Mac/UserInterface/Bubbles.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ using System; -using MonoMac.Foundation; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/EventLog.cs b/SparkleShare/Mac/UserInterface/EventLog.cs index 51cb5cc6..8a5b2b58 100644 --- a/SparkleShare/Mac/UserInterface/EventLog.cs +++ b/SparkleShare/Mac/UserInterface/EventLog.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -19,9 +19,9 @@ using System; using System.Drawing; using System.IO; -using MonoMac.AppKit; -using MonoMac.Foundation; -using MonoMac.WebKit; +using AppKit; +using Foundation; +using WebKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/Note.cs b/SparkleShare/Mac/UserInterface/Note.cs index af3a1aa2..c1c063a5 100644 --- a/SparkleShare/Mac/UserInterface/Note.cs +++ b/SparkleShare/Mac/UserInterface/Note.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -18,8 +18,8 @@ using System; using System.Drawing; -using MonoMac.AppKit; -using MonoMac.Foundation; +using AppKit; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/Setup.cs b/SparkleShare/Mac/UserInterface/Setup.cs index 8387289a..011ba2c4 100644 --- a/SparkleShare/Mac/UserInterface/Setup.cs +++ b/SparkleShare/Mac/UserInterface/Setup.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -21,9 +21,9 @@ using System.Drawing; using System.IO; using Mono.Unix; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.WebKit; +using Foundation; +using AppKit; +using WebKit; using Sparkles; diff --git a/SparkleShare/Mac/UserInterface/SetupWindow.cs b/SparkleShare/Mac/UserInterface/SetupWindow.cs index ab0b9e50..e57fb6b7 100644 --- a/SparkleShare/Mac/UserInterface/SetupWindow.cs +++ b/SparkleShare/Mac/UserInterface/SetupWindow.cs @@ -1,4 +1,4 @@ -// SparkleShare, an instant update workflow to Git. +// SparkleShare, an instant update workflow to Git. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -18,8 +18,8 @@ using System.Collections.Generic; using System.Drawing; -using MonoMac.Foundation; -using MonoMac.AppKit; +using Foundation; +using AppKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/StatusIcon.cs b/SparkleShare/Mac/UserInterface/StatusIcon.cs index 39469af5..9cae6905 100644 --- a/SparkleShare/Mac/UserInterface/StatusIcon.cs +++ b/SparkleShare/Mac/UserInterface/StatusIcon.cs @@ -1,4 +1,4 @@ -// SparkleShare, an instant update workflow to Git. +// SparkleShare, an instant update workflow to Git. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -19,7 +19,7 @@ using System; using System.Collections.Generic; using System.Drawing; -using MonoMac.AppKit; +using AppKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/UserInterface.cs b/SparkleShare/Mac/UserInterface/UserInterface.cs index a3fd0d98..9590dac2 100755 --- a/SparkleShare/Mac/UserInterface/UserInterface.cs +++ b/SparkleShare/Mac/UserInterface/UserInterface.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -17,8 +17,8 @@ using System; -using MonoMac.AppKit; -using MonoMac.Foundation; +using AppKit; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/Watcher.cs b/SparkleShare/Mac/Watcher.cs index ff2d12af..e8de3ae5 100755 --- a/SparkleShare/Mac/Watcher.cs +++ b/SparkleShare/Mac/Watcher.cs @@ -1,6 +1,6 @@ -// Originally taken from: +// Originally taken from: // https://github.com/jesse99/Continuum/blob/master/source/shared/DirectoryWatcher.cs -// Modified to use MonoMac and integrate into SparkleShare +// Modified to use Xamarin.Mac and integrate into SparkleShare // // Copyright (C) 2008 Jesse Jones // Copyright (C) 2012 Hylke Bons @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.IO; -using MonoMac.Foundation; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/packReleaseDist.sh b/SparkleShare/Mac/packReleaseDist.sh index 85f43efa..d5c52a6e 100755 --- a/SparkleShare/Mac/packReleaseDist.sh +++ b/SparkleShare/Mac/packReleaseDist.sh @@ -19,6 +19,5 @@ cp ${MONO_PATH}/lib/libMonoPosixHelper.dylib ../MacOS/ sed -i .bak 's/libMonoPosixHelper.dylib/@executable_path\/libMonoPosixHelper.dylib/' ./config # merge all Assemblies into one Mac binary -mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe Sparkles.dll MonoMac.dll Sparkles.Git.dll +mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe Sparkles.dll Xamarin.Mac.dll Sparkles.Git.dll rm *.dll *.exe -