Make it compile with Sparkleshare 0.6 and create .msi file correctly
This commit is contained in:
parent
f4c4a94000
commit
0dd7605834
|
@ -86,7 +86,8 @@ namespace SparkleLib {
|
|||
this.git = new SparkleGit (SparkleConfig.DefaultConfig.TmpPath,
|
||||
"clone " +
|
||||
"--progress " + // Redirects progress stats to standarderror
|
||||
"\"" + base.remote_url + "\" " + "\"" + base.target_folder + "\"");
|
||||
"\"" + base.remote_url + "\" " +
|
||||
"\"" + SparkleHelpers.NormalizeSeparatorsToOS(base.target_folder) + "\"");
|
||||
|
||||
this.git.StartInfo.RedirectStandardError = true;
|
||||
this.git.Start ();
|
||||
|
|
|
@ -173,8 +173,14 @@ namespace SparkleLib {
|
|||
|
||||
string ssh_config_path = Path.Combine (path, ".ssh");
|
||||
string ssh_config_file_path = SparkleHelpers.CombineMore (path, ".ssh", "config");
|
||||
string ssh_config = "IdentityFile " +
|
||||
Path.Combine (SparkleConfig.ConfigPath, "sparkleshare." + User.Email + ".key");
|
||||
|
||||
string ssh_key_path = SparkleHelpers.NormalizeSeparatorsToOS(
|
||||
Path.Combine(SparkleConfig.ConfigPath, "sparkleshare." + User.Email + ".key"));
|
||||
if (SparkleHelpers.IsWindows && ssh_key_path.IndexOf(' ') >= 0)
|
||||
{
|
||||
ssh_key_path = "\"" + ssh_key_path + "\"";
|
||||
}
|
||||
string ssh_config = "IdentityFile " + ssh_key_path;
|
||||
|
||||
if (!Directory.Exists (ssh_config_path))
|
||||
Directory.CreateDirectory (ssh_config_path);
|
||||
|
|
|
@ -93,6 +93,29 @@ namespace SparkleLib {
|
|||
{
|
||||
return target.Replace (source + Path.DirectorySeparatorChar, "");
|
||||
}
|
||||
|
||||
public static bool IsWindows
|
||||
{
|
||||
get
|
||||
{
|
||||
PlatformID platform = Environment.OSVersion.Platform;
|
||||
return (platform == PlatformID.Win32NT
|
||||
|| platform == PlatformID.Win32S
|
||||
|| platform == PlatformID.Win32Windows);
|
||||
}
|
||||
}
|
||||
|
||||
public static string NormalizeSeparatorsToOS(string path)
|
||||
{
|
||||
if (IsWindows)
|
||||
{
|
||||
return path.Replace('\\', '/');
|
||||
}
|
||||
else
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2C914413-B31C-4362-93C7-1AE34F09112A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
|
@ -75,9 +75,6 @@
|
|||
<Compile Include="..\SparkleConfig.cs">
|
||||
<Link>SparkleConfig.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\SparklePath.cs">
|
||||
<Link>SparklePath.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\SparkleRepoBase.cs">
|
||||
<Link>SparkleRepoBase.cs</Link>
|
||||
</Compile>
|
||||
|
@ -97,7 +94,6 @@
|
|||
<Compile Include="..\SparkleOptions.cs" />
|
||||
<Compile Include="..\SparkleChangeSet.cs" />
|
||||
<Compile Include="..\SparkleListenerBase.cs" />
|
||||
<Compile Include="..\SparkleListenerIrc.cs" />
|
||||
<Compile Include="..\SparkleListenerTcp.cs" />
|
||||
<Compile Include="..\SparkleBackend.cs" />
|
||||
<Compile Include="GlobalAssemblyInfo.cs">
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
process.StartInfo.RedirectStandardOutput = true;
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
process.StartInfo.FileName = "git";
|
||||
process.StartInfo.Arguments = "describe --tags --dirty=-d --always";
|
||||
process.StartInfo.Arguments = "describe --tags";
|
||||
process.StartInfo.WorkingDirectory = Path.GetDirectoryName(Host.TemplateFile);
|
||||
process.Start();
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@ using System.Text.RegularExpressions;
|
|||
using System.Threading;
|
||||
using System.Xml;
|
||||
|
||||
#if __MonoCS__
|
||||
using Mono.Unix;
|
||||
#endif
|
||||
using SparkleLib;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
@ -90,7 +92,7 @@ namespace SparkleShare {
|
|||
// Short alias for the translations
|
||||
public static string _ (string s)
|
||||
{
|
||||
return Catalog.GetString (s);
|
||||
return Program._(s);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1081,12 +1083,16 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
public void Quit ()
|
||||
public virtual void Quit ()
|
||||
{
|
||||
foreach (SparkleRepoBase repo in Repositories)
|
||||
repo.Dispose ();
|
||||
|
||||
#if __MonoCS__
|
||||
Environment.Exit (0);
|
||||
#else
|
||||
System.Windows.Forms.Application.Exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,9 +23,13 @@ using System.Runtime.InteropServices;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
#if __MonoCS__
|
||||
using Gtk;
|
||||
using Mono.Unix;
|
||||
using Mono.Unix.Native;
|
||||
#else
|
||||
using System.Windows.Forms;
|
||||
#endif
|
||||
using SparkleLib;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
@ -44,17 +48,19 @@ namespace SparkleShare {
|
|||
// Short alias for the translations
|
||||
public static string _(string s)
|
||||
{
|
||||
return Catalog.GetString (s);
|
||||
return Program._ (s);
|
||||
}
|
||||
|
||||
|
||||
public SparkleUI ()
|
||||
{
|
||||
// Initialize the application
|
||||
#if __MonoCS__
|
||||
Application.Init ();
|
||||
|
||||
// Use translations
|
||||
Catalog.Init (Defines.GETTEXT_PACKAGE, Defines.LOCALE_DIR);
|
||||
#endif
|
||||
|
||||
StatusIcon = new SparkleStatusIcon ();
|
||||
Bubbles = new SparkleBubbles ();
|
||||
|
@ -73,6 +79,7 @@ namespace SparkleShare {
|
|||
public void Run ()
|
||||
{
|
||||
Application.Run ();
|
||||
StatusIcon.Dispose ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,8 +62,9 @@ namespace SparkleShare {
|
|||
Application.SetCompatibleTextRenderingDefault (false);
|
||||
|
||||
// Add msysgit to path, as we cannot asume it is added to the path
|
||||
// Asume it is installed in @"C:\msysgit\bin" for now
|
||||
string MSysGit=@"C:\msysgit";
|
||||
// Asume it is installed in @"<exec dir>\msysgit\bin"
|
||||
string ExecutableDir = Path.GetDirectoryName(Application.ExecutablePath);
|
||||
string MSysGit = Path.Combine(ExecutableDir, "msysgit");
|
||||
|
||||
string newPath = MSysGit + @"\bin" + ";"
|
||||
+ MSysGit + @"\mingw\bin" + ";"
|
||||
|
@ -110,7 +111,7 @@ namespace SparkleShare {
|
|||
}
|
||||
}
|
||||
|
||||
public override string GetAvatar (string email, int size)
|
||||
/*public override string GetAvatar (string email, int size)
|
||||
{
|
||||
if (string.IsNullOrEmpty (email)) {
|
||||
return "application://sparkleshare/avatar-default-32.png";
|
||||
|
@ -119,7 +120,7 @@ namespace SparkleShare {
|
|||
SparklePaths.SparkleLocalIconPath, size + "x" + size, "status", "avatar-" + email);
|
||||
|
||||
return avatar_file_path;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
// Creates a .desktop entry in autostart folder to
|
||||
|
@ -146,18 +147,27 @@ namespace SparkleShare {
|
|||
// Creates the SparkleShare folder in the user's home folder
|
||||
public override bool CreateSparkleShareFolder ()
|
||||
{
|
||||
if (!Directory.Exists (SparklePaths.SparklePath)) {
|
||||
|
||||
Directory.CreateDirectory (SparklePaths.SparklePath);
|
||||
SparkleHelpers.DebugInfo ("Config", "Created '" + SparklePaths.SparklePath + "'");
|
||||
if (!Directory.Exists(SparkleConfig.DefaultConfig.FoldersPath))
|
||||
{
|
||||
Directory.CreateDirectory(SparkleConfig.DefaultConfig.FoldersPath);
|
||||
Directory.CreateDirectory(SparkleConfig.DefaultConfig.TmpPath);
|
||||
SparkleHelpers.DebugInfo("Config", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OpenFile(string url)
|
||||
{
|
||||
Process process = new Process();
|
||||
process.StartInfo.Arguments = "\"" + url + "\"";
|
||||
process.StartInfo.FileName = "start";
|
||||
|
||||
process.Start();
|
||||
}
|
||||
|
||||
public override void OpenSparkleShareFolder (string subfolder)
|
||||
{
|
||||
Process process = new Process();
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace SparkleShare {
|
|||
HTML = HTML.Replace ("<!-- $document-moved-background-image -->",
|
||||
"application://sparkleshare/document-moved-12.png");
|
||||
|
||||
HTML = HTML.Replace ("href='" + SparklePaths.SparklePath, "href='application://file/" + SparklePaths.SparklePath);
|
||||
HTML = HTML.Replace("href='" + SparkleConfig.DefaultConfig.FoldersPath, "href='application://file/" + SparkleConfig.DefaultConfig.FoldersPath);
|
||||
HTML = HTML.Replace ("file://application://sparkleshare/", "application://sparkleshare/");
|
||||
HTML = HTML.Replace ("file://", "application://file/");
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ namespace SparkleShare {
|
|||
Filename = Uri.UnescapeDataString (Filename);
|
||||
Filename = Filename.Replace ("/", "\\");
|
||||
|
||||
if (Filename.StartsWith (SparklePaths.SparklePath))
|
||||
if (Filename.StartsWith(SparkleConfig.DefaultConfig.FoldersPath))
|
||||
System.Diagnostics.Process.Start (Filename);
|
||||
}
|
||||
}
|
||||
|
|
4
SparkleShare/Windows/SparkleSetup.Designer.cs
generated
4
SparkleShare/Windows/SparkleSetup.Designer.cs
generated
|
@ -227,7 +227,7 @@ namespace SparkleShare {
|
|||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font ("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.Font = new System.Drawing.Font ("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.Location = new System.Drawing.Point (197, 267);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size (114, 20);
|
||||
|
@ -237,7 +237,7 @@ namespace SparkleShare {
|
|||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Font = new System.Drawing.Font ("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label14.Font = new System.Drawing.Font ("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label14.Location = new System.Drawing.Point (8, 267);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size (75, 20);
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace SparkleShare {
|
|||
pictureBox.Image = Icons.side_splash;
|
||||
this.Icon = Icons.sparkleshare;
|
||||
|
||||
Controller.ChangePageEvent += delegate (PageType type) {
|
||||
Controller.ChangePageEvent += delegate (PageType type, string [] warnings) {
|
||||
tabControl.SafeInvoke ((Action)delegate {
|
||||
switch (type) {
|
||||
case PageType.Add:
|
||||
|
@ -206,12 +206,19 @@ namespace SparkleShare {
|
|||
// Enables or disables the 'Next' button depending on the
|
||||
// entries filled in by the user
|
||||
if (!String.IsNullOrEmpty (NameEntry.Text) &&
|
||||
Program.Controller.IsValidEmail (EmailEntry.Text)) {
|
||||
this.IsValidEmail (EmailEntry.Text)) {
|
||||
buttonNext.Enabled = true;
|
||||
} else {
|
||||
buttonNext.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Checks to see if an email address is valid
|
||||
public bool IsValidEmail(string email)
|
||||
{
|
||||
Regex regex = new Regex(@"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$", RegexOptions.IgnoreCase);
|
||||
return regex.IsMatch(email);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<ProjectGuid>{728483AA-E34B-4441-BF2C-C8BC2901E4E0}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AssemblyName>SparkleShare</AssemblyName>
|
||||
|
@ -54,7 +54,9 @@
|
|||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Reference Include="CefSharp, Version=0.3.4006.34354, Culture=neutral, processorArchitecture=x86" />
|
||||
<Reference Include="CefSharp, Version=0.3.4006.34354, Culture=neutral, processorArchitecture=x86">
|
||||
<HintPath>..\..\bin\CefSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Gettext.Cs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\tools\gettext-cs-utils\Gettext.CsUtils\Core\Gettext.Cs\bin\Release\Gettext.Cs.dll</HintPath>
|
||||
|
@ -85,6 +87,9 @@
|
|||
<Compile Include="..\SparkleExtensions.cs">
|
||||
<Link>SparkleExtensions.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\SparkleInvite.cs">
|
||||
<Link>SparkleInvite.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\SparklePlugin.cs">
|
||||
<Link>SparklePlugin.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
@ -1,64 +1,78 @@
|
|||
<?xml version='1.0' encoding='windows-1252'?>
|
||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
||||
|
||||
<Product Name='SparkleShare 0.2' Id='184950D5-67F6-4D06-9717-7E2F1607A7B0' UpgradeCode='D3DF1D99-87F5-47A7-A349-863DD6E4B73A'
|
||||
|
||||
<Product Name='SparkleShare 0.6' Id='184950D5-67F6-4D06-9717-7E2F1607A7B0' UpgradeCode='D3DF1D99-87F5-47A7-A349-863DD6E4B73A'
|
||||
Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='sparkleshare.org'>
|
||||
|
||||
<Package Id='*' Keywords='Installer' Description="SparkleShare 0.2 Installer"
|
||||
<Package Id='*' Keywords='Installer' Description="SparkleShare 0.6 Installer"
|
||||
Comments='This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.' Manufacturer='sparkleshare.org'
|
||||
InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
|
||||
|
||||
<Media Id='1' Cabinet='SparkleShare.cab' EmbedCab='yes' DiskPrompt='SparkleShare CAB' />
|
||||
<Media Id='2' Cabinet='MsysGit.cab' EmbedCab='no' DiskPrompt='MsysGit portable CAB' />
|
||||
<Property Id='DiskPrompt' Value="sparkleshare.org Bundle CAB Installation" />
|
||||
|
||||
<Property Id="MSYSGIT_CAB_EXISTS">
|
||||
<DirectorySearch Id="db2CabFile" Path="[SourceDir]">
|
||||
<FileSearch Name="MsysGit.cab"/>
|
||||
</DirectorySearch>
|
||||
</Property>
|
||||
|
||||
<Directory Id='TARGETDIR' Name='SourceDir'>
|
||||
|
||||
<Directory Id='ProgramFilesFolder' Name='PFiles'>
|
||||
|
||||
<Media Id='1' Cabinet='SparkleShare.cab' EmbedCab='yes' DiskPrompt='SparkleShare CAB' />
|
||||
<Property Id='DiskPrompt' Value="sparkleshare.org Bundle CAB Installation" />
|
||||
|
||||
<Directory Id='TARGETDIR' Name='SourceDir'>
|
||||
<Directory Id='ProgramFilesFolder' Name='PFiles'>
|
||||
<Directory Id='sparkleshareDotOrgDir' Name='sparkleshare.org'>
|
||||
<Directory Id='INSTALLDIR' Name='SparkleShare'>
|
||||
<Component Id='MainExecutable' Guid='0DA692D5-4DBE-4251-9F62-E7C1A76F10E1'>
|
||||
<File Id='CefSharp.dll' Name='CefSharp.dll' Source='bin/CefSharp.dll' DiskId='1' />
|
||||
<File Id='Meebey.SmartIrc4net.dll' Name='Meebey.SmartIrc4net.dll' Source='bin/Meebey.SmartIrc4net.dll' DiskId='1' />
|
||||
<File Id='Meebey.SmartIrc4net.xml' Name='Meebey.SmartIrc4net.xml' Source='bin/Meebey.SmartIrc4net.xml' DiskId='1' />
|
||||
<File Id='SparkleLib.dll' Name='SparkleLib.dll' Source='bin/SparkleLib.dll' DiskId='1' />
|
||||
<File Id='SparkleShare.exe' Name='SparkleShare.exe' Source='bin/SparkleShare.exe' KeyPath='yes' DiskId='1' />
|
||||
<File Id='avcodec52.dll' Name='avcodec-52.dll' Source='bin/avcodec-52.dll' DiskId='1' />
|
||||
<File Id='avformat52.dll' Name='avformat-52.dll' Source='bin/avformat-52.dll' DiskId='1' />
|
||||
<File Id='avutil50.dll' Name='avutil-50.dll' Source='bin/avutil-50.dll' DiskId='1' />
|
||||
<File Id='icudt42.dll' Name='icudt42.dll' Source='bin/icudt42.dll' DiskId='1' />
|
||||
<File Id='debug.log' Name='debug.log' Source='bin/debug.log' DiskId='1' />
|
||||
<File Id='libcef.dll' Name='libcef.dll' Source='bin/libcef.dll' DiskId='1' />
|
||||
</Component>
|
||||
<Directory Id='MSYSGIT_DIR' DiskId='2' Name='msysgit'>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
</Directory>
|
||||
|
||||
|
||||
|
||||
<Feature Id='SparkleShareFeature' Title='SparkleShare 0.2' Description='This is the SparkleShare executables.' Level='1' AllowAdvertise='no'>
|
||||
<Directory Id='INSTALLDIR' Name='SparkleShare'>
|
||||
<Component Id='MainExecutable' Guid='0DA692D5-4DBE-4251-9F62-E7C1A76F10E1'>
|
||||
<File Id='CefSharp.dll' Name='CefSharp.dll' Source='!(wix.root)\bin\CefSharp.dll' DiskId='1' />
|
||||
<File Id='Meebey.SmartIrc4net.dll' Name='Meebey.SmartIrc4net.dll' Source='!(wix.root)\bin\Meebey.SmartIrc4net.dll' DiskId='1' />
|
||||
<File Id='Meebey.SmartIrc4net.xml' Name='Meebey.SmartIrc4net.xml' Source='!(wix.root)\bin\Meebey.SmartIrc4net.xml' DiskId='1' />
|
||||
<File Id='Gettext.Cs.dll' Name='Gettext.Cs.dll' Source='!(wix.root)\bin\Gettext.Cs.dll' DiskId='1' />
|
||||
<File Id='SparkleLib.dll' Name='SparkleLib.dll' Source='!(wix.root)\bin\SparkleLib.dll' DiskId='1' />
|
||||
<File Id='SparkleShare.exe' Name='SparkleShare.exe' Source='!(wix.root)\bin\SparkleShare.exe' KeyPath='yes' DiskId='1' />
|
||||
<File Id='avcodec52.dll' Name='avcodec-52.dll' Source='!(wix.root)\bin\avcodec-52.dll' DiskId='1' />
|
||||
<File Id='avformat52.dll' Name='avformat-52.dll' Source='!(wix.root)\bin\avformat-52.dll' DiskId='1' />
|
||||
<File Id='avutil50.dll' Name='avutil-50.dll' Source='!(wix.root)\bin\avutil-50.dll' DiskId='1' />
|
||||
<File Id='icudt42.dll' Name='icudt42.dll' Source='!(wix.root)\bin\icudt42.dll' DiskId='1' />
|
||||
<File Id='libcef.dll' Name='libcef.dll' Source='!(wix.root)\bin\libcef.dll' DiskId='1' />
|
||||
</Component>
|
||||
<Directory Id='MSYSGIT_DIR' Name='msysgit'>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="ApplicationProgramsFolder" Name="SparkleShare">
|
||||
<Component Id="ApplicationShortcut" Guid="468550D5-67F6-4D06-97A2-7E2F1607A7B0">
|
||||
<Shortcut Id="ApplicationStartMenuShortcut"
|
||||
Name="SparkleShare"
|
||||
Description="Collaboration and sharing tool that is designed to keep things simple"
|
||||
Target="[INSTALLDIR]SparkleShare.exe"
|
||||
WorkingDirectory="INSTALLDIR"/>
|
||||
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
|
||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\SparkleShare" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Component Id="Autostart" Guid="468321D5-6AB6-248E-97A2-7E2F162447B0">
|
||||
<RegistryValue Root="HKMU" Key="Software\Microsoft\Windows\CurrentVersion\Run" Name="SparkleShare" Type="string" Value="[INSTALLDIR]SparkleShare.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
|
||||
<Feature Id='SparkleShareFeature' Title='SparkleShare' Description='This is the SparkleShare executables.' Level='1' AllowAdvertise='no'>
|
||||
<ComponentRef Id='MainExecutable' />
|
||||
</Feature>
|
||||
<Feature Id='MsysGitFeature' Title='MsysGit' Description='MsysGit is the storage and synchronization engine used with SparkleShare. If you already have MsysGit installed, you can uncheck this feature to save disk space.' Level='0' Absent='allow' AllowAdvertise='no'>
|
||||
<ComponentRef Id="ApplicationShortcut" />
|
||||
<ComponentRef Id="Autostart" />
|
||||
<ComponentGroupRef Id='msysGitComponentGroup' />
|
||||
<Condition Level='1'>
|
||||
MSYSGIT_CAB_EXISTS
|
||||
</Condition>
|
||||
</Feature>
|
||||
|
||||
<UIRef Id="WixUI_FeatureTree" />
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
|
||||
<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
|
||||
|
||||
<UI>
|
||||
<UIRef Id="WixUI_InstallDir" />
|
||||
<Publish Dialog="ExitDialog"
|
||||
Control="Finish"
|
||||
Event="DoAction"
|
||||
Value="LaunchApplication" />
|
||||
</UI>
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
|
||||
<WixVariable Id="WixUILicenseRtf" Value="..\..\LICENSE.rtf" />
|
||||
<WixVariable Id="WixUIBannerBmp" Value="..\..\data\install\bannrbmp.bmp" />
|
||||
<WixVariable Id="WixUIDialogBmp" Value="..\..\data\install\dlgbmp.bmp" />
|
||||
|
||||
<Property Id="WixShellExecTarget" Value="[#SparkleShare.exe]" />
|
||||
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
|
||||
|
||||
</Product>
|
||||
|
||||
|
||||
</Wix>
|
|
@ -56,14 +56,14 @@ namespace SparkleShare {
|
|||
CreateMenu ();
|
||||
SetNormalState ();
|
||||
|
||||
Program.Controller.FolderSizeChanged += delegate {
|
||||
/*Program.Controller.FolderSizeChanged += delegate {
|
||||
status_icon.ContextMenuStrip.SafeInvoke ((Action)delegate {
|
||||
if (!Animation.Enabled)
|
||||
SetNormalState ();
|
||||
|
||||
UpdateMenu ();
|
||||
});
|
||||
};
|
||||
};*/
|
||||
|
||||
Program.Controller.FolderListChanged += delegate {
|
||||
status_icon.ContextMenuStrip.SafeInvoke ((Action)delegate {
|
||||
|
@ -315,7 +315,7 @@ namespace SparkleShare {
|
|||
this.status_icon.Icon = Icon.FromHandle (Icons.sparkleshare_syncing_error_24.GetHicon ());
|
||||
});
|
||||
} else {
|
||||
StateText = _("Up to date") + " (" + Program.Controller.FolderSize + ")";
|
||||
StateText = _("Up to date") + " (" + FolderSize + ")";
|
||||
status_icon.ContextMenuStrip.SafeInvoke ((Action)delegate {
|
||||
this.status_icon.Icon = Icon.FromHandle (AnimationFrames [0].GetHicon ());
|
||||
});
|
||||
|
@ -333,6 +333,19 @@ namespace SparkleShare {
|
|||
Animation.Start ();
|
||||
}
|
||||
|
||||
public string FolderSize
|
||||
{
|
||||
get
|
||||
{
|
||||
double size = 0;
|
||||
|
||||
foreach (SparkleRepoBase repo in Program.Controller.Repositories)
|
||||
size += repo.Size + repo.HistorySize;
|
||||
|
||||
return Program.Controller.FormatSize(size);
|
||||
}
|
||||
}
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
public void Dispose ()
|
||||
|
|
|
@ -16,15 +16,13 @@ set wixBinDir=%WIX%\bin
|
|||
|
||||
if "%1"=="installer" (
|
||||
if exist "%wixBinDir%" (
|
||||
"%wixBinDir%\heat.exe" dir "%git_install_root%." -cg msysGitComponentGroup -gg -scom -sreg -sfrag -srd -dr MSYSGIT_DIR -t addmedia.xlst -var wix.msysgitpath -o msysgit.wxs
|
||||
"%wixBinDir%\candle" "%~dp0\SparkleShare.wxs"
|
||||
"%wixBinDir%\candle" "msysgit.wxs
|
||||
"%wixBinDir%\light" -ext WixUIExtension Sparkleshare.wixobj msysgit.wixobj -dmsysgitpath=%git_install_root% -o SparkleShare.msi
|
||||
"%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\msysgit" -cg msysGitComponentGroup -gg -scom -sreg -sfrag -srd -dr MSYSGIT_DIR -var wix.msysgitpath -o msysgit.wxs
|
||||
"%wixBinDir%\candle" "%~dp0\SparkleShare.wxs" -ext WixUIExtension -ext WixUtilExtension
|
||||
"%wixBinDir%\candle" "%~dp0\msysgit.wxs" -ext WixUIExtension -ext WixUtilExtension
|
||||
"%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension Sparkleshare.wixobj msysgit.wixobj -droot="%~dp0\..\.." -dmsysgitpath="%~dp0\..\..\bin\msysgit" -o SparkleShare.msi
|
||||
echo SparkleShare.msi created.
|
||||
|
||||
) else (
|
||||
echo Not building installer ^(could not find wix, Windows Installer XML toolset^)
|
||||
echo wix is available at http://wix.sourceforge.net/
|
||||
echo wix is available at http://wix.sourceforge.net/
|
||||
)
|
||||
|
||||
) else echo Not building installer, as it was not requested. ^(Issue "build.cmd installer" to build installer ^)
|
||||
|
|
Loading…
Reference in a new issue