From b3126200486b2469d761a4ff71b285be384c1c14 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 31 Mar 2016 09:35:26 +0100 Subject: [PATCH] Rename SparkleLib to Sparkles --- .gitignore | 1 - Makefile.am | 13 +-- README.md | 2 +- .../SparkleShare.sln => SparkleShare.sln | 8 +- SparkleShare/Common/AboutController.cs | 12 ++- SparkleShare/Common/Avatars.cs | 2 +- SparkleShare/Common/BaseController.cs | 16 +-- SparkleShare/Common/BubblesController.cs | 2 +- SparkleShare/Common/EventLogController.cs | 2 +- SparkleShare/Common/Invite.cs | 2 +- SparkleShare/Common/Makefile.am | 2 +- SparkleShare/Common/NoteController.cs | 2 +- SparkleShare/Common/Plugins/gitorious.png | Bin 1238 -> 0 bytes SparkleShare/Common/Plugins/gitorious.xml | 20 ---- SparkleShare/Common/Plugins/gitorious@2x.png | Bin 2751 -> 0 bytes SparkleShare/Common/Plugins/ssnet.png | Bin 1438 -> 0 bytes SparkleShare/Common/Plugins/ssnet.xml | 19 ---- SparkleShare/Common/Plugins/ssnet@2x.png | Bin 3701 -> 0 bytes .../Common/{Plugins => Presets}/Makefile.am | 7 +- .../Common/{Plugins => Presets}/bitbucket.png | Bin .../Common/{Plugins => Presets}/bitbucket.xml | 0 .../{Plugins => Presets}/bitbucket@2x.png | Bin .../Common/{Plugins => Presets}/github.png | Bin .../Common/{Plugins => Presets}/github.xml | 0 .../Common/{Plugins => Presets}/github@2x.png | Bin .../{Plugins => Presets}/own-server.png | Bin .../{Plugins => Presets}/own-server.xml | 0 .../{Plugins => Presets}/own-server@2x.png | Bin .../{Plugins => Presets}/parse_plugins.xsl | 0 .../Common/{Plugins => Presets}/planio.png | Bin .../Common/{Plugins => Presets}/planio.xml | 0 .../Common/{Plugins => Presets}/planio@2x.png | Bin SparkleShare/Common/SetupController.cs | 100 ++++++++---------- SparkleShare/Common/SparkleShare.cs | 31 +++--- SparkleShare/Common/StatusIconController.cs | 2 +- SparkleShare/Linux/Bubbles.cs | 3 +- SparkleShare/Linux/Controller.cs | 7 +- SparkleShare/Linux/EventLog.cs | 2 +- SparkleShare/Linux/Makefile.am | 5 +- SparkleShare/Linux/Pixmaps/Makefile.am | 1 + SparkleShare/Linux/Pixmaps/icons/Makefile.am | 1 + .../Linux/Pixmaps/icons/gnome/Makefile.am | 1 + SparkleShare/Linux/Setup.cs | 22 ++-- SparkleShare/Linux/SparkleShare.Linux.csproj | 82 +++++++------- SparkleShare/Linux/UserInterface.cs | 29 ++--- SparkleShare/Linux/sparkleshare.in | 4 +- .../Mac/{Controllers => }/Controller.cs | 12 +-- SparkleShare/Mac/SparkleShare.Mac.csproj | 93 +++++++--------- SparkleShare/Mac/UserInterface/EventLog.cs | 20 ++-- SparkleShare/Mac/UserInterface/Setup.cs | 57 +++++----- .../Mac/UserInterface/UserInterface.cs | 13 +-- SparkleShare/Mac/packReleaseDist.sh | 2 +- SparkleShare/Windows/SparkleController.cs | 6 +- .../Windows/SparkleEventLogWindow.xaml.cs | 4 +- SparkleShare/Windows/SparkleNote.xaml.cs | 2 +- SparkleShare/Windows/SparkleSetup.cs | 16 +-- .../Windows/SparkleShare.Windows.csproj | 52 ++++----- SparkleShare/Windows/SparkleShare.vssettings | 2 +- SparkleShare/Windows/SparkleShare.wxs | 4 +- SparkleShare/Windows/SparkleUI.cs | 2 +- .../AuthenticationInfo.cs | 2 +- {SparkleLib => Sparkles}/BaseFetcher.cs | 2 +- {SparkleLib => Sparkles}/BaseListener.cs | 2 +- {SparkleLib => Sparkles}/BaseRepository.cs | 2 +- {SparkleLib => Sparkles}/ChangeSet.cs | 2 +- {SparkleLib => Sparkles}/Command.cs | 7 +- {SparkleLib => Sparkles}/Configuration.cs | 8 +- {SparkleLib => Sparkles}/Extensions.cs | 2 +- {SparkleLib => Sparkles}/Git/GitCommand.cs | 2 +- {SparkleLib => Sparkles}/Git/GitFetcher.cs | 4 +- {SparkleLib => Sparkles}/Git/GitRepository.cs | 2 +- {SparkleLib => Sparkles}/Git/Makefile.am | 6 +- .../Git/Sparkles.Git.csproj | 16 +-- Sparkles/InstallationInfo.Directory.cs | 29 +++++ .../InstallationInfo.Directory.cs.in | 9 +- .../InstallationInfo.cs | 8 +- {SparkleLib => Sparkles}/ListenerFactory.cs | 2 +- {SparkleLib => Sparkles}/Logger.cs | 30 +++--- {SparkleLib => Sparkles}/Makefile.am | 8 +- .../Common/Plugin.cs => Sparkles/Preset.cs | 52 ++++----- .../SSHAuthenticationInfo.cs | 2 +- {SparkleLib => Sparkles}/SSHFetcher.cs | 2 +- .../Sparkles.csproj | 9 +- {SparkleLib => Sparkles}/TcpListener.cs | 4 +- {SparkleLib => Sparkles}/User.cs | 2 +- {SparkleLib => Sparkles}/Watcher.cs | 2 +- build/Makefile.am | 1 + build/build.environment.mk | 9 +- build/build.mk | 1 - build/build.rules.mk | 1 - build/bump-version.sh | 4 +- configure.ac | 8 +- ...parkleLib.txt => License_for_Sparkles.txt} | 0 93 files changed, 438 insertions(+), 487 deletions(-) rename SparkleShare/SparkleShare.sln => SparkleShare.sln (85%) delete mode 100644 SparkleShare/Common/Plugins/gitorious.png delete mode 100644 SparkleShare/Common/Plugins/gitorious.xml delete mode 100644 SparkleShare/Common/Plugins/gitorious@2x.png delete mode 100644 SparkleShare/Common/Plugins/ssnet.png delete mode 100644 SparkleShare/Common/Plugins/ssnet.xml delete mode 100644 SparkleShare/Common/Plugins/ssnet@2x.png rename SparkleShare/Common/{Plugins => Presets}/Makefile.am (66%) rename SparkleShare/Common/{Plugins => Presets}/bitbucket.png (100%) rename SparkleShare/Common/{Plugins => Presets}/bitbucket.xml (100%) rename SparkleShare/Common/{Plugins => Presets}/bitbucket@2x.png (100%) rename SparkleShare/Common/{Plugins => Presets}/github.png (100%) rename SparkleShare/Common/{Plugins => Presets}/github.xml (100%) rename SparkleShare/Common/{Plugins => Presets}/github@2x.png (100%) rename SparkleShare/Common/{Plugins => Presets}/own-server.png (100%) rename SparkleShare/Common/{Plugins => Presets}/own-server.xml (100%) rename SparkleShare/Common/{Plugins => Presets}/own-server@2x.png (100%) rename SparkleShare/Common/{Plugins => Presets}/parse_plugins.xsl (100%) rename SparkleShare/Common/{Plugins => Presets}/planio.png (100%) rename SparkleShare/Common/{Plugins => Presets}/planio.xml (100%) rename SparkleShare/Common/{Plugins => Presets}/planio@2x.png (100%) rename SparkleShare/Mac/{Controllers => }/Controller.cs (97%) rename {SparkleLib => Sparkles}/AuthenticationInfo.cs (97%) rename {SparkleLib => Sparkles}/BaseFetcher.cs (99%) mode change 100755 => 100644 rename {SparkleLib => Sparkles}/BaseListener.cs (99%) mode change 100755 => 100644 rename {SparkleLib => Sparkles}/BaseRepository.cs (99%) rename {SparkleLib => Sparkles}/ChangeSet.cs (99%) rename {SparkleLib => Sparkles}/Command.cs (96%) rename {SparkleLib => Sparkles}/Configuration.cs (97%) mode change 100755 => 100644 rename {SparkleLib => Sparkles}/Extensions.cs (99%) mode change 100755 => 100644 rename {SparkleLib => Sparkles}/Git/GitCommand.cs (98%) rename {SparkleLib => Sparkles}/Git/GitFetcher.cs (99%) mode change 100755 => 100644 rename {SparkleLib => Sparkles}/Git/GitRepository.cs (99%) rename {SparkleLib => Sparkles}/Git/Makefile.am (84%) rename SparkleLib/Git/SparkleLib.Git.csproj => Sparkles/Git/Sparkles.Git.csproj (91%) create mode 100644 Sparkles/InstallationInfo.Directory.cs rename SparkleLib/Defines.cs.in => Sparkles/InstallationInfo.Directory.cs.in (83%) rename SparkleLib/Backend.cs => Sparkles/InstallationInfo.cs (93%) mode change 100755 => 100644 rename {SparkleLib => Sparkles}/ListenerFactory.cs (99%) rename {SparkleLib => Sparkles}/Logger.cs (82%) rename {SparkleLib => Sparkles}/Makefile.am (83%) rename SparkleShare/Common/Plugin.cs => Sparkles/Preset.cs (71%) rename {SparkleLib => Sparkles}/SSHAuthenticationInfo.cs (99%) rename {SparkleLib => Sparkles}/SSHFetcher.cs (99%) rename SparkleLib/SparkleLib.csproj => Sparkles/Sparkles.csproj (92%) rename {SparkleLib => Sparkles}/TcpListener.cs (98%) rename {SparkleLib => Sparkles}/User.cs (97%) rename {SparkleLib => Sparkles}/Watcher.cs (98%) mode change 100755 => 100644 rename legal/{License_for_SparkleLib.txt => License_for_Sparkles.txt} (100%) diff --git a/.gitignore b/.gitignore index 70faa4c1..1fee9b75 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,6 @@ missing build/m4/shave/shave build/m4/*.m4 build/m4/shave/shave-libtool -SparkleLib/Defines.cs SparkleShare/Linux/sparkleshare SparkleShare/Mac/git* gnome-doc-utils.make diff --git a/Makefile.am b/Makefile.am index d2771fea..a01cb1c1 100755 --- a/Makefile.am +++ b/Makefile.am @@ -1,22 +1,23 @@ -basedirs = build SparkleLib SparkleLib/Git +basedirs = build Sparkles Sparkles/Git SUBDIRS = $(basedirs) $(GUISUBDIRS) DIST_SUBDIRS = $(basedirs) SparkleShare EXTRA_DIST = \ News.txt \ - README.md \ + README.md \ legal/License_for_SparkleShare.txt \ - legal/License_for_SparkleLib.txt \ + legal/License_for_Sparkles.txt \ legal/Authors.txt \ SparkleShare/Linux/README.md \ SparkleShare/Linux/org.sparkleshare.SparkleShare.appdata.xml DISTCLEANFILES = \ - intltool-extract \ - intltool-merge \ - intltool-update \ + intltool-extract \ + intltool-merge \ + intltool-update \ gnome-doc-utils.make clean-local: rm -rf $(top_builddir)/bin + diff --git a/README.md b/README.md index a2908d76..2a3512dd 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ SparkleShare uses the version control system [Git](https://git-scm.com/) under t ## Free and Open Source -`SparkleShare` is Free and Open Source software and licensed under the [GNU General Public License version 3 or later](legal/License_for_SparkleShare.txt). You are welcome to change and redistribute it under certain conditions. Its library `SparkleLib` is licensed under the [GNU Lesser General Public License version 3 or later](legal/License_for_SparkleLib.txt). +`SparkleShare` is Free and Open Source software and licensed under the [GNU General Public License version 3 or later](legal/License_for_SparkleShare.txt). You are welcome to change and redistribute it under certain conditions. Its library `Sparkles` is licensed under the [GNU Lesser General Public License version 3 or later](legal/License_for_Sparkles.txt). ## Compiling from source diff --git a/SparkleShare/SparkleShare.sln b/SparkleShare.sln similarity index 85% rename from SparkleShare/SparkleShare.sln rename to SparkleShare.sln index 7a25902b..1d7731b6 100644 --- a/SparkleShare/SparkleShare.sln +++ b/SparkleShare.sln @@ -1,13 +1,13 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Linux", "Linux\SparkleShare.Linux.csproj", "{CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Mac", "SparkleShare\Mac\SparkleShare.Mac.csproj", "{CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleLib", "..\SparkleLib\SparkleLib.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles", "Sparkles\Sparkles.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleLib.Git", "..\SparkleLib\Git\SparkleLib.Git.csproj", "{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles.Git", "Sparkles\Git\Sparkles.Git.csproj", "{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Windows", "Windows\SparkleShare.Windows.csproj", "{728483AA-E34B-4441-BF2C-C8BC2901E4E0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Windows", "SparkleShare\Windows\SparkleShare.Windows.csproj", "{728483AA-E34B-4441-BF2C-C8BC2901E4E0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/SparkleShare/Common/AboutController.cs b/SparkleShare/Common/AboutController.cs index bc553b4c..60c4e91a 100644 --- a/SparkleShare/Common/AboutController.cs +++ b/SparkleShare/Common/AboutController.cs @@ -19,6 +19,8 @@ using System; using System.Net; using System.Threading; +using Sparkles; + namespace SparkleShare { public class SparkleAboutController { @@ -39,11 +41,11 @@ namespace SparkleShare { public SparkleAboutController () { - RunningVersion = SparkleLib.Backend.Version; + RunningVersion = InstallationInfo.Version; SparkleShare.Controller.ShowAboutWindowEvent += delegate { ShowWindowEvent (); - new Thread (() => CheckForNewVersion ()).Start (); + new Thread (CheckForNewVersion).Start (); }; } @@ -54,13 +56,13 @@ namespace SparkleShare { } - private void CheckForNewVersion () + void CheckForNewVersion () { UpdateLabelEvent ("Checking for updates..."); Thread.Sleep (500); - WebClient web_client = new WebClient (); - Uri uri = new Uri ("http://www.sparkleshare.org/version"); + var web_client = new WebClient (); + var uri = new Uri ("http://www.sparkleshare.org/version"); try { string latest_version = web_client.DownloadString (uri).Trim (); diff --git a/SparkleShare/Common/Avatars.cs b/SparkleShare/Common/Avatars.cs index c0cb0e65..981c05d5 100644 --- a/SparkleShare/Common/Avatars.cs +++ b/SparkleShare/Common/Avatars.cs @@ -23,7 +23,7 @@ using System.Net.Mime; using System.Net.Security; using System.Security.Cryptography.X509Certificates; -using SparkleLib; +using Sparkles; namespace SparkleShare { diff --git a/SparkleShare/Common/BaseController.cs b/SparkleShare/Common/BaseController.cs index d2dac560..46bb2487 100644 --- a/SparkleShare/Common/BaseController.cs +++ b/SparkleShare/Common/BaseController.cs @@ -21,8 +21,8 @@ using System.IO; using System.Linq; using System.Threading; -using SparkleLib; -using SparkleLib.Git; +using Sparkles; +using Sparkles.Git; namespace SparkleShare { @@ -155,7 +155,7 @@ namespace SparkleShare { // Path where the plugins are kept - public abstract string PluginsPath { get; } + public abstract string PresetsPath { get; } // Enables SparkleShare to start automatically at login public abstract void CreateStartupItem (); @@ -212,11 +212,11 @@ namespace SparkleShare { public virtual void Initialize () { - Logger.LogInfo ("Environment", "SparkleShare " + Backend.Version); + Logger.LogInfo ("Environment", "SparkleShare " + InstallationInfo.Version); Logger.LogInfo ("Environment", "Git " + GitCommand.GitVersion); - Logger.LogInfo ("Environment", Backend.Platform + " (" + Environment.OSVersion + ")"); + Logger.LogInfo ("Environment", InstallationInfo.Platform + " (" + Environment.OSVersion + ")"); - Plugin.PluginsPath = PluginsPath; + Preset.PresetsPath = PresetsPath; InstallProtocolHandler (); try { @@ -394,7 +394,7 @@ namespace SparkleShare { try { repo = (BaseRepository) Activator.CreateInstance ( - Type.GetType ("SparkleLib." + backend + "." + backend + "Repository, SparkleLib." + backend), + Type.GetType ("Sparkles." + backend + "." + backend + "Repository, Sparkles." + backend), new object [] { folder_path, Config }); } catch (Exception e) { @@ -561,7 +561,7 @@ namespace SparkleShare { try { this.fetcher = (BaseFetcher) Activator.CreateInstance ( - Type.GetType ("SparkleLib." + backend + ".SparkleFetcher, SparkleLib." + backend), info); + Type.GetType ("Sparkles." + backend + "." + backend + "Fetcher, Sparkles." + backend), info); } catch (Exception e) { Logger.LogInfo ("Controller", diff --git a/SparkleShare/Common/BubblesController.cs b/SparkleShare/Common/BubblesController.cs index b0665a85..7ed3dfaf 100644 --- a/SparkleShare/Common/BubblesController.cs +++ b/SparkleShare/Common/BubblesController.cs @@ -18,7 +18,7 @@ using System; using System.Text; -using SparkleLib; +using Sparkles; namespace SparkleShare { diff --git a/SparkleShare/Common/EventLogController.cs b/SparkleShare/Common/EventLogController.cs index ba4a5cb4..acbf4239 100644 --- a/SparkleShare/Common/EventLogController.cs +++ b/SparkleShare/Common/EventLogController.cs @@ -24,7 +24,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading; -using SparkleLib; +using Sparkles; namespace SparkleShare { diff --git a/SparkleShare/Common/Invite.cs b/SparkleShare/Common/Invite.cs index 7a8098bc..4e923855 100644 --- a/SparkleShare/Common/Invite.cs +++ b/SparkleShare/Common/Invite.cs @@ -21,7 +21,7 @@ using System.Net; using System.Text; using System.Xml; -using SparkleLib; +using Sparkles; namespace SparkleShare { diff --git a/SparkleShare/Common/Makefile.am b/SparkleShare/Common/Makefile.am index 2f972e5d..04d55813 100644 --- a/SparkleShare/Common/Makefile.am +++ b/SparkleShare/Common/Makefile.am @@ -1,3 +1,3 @@ SUBDIRS = HTML \ - Plugins \ + Presets \ Pixmaps diff --git a/SparkleShare/Common/NoteController.cs b/SparkleShare/Common/NoteController.cs index edd09fde..6edcd82d 100644 --- a/SparkleShare/Common/NoteController.cs +++ b/SparkleShare/Common/NoteController.cs @@ -18,7 +18,7 @@ using System; using System.Threading; -using SparkleLib; +using Sparkles; namespace SparkleShare { diff --git a/SparkleShare/Common/Plugins/gitorious.png b/SparkleShare/Common/Plugins/gitorious.png deleted file mode 100644 index 731835b734baf5ee6ce6538d52f148ce455bffea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1238 zcmV;{1S$K8P)X7?(N$>$00$|VSTsXo@f6(&+qel_WZX$ z0bt&>^$5Y|t`AaPABa98Toj`eWXhG)@cwQ7P`u{{ElKw1e0+B32qNG=0rG={aHCSN zCANfW+fo*2DYz1AZSK!SZ^v=;{#F9IxEO|n1dC22qID!$uO*0>c7ou01!9!Ei1=fI z^0;E5IqOoSxwiLHw2!E8M!g*+T`Mu%5RQRM;jm<9gQ=(hTU!fbW+q0S4>Rfn{0SY& zFVql3$P6G>C4797O7MC7F;chl)YGOPy0<$2FchP8M1d21>rvXX7A^XG3>ur=z@3X> zaA-7Kb2nr;bP(*BN-(vh82>oMKJ-M8X;4D;X?%Qk4H85k5m!u_sygG?zHwI*T8XQM zWHjmHam|nq1KWqG(2V9D@b@?dwXimw1${an%%wuGoz<|M$;D{$I$BHd28qo_#h{(l z7_x4Ko+*IEehahW0n{Eqin-z#b78&b!FH*@-Z%~|-@?VGCD8DF88={blw&F;W(;wM7a*~C(fufwMM5$ug3 z&_63c*C}8+kpcD2H}LC<5L=y)ver^m2O*cseZ$`L50Sn@?Ol~7xE_%zWVao9(o*)z zDs&k(!QfnvA=^saG(Lmj#uey49|lW9I+zXxn657|UiTS#K8i&{=u^xoKF?O|C+aE^ zOTO3}7#J>-$%O7h!Ig(x - - - - Gitorious - Open source infrastructure for hosting open source projects - gitorious.png - Git - 7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d - -
- ssh://git@gitorious.org/ - -
- - - /project/repository - -
-
diff --git a/SparkleShare/Common/Plugins/gitorious@2x.png b/SparkleShare/Common/Plugins/gitorious@2x.png deleted file mode 100644 index 806f1138420b4f5968230720f6d9d3d336c47754..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2751 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 diff --git a/SparkleShare/Common/Plugins/ssnet.xml b/SparkleShare/Common/Plugins/ssnet.xml deleted file mode 100644 index 718e6f3c..00000000 --- a/SparkleShare/Common/Plugins/ssnet.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - SparkleShare.Net - The easiest way to share projects with SparkleShare - ssnet.png - Git - -
- ssh://storage@sparkleshare.net/ - -
- - - /username/project - -
-
diff --git a/SparkleShare/Common/Plugins/ssnet@2x.png b/SparkleShare/Common/Plugins/ssnet@2x.png deleted file mode 100644 index 3449b9e41e06c395ae9ecc99909756e337939ed2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3701 zcmV-*4vO)KP);5B|e){ous%3Vk4N;xV(+~k@RtR&v<9c+! zS)U8QO{6xZv;CWZ&jEkY;CM?z#H(0fGhoTz1^fdbMu$>dyrG|gZjZEx5rP%N^Zg|S zL}5S_1gsQFLq$2v%muu1a?WI}|mi0p% zh4g1K^tc{}DrK{RL}9cneaH38b(hML)|%O3fgtHGv>X;_6PjA7L|6~#?eAx-y9)uR z9Z%Eu^KX%!*$cn~Ea?U9xJ<3Tn&?ws!_AGcI+fyJxk4NSOZrC$NjjH#=2fms7PK zinCQz6a$dm@dQ0@KS8I4O0XE(gkZM+e0G2G9%Ocmkz|S^l?uAWvvUTp(JsZ1inK-t zWrV7;9FERFr8d{Wq^!6L6(%&f{BF+w+266}#s^3^5=RKj&G2KX60#uy+CD2~1?Xi2 z%*;Zi241?GRlj>BURRE@f^Ox#e&A&ey}iSTh!l9z@M!T=omL^V3HuUFl}!Ql5?U|5 zn`$6G3#aBmCQ_`~ejR>y_N+;_zxURC1R4T_Qf+*6i)Y6YQkJ?+5lyowGb*O`yhmwv zmPPH1J>D#_YqniSGTVnPPZLi*1uEjKARL^F{|F%jvE|XurNvXTL%RXtz*NVjZo&jRy#8$jd{4=^TL-_a?8e^ViAp{6O3OjMoZcIR1p6$zM zIy-2VN7qjh#SxC5fGBRNcj6GGVQBqDjBeSE>$xm~lo(VCsJ+i1bPRqMiBJCkk?ONF zwtbE0**nje0U-ps5wTiWroxd3*ELO|@C3=O9MW->i_i$+AUqG(bxHRP7{~W@X9&Wu z*#Zw=vK2R#q9dXzy0{-T^&039To-x%9~km+rGS&p;cU2$==r}tqX496mM%a~{~$@< zZ+NVXLgV;J<4Nf{fX3BIp`}FIR>F)%v6Q%p1Za%{{H|^Q;+F02~(pXX6b3 z9R2ydjDGY>c-eE1BNwBmcP=kLfDoc7z)kq(v*o2NPo>a}0D%=?USQwR41idlRwj;M zFt8LYXHb!cP_la*I27ilAIQjC!4D}{CapGlaGy6ymtOais z?Qk~VhR(l(+VelQ<2@|{&~Z6!39uz3(X?m4?rp;`ByI`lm;t510jkH};ozfxNjP@` zfS_K(3uaioHb=HA;H__d9KU-2DHH&`o33Q_wRhVVT}pdiA+aVFD1|{#t08^g@M_P3 zRv!q6W8x?vsMU$%nE9DJ#1Z*&hFEJxRdcg#N7thr2mbqSS#$G)q(&}a-L3!5dk=q+ z;=8{9V03lX9N&|5agR?^ncjzRJl0(IkH**tL1E|9)Zcu9{;X#+ARA%I1cT!AG@g_c zOBHjjdQS$W1#wU}duO+?v&WHwpjI`?qM(ixqJxPAAmFqTD(`uPH^07(4Yz!kuC-Ti z!51GTc=cYQw;sUr94i{wbioL*Oq0C&dpM1f({ae5C;y45=fA_b6Mf*eGJsxWV!QGL zb;5d`C{k4C@*t2de9&XJjjaZIu?J2w@%Y35dnQlt_I=kge$`i5b>*ETF8y=lo=2=P zEpQ!3tiJ)-ARo<5@y_=?OX+aKz`B_g7elrKc_w}G^R<=9rz&;AXCozF0^Dbn$r{4^-3?pg!OM z3wWY+>pmc~Kmm$Yo!J+}RxG$_E5OfzkgdRuqI(?KHHHeRtiI~6O(zPP;_E*oGw~6; z+__}0e~8)1{{=vgY=>jNTDZ3c@X`=gh!too(bi~qF1(Rh=Zb~(PYbb@2(5@>7dP3B z=$^2%Bu|TEKVUaC=>~aKFERPh7bxubsrl}_&)iG@B{!1Y_;CPYC2?~XfC_EIA?OI4 zB=u@wJt-a9yxb}wn}K!#igx$LfKoQ2rQ90Q`TZ34y+_|r4s~>wAuObeCGVKATB%T& z+|S4re?pMo$K)fo6U-iCXw63E^T(Kc@HPe;<#SFWJ7IN>6Hnd6_+ZkI*D5k2S|NJt zu8Q!#`61C%yjL-N`C$sajFHkbn4ZG9hO zK@3EQdY!44?q}+``>~esIB&ydve^OR!C?*`oMigdADIB?>dK;07tx$Rv>hsY$e*-( zkn)y4B$MrBI-j>Kv=u{aNGd?s3?Q`m(ijAgt_!_=B+_YW7i@=yfW13+FqmFXx4&qY zWFi5q8XIS3<^;)9n(wal^RMZ;J%*RBO7|Uc&sw--CCb=O+huvr@dm zK9<89uN`GMlr~>WdVCX+Qk;rnQhoizrTHdL!&`t9LTIfNQ5fT<(&pD^ji4SYPFCxH z!2kSx%wBdAVWyA&Z-kkC=C|HL;^uFFhW&G8g4mWzvZvQfa2Q1hG=Oro)<>n3tE&;D z5*}$+G9N|&94?j342)$`BtLx@m22)`u2?`KSPt32LA#r4!Sq^l`8-QOV_=?(CDUmX zaHLeG*!D~`V zq!645j^l!60bDnMSVp+OqFgKzNryv~8kH!f9sPd7l+IkCf}idos8!x_)7gO+qFU*y zLz71tTRY4^%4aqRDAZfZXR0+0&CH)9t@N@20L1LPsd?Ha zYar>9^%Kf~zymYt7Byc=GyS z_T*!r7(Rc5^FOq<`LsO_>V%aFD}|f%8|Pn{Gc)N~;!zN=`?X1?59ATj ziT&)*wuk=enqM0M05{$9(OjAfYPZF#~Wo6R6>N5+D-S~{m7j++zrqa0PxwbKYndkE Plugins = new List (); - public Plugin SelectedPlugin; + public readonly List Presets = new List (); + public Preset SelectedPreset; public bool WindowIsOpen { get; private set; } public SparkleInvite PendingInvite { get; private set; } @@ -86,9 +86,9 @@ namespace SparkleShare { public double ProgressBarPercentage { get; private set; } - public int SelectedPluginIndex { + public int SelectedPresetIndex { get { - return Plugins.IndexOf (SelectedPlugin); + return Presets.IndexOf (SelectedPreset); } } @@ -117,35 +117,29 @@ namespace SparkleShare { PreviousUrl = ""; SyncingFolder = ""; - string local_plugins_path = Plugin.LocalPluginsPath; - int local_plugins_count = 0; + string local_presets_path = Preset.LocalPresetsPath; + int local_presets_count = 0; - // Import all of the plugins - if (Directory.Exists (local_plugins_path)) - // Local plugins go first... - foreach (string xml_file_path in Directory.GetFiles (local_plugins_path, "*.xml")) { - Plugins.Add (new Plugin (xml_file_path)); - local_plugins_count++; + // Import all of the presets + if (Directory.Exists (local_presets_path)) + // Local presets go first... + foreach (string xml_file_path in Directory.GetFiles (local_presets_path, "*.xml")) { + Presets.Add (new Preset (xml_file_path)); + local_presets_count++; } - // ...system plugins after that... - if (Directory.Exists (SparkleShare.Controller.PluginsPath)) { - foreach (string xml_file_path in Directory.GetFiles (SparkleShare.Controller.PluginsPath, "*.xml")) { + // ...system presets after that... + if (Directory.Exists (SparkleShare.Controller.PresetsPath)) { + foreach (string xml_file_path in Directory.GetFiles (SparkleShare.Controller.PresetsPath, "*.xml")) { // ...and "Own server" at the very top - if (xml_file_path.EndsWith ("own-server.xml")) { - Plugins.Insert (0, new Plugin (xml_file_path)); - - } else if (xml_file_path.EndsWith ("ssnet.xml")) { - // Plugins.Insert ((local_plugins_count + 1), new SparklePlugin (xml_file_path)); - // TODO: Skip this plugin for now - - } else { - Plugins.Add (new Plugin (xml_file_path)); - } + if (xml_file_path.EndsWith ("own-server.xml")) + Presets.Insert (0, new Preset (xml_file_path)); + else + Presets.Add (new Preset (xml_file_path)); } } - SelectedPlugin = Plugins [0]; + SelectedPreset = Presets [0]; SparkleShare.Controller.InviteReceived += delegate (SparkleInvite invite) { PendingInvite = invite; @@ -203,7 +197,7 @@ namespace SparkleShare { public void PageCancelled () { PendingInvite = null; - SelectedPlugin = Plugins [0]; + SelectedPreset = Presets [0]; PreviousAddress = ""; PreviousPath = ""; @@ -275,25 +269,25 @@ namespace SparkleShare { } - public void SelectedPluginChanged (int plugin_index) + public void SelectedPresetChanged (int preset_index) { - SelectedPlugin = Plugins [plugin_index]; + SelectedPreset = Presets [preset_index]; - if (SelectedPlugin.Address != null) { - ChangeAddressFieldEvent (SelectedPlugin.Address, "", FieldState.Disabled); + if (SelectedPreset.Address != null) { + ChangeAddressFieldEvent (SelectedPreset.Address, "", FieldState.Disabled); - } else if (SelectedPlugin.AddressExample != null) { - ChangeAddressFieldEvent (this.saved_address, SelectedPlugin.AddressExample, FieldState.Enabled); + } else if (SelectedPreset.AddressExample != null) { + ChangeAddressFieldEvent (this.saved_address, SelectedPreset.AddressExample, FieldState.Enabled); } else { ChangeAddressFieldEvent (this.saved_address, "", FieldState.Enabled); } - if (SelectedPlugin.Path != null) { - ChangePathFieldEvent (SelectedPlugin.Path, "", FieldState.Disabled); + if (SelectedPreset.Path != null) { + ChangePathFieldEvent (SelectedPreset.Path, "", FieldState.Disabled); - } else if (SelectedPlugin.PathExample != null) { - ChangePathFieldEvent (this.saved_remote_path, SelectedPlugin.PathExample, FieldState.Enabled); + } else if (SelectedPreset.PathExample != null) { + ChangePathFieldEvent (this.saved_remote_path, SelectedPreset.PathExample, FieldState.Enabled); } else { ChangePathFieldEvent (this.saved_remote_path, "", FieldState.Enabled); @@ -307,12 +301,12 @@ namespace SparkleShare { } - public void CheckAddPage (string address, string remote_path, int selected_plugin) + public void CheckAddPage (string address, string remote_path, int selected_preset) { address = address.Trim (); remote_path = remote_path.Trim (); - if (selected_plugin == 0) + if (selected_preset == 0) this.saved_address = address; this.saved_remote_path = remote_path; @@ -341,7 +335,7 @@ namespace SparkleShare { remote_path = remote_path.Trim (); remote_path = remote_path.TrimEnd ("/".ToCharArray ()); - if (SelectedPlugin.PathUsesLowerCase) + if (SelectedPreset.PathUsesLowerCase) remote_path = remote_path.ToLower (); PreviousAddress = address; @@ -353,11 +347,11 @@ namespace SparkleShare { SparkleFetcherInfo info = new SparkleFetcherInfo { Address = address, - Fingerprint = SelectedPlugin.Fingerprint, + Fingerprint = SelectedPreset.Fingerprint, RemotePath = remote_path, FetchPriorHistory = this.fetch_prior_history, - AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl, - Backend = SelectedPlugin.Backend + AnnouncementsUrl = SelectedPreset.AnnouncementsUrl, + Backend = SelectedPreset.Backend }; new Thread (() => { SparkleShare.Controller.StartFetcher (info); }).Start (); @@ -370,23 +364,23 @@ namespace SparkleShare { { SyncingFolder = ""; - // Create a local plugin for succesfully added projects, so + // Create a local preset for succesfully added projects, so // so the user can easily use the same host again - if (SelectedPluginIndex == 0) { - Plugin new_plugin; + if (SelectedPresetIndex == 0) { + Preset new_preset; Uri uri = new Uri (remote_url); try { string address = remote_url.Replace (uri.AbsolutePath, ""); - new_plugin = Plugin.Create (uri.Host, address, address, "", "", "/path/to/project"); + new_preset = Preset.Create (uri.Host, address, address, "", "", "/path/to/project"); - if (new_plugin != null) { - Plugins.Insert (1, new_plugin); - Logger.LogInfo ("Controller", "Added plugin for " + uri.Host); + if (new_preset != null) { + Presets.Insert (1, new_preset); + Logger.LogInfo ("Controller", "Added preset for " + uri.Host); } } catch { - Logger.LogInfo ("Controller", "Failed adding plugin for " + uri.Host); + Logger.LogInfo ("Controller", "Failed adding preset for " + uri.Host); } } @@ -571,7 +565,7 @@ namespace SparkleShare { public void FinishPageCompleted () { - SelectedPlugin = Plugins [0]; + SelectedPreset = Presets [0]; PreviousUrl = ""; PreviousAddress = ""; PreviousPath = ""; diff --git a/SparkleShare/Common/SparkleShare.cs b/SparkleShare/Common/SparkleShare.cs index 8cd4330a..d949ef1d 100644 --- a/SparkleShare/Common/SparkleShare.cs +++ b/SparkleShare/Common/SparkleShare.cs @@ -18,18 +18,17 @@ using System; using System.Threading; -using SparkleLib; +using Sparkles; namespace SparkleShare { - // This is SparkleShare! public class SparkleShare { public static Controller Controller; public static UserInterface UI; public static string [] Arguments; - private static Mutex program_mutex = new Mutex (false, "SparkleShare"); + static Mutex program_mutex = new Mutex (false, "SparkleShare"); #if !__MonoCS__ @@ -39,25 +38,23 @@ namespace SparkleShare { { Arguments = args; - if (args.Length != 0 && !args [0].Equals ("help") && - Backend.Platform != PlatformID.MacOSX && - Backend.Platform != PlatformID.Win32NT) { + if (args.Length != 0 && (args [0].Equals ("help") || args [0].Equals ("version")) && + InstallationInfo.Platform != PlatformID.MacOSX && + InstallationInfo.Platform != PlatformID.Win32NT) { string n = Environment.NewLine; Console.WriteLine (n + "Share and collaborate by syncing with any Git repository instantly." + n + n + - "Version: " + SparkleLib.Backend.Version + n + + "Version: " + InstallationInfo.Version + n + "Copyright (C) 2010 Hylke Bons and others" + n + "This program comes with ABSOLUTELY NO WARRANTY." + n + n + "This is free software, and you are welcome to redistribute it" + n + - "under certain conditions. Please read the GNU GPLv3 for details." + n + - n + - "Usage: sparkleshare [start|open]"); + "under certain conditions. Please read the GNU GPLv3 for details." + n); - Environment.Exit (-1); + Environment.Exit (0); } // Only allow one instance of SparkleShare (on Windows) @@ -81,15 +78,11 @@ namespace SparkleShare { #endif } - private static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args) + + static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args) { - try { - Exception e = (Exception) exception_args.ExceptionObject; - Logger.WriteCrashReport (e); - - } finally { - Environment.Exit (-1); - } + var exception = (Exception) exception_args.ExceptionObject; + Logger.WriteCrashReport (exception); } } } diff --git a/SparkleShare/Common/StatusIconController.cs b/SparkleShare/Common/StatusIconController.cs index 16bda33a..bfc3d2e2 100644 --- a/SparkleShare/Common/StatusIconController.cs +++ b/SparkleShare/Common/StatusIconController.cs @@ -20,7 +20,7 @@ using System.Collections.Generic; using System.Threading; using Timers = System.Timers; -using SparkleLib; +using Sparkles; namespace SparkleShare { diff --git a/SparkleShare/Linux/Bubbles.cs b/SparkleShare/Linux/Bubbles.cs index 8ec6dfb3..d1b9def4 100755 --- a/SparkleShare/Linux/Bubbles.cs +++ b/SparkleShare/Linux/Bubbles.cs @@ -19,7 +19,8 @@ using System; using Gtk; using Notifications; -using SparkleLib; + +using Sparkles; namespace SparkleShare { diff --git a/SparkleShare/Linux/Controller.cs b/SparkleShare/Linux/Controller.cs index c6a6852c..5f231f86 100755 --- a/SparkleShare/Linux/Controller.cs +++ b/SparkleShare/Linux/Controller.cs @@ -22,18 +22,18 @@ using System.IO; using Gtk; using Mono.Unix.Native; -using SparkleLib; +using Sparkles; namespace SparkleShare { - public class SparkleController : SparkleControllerBase { + public class SparkleController : ControllerBase { public SparkleController () { } - public override string PluginsPath { + public override string PresetsPath { get { return Path.Combine (Defines.INSTALL_DIR, "plugins"); } @@ -58,6 +58,7 @@ namespace SparkleShare { if (Defines.INSTALL_DIR.StartsWith ("/app/")) autostart_exec = "xdg-app run org.sparkleshare.SparkleShare"; + // TODO: Ship as .desktop file and copy in place try { File.WriteAllText (autostart_file_path, "[Desktop Entry]\n" + diff --git a/SparkleShare/Linux/EventLog.cs b/SparkleShare/Linux/EventLog.cs index 701f2704..b9cb5dfc 100755 --- a/SparkleShare/Linux/EventLog.cs +++ b/SparkleShare/Linux/EventLog.cs @@ -74,7 +74,7 @@ namespace SparkleShare { this.content_wrapper.StyleContext.AddProvider (css_provider, 800); // this.web_view = new WebView () { Editable = false }; -// this.web_view.Settings.EnablePlugins = false; +// this.web_view.Settings.EnablePresets = false; // this.web_view.NavigationRequested += WebViewNavigationRequested; this.scrolled_window.Add (new Button ("WebView")); diff --git a/SparkleShare/Linux/Makefile.am b/SparkleShare/Linux/Makefile.am index 51dc6a32..792d0108 100644 --- a/SparkleShare/Linux/Makefile.am +++ b/SparkleShare/Linux/Makefile.am @@ -18,7 +18,6 @@ SOURCES = \ ../Common/EventLogController.cs \ ../Common/Invite.cs \ ../Common/NoteController.cs \ - ../Common/Plugin.cs \ ../Common/SetupController.cs \ ../Common/StatusIconController.cs \ About.cs \ @@ -37,9 +36,11 @@ include $(top_srcdir)/build/build.mk bin_SCRIPTS = sparkleshare Applicationsdir = $(datadir)/applications -dist_Applications_DATA = org.sparkleshare.SparkleShare.desktop \ +dist_Applications_DATA = \ + org.sparkleshare.SparkleShare.desktop \ org.sparkleshare.SparkleShare.Invites.desktop install-data-hook: test -f $(datadir)/applications/defaults.list && \ test -z $(DESTDIR) && update-desktop-database $(datadir)/applications || : + diff --git a/SparkleShare/Linux/Pixmaps/Makefile.am b/SparkleShare/Linux/Pixmaps/Makefile.am index 91e7038a..ebbcebca 100755 --- a/SparkleShare/Linux/Pixmaps/Makefile.am +++ b/SparkleShare/Linux/Pixmaps/Makefile.am @@ -7,3 +7,4 @@ pixmapsdir = $(pkgdatadir)/pixmaps/ MAINTAINERCLEANFILES = \ Makefile.in + diff --git a/SparkleShare/Linux/Pixmaps/icons/Makefile.am b/SparkleShare/Linux/Pixmaps/icons/Makefile.am index 9954f9b7..4b769ec9 100755 --- a/SparkleShare/Linux/Pixmaps/icons/Makefile.am +++ b/SparkleShare/Linux/Pixmaps/icons/Makefile.am @@ -50,3 +50,4 @@ uninstall-hook: MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(wildcard *.png *.svg) + diff --git a/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am b/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am index 89edffb3..a694312a 100644 --- a/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am +++ b/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am @@ -18,3 +18,4 @@ uninstall-hook: MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(wildcard *.png *.svg) + diff --git a/SparkleShare/Linux/Setup.cs b/SparkleShare/Linux/Setup.cs index b04c670f..e45c95ae 100755 --- a/SparkleShare/Linux/Setup.cs +++ b/SparkleShare/Linux/Setup.cs @@ -137,7 +137,7 @@ namespace SparkleShare { VBox layout_address = new VBox (true, 0); VBox layout_path = new VBox (true, 0); - ListStore store = new ListStore (typeof (string), typeof (Gdk.Pixbuf), typeof (string), typeof (SparklePlugin)); + ListStore store = new ListStore (typeof (string), typeof (Gdk.Pixbuf), typeof (string), typeof (SparklePreset)); SparkleTreeView tree_view = new SparkleTreeView (store) { HeadersVisible = false }; ScrolledWindow scrolled_window = new ScrolledWindow () { ShadowType = ShadowType.In }; @@ -157,7 +157,7 @@ namespace SparkleShare { service_column.PackStart (service_cell, true); service_column.SetCellDataFunc (service_cell, new TreeCellDataFunc (RenderServiceColumn)); - foreach (SparklePlugin plugin in Controller.Plugins) { + foreach (SparklePreset plugin in Controller.Presets) { store.AppendValues ("", new Gdk.Pixbuf (plugin.ImagePath), "" + plugin.Name + "\n" + "" + plugin.Description + "" + @@ -169,13 +169,13 @@ namespace SparkleShare { Entry address_entry = new Entry () { Text = Controller.PreviousAddress, - Sensitive = (Controller.SelectedPlugin.Address == null), + Sensitive = (Controller.SelectedPreset.Address == null), ActivatesDefault = true }; Entry path_entry = new Entry () { Text = Controller.PreviousPath, - Sensitive = (Controller.SelectedPlugin.Path == null), + Sensitive = (Controller.SelectedPreset.Path == null), ActivatesDefault = true }; @@ -183,19 +183,19 @@ namespace SparkleShare { Xalign = 0, UseMarkup = true, Markup = "" + Controller.SelectedPlugin.AddressExample + "" + Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPreset.AddressExample + "" }; Label path_example = new Label () { Xalign = 0, UseMarkup = true, Markup = "" + Controller.SelectedPlugin.PathExample + "" + Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPreset.PathExample + "" }; TreeSelection default_selection = tree_view.Selection; - TreePath default_path = new TreePath ("" + Controller.SelectedPluginIndex); + TreePath default_path = new TreePath ("" + Controller.SelectedPresetIndex); default_selection.SelectPath (default_path); tree_view.Model.Foreach (new TreeModelForeachFunc ( @@ -203,7 +203,7 @@ namespace SparkleShare { string address; try { - address = (model.GetValue (iter, 2) as SparklePlugin).Address; + address = (model.GetValue (iter, 2) as SparklePreset).Address; } catch (NullReferenceException) { address = ""; @@ -213,7 +213,7 @@ namespace SparkleShare { address.Equals (Controller.PreviousAddress)) { tree_view.SetCursor (path, service_column, false); - SparklePlugin plugin = (SparklePlugin) model.GetValue (iter, 2); + SparklePreset plugin = (SparklePreset) model.GetValue (iter, 2); if (plugin.Address != null) address_entry.Sensitive = false; @@ -256,7 +256,7 @@ namespace SparkleShare { layout_vertical.PackStart (scrolled_window, true, true, 0); layout_vertical.PackStart (layout_fields, false, false, 0); - tree_view.ScrollToCell (new TreePath ("" + Controller.SelectedPluginIndex), null, true, 0, 0); + tree_view.ScrollToCell (new TreePath ("" + Controller.SelectedPresetIndex), null, true, 0, 0); Add (layout_vertical); @@ -301,7 +301,7 @@ namespace SparkleShare { tree_view.CursorChanged += delegate (object sender, EventArgs e) { - Controller.SelectedPluginChanged (tree_view.SelectedRow); + Controller.SelectedPresetChanged (tree_view.SelectedRow); }; address_entry.Changed += delegate { diff --git a/SparkleShare/Linux/SparkleShare.Linux.csproj b/SparkleShare/Linux/SparkleShare.Linux.csproj index 14726223..c151da8e 100644 --- a/SparkleShare/Linux/SparkleShare.Linux.csproj +++ b/SparkleShare/Linux/SparkleShare.Linux.csproj @@ -167,18 +167,18 @@ - + - + {2C914413-B31C-4362-93C7-1AE34F09112A} - SparkleLib + Sparkles - + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE} - SparkleLib.Git + Sparkles.Git @@ -234,60 +234,60 @@ Resources\tutorial-slide-2%402x.png - - Plugins\bitbucket%402x.png + + Presets\bitbucket%402x.png - - Plugins\github%402x.png + + Presets\github%402x.png - - Plugins\gitorious%402x.png + + Presets\gitorious%402x.png - - Plugins\own-server%402x.png + + Presets\own-server%402x.png - - Plugins\ssnet%402x.png + + Presets\ssnet%402x.png - - Plugins\bitbucket.xml + + Presets\bitbucket.xml - - Plugins\github.xml + + Presets\github.xml - - Plugins\gitorious.xml + + Presets\gitorious.xml - - Plugins\own-server.xml + + Presets\own-server.xml - - Plugins\bitbucket.png + + Presets\bitbucket.png - - Plugins\github.png + + Presets\github.png - - Plugins\gitorious.png + + Presets\gitorious.png - - Plugins\own-server.png + + Presets\own-server.png - - Plugins\ssnet.png + + Presets\ssnet.png - - Plugins\ssnet.xml + + Presets\ssnet.xml - - Plugins\planio.png + + Presets\planio.png - - Plugins\planio.xml + + Presets\planio.xml - - Plugins\planio%402x.png + + Presets\planio%402x.png Resources\text-balloon.png diff --git a/SparkleShare/Linux/UserInterface.cs b/SparkleShare/Linux/UserInterface.cs index 45ec21e0..13f95948 100644 --- a/SparkleShare/Linux/UserInterface.cs +++ b/SparkleShare/Linux/UserInterface.cs @@ -19,11 +19,12 @@ using System; using GLib; using Gtk; -using SparkleLib; + +using Sparkles; namespace SparkleShare { - public class SparkleUI { + public class UserInterface { public static string AssetsPath = Defines.INSTALL_DIR; @@ -37,15 +38,15 @@ namespace SparkleShare { public readonly string SecondaryTextColor; public readonly string SecondaryTextColorSelected; - private Gtk.Application application; + Gtk.Application application; - public SparkleUI () + public UserInterface () { - this.application = new Gtk.Application ("org.sparkleshare.SparkleShare", 0); + application = new Gtk.Application ("org.sparkleshare.SparkleShare", 0); - this.application.Register (null); - this.application.Activated += ApplicationActivatedDelegate; + application.Register (null); + application.Activated += ApplicationActivatedDelegate; Gdk.Color color = SparkleUIHelpers.RGBAToColor (new Label().StyleContext.GetColor (StateFlags.Insensitive)); SecondaryTextColor = SparkleUIHelpers.ColorToHex (color); @@ -61,16 +62,16 @@ namespace SparkleShare { public void Run () { - (this.application as GLib.Application).Run (null, null); + (application as GLib.Application).Run (null, null); } - private void ApplicationActivatedDelegate (object sender, EventArgs args) + void ApplicationActivatedDelegate (object sender, EventArgs args) { - if (this.application.Windows.Length > 0) { + if (application.Windows.Length > 0) { bool has_visible_windows = false; - foreach (Window window in this.application.Windows) { + foreach (Window window in application.Windows) { if (window.Visible) { window.Present (); has_visible_windows = true; @@ -88,9 +89,9 @@ namespace SparkleShare { StatusIcon = new SparkleStatusIcon (); Note = new SparkleNote (); - Setup.Application = this.application; - EventLog.Application = this.application; - About.Application = this.application; + Setup.Application = application; + EventLog.Application = application; + About.Application = application; Program.Controller.UIHasLoaded (); } diff --git a/SparkleShare/Linux/sparkleshare.in b/SparkleShare/Linux/sparkleshare.in index 2a9bfb38..fed7aec1 100755 --- a/SparkleShare/Linux/sparkleshare.in +++ b/SparkleShare/Linux/sparkleshare.in @@ -12,8 +12,8 @@ case $1 in curl --insecure --output ~/SparkleShare/.$invite.xml $open mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" ;; - help|--help) - mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" --help + help|--help|version|--version) + mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" help ;; *) mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 diff --git a/SparkleShare/Mac/Controllers/Controller.cs b/SparkleShare/Mac/Controller.cs similarity index 97% rename from SparkleShare/Mac/Controllers/Controller.cs rename to SparkleShare/Mac/Controller.cs index f04817cd..ccf7140b 100644 --- a/SparkleShare/Mac/Controllers/Controller.cs +++ b/SparkleShare/Mac/Controller.cs @@ -24,16 +24,16 @@ using Mono.Unix.Native; using MonoMac.Foundation; using MonoMac.AppKit; -using SparkleLib; -using SparkleLib.Git; +using Sparkles; +using Sparkles.Git; namespace SparkleShare { public class Controller : BaseController { - public override string PluginsPath { + public override string PresetsPath { get { - return Path.Combine (NSBundle.MainBundle.ResourcePath, "Plugins"); + return Path.Combine (NSBundle.MainBundle.ResourcePath, "Presets"); } } @@ -138,7 +138,7 @@ namespace SparkleShare { public override void SetFolderIcon () { - if (Environment.OSVersion.Version.Major >= 14) { + /* if (Environment.OSVersion.Version.Major >= 14) { NSWorkspace.SharedWorkspace.SetIconforFile ( NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"), SparkleShare.Controller.FoldersPath, 0); @@ -147,7 +147,7 @@ namespace SparkleShare { NSWorkspace.SharedWorkspace.SetIconforFile ( NSImage.ImageNamed ("sparkleshare-folder.icns"), SparkleShare.Controller.FoldersPath, 0); - } + }*/ } diff --git a/SparkleShare/Mac/SparkleShare.Mac.csproj b/SparkleShare/Mac/SparkleShare.Mac.csproj index 14726223..43229c83 100644 --- a/SparkleShare/Mac/SparkleShare.Mac.csproj +++ b/SparkleShare/Mac/SparkleShare.Mac.csproj @@ -95,9 +95,6 @@ SparkleShare.cs - - Plugin.cs - Invite.cs @@ -128,10 +125,10 @@ - Controllers\BaseController.cs + @@ -167,20 +164,10 @@ - + - - - {2C914413-B31C-4362-93C7-1AE34F09112A} - SparkleLib - - - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE} - SparkleLib.Git - - Resources\side-splash.png @@ -234,60 +221,42 @@ Resources\tutorial-slide-2%402x.png - - Plugins\bitbucket%402x.png + + Presets\bitbucket%402x.png - - Plugins\github%402x.png + + Presets\github%402x.png - - Plugins\gitorious%402x.png + + Presets\own-server%402x.png - - Plugins\own-server%402x.png + + Presets\bitbucket.xml - - Plugins\ssnet%402x.png + + Presets\github.xml - - Plugins\bitbucket.xml + + Presets\own-server.xml - - Plugins\github.xml + + Presets\bitbucket.png - - Plugins\gitorious.xml + + Presets\github.png - - Plugins\own-server.xml - - - Plugins\bitbucket.png - - - Plugins\github.png - - - Plugins\gitorious.png - - - Plugins\own-server.png - - - Plugins\ssnet.png - - - Plugins\ssnet.xml + + Presets\own-server.png - - Plugins\planio.png + + Presets\planio.png - - Plugins\planio.xml + + Presets\planio.xml - - Plugins\planio%402x.png + + Presets\planio%402x.png Resources\text-balloon.png @@ -296,4 +265,14 @@ Resources\text-balloon%402x.png + + + {2C914413-B31C-4362-93C7-1AE34F09112A} + Sparkles + + + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE} + Sparkles.Git + + diff --git a/SparkleShare/Mac/UserInterface/EventLog.cs b/SparkleShare/Mac/UserInterface/EventLog.cs index 3a289f31..e5d3d61e 100644 --- a/SparkleShare/Mac/UserInterface/EventLog.cs +++ b/SparkleShare/Mac/UserInterface/EventLog.cs @@ -30,18 +30,20 @@ namespace SparkleShare { public SparkleEventLogController Controller = new SparkleEventLogController (); public float TitlebarHeight; - private WebView web_view; - private NSBox background; - private NSBox cover; - private NSPopUpButton popup_button; - private NSProgressIndicator progress_indicator; - private NSTextField size_label, size_label_value, history_label, history_label_value; - private NSButton hidden_close_button; + WebView web_view; + NSBox background; + NSBox cover; + NSPopUpButton popup_button; + NSProgressIndicator progress_indicator; + NSTextField size_label, size_label_value, history_label, history_label_value; + NSButton hidden_close_button; - public EventLog (IntPtr handle) : base (handle) { } + public EventLog (IntPtr handle) : base (handle) + { + } - public EventLog () : base () + public EventLog () { Title = "Recent Changes"; Delegate = new SparkleEventsDelegate (); diff --git a/SparkleShare/Mac/UserInterface/Setup.cs b/SparkleShare/Mac/UserInterface/Setup.cs index 3232b5e8..7fc86314 100644 --- a/SparkleShare/Mac/UserInterface/Setup.cs +++ b/SparkleShare/Mac/UserInterface/Setup.cs @@ -189,7 +189,7 @@ namespace SparkleShare { AddressTextField = new NSTextField () { Frame = new RectangleF (190, Frame.Height - 336, 196, 22), - Enabled = (Controller.SelectedPlugin.Address == null), + Enabled = (Controller.SelectedPreset.Address == null), Delegate = new SparkleTextFieldDelegate (), StringValue = "" + Controller.PreviousAddress }; @@ -203,24 +203,24 @@ namespace SparkleShare { PathTextField = new NSTextField () { Frame = new RectangleF (190 + 196 + 16, Frame.Height - 336, 196, 22), - Enabled = (Controller.SelectedPlugin.Path == null), + Enabled = (Controller.SelectedPreset.Path == null), Delegate = new SparkleTextFieldDelegate (), StringValue = "" + Controller.PreviousPath }; PathTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail; - PathHelpLabel = new SparkleLabel (Controller.SelectedPlugin.PathExample, NSTextAlignment.Left) { + PathHelpLabel = new SparkleLabel (Controller.SelectedPreset.PathExample, NSTextAlignment.Left) { TextColor = NSColor.DisabledControlText, Frame = new RectangleF (190 + 196 + 16, Frame.Height - 358, 204, 19) }; - AddressHelpLabel = new SparkleLabel (Controller.SelectedPlugin.AddressExample, NSTextAlignment.Left) { + AddressHelpLabel = new SparkleLabel (Controller.SelectedPreset.AddressExample, NSTextAlignment.Left) { TextColor = NSColor.DisabledControlText, Frame = new RectangleF (190, Frame.Height - 358, 204, 19) }; - if (TableView == null || TableView.RowCount != Controller.Plugins.Count) { + if (TableView == null || TableView.RowCount != Controller.Presets.Count) { TableView = new NSTableView () { Frame = new RectangleF (0, 0, 0, 0), RowHeight = 38, @@ -256,21 +256,21 @@ namespace SparkleShare { // Hi-res display support was added after Snow Leopard if (Environment.OSVersion.Version.Major < 11) - DataSource = new SparkleDataSource (1, Controller.Plugins); + DataSource = new SparkleDataSource (1, Controller.Presets); else - DataSource = new SparkleDataSource (BackingScaleFactor, Controller.Plugins); + DataSource = new SparkleDataSource (BackingScaleFactor, Controller.Presets); TableView.DataSource = DataSource; TableView.ReloadData (); (TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate { - Controller.SelectedPluginChanged (TableView.SelectedRow); + Controller.SelectedPresetChanged (TableView.SelectedRow); Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow); }; } - TableView.SelectRow (Controller.SelectedPluginIndex, false); - TableView.ScrollRowToVisible (Controller.SelectedPluginIndex); + TableView.SelectRow (Controller.SelectedPresetIndex, false); + TableView.ScrollRowToVisible (Controller.SelectedPresetIndex); MakeFirstResponder ((NSResponder) TableView); HistoryCheckButton = new NSButton () { @@ -730,7 +730,7 @@ namespace SparkleShare { int backing_scale_factor; - public SparkleDataSource (float backing_scale_factor, List plugins) + public SparkleDataSource (float backing_scale_factor, List plugins) { Items = new List (); Cells = new NSAttributedString [plugins.Count]; @@ -739,7 +739,7 @@ namespace SparkleShare { this.backing_scale_factor = (int) backing_scale_factor; int i = 0; - foreach (Plugin plugin in plugins) { + foreach (Preset plugin in plugins) { Items.Add (plugin); NSTextFieldCell cell = new NSTextFieldCell (); @@ -815,27 +815,24 @@ namespace SparkleShare { SparkleShare.UI.Setup.FirstResponder == table_view) { return SelectedCells [row_index]; - - } else { - return Cells [row_index]; } - } else { - Plugin plugin = (Plugin) Items [row_index]; - string path = plugin.ImagePath; - - if (backing_scale_factor >= 2) { - string hi_path = String.Format ("{0}@{1}x{2}", - Path.Combine (Path.GetDirectoryName (path), Path.GetFileNameWithoutExtension (path)), - backing_scale_factor, Path.GetExtension (path) - ); - - if (File.Exists (hi_path)) - path = hi_path; - } - - return new NSImage (path) { Size = new SizeF (24, 24) }; + return Cells [row_index]; } + + string image_path = (Items [row_index] as Preset).ImagePath; + + if (backing_scale_factor >= 2) { + string hi_path = String.Format ("{0}@{1}x{2}", + Path.Combine (Path.GetDirectoryName (image_path), Path.GetFileNameWithoutExtension (image_path)), + backing_scale_factor, Path.GetExtension (image_path) + ); + + if (File.Exists (hi_path)) + image_path = hi_path; + } + + return new NSImage (image_path) { Size = new SizeF (24, 24) }; } } diff --git a/SparkleShare/Mac/UserInterface/UserInterface.cs b/SparkleShare/Mac/UserInterface/UserInterface.cs index 71d937d6..241d9b85 100755 --- a/SparkleShare/Mac/UserInterface/UserInterface.cs +++ b/SparkleShare/Mac/UserInterface/UserInterface.cs @@ -41,18 +41,7 @@ namespace SparkleShare { FontName = "Lucida Grande"; SparkleShare.Controller.Invoke (() => { - if (Environment.OSVersion.Version.Major >= 14) { - NSWorkspace.SharedWorkspace.SetIconforFile ( - NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"), - SparkleShare.Controller.FoldersPath, 0); - - } else { - NSWorkspace.SharedWorkspace.SetIconforFile ( - NSImage.ImageNamed ("sparkleshare-folder.icns"), - SparkleShare.Controller.FoldersPath, 0); - } - - NSApplication.SharedApplication.ApplicationIconImage = NSImage.ImageNamed ("sparkleshare-app.icns"); + // NSApplication.SharedApplication.ApplicationIconImage = NSImage.ImageNamed ("Resources/sparkleshare-app.icns"); Setup = new Setup (); EventLog = new EventLog (); diff --git a/SparkleShare/Mac/packReleaseDist.sh b/SparkleShare/Mac/packReleaseDist.sh index 171811df..85f43efa 100755 --- a/SparkleShare/Mac/packReleaseDist.sh +++ b/SparkleShare/Mac/packReleaseDist.sh @@ -19,6 +19,6 @@ 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 SparkleLib.dll MonoMac.dll SparkleLib.Git.dll +mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe Sparkles.dll MonoMac.dll Sparkles.Git.dll rm *.dll *.exe diff --git a/SparkleShare/Windows/SparkleController.cs b/SparkleShare/Windows/SparkleController.cs index d4aa63df..9c2fa5b0 100644 --- a/SparkleShare/Windows/SparkleController.cs +++ b/SparkleShare/Windows/SparkleController.cs @@ -29,7 +29,7 @@ using System.Windows; using Forms = System.Windows.Forms; using Microsoft.Win32; -using SparkleLib; +using Sparkles; namespace SparkleShare { @@ -40,7 +40,7 @@ namespace SparkleShare { } - public override string PluginsPath + public override string PresetsPath { get { return Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "plugins"); @@ -63,7 +63,7 @@ namespace SparkleShare { Environment.SetEnvironmentVariable ("PATH", new_PATH); Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); - SparkleLib.Git.SparkleGit.SSHPath = Path.Combine (msysgit_path, "bin", "ssh.exe"); + Sparkles.Git.SparkleGit.SSHPath = Path.Combine (msysgit_path, "bin", "ssh.exe"); base.Initialize (); } diff --git a/SparkleShare/Windows/SparkleEventLogWindow.xaml.cs b/SparkleShare/Windows/SparkleEventLogWindow.xaml.cs index ac6b5816..a77f0edc 100644 --- a/SparkleShare/Windows/SparkleEventLogWindow.xaml.cs +++ b/SparkleShare/Windows/SparkleEventLogWindow.xaml.cs @@ -145,7 +145,7 @@ namespace SparkleShare private void UpdateContent (string html) { - string pixmaps_path = Path.Combine (SparkleLib.SparkleConfig.DefaultConfig.TmpPath, "Pixmaps"); + string pixmaps_path = Path.Combine (Sparkles.SparkleConfig.DefaultConfig.TmpPath, "Pixmaps"); pixmaps_path = pixmaps_path.Replace ("\\", "/"); html = html.Replace (" - - Plugins\github.png + + Presets\github.png Always - - Plugins\gitorious.png + + Presets\gitorious.png Always - - Plugins\own-server.png + + Presets\own-server.png Always - - Plugins\bitbucket.png + + Presets\bitbucket.png Always - - Plugins\ssnet.png + + Presets\ssnet.png Always - - Plugins\planio.png + + Presets\planio.png Always - - Plugins\ssnet.xml + + Presets\ssnet.xml Always - - Plugins\bitbucket.xml + + Presets\bitbucket.xml Always - - Plugins\github.xml + + Presets\github.xml Always - - Plugins\gitorious.xml + + Presets\gitorious.xml Always - - Plugins\own-server.xml + + Presets\own-server.xml Always - - Plugins\planio.xml + + Presets\planio.xml Always @@ -281,11 +281,11 @@ {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE} - SparkleLib.Git + Sparkles.Git {2C914413-B31C-4362-93C7-1AE34F09112A} - SparkleLib + Sparkles diff --git a/SparkleShare/Windows/SparkleShare.vssettings b/SparkleShare/Windows/SparkleShare.vssettings index 9651a513..240532e9 100644 --- a/SparkleShare/Windows/SparkleShare.vssettings +++ b/SparkleShare/Windows/SparkleShare.vssettings @@ -91,7 +91,7 @@ True \[{"Error":[^n];"SharepointError";"HasException":true True - C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\WebTestPlugins\DefaultSharePointRules.xml + C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\WebTestPresets\DefaultSharePointRules.xml AAEAAAD/////AQAAAAAAAAAMAgAAAGxNaWNyb3NvZnQuVmlzdWFsU3R1ZGlvLlF1YWxpdHlUb29scy5Wc2lwLCBWZXJzaW9uPTEyLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EEAQAAAMMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNaWNyb3NvZnQuVmlzdWFsU3R1ZGlvLlRlc3RUb29scy5Wc2lwLlVSTFBhdHRlcm4sIE1pY3Jvc29mdC5WaXN1YWxTdHVkaW8uUXVhbGl0eVRvb2xzLlZzaXAsIFZlcnNpb249MTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAyTWljcm9zb2Z0LlZpc3VhbFN0dWRpby5UZXN0VG9vbHMuVnNpcC5VUkxQYXR0ZXJuW10CAAAACAgJAwAAAAQAAAAEAAAABwMAAAAAAQAAAAQAAAAEME1pY3Jvc29mdC5WaXN1YWxTdHVkaW8uVGVzdFRvb2xzLlZzaXAuVVJMUGF0dGVybgIAAAAJBAAAAAkFAAAACQYAAAAJBwAAAAwIAAAASVN5c3RlbSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFBAAAADBNaWNyb3NvZnQuVmlzdWFsU3R1ZGlvLlRlc3RUb29scy5Wc2lwLlVSTFBhdHRlcm4DAAAAD1Byb3BlcnR5Q2hhbmdlZAptX2NyaXRlcmlhCW1fcGF0dGVybgQBATFTeXN0ZW0uQ29tcG9uZW50TW9kZWwuUHJvcGVydHlDaGFuZ2VkRXZlbnRIYW5kbGVyCAAAAAIAAAAKBgkAAAAIRW5kc1dpdGgGCgAAAAlibGFuay5naWYBBQAAAAQAAAAKCQkAAAAGDAAAAAlibGFuay5odG0BBgAAAAQAAAAKCQkAAAAGDgAAAA9TY3JpcHRSZXN4LmFzaHgBBwAAAAQAAAAKCQkAAAAGEAAAAA5jb21tYW5kdWkuYXNoeAs= True True1101011110101111100010011110001001101111000000167577360473600210110111000050001500015001000100010002000200050001000010000250100050012510001100111111111100001110010011000000001012048509000100011000001011http://referencesource.microsoft.com/symbolshttp://msdl.microsoft.com/download/symbolsFunction: $FUNCTION, Thread: $TID $TNAME506464101csv3.01002.03.01100Falsefalsetruefalsefalse-1TrueTrueTrue25TruefalsefalseTrueTrueTrue8, 8SnapLinesTrueTrueTrueTruePreserveTrueTrueTrueTrueFalseTrueTrueTrueTrueTruePreserveTrueFalseDoubleQuote120FalseNoneFalseTrueTrueTrueTrueTrueTrueTrueTrue%VsInstallDir%\xml\Schemas \ No newline at end of file diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs index e889b4af..3b6c6871 100644 --- a/SparkleShare/Windows/SparkleShare.wxs +++ b/SparkleShare/Windows/SparkleShare.wxs @@ -20,8 +20,8 @@ - - + + diff --git a/SparkleShare/Windows/SparkleUI.cs b/SparkleShare/Windows/SparkleUI.cs index 31f5ebb1..447f0c6b 100644 --- a/SparkleShare/Windows/SparkleUI.cs +++ b/SparkleShare/Windows/SparkleUI.cs @@ -19,7 +19,7 @@ using System; using System.Threading; using System.Windows.Forms; -using SparkleLib; +using Sparkles; namespace SparkleShare { diff --git a/SparkleLib/AuthenticationInfo.cs b/Sparkles/AuthenticationInfo.cs similarity index 97% rename from SparkleLib/AuthenticationInfo.cs rename to Sparkles/AuthenticationInfo.cs index b4b1db58..0396e086 100644 --- a/SparkleLib/AuthenticationInfo.cs +++ b/Sparkles/AuthenticationInfo.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . -namespace SparkleLib { +namespace Sparkles { public abstract class AuthenticationInfo { diff --git a/SparkleLib/BaseFetcher.cs b/Sparkles/BaseFetcher.cs old mode 100755 new mode 100644 similarity index 99% rename from SparkleLib/BaseFetcher.cs rename to Sparkles/BaseFetcher.cs index 2297ab57..77721bf1 --- a/SparkleLib/BaseFetcher.cs +++ b/Sparkles/BaseFetcher.cs @@ -22,7 +22,7 @@ using System.IO; using System.Security.Cryptography; using System.Threading; -namespace SparkleLib { +namespace Sparkles { public class SparkleFetcherInfo { public string Address; diff --git a/SparkleLib/BaseListener.cs b/Sparkles/BaseListener.cs old mode 100755 new mode 100644 similarity index 99% rename from SparkleLib/BaseListener.cs rename to Sparkles/BaseListener.cs index 2174517f..13ae7a09 --- a/SparkleLib/BaseListener.cs +++ b/Sparkles/BaseListener.cs @@ -19,7 +19,7 @@ using System; using System.Collections.Generic; using System.Timers; -namespace SparkleLib { +namespace Sparkles { public enum DisconnectReason { None, diff --git a/SparkleLib/BaseRepository.cs b/Sparkles/BaseRepository.cs similarity index 99% rename from SparkleLib/BaseRepository.cs rename to Sparkles/BaseRepository.cs index bbc9a354..15b668db 100644 --- a/SparkleLib/BaseRepository.cs +++ b/Sparkles/BaseRepository.cs @@ -22,7 +22,7 @@ using System.Threading; using Timers = System.Timers; -namespace SparkleLib { +namespace Sparkles { public enum SyncStatus { Idle, diff --git a/SparkleLib/ChangeSet.cs b/Sparkles/ChangeSet.cs similarity index 99% rename from SparkleLib/ChangeSet.cs rename to Sparkles/ChangeSet.cs index cbe71062..875e1f97 100644 --- a/SparkleLib/ChangeSet.cs +++ b/Sparkles/ChangeSet.cs @@ -19,7 +19,7 @@ using System; using System.IO; using System.Collections.Generic; -namespace SparkleLib { +namespace Sparkles { public enum ChangeType { Added, diff --git a/SparkleLib/Command.cs b/Sparkles/Command.cs similarity index 96% rename from SparkleLib/Command.cs rename to Sparkles/Command.cs index 832c7459..701776e0 100644 --- a/SparkleLib/Command.cs +++ b/Sparkles/Command.cs @@ -19,7 +19,7 @@ using System; using System.Diagnostics; using System.IO; -namespace SparkleLib { +namespace Sparkles { public class Command : Process { @@ -52,7 +52,7 @@ namespace SparkleLib { if (!string.IsNullOrEmpty (StartInfo.WorkingDirectory)) folder = Path.GetFileName (StartInfo.WorkingDirectory) + " | "; - if (this.write_output) + if (write_output) Logger.LogInfo ("Cmd", folder + Path.GetFileName (StartInfo.FileName) + " " + StartInfo.Arguments); try { @@ -103,7 +103,7 @@ namespace SparkleLib { { string [] possible_command_paths = { Environment.GetFolderPath (Environment.SpecialFolder.Personal) + "/bin/" + name, - Defines.INSTALL_DIR + "/bin/" + name, + InstallationInfo.Directory + "/bin/" + name, "/usr/local/bin/" + name, "/usr/bin/" + name, "/opt/local/bin/" + name @@ -118,4 +118,3 @@ namespace SparkleLib { } } } - diff --git a/SparkleLib/Configuration.cs b/Sparkles/Configuration.cs old mode 100755 new mode 100644 similarity index 97% rename from SparkleLib/Configuration.cs rename to Sparkles/Configuration.cs index f5cc18b8..b733d497 --- a/SparkleLib/Configuration.cs +++ b/Sparkles/Configuration.cs @@ -20,7 +20,7 @@ using System.IO; using System.Collections.Generic; using System.Xml; -namespace SparkleLib { +namespace Sparkles { public class Configuration : XmlDocument { @@ -34,7 +34,7 @@ namespace SparkleLib { public string HomePath { get { - if (Backend.Platform == PlatformID.Win32NT) + if (InstallationInfo.Platform == PlatformID.Win32NT) return Environment.GetFolderPath (Environment.SpecialFolder.UserProfile); else return Environment.GetFolderPath (Environment.SpecialFolder.Personal); @@ -110,8 +110,8 @@ namespace SparkleLib { { string user_name = "Unknown"; - if (Backend.Platform == PlatformID.Unix || - Backend.Platform == PlatformID.MacOSX) { + if (InstallationInfo.Platform == PlatformID.Unix || + InstallationInfo.Platform == PlatformID.MacOSX) { user_name = Environment.UserName; if (string.IsNullOrEmpty (user_name)) diff --git a/SparkleLib/Extensions.cs b/Sparkles/Extensions.cs old mode 100755 new mode 100644 similarity index 99% rename from SparkleLib/Extensions.cs rename to Sparkles/Extensions.cs index 0b28480c..06fc27b2 --- a/SparkleLib/Extensions.cs +++ b/Sparkles/Extensions.cs @@ -20,7 +20,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; -namespace SparkleLib { +namespace Sparkles { public static class Extensions { diff --git a/SparkleLib/Git/GitCommand.cs b/Sparkles/Git/GitCommand.cs similarity index 98% rename from SparkleLib/Git/GitCommand.cs rename to Sparkles/Git/GitCommand.cs index 4b85a5a6..b2f24a47 100644 --- a/SparkleLib/Git/GitCommand.cs +++ b/Sparkles/Git/GitCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . -namespace SparkleLib.Git { +namespace Sparkles.Git { public class GitCommand : Command { diff --git a/SparkleLib/Git/GitFetcher.cs b/Sparkles/Git/GitFetcher.cs old mode 100755 new mode 100644 similarity index 99% rename from SparkleLib/Git/GitFetcher.cs rename to Sparkles/Git/GitFetcher.cs index 5b3f49fa..fec8a8b9 --- a/SparkleLib/Git/GitFetcher.cs +++ b/Sparkles/Git/GitFetcher.cs @@ -21,7 +21,7 @@ using System.IO; using System.Text.RegularExpressions; using System.Threading; -namespace SparkleLib.Git { +namespace Sparkles.Git { public class GitFetcher : SSHFetcher { @@ -259,7 +259,7 @@ namespace SparkleLib.Git { "push.default matching" }; - if (Backend.Platform == PlatformID.Win32NT) + if (InstallationInfo.Platform == PlatformID.Win32NT) settings [0] = "core.autocrlf true"; foreach (string setting in settings) { diff --git a/SparkleLib/Git/GitRepository.cs b/Sparkles/Git/GitRepository.cs similarity index 99% rename from SparkleLib/Git/GitRepository.cs rename to Sparkles/Git/GitRepository.cs index e8a5e2b6..7145838d 100644 --- a/SparkleLib/Git/GitRepository.cs +++ b/Sparkles/Git/GitRepository.cs @@ -23,7 +23,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading; -namespace SparkleLib.Git { +namespace Sparkles.Git { public class GitRepository : BaseRepository { diff --git a/SparkleLib/Git/Makefile.am b/Sparkles/Git/Makefile.am similarity index 84% rename from SparkleLib/Git/Makefile.am rename to Sparkles/Git/Makefile.am index c376b41e..864c4710 100755 --- a/SparkleLib/Git/Makefile.am +++ b/Sparkles/Git/Makefile.am @@ -1,14 +1,13 @@ -ASSEMBLY = SparkleLib.Git +ASSEMBLY = Sparkles.Git TARGET = library -LINK = -r:$(DIR_BIN)/SparkleLib.dll +LINK = -r:$(DIR_BIN)/Sparkles.dll SOURCES = \ GitCommand.cs \ GitFetcher.cs \ GitRepository.cs - install-data-hook: for ASM in $(EXTRA_BUNDLE); do \ $(INSTALL) -m 0755 $$ASM $(DESTDIR)$(moduledir); \ @@ -20,3 +19,4 @@ uninstall-hook: done; include $(top_srcdir)/build/build.mk + diff --git a/SparkleLib/Git/SparkleLib.Git.csproj b/Sparkles/Git/Sparkles.Git.csproj similarity index 91% rename from SparkleLib/Git/SparkleLib.Git.csproj rename to Sparkles/Git/Sparkles.Git.csproj index 8023d098..c4ca1fd3 100644 --- a/SparkleLib/Git/SparkleLib.Git.csproj +++ b/Sparkles/Git/Sparkles.Git.csproj @@ -8,8 +8,8 @@ {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE} Library Properties - SparkleLib.Git - SparkleLib.Git + Sparkles.Git + Sparkles.Git 512 @@ -45,15 +45,15 @@ --> - - - {2C914413-B31C-4362-93C7-1AE34F09112A} - SparkleLib - - + + + {2C914413-B31C-4362-93C7-1AE34F09112A} + Sparkles + + diff --git a/Sparkles/InstallationInfo.Directory.cs b/Sparkles/InstallationInfo.Directory.cs new file mode 100644 index 00000000..e2745a08 --- /dev/null +++ b/Sparkles/InstallationInfo.Directory.cs @@ -0,0 +1,29 @@ +// SparkleShare, a collaboration and sharing tool. +// Copyright (C) 2010 Hylke Bons +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + + +using System.Reflection; + +[assembly:AssemblyTitle ("Sparkles")] +[assembly:AssemblyVersion ("2.0")] +[assembly:AssemblyCopyright ("Copyright (c) 2010 Hylke Bons and others")] + +namespace Sparkles { + + public partial class InstallationInfo { + public const string Directory = "/app/share/sparkleshare"; + } +} diff --git a/SparkleLib/Defines.cs.in b/Sparkles/InstallationInfo.Directory.cs.in similarity index 83% rename from SparkleLib/Defines.cs.in rename to Sparkles/InstallationInfo.Directory.cs.in index 8ba23317..09cd3ef1 100755 --- a/SparkleLib/Defines.cs.in +++ b/Sparkles/InstallationInfo.Directory.cs.in @@ -15,16 +15,15 @@ // along with this program. If not, see . -using System; using System.Reflection; -[assembly:AssemblyTitle ("SparkleLib")] +[assembly:AssemblyTitle ("Sparkles")] [assembly:AssemblyVersion ("@VERSION@")] [assembly:AssemblyCopyright ("Copyright (c) 2010 Hylke Bons and others")] -namespace SparkleLib { +namespace Sparkles { - public class Defines { - public const string INSTALL_DIR = "@expanded_datadir@/sparkleshare"; + public partial class InstallationInfo { + public const string Directory = "@expanded_datadir@/sparkleshare"; } } diff --git a/SparkleLib/Backend.cs b/Sparkles/InstallationInfo.cs old mode 100755 new mode 100644 similarity index 93% rename from SparkleLib/Backend.cs rename to Sparkles/InstallationInfo.cs index c6297c5b..9f0c930c --- a/SparkleLib/Backend.cs +++ b/Sparkles/InstallationInfo.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.Reflection; using System.Runtime.InteropServices; -namespace SparkleLib { - - public static class Backend { +namespace Sparkles { + + public partial class InstallationInfo { public static string Version { get { diff --git a/SparkleLib/ListenerFactory.cs b/Sparkles/ListenerFactory.cs similarity index 99% rename from SparkleLib/ListenerFactory.cs rename to Sparkles/ListenerFactory.cs index 1ca2b7d4..c4f63028 100644 --- a/SparkleLib/ListenerFactory.cs +++ b/Sparkles/ListenerFactory.cs @@ -18,7 +18,7 @@ using System; using System.Collections.Generic; -namespace SparkleLib { +namespace Sparkles { public static class ListenerFactory { diff --git a/SparkleLib/Logger.cs b/Sparkles/Logger.cs similarity index 82% rename from SparkleLib/Logger.cs rename to Sparkles/Logger.cs index df93e57e..2abd59ab 100644 --- a/SparkleLib/Logger.cs +++ b/Sparkles/Logger.cs @@ -18,7 +18,7 @@ using System; using System.IO; -namespace SparkleLib { +namespace Sparkles { public static class Logger { @@ -65,21 +65,24 @@ namespace SparkleLib { { string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal); - if (Backend.Platform == PlatformID.Win32NT) + if (InstallationInfo.Platform == PlatformID.Win32NT) home_path = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile); string crash_report_file_path = new string [] { home_path, "SparkleShare", "crash_report.txt" }.Combine (); string n = Environment.NewLine; - string crash_report = "Oops! SparkleShare has crashed... :(" + n + n + + string crash_report = + "Oops! SparkleShare has crashed... :(" + n + + n + "If you want to help fix this crash, please report it at " + n + - "https://github.com/hbons/SparkleShare/issues and include the lines below." + n + n + - "Remove any sensitive information like file names, IP addresses, domain names, etc. if needed." + n + n + - "------" + n + n + - "SparkleShare version: " + Backend.Version + n + - "Operating system: " + Backend.Platform + " (" + Environment.OSVersion + ")" + n; + "https://github.com/hbons/SparkleShare/issues and include the lines below." + n + + n + + "Remove any sensitive information like file names, IP addresses, domain names, etc. if needed." + n + + n + + "------" + n + + n; - crash_report += e.GetType () + ": " + e.Message + n + e.StackTrace + n; + crash_report += e.GetType () + ": " + e.Message + n + e.StackTrace + n + n; if (e.InnerException != null) crash_report += n + e.InnerException.Message + n + e.InnerException.StackTrace + n; @@ -89,13 +92,10 @@ namespace SparkleLib { string [] debug_lines = debug_log.Split (Environment.NewLine.ToCharArray ()); int line_count = 50; - if (debug_lines.Length > line_count) { - crash_report += string.Join (Environment.NewLine, debug_lines, - (debug_lines.Length - line_count), line_count) + n; - - } else { + if (debug_lines.Length > line_count) + crash_report += string.Join (n, debug_lines, (debug_lines.Length - line_count), line_count) + n; + else crash_report += debug_log + n; - } } File.WriteAllText (crash_report_file_path, crash_report); diff --git a/SparkleLib/Makefile.am b/Sparkles/Makefile.am similarity index 83% rename from SparkleLib/Makefile.am rename to Sparkles/Makefile.am index 9e2ec19a..08763e72 100755 --- a/SparkleLib/Makefile.am +++ b/Sparkles/Makefile.am @@ -1,11 +1,11 @@ -ASSEMBLY = SparkleLib +ASSEMBLY = Sparkles TARGET = library -ASSEMBLY_INFO_SOURCE = Defines.cs +ASSEMBLY_INFO_SOURCE = InstallationInfo.Directory.cs SOURCES = \ AuthenticationInfo.cs \ - Backend.cs \ + InstallationInfo.cs \ BaseFetcher.cs \ BaseListener.cs \ BaseRepository.cs \ @@ -15,6 +15,7 @@ SOURCES = \ Extensions.cs \ ListenerFactory.cs \ Logger.cs \ + Preset.cs \ SSHAuthenticationInfo.cs \ SSHFetcher.cs \ TcpListener.cs \ @@ -32,3 +33,4 @@ uninstall-hook: done; include $(top_srcdir)/build/build.mk + diff --git a/SparkleShare/Common/Plugin.cs b/Sparkles/Preset.cs similarity index 71% rename from SparkleShare/Common/Plugin.cs rename to Sparkles/Preset.cs index 264affd0..af8f392e 100644 --- a/SparkleShare/Common/Plugin.cs +++ b/Sparkles/Preset.cs @@ -22,12 +22,12 @@ using IO = System.IO; namespace SparkleShare { - public class Plugin : XmlDocument { + public class Preset : XmlDocument { - public static string PluginsPath = ""; + public static string PresetsPath = ""; - public static string LocalPluginsPath = IO.Path.Combine ( - Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "sparkleshare", "plugins"); + public static string LocalPresetsPath = IO.Path.Combine ( + Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "sparkleshare", "presets"); new public string Name { get { return GetValue ("info", "name"); } } public string Description { get { return GetValue ("info", "description"); } } @@ -42,12 +42,12 @@ namespace SparkleShare { public string ImagePath { get { string image_file_name = GetValue ("info", "icon"); - string image_path = IO.Path.Combine (this.plugin_directory, image_file_name); + string image_path = IO.Path.Combine (preset_directory, image_file_name); if (IO.File.Exists (image_path)) return image_path; - else - return IO.Path.Combine (PluginsPath, image_file_name); + + return IO.Path.Combine (PresetsPath, image_file_name); } } @@ -62,27 +62,29 @@ namespace SparkleShare { } } - private string plugin_directory; + string preset_directory; - public Plugin (string plugin_path) + public Preset (string preset_path) { - this.plugin_directory = System.IO.Path.GetDirectoryName (plugin_path); - Load (plugin_path); + preset_directory = IO.Path.GetDirectoryName (preset_path); + Load (preset_path); } - public static Plugin Create (string name, string description, string address_value, + // TODO: Gitlab preset + public static Preset Create (string name, string description, string address_value, string address_example, string path_value, string path_example) { - string plugin_path = System.IO.Path.Combine (LocalPluginsPath, name + ".xml"); + string preset_path = IO.Path.Combine (LocalPresetsPath, name + ".xml"); - if (IO.File.Exists (plugin_path)) + if (IO.File.Exists (preset_path)) return null; - string plugin_xml = "" + + // TODO: Don't write maually + string preset_xml = "" + "" + - " " + + " " + " " + " " + name + "" + " " + description + "" + @@ -96,23 +98,23 @@ namespace SparkleShare { " " + path_value + "" + " " + path_example + "" + " " + - " " + + " " + ""; - plugin_xml = plugin_xml.Replace ("", ""); - plugin_xml = plugin_xml.Replace ("", ""); + preset_xml = preset_xml.Replace ("", ""); + preset_xml = preset_xml.Replace ("", ""); - if (!IO.Directory.Exists (LocalPluginsPath)) - IO.Directory.CreateDirectory (LocalPluginsPath); + if (!IO.Directory.Exists (LocalPresetsPath)) + IO.Directory.CreateDirectory (LocalPresetsPath); - IO.File.WriteAllText (plugin_path, plugin_xml); - return new Plugin (plugin_path); + IO.File.WriteAllText (preset_path, preset_xml); + return new Preset (preset_path); } private string GetValue (string a, string b) { - XmlNode node = SelectSingleNode ("/sparkleshare/plugin/" + a + "/" + b + "/text()"); + XmlNode node = SelectSingleNode ("/sparkleshare/preset/" + a + "/" + b + "/text()"); if (node != null && !string.IsNullOrEmpty (node.Value)) return node.Value; @@ -120,4 +122,4 @@ namespace SparkleShare { return null; } } -} \ No newline at end of file +} diff --git a/SparkleLib/SSHAuthenticationInfo.cs b/Sparkles/SSHAuthenticationInfo.cs similarity index 99% rename from SparkleLib/SSHAuthenticationInfo.cs rename to Sparkles/SSHAuthenticationInfo.cs index abe84d0b..637dce6f 100644 --- a/SparkleLib/SSHAuthenticationInfo.cs +++ b/Sparkles/SSHAuthenticationInfo.cs @@ -20,7 +20,7 @@ using System.Net; using IO = System.IO; -namespace SparkleLib { +namespace Sparkles { public class SSHAuthenticationInfo : AuthenticationInfo { diff --git a/SparkleLib/SSHFetcher.cs b/Sparkles/SSHFetcher.cs similarity index 99% rename from SparkleLib/SSHFetcher.cs rename to Sparkles/SSHFetcher.cs index 9bb9e46b..e62df067 100644 --- a/SparkleLib/SSHFetcher.cs +++ b/Sparkles/SSHFetcher.cs @@ -20,7 +20,7 @@ using System.Diagnostics; using System.IO; using System.Security.Cryptography; -namespace SparkleLib { +namespace Sparkles { public abstract class SSHFetcher : BaseFetcher { diff --git a/SparkleLib/SparkleLib.csproj b/Sparkles/Sparkles.csproj similarity index 92% rename from SparkleLib/SparkleLib.csproj rename to Sparkles/Sparkles.csproj index 5c8c84b9..fc3d3488 100644 --- a/SparkleLib/SparkleLib.csproj +++ b/Sparkles/Sparkles.csproj @@ -7,8 +7,8 @@ 2.0 {2C914413-B31C-4362-93C7-1AE34F09112A} Library - SparkleLib - SparkleLib + Sparkles + Sparkles @@ -32,11 +32,10 @@ - - + Fetcher\SSHFetcher.cs @@ -71,6 +70,8 @@ Repository\Watcher.cs + + diff --git a/SparkleLib/TcpListener.cs b/Sparkles/TcpListener.cs similarity index 98% rename from SparkleLib/TcpListener.cs rename to Sparkles/TcpListener.cs index e125154c..3fa1b14c 100644 --- a/SparkleLib/TcpListener.cs +++ b/Sparkles/TcpListener.cs @@ -20,7 +20,7 @@ using System.Net.Sockets; using System.Text; using System.Threading; -namespace SparkleLib { +namespace Sparkles { public class TcpListener : BaseListener { @@ -82,7 +82,7 @@ namespace SparkleLib { if (this.socket != null) this.socket.Close (); - OnDisconnected (SparkleLib.DisconnectReason.TimeOut, e.Message); + OnDisconnected (Sparkles.DisconnectReason.TimeOut, e.Message); return; } diff --git a/SparkleLib/User.cs b/Sparkles/User.cs similarity index 97% rename from SparkleLib/User.cs rename to Sparkles/User.cs index 4f4c4652..947f1e77 100644 --- a/SparkleLib/User.cs +++ b/Sparkles/User.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . -namespace SparkleLib { +namespace Sparkles { public class User { diff --git a/SparkleLib/Watcher.cs b/Sparkles/Watcher.cs old mode 100755 new mode 100644 similarity index 98% rename from SparkleLib/Watcher.cs rename to Sparkles/Watcher.cs index d25a688a..d581f18d --- a/SparkleLib/Watcher.cs +++ b/Sparkles/Watcher.cs @@ -17,7 +17,7 @@ using System.IO; -namespace SparkleLib { +namespace Sparkles { public class Watcher : FileSystemWatcher { diff --git a/build/Makefile.am b/build/Makefile.am index 6f9c81df..c99d383a 100755 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -4,3 +4,4 @@ EXTRA_DIST = \ icon-theme-installer MAINTAINERCLEANFILES = Makefile.in + diff --git a/build/build.environment.mk b/build/build.environment.mk index 8fd2b446..24866848 100755 --- a/build/build.environment.mk +++ b/build/build.environment.mk @@ -11,15 +11,14 @@ LINK_MONO_POSIX = -r:Mono.Posix LINK_GLIB = $(GLIBSHARP_LIBS) LINK_GTK = $(GTKSHARP_LIBS) -LINK_GNOME = $(GNOME_SHARP_LIBS) LINK_WEBKIT = $(WEBKITGTK_SHARP_LIBS) LINK_APP_INDICATOR = $(APP_INDICATOR_LIBS) -REF_SPARKLELIB = $(LINK_SYSTEM) $(LINK_MONO_POSIX) -LINK_SPARKLELIB = -r:$(DIR_BIN)/SparkleLib.dll -LINK_SPARKLELIB_DEPS = $(REF_SPARKLELIB) $(LINK_SPARKLELIB) +REF_SPARKLES = $(LINK_SYSTEM) $(LINK_MONO_POSIX) +LINK_SPARKLES = -r:$(DIR_BIN)/Sparkles.dll +LINK_SPARKLES_DEPS = $(REF_SPARKLES) $(LINK_SPARKLES) -REF_SPARKLESHARE = $(LINK_GTK) $(LINK_SPARKLELIB_DEPS) $(LINK_APP_INDICATOR) $(LINK_WEBKIT) +REF_SPARKLESHARE = $(LINK_GTK) $(LINK_SPARKLES_DEPS) $(LINK_APP_INDICATOR) $(LINK_WEBKIT) # Cute hack to replace a space with something colon:= : diff --git a/build/build.mk b/build/build.mk index 78e07604..bb00ae72 100755 --- a/build/build.mk +++ b/build/build.mk @@ -1,3 +1,2 @@ include $(top_srcdir)/build/build.environment.mk include $(top_srcdir)/build/build.rules.mk - diff --git a/build/build.rules.mk b/build/build.rules.mk index 0beed5c0..1fdba24a 100755 --- a/build/build.rules.mk +++ b/build/build.rules.mk @@ -75,4 +75,3 @@ EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) CLEANFILES = $(OUTPUT_FILES) $(ASSEMBLY_FILE).config DISTCLEANFILES = *.pidb MAINTAINERCLEANFILES = Makefile.in - diff --git a/build/bump-version.sh b/build/bump-version.sh index 0f6769e9..ed8b657b 100755 --- a/build/bump-version.sh +++ b/build/bump-version.sh @@ -4,13 +4,13 @@ if [ "$1" = "" ]; then echo "No version number specified. Usage: ./bump-version.sh VERSION_NUMBER" else sed -i.bak "s/ Version='[^']*'/ Version='$1'/" ../SparkleShare/Windows/SparkleShare.wxs - sed -i.bak "s/assembly:AssemblyVersion *(\"[^\"]*\")/assembly:AssemblyVersion (\"$1\")/" ../SparkleLib/Defines.cs + sed -i.bak "s/assembly:AssemblyVersion *(\"[^\"]*\")/assembly:AssemblyVersion (\"$1\")/" ../Sparkles/InstallationInfo.Directory.cs sed -i.bak "s/m4_define(.sparkleshare_version[^)]*)/m4_define([sparkleshare_version], [$1])/" ../configure.ac cat ../SparkleShare/Mac/Info.plist | eval "sed -e '/CFBundleShortVersionString<\/key>/{N;s#.*<\/string>#$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist.tmp cat ../SparkleShare/Mac/Info.plist.tmp | eval "sed -e '/CFBundleVersion<\/key>/{N;s#.*<\/string>#$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist rm ../SparkleShare/Mac/Info.plist.tmp rm ../SparkleShare/Windows/SparkleShare.wxs.bak - rm ../SparkleLib/Defines.cs.bak + rm ../Sparkles/InstallationInfo.Directory.cs.bak rm ../configure.ac.bak fi diff --git a/configure.ac b/configure.ac index 46d475f8..270aa398 100755 --- a/configure.ac +++ b/configure.ac @@ -109,12 +109,12 @@ build/Makefile build/m4/Makefile build/m4/shave/shave build/m4/shave/shave-libtool -SparkleLib/Defines.cs -SparkleLib/Makefile -SparkleLib/Git/Makefile +Sparkles/InstallationInfo.Directory.cs +Sparkles/Makefile +Sparkles/Git/Makefile SparkleShare/Common/Makefile SparkleShare/Common/HTML/Makefile -SparkleShare/Common/Plugins/Makefile +SparkleShare/Common/Presets/Makefile SparkleShare/Common/Pixmaps/Makefile SparkleShare/Linux/Makefile SparkleShare/Linux/Pixmaps/Makefile diff --git a/legal/License_for_SparkleLib.txt b/legal/License_for_Sparkles.txt similarity index 100% rename from legal/License_for_SparkleLib.txt rename to legal/License_for_Sparkles.txt