diff --git a/SparkleShare/Windows/SparkleController.cs b/SparkleShare/Windows/SparkleController.cs
index 679c8780..9c7a108f 100644
--- a/SparkleShare/Windows/SparkleController.cs
+++ b/SparkleShare/Windows/SparkleController.cs
@@ -26,6 +26,7 @@ using System.Threading;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using CefSharp;
+using Microsoft.Win32;
namespace SparkleShare {
@@ -111,17 +112,6 @@ namespace SparkleShare {
}
}
- /*public override string GetAvatar (string email, int size)
- {
- if (string.IsNullOrEmpty (email)) {
- return "application://sparkleshare/avatar-default-32.png";
- }
- string avatar_file_path = SparkleHelpers.CombineMore (
- SparklePaths.SparkleLocalIconPath, size + "x" + size, "status", "avatar-" + email);
-
- return avatar_file_path;
- }*/
-
// Creates a .desktop entry in autostart folder to
// start SparkleShare automatically at login
@@ -132,6 +122,22 @@ namespace SparkleShare {
public override void InstallProtocolHandler()
{
+ // Get assembly location
+ string location = System.Reflection.Assembly.GetExecutingAssembly().Location;
+ string folder = Path.GetDirectoryName(location);
+ string inviteExe = Path.Combine(folder, "SparkleShareInviteOpen.exe");
+
+ // Register protocol handler as explained in
+ // http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx
+ string mainKey = "HKEY_CLASSES_ROOT\\sparkleshare";
+ Registry.SetValue(mainKey, "", "SparkleShare Invites");
+ Registry.SetValue(mainKey, "URL Protocol", "");
+
+ string iconKey = "HKEY_CLASSES_ROOT\\sparkleshare\\DefaultIcon";
+ Registry.SetValue(iconKey, "", inviteExe + ",1");
+
+ string actionKey = "HKEY_CLASSES_ROOT\\sparkleshare\\shell\\open\\command";
+ Registry.SetValue(actionKey, "", "\"" + inviteExe + "\" \"%1\"");
}
diff --git a/SparkleShare/Windows/SparkleShare.sln b/SparkleShare/Windows/SparkleShare.sln
index 83b5e5a1..5f5b3a2b 100644
--- a/SparkleShare/Windows/SparkleShare.sln
+++ b/SparkleShare/Windows/SparkleShare.sln
@@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare", "SparkleShar
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleLib", "..\..\SparkleLib\windows\SparkleLib.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShareInviteOpen", "SparkleShareInviteOpen\SparkleShareInviteOpen.csproj", "{1DB5492D-B897-4A5E-8DD7-175EC65F52F2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -19,6 +21,10 @@ Global
{2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs
index db54540b..54f5d1e4 100644
--- a/SparkleShare/Windows/SparkleShare.wxs
+++ b/SparkleShare/Windows/SparkleShare.wxs
@@ -25,6 +25,8 @@
+
+
diff --git a/SparkleShare/Windows/SparkleShareInviteOpen/Properties/AssemblyInfo.cs b/SparkleShare/Windows/SparkleShareInviteOpen/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..43f12384
--- /dev/null
+++ b/SparkleShare/Windows/SparkleShareInviteOpen/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// La información general sobre un ensamblado se controla mediante el siguiente
+// conjunto de atributos. Cambie estos atributos para modificar la información
+// asociada con un ensamblado.
+[assembly: AssemblyTitle("SparkleShareInviteOpen")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("SparkleShareInviteOpen")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Si establece ComVisible como false, los tipos de este ensamblado no estarán visibles
+// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
+// COM, establezca el atributo ComVisible como true en este tipo.
+[assembly: ComVisible(false)]
+
+// El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
+[assembly: Guid("5d15209c-88a2-4d7f-9934-af24b8c90c55")]
+
+// La información de versión de un ensamblado consta de los cuatro valores siguientes:
+//
+// Versión principal
+// Versión secundaria
+// Número de versión de compilación
+// Revisión
+//
+// Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión
+// mediante el asterisco ('*'), como se muestra a continuación:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/SparkleShare/Windows/SparkleShareInviteOpen/SparkleShareInviteOpen.csproj b/SparkleShare/Windows/SparkleShareInviteOpen/SparkleShareInviteOpen.csproj
new file mode 100644
index 00000000..9e49f1df
--- /dev/null
+++ b/SparkleShare/Windows/SparkleShareInviteOpen/SparkleShareInviteOpen.csproj
@@ -0,0 +1,51 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}
+ Exe
+ Properties
+ SparkleShareInviteOpen
+ SparkleShareInviteOpen
+ v3.5
+ 512
+ ..\..\..\data\icons\sparkleshare.ico
+
+
+ true
+ full
+ false
+ ..\..\..\bin\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ ..\..\..\bin\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+ sparkleshare-invite-open.cs
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SparkleShare/Windows/build.cmd b/SparkleShare/Windows/build.cmd
index 6c837043..7f86aa63 100644
--- a/SparkleShare/Windows/build.cmd
+++ b/SparkleShare/Windows/build.cmd
@@ -11,6 +11,8 @@ cd lib
copy * ..\..\..\bin
cd ..
+cp ..\..\data\icons\sparkleshare.ico ..\..\bin
+
%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="AnyCPU" %~dp0\tools\gettext-cs-utils\Gettext.CsUtils\Core\Gettext.Cs\Gettext.Cs.csproj
%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" %~dp0\SparkleShare.sln