Merge remote-tracking branch 'upstream/master' into windows
This commit is contained in:
commit
1bbc3fb396
203
README
Normal file
203
README
Normal file
|
@ -0,0 +1,203 @@
|
||||||
|
SparkleShare
|
||||||
|
============
|
||||||
|
|
||||||
|
SparkleShare is a collaboration and sharing tool that is designed to keep
|
||||||
|
things simple and to stay out of your way. It allows you to instantly sync
|
||||||
|
with any Git repository you have access to.
|
||||||
|
|
||||||
|
Though SparkleShare is not made to be a graphical frontend
|
||||||
|
for git or a backup tool, it may be useful for other kinds of purposes as well,
|
||||||
|
like backing up small files or monitoring your favourite project. In contrast
|
||||||
|
to the projects name, we will very likely refuse to implement your personal
|
||||||
|
ponies.
|
||||||
|
|
||||||
|
SparkleShare currently works on Linux and Mac. A Windows port and mobile
|
||||||
|
device support are planned for the future.
|
||||||
|
|
||||||
|
|
||||||
|
License
|
||||||
|
=======
|
||||||
|
|
||||||
|
SparkleShare is free software and licensed under the GNU GPLv3 or later. You
|
||||||
|
are welcome to change and redistribute it under certain conditions. For more
|
||||||
|
information see the LICENSE file or visit http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
|
||||||
|
Run on Linux:
|
||||||
|
=============
|
||||||
|
|
||||||
|
Requirements:
|
||||||
|
|
||||||
|
- git >= 1.7.0
|
||||||
|
- gtk-sharp2
|
||||||
|
- gvfs
|
||||||
|
- intltool
|
||||||
|
- libnotify
|
||||||
|
- mono-core >= 2.8
|
||||||
|
- notify-sharp
|
||||||
|
- nautilus-python
|
||||||
|
- openssh
|
||||||
|
- pygtk
|
||||||
|
- webkitgtk
|
||||||
|
- webkit-sharp
|
||||||
|
|
||||||
|
|
||||||
|
Run the service, either click the SparkleShare launcher or:
|
||||||
|
|
||||||
|
$ sparkleshare start
|
||||||
|
|
||||||
|
You can stop the service via the graphical interface or by typing:
|
||||||
|
|
||||||
|
$ sparkleshare stop
|
||||||
|
|
||||||
|
For help:
|
||||||
|
|
||||||
|
$ sparkleshare --help
|
||||||
|
|
||||||
|
Note:
|
||||||
|
|
||||||
|
SparkleShare creates its own RSA keypair in ~/config/sparkleshare/ and uses
|
||||||
|
that for authentication. Please mind this if you're planning to set up your
|
||||||
|
own server by hand.
|
||||||
|
|
||||||
|
|
||||||
|
Build on Linux:
|
||||||
|
===============
|
||||||
|
|
||||||
|
Installing the build dependencies on Debian or Ubuntu:
|
||||||
|
|
||||||
|
$ sudo apt-get install gtk-sharp2 mono-runtime mono-devel monodevelop \
|
||||||
|
libndesk-dbus1.0-cil-dev nant libnotify-cil-dev libgtk2.0-cil-dev \
|
||||||
|
libwebkit-cil-dev intltool libtool python-nautilus libndesk-dbus-glib1.0-cil-dev
|
||||||
|
|
||||||
|
For Ubuntu libappindicator support, run the following before building:
|
||||||
|
|
||||||
|
$ sudo apt-get install libappindicator0.1-cil-dev
|
||||||
|
|
||||||
|
|
||||||
|
On Fedora:
|
||||||
|
|
||||||
|
$ sudo yum install gtk-sharp2-devel mono-core mono-devel monodevelop \
|
||||||
|
ndesk-dbus-devel ndesk-dbus-glib-devel nautilus-python-devel nant \
|
||||||
|
notify-sharp-devel webkit-sharp-devel webkitgtk-devel libtool intltool \
|
||||||
|
gnome-doc-utils
|
||||||
|
|
||||||
|
|
||||||
|
You can build and install SparkleShare like this:
|
||||||
|
|
||||||
|
$ ./configure --prefix=/usr (or ./autogen.sh if you build from the repository)
|
||||||
|
$ make
|
||||||
|
$ sudo make install
|
||||||
|
|
||||||
|
Note:
|
||||||
|
|
||||||
|
Use '--prefix=/usr' if you want the Nautilus extension to work.
|
||||||
|
|
||||||
|
|
||||||
|
Run on Mac:
|
||||||
|
===========
|
||||||
|
|
||||||
|
Just double-click the SparkleShare.app.
|
||||||
|
|
||||||
|
|
||||||
|
Build on Mac:
|
||||||
|
=============
|
||||||
|
|
||||||
|
Install the Mono Framework, MonoDevelop and the MonoMac plugin (you find it in Add-in Manager).
|
||||||
|
|
||||||
|
You may need to adjust some environment variables to let the build environment tools find mono:
|
||||||
|
|
||||||
|
$ export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH
|
||||||
|
$ export PKG_CONFIG=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config
|
||||||
|
$ export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig
|
||||||
|
|
||||||
|
Then you need either MacPorts or Homebrew. Go on and choose one of the next two sections.
|
||||||
|
|
||||||
|
|
||||||
|
Using MacPorts
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Install git, automake, and intltool:
|
||||||
|
|
||||||
|
$ sudo port install git-core automake intltool
|
||||||
|
|
||||||
|
Start the first part of the build:
|
||||||
|
|
||||||
|
$ ./autogen.sh --enable-gtkui=no
|
||||||
|
$ make
|
||||||
|
|
||||||
|
The last step will give you some errors in SparkleShare.exe, ignore these and go on to the
|
||||||
|
MonoDevelop section.
|
||||||
|
|
||||||
|
|
||||||
|
Using Homebrew
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Because there are old versions of autoconf and automake installed on OS X, they are not in
|
||||||
|
the official master branch. It's easy to create the formulas:
|
||||||
|
|
||||||
|
$ brew create $url
|
||||||
|
|
||||||
|
Now install the formulas.
|
||||||
|
|
||||||
|
You can have a look at this branch for the created Formulas:
|
||||||
|
https://github.com/toabi/homebrew/commits/sparkleshare
|
||||||
|
|
||||||
|
You also have to comment out the 'keg_only' in gettext and remove it if you already
|
||||||
|
installed it. If you created the formulas install them:
|
||||||
|
|
||||||
|
$ brew install git autoconf automake intltool gettext
|
||||||
|
|
||||||
|
Now start the first part of the build:
|
||||||
|
|
||||||
|
$ export ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
|
||||||
|
$ cd SmartIrc4net
|
||||||
|
$ ./autogen.sh
|
||||||
|
$ cd ..
|
||||||
|
$ ./autogen.sh --enable-gtkui=no
|
||||||
|
$ make
|
||||||
|
|
||||||
|
Ignore the error and continue to the MonoDevelop-part.
|
||||||
|
|
||||||
|
|
||||||
|
Building the Mac UI
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Now that you have compiled the libraries, open 'SparkleShare/Mac/SparkleShare.sln' in
|
||||||
|
MonoDevelop and start the build.
|
||||||
|
|
||||||
|
To create the SparkleShare.app, select Project from the menu bar
|
||||||
|
and click "Create Mac Installer..." Save the SparkleShare.app somewhere.
|
||||||
|
|
||||||
|
Paste the contents of the following file in SparkleShare.app/Contents/MonoBundle/config:
|
||||||
|
https://raw.github.com/gist/1aeffa61bac73fc08eca/0c0f09ef9e36864c35f34fd5e8bf4f99886be193/gistfile1.txt
|
||||||
|
|
||||||
|
Copy /Library/Frameworks/Mono.framework/Versions/Current/lib/libintl.dylib
|
||||||
|
to SparkleShare.app/Contents/Resources
|
||||||
|
|
||||||
|
Now you should have a working .app that you can run.
|
||||||
|
|
||||||
|
|
||||||
|
Info
|
||||||
|
====
|
||||||
|
|
||||||
|
Official website:
|
||||||
|
http://www.sparkleshare.org/
|
||||||
|
|
||||||
|
Source code:
|
||||||
|
http://github.com/SparkleShare/
|
||||||
|
|
||||||
|
IRC Channel:
|
||||||
|
#sparkleshare on irc.gnome.org
|
||||||
|
|
||||||
|
Wiki:
|
||||||
|
http://github.com/hbons/SparkleShare/wiki/
|
||||||
|
|
||||||
|
Report issues:
|
||||||
|
http://github.com/hbons/SparkleShare/issues/
|
||||||
|
|
||||||
|
Translation project:
|
||||||
|
http://www.transifex.net/projects/p/sparkleshare/
|
||||||
|
|
||||||
|
|
||||||
|
Now have fun and create cool things together! :)
|
|
@ -19,7 +19,6 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Xml;
|
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace SparkleLib {
|
||||||
|
|
||||||
|
@ -153,11 +152,6 @@ namespace SparkleLib {
|
||||||
// the newly cloned repository
|
// the newly cloned repository
|
||||||
private void InstallConfiguration ()
|
private void InstallConfiguration ()
|
||||||
{
|
{
|
||||||
string global_config_file_path = Path.Combine (SparkleConfig.DefaultConfig.TmpPath, "config.xml");
|
|
||||||
|
|
||||||
if (!File.Exists (global_config_file_path))
|
|
||||||
return;
|
|
||||||
|
|
||||||
string repo_config_file_path = SparkleHelpers.CombineMore (base.target_folder, ".git", "config");
|
string repo_config_file_path = SparkleHelpers.CombineMore (base.target_folder, ".git", "config");
|
||||||
string config = String.Join (Environment.NewLine, File.ReadAllLines (repo_config_file_path));
|
string config = String.Join (Environment.NewLine, File.ReadAllLines (repo_config_file_path));
|
||||||
|
|
||||||
|
@ -173,20 +167,6 @@ namespace SparkleLib {
|
||||||
// Ignore permission changes
|
// Ignore permission changes
|
||||||
config = config.Replace ("filemode = true", "filemode = false");
|
config = config.Replace ("filemode = true", "filemode = false");
|
||||||
|
|
||||||
|
|
||||||
// Add user info
|
|
||||||
XmlDocument xml = new XmlDocument();
|
|
||||||
xml.Load (global_config_file_path);
|
|
||||||
|
|
||||||
XmlNode node_name = xml.SelectSingleNode ("//user/name/text()");
|
|
||||||
XmlNode node_email = xml.SelectSingleNode ("//user/email/text()");
|
|
||||||
|
|
||||||
// TODO: just use commands instead of messing with the config file
|
|
||||||
config += n +
|
|
||||||
"[user]" + n +
|
|
||||||
"\tname = " + node_name.Value + n +
|
|
||||||
"\temail = " + node_email.Value + n;
|
|
||||||
|
|
||||||
// Write the config to the file
|
// Write the config to the file
|
||||||
TextWriter writer = new StreamWriter (repo_config_file_path);
|
TextWriter writer = new StreamWriter (repo_config_file_path);
|
||||||
writer.WriteLine (config);
|
writer.WriteLine (config);
|
||||||
|
|
|
@ -402,7 +402,11 @@ namespace SparkleLib {
|
||||||
// Commits the made changes
|
// Commits the made changes
|
||||||
private void Commit (string message)
|
private void Commit (string message)
|
||||||
{
|
{
|
||||||
SparkleGit git = new SparkleGit (LocalPath, "commit -m \"" + message + "\"");
|
SparkleGit git = new SparkleGit (LocalPath,
|
||||||
|
"commit -m \"" + message + "\" " +
|
||||||
|
"--author=\"" + SparkleConfig.DefaultConfig.User.Name +
|
||||||
|
" <" + SparkleConfig.DefaultConfig.User.Email + ">\"");
|
||||||
|
|
||||||
git.Start ();
|
git.Start ();
|
||||||
git.StandardOutput.ReadToEnd ();
|
git.StandardOutput.ReadToEnd ();
|
||||||
git.WaitForExit ();
|
git.WaitForExit ();
|
||||||
|
|
|
@ -29,6 +29,8 @@ namespace SparkleLib {
|
||||||
private Thread thread;
|
private Thread thread;
|
||||||
private IrcClient client;
|
private IrcClient client;
|
||||||
private string nick;
|
private string nick;
|
||||||
|
private string announcements_password;
|
||||||
|
private bool allow_passwordless_join;
|
||||||
|
|
||||||
|
|
||||||
public SparkleListenerIrc (Uri server, string folder_identifier) :
|
public SparkleListenerIrc (Uri server, string folder_identifier) :
|
||||||
|
@ -41,6 +43,19 @@ namespace SparkleLib {
|
||||||
// with a number, so prefix an alphabetic character
|
// with a number, so prefix an alphabetic character
|
||||||
this.nick = "s" + this.nick.Substring (0, 7);
|
this.nick = "s" + this.nick.Substring (0, 7);
|
||||||
|
|
||||||
|
// Optional password to make the channel access more safe
|
||||||
|
this.announcements_password =
|
||||||
|
SparkleConfig.DefaultConfig.GetConfigOption ("announcements_password");
|
||||||
|
|
||||||
|
// Option to allow access to channel when no password is defined
|
||||||
|
try {
|
||||||
|
this.allow_passwordless_join = Convert.ToBoolean (
|
||||||
|
SparkleConfig.DefaultConfig.GetConfigOption ("allow_passwordless_join"));
|
||||||
|
|
||||||
|
} catch (Exception) {
|
||||||
|
this.allow_passwordless_join = true;
|
||||||
|
}
|
||||||
|
|
||||||
base.channels.Add ("#" + folder_identifier);
|
base.channels.Add ("#" + folder_identifier);
|
||||||
|
|
||||||
this.client = new IrcClient () {
|
this.client = new IrcClient () {
|
||||||
|
@ -104,13 +119,31 @@ namespace SparkleLib {
|
||||||
try {
|
try {
|
||||||
// Connect, login, and join the channel
|
// Connect, login, and join the channel
|
||||||
int port = base.server.Port;
|
int port = base.server.Port;
|
||||||
if (port < 0) port = 6667;
|
|
||||||
|
if (port < 0)
|
||||||
|
port = 6667;
|
||||||
|
|
||||||
this.client.Connect (base.server.Host, port);
|
this.client.Connect (base.server.Host, port);
|
||||||
this.client.Login (this.nick, this.nick, 8, this.nick);
|
this.client.Login (this.nick, this.nick, 8, this.nick);
|
||||||
|
|
||||||
foreach (string channel in base.channels) {
|
foreach (string channel in base.channels) {
|
||||||
SparkleHelpers.DebugInfo ("ListenerIrc", "Joining channel " + channel);
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Joining channel " + channel);
|
||||||
this.client.RfcJoin (channel);
|
|
||||||
|
if (!string.IsNullOrEmpty (this.announcements_password)) {
|
||||||
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Password set to access the channel");
|
||||||
|
this.client.RfcJoin (channel, this.announcements_password);
|
||||||
|
this.client.RfcMode (channel, "+k " + this.announcements_password);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (this.allow_passwordless_join) {
|
||||||
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Accessing a dangerous channel, change the setting to not access");
|
||||||
|
this.client.RfcJoin (channel);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Dangerous channel, change the setting to access");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.client.RfcMode (channel, "+s");
|
this.client.RfcMode (channel, "+s");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +171,18 @@ namespace SparkleLib {
|
||||||
|
|
||||||
if (IsConnected) {
|
if (IsConnected) {
|
||||||
SparkleHelpers.DebugInfo ("ListenerIrc", "Joining channel " + channel);
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Joining channel " + channel);
|
||||||
this.client.RfcJoin (channel);
|
if (this.announcements_password != null) {
|
||||||
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Password set to access the channel");
|
||||||
|
this.client.RfcJoin (channel, this.announcements_password);
|
||||||
|
this.client.RfcMode (channel, "+k " + this.announcements_password);
|
||||||
|
} else {
|
||||||
|
if (allow_passwordless_join) {
|
||||||
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Accessing a dangerous channel change the setting to not access");
|
||||||
|
this.client.RfcJoin (channel);
|
||||||
|
} else {
|
||||||
|
SparkleHelpers.DebugInfo ("ListenerIrc", "Dangerous channel, change the setting to access");
|
||||||
|
}
|
||||||
|
}
|
||||||
this.client.RfcMode (channel, "+s");
|
this.client.RfcMode (channel, "+s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue