Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions SparkleShare/Windows/SparkleShare.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,23 @@
<Link>Images\user-icon-default.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-added-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-added.png">
<Link>Images\document-added-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-deleted-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-deleted.png">
<Link>Images\document-deleted-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-edited-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-edited.png">
<Link>Images\document-edited-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-moved-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-moved.png">
<Link>Images\document-moved-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\process-working-22.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\22x22\status\process-working.png">
<Link>Images\process-working-22.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
Expand Down
4 changes: 2 additions & 2 deletions SparkleShare/Windows/UserInterface/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override void Initialize ()
string executable_path = Path.GetDirectoryName (Forms.Application.ExecutablePath);
string msysgit_path = Path.Combine (executable_path, "msysgit");

Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile));
//Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile));

SSHCommand.SSHPath = Path.Combine (msysgit_path, "usr", "bin");
SSHFetcher.SSHKeyScan = Path.Combine (msysgit_path, "usr", "bin", "ssh-keyscan.exe");
Expand Down Expand Up @@ -191,7 +191,7 @@ public override void CopyToClipboard (string text)
}


public override void Quit ()
public override void PlatformQuit ()
{
base.Quit ();
}
Expand Down
28 changes: 28 additions & 0 deletions SparkleShare/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@echo off

set WinDirNet=%WinDir%\Microsoft.NET\Framework
set msbuild="%WinDirNet%\v4.0\msbuild.exe"
if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe"
set wixBinDir=%WIX%\bin

if not exist ..\..\bin mkdir ..\..\bin
copy Images\sparkleshare-app.ico ..\..\bin\

%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" "%~dp0\SparkleShare.sln"

if "%1"=="installer" (
if exist "%wixBinDir%" (
if exist "%~dp0\SparkleShare.msi" del "%~dp0\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%\heat.exe" dir "%~dp0\..\..\bin\plugins" -cg pluginsComponentGroup -gg -scom -sreg -sfrag -srd -dr PLUGINS_DIR -var wix.pluginsdir -o plugins.wxs
"%wixBinDir%\candle" "%~dp0\SparkleShare.wxs" -ext WixUIExtension -ext WixUtilExtension
"%wixBinDir%\candle" "%~dp0\msysgit.wxs" -ext WixUIExtension -ext WixUtilExtension
"%wixBinDir%\candle" "%~dp0\plugins.wxs" -ext WixUIExtension -ext WixUtilExtension
"%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension Sparkleshare.wixobj msysgit.wixobj plugins.wixobj -droot="%~dp0\..\.." -dmsysgitpath="%~dp0\..\..\bin\msysgit" -dpluginsdir="%~dp0\..\..\bin\plugins" -o SparkleShare.msi
if exist "%~dp0\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/
)
) else echo Not building installer, as it was not requested. ^(Issue "build.cmd installer" to build installer ^)

8 changes: 4 additions & 4 deletions Sparkles/Git/Git.Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public GitCommand (string working_dir, string args, SSHAuthenticationInfo auth_i

// Don't let Git try to read the config options in PREFIX/etc or ~
SetEnvironmentVariable ("GIT_CONFIG_NOSYSTEM", "1");
SetEnvironmentVariable ("PREFIX", "");
SetEnvironmentVariable ("HOME", "");
// SetEnvironmentVariable ("PREFIX", "");
// SetEnvironmentVariable ("HOME", "");

SetEnvironmentVariable ("LANG", "en_US");
}
Expand Down Expand Up @@ -224,8 +224,8 @@ public static string FormatGitSSHCommand (SSHAuthenticationInfo auth_info)
"-i " + auth_info.PrivateKeyFilePath.Replace ("\\", "/").Replace (" ", "\\ ") + " " +
"-o UserKnownHostsFile=" + auth_info.KnownHostsFilePath.Replace ("\\", "/").Replace (" ", "\\ ") + " " +
"-o IdentitiesOnly=yes" + " " + // Don't fall back to other keys on the system
"-o PasswordAuthentication=no" + " " + // Don't hang on possible password prompts
"-F /dev/null"; // Ignore the system's SSH config file
"-o PasswordAuthentication=no" + " "; //+ // Don't hang on possible password prompts
// "-F /dev/null"; // Ignore the system's SSH config file
}
}
}
11 changes: 9 additions & 2 deletions Sparkles/Git/Git.Fetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,20 @@ void InstallGitLFS ()
string smudge_command;
string clean_command;

if (InstallationInfo.OperatingSystem == OS.macOS || InstallationInfo.OperatingSystem == OS.Windows) {
if (InstallationInfo.OperatingSystem == OS.macOS) {
smudge_command = "env GIT_SSH_COMMAND='" + GIT_SSH_COMMAND + "' " +
Path.Combine (Configuration.DefaultConfiguration.BinPath, "git-lfs").Replace ("\\", "/") + " smudge %f";

clean_command = Path.Combine (Configuration.DefaultConfiguration.BinPath, "git-lfs").Replace ("\\", "/") + " clean %f";

} else {
} else if(InstallationInfo.OperatingSystem == OS.Windows) {
smudge_command = "env GIT_SSH_COMMAND='" + GIT_SSH_COMMAND + "' " +
Path.Combine(Path.GetDirectoryName(GitCommand.GitPath), "git-lfs").Replace("\\", "/") + " smudge %f";

clean_command = Path.Combine(Path.GetDirectoryName(GitCommand.GitPath), "git-lfs").Replace("\\", "/") + " clean %f";

}
else {
smudge_command = "env GIT_SSH_COMMAND='" + GIT_SSH_COMMAND + "' git-lfs smudge %f";
clean_command = "git-lfs clean %f";
}
Expand Down
11 changes: 9 additions & 2 deletions Sparkles/Git/Git.Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -891,13 +891,20 @@ void PrepareGitLFS ()
string pre_push_hook_path = Path.Combine (LocalPath, ".git", "hooks", "pre-push");
string pre_push_hook_content;

if (InstallationInfo.OperatingSystem == OS.macOS || InstallationInfo.OperatingSystem == OS.Windows) {
if (InstallationInfo.OperatingSystem == OS.macOS) {
pre_push_hook_content =
"#!/bin/sh" + Environment.NewLine +
"env GIT_SSH_COMMAND='" + GitCommand.FormatGitSSHCommand (auth_info) + "' " +
Path.Combine (Configuration.DefaultConfiguration.BinPath, "git-lfs").Replace ("\\", "/") + " pre-push \"$@\"";

} else {
} else if(InstallationInfo.OperatingSystem == OS.Windows) {
pre_push_hook_content =
"#!/bin/sh" + Environment.NewLine +
"env GIT_SSH_COMMAND='" + GitCommand.FormatGitSSHCommand(auth_info) + "' " +
Path.Combine(Path.GetDirectoryName(GitCommand.GitPath), "git-lfs").Replace("\\", "/") + " pre-push \"$@\"";

}
else {
pre_push_hook_content =
"#!/bin/sh" + Environment.NewLine +
"env GIT_SSH_COMMAND='" + GitCommand.FormatGitSSHCommand (auth_info) + "' " +
Expand Down
Loading