Skip to content

Commit

Permalink
Merge branch 'release/1.1.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
canton7 committed Mar 18, 2016
2 parents a0b2d83 + 8f9c032 commit b3d490f
Show file tree
Hide file tree
Showing 52 changed files with 694 additions and 326 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Changelog
=========

v1.1.8
------

- Fix portable upgrades when there's a space in the path (will fix upgrades from 1.1.8 -> 1.1.9) (#232)
- Improve quality of small tray icons slightly (#140)
- Add "new device" / "new folder" balloon messages (#235)
- Improve update checking schedule
- Don't confuse the user when pausing devices on Windows 8+ (#242)
- Fix touch screen operation (although touch screen scrolling is still broken upstream) (#241)
- Allow settings window to be resized vertically (#238)
- Move to SHA512 for verifying downloads
- Add logging to help debug case where Syncthing returns odd values on startup
- Remove API Key from settings

v1.1.7
------

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ task :"create-checksums" => [:"build-checksum-util"] do
files = Dir["#{DEPLOY_DIR}/*.{zip,exe}"]

create_checksums(File.join(DEPLOY_DIR, 'sha1sum.txt.asc'), password, 'sha1', files)
create_checksums(File.join(DEPLOY_DIR, 'md5sum.txt.asc'), password, 'md5', files)
create_checksums(File.join(DEPLOY_DIR, 'sha512sum.txt.asc'), password, 'sha512', files)
end

desc 'Clean portable and installer, all architectures'
Expand Down
21 changes: 19 additions & 2 deletions server/version_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function get_with_wildcard($src, $value, $default = null)
}

$versions = [
'1.1.7' => [
'1.1.8' => [
'installed' => [
'direct_download_url' => [
'x64' => 'https://github.com/canton7/SyncTrayzor/releases/download/v{version}/SyncTrayzorSetup-x64.exe',
Expand All @@ -79,12 +79,14 @@ function get_with_wildcard($src, $value, $default = null)
],
],
'sha1sum_download_url' => 'https://github.com/canton7/SyncTrayzor/releases/download/v{version}/sha1sum.txt.asc',
'sha512sum_download_url' => 'https://github.com/canton7/SyncTrayzor/releases/download/v{version}/sha512sum.txt.asc',
'release_page_url' => 'https://github.com/canton7/SyncTrayzor/releases/tag/v{version}',
'release_notes' => "- Handle thousands of conflicts in the conflict editor without crashing (#224)\n- Handle crash when syncing many files (reappearance of #112) (#227)\n- Fix rendering of some strings\n- Add logging to file to portable upgrades, in case of error",
'release_notes' => "- Fix portable upgrades when there's a space in the path (will fix upgrades from 1.1.8 -> 1.1.9) (#232)\n- Improve quality of small tray icons slightly (#140)\n- Add \"new device\" / \"new folder\" balloon messages (#235)\n- Improve update checking schedule\n- Don't confuse the user when pausing devices on Windows 8+ (#242)\n- Fix touch screen operation (although touch screen scrolling is still broken upstream) (#241)\n- Allow settings window to be resized vertically (#238)\n- Move to SHA512 for verifying downloads\n- Add logging to help debug case where Syncthing returns odd values on startup\n- Remove API Key from settings",
]
];

$upgrades = [
'1.1.7' => ['to' => 'latest', 'formatter' => '4'],
'1.1.6' => ['to' => 'latest', 'formatter' => '4'],
'1.1.5' => ['to' => 'latest', 'formatter' => '4'],
'1.1.4' => ['to' => 'latest', 'formatter' => '4'],
Expand Down Expand Up @@ -177,6 +179,21 @@ function get_with_wildcard($src, $value, $default = null)
'release_notes' => isset($overrides['release_notes']) ? $overrides['release_notes'] : $to_version_info['release_notes'],
];

return $data;
},
// Learnt about sha512sum
'5' => function($arch, $variant, $to_version, $to_version_info, $overrides)
{
$variant_info = isset($overrides[$variant]) ? get_with_wildcard($overrides, $variant) : get_with_wildcard($to_version_info, $variant);

$data = [
'version' => $to_version,
'direct_download_url' => get_with_wildcard($variant_info['direct_download_url'], $arch),
'sha512sum_download_url' => $to_version_info['sha512sum_download_url'],
'release_page_url' => $to_version_info['release_page_url'],
'release_notes' => isset($overrides['release_notes']) ? $overrides['release_notes'] : $to_version_info['release_notes'],
];

return $data;
},
];
Expand Down
7 changes: 5 additions & 2 deletions src/PortableInstaller/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ class Program

public static int Main(string[] args)
{
// args[4] is a new parameter containing arguments to args[3] (path to restart application)

RecycleBinDeleter.Logger = s => Log("!! " + s);
if (args.Length != 4)
if (args.Length < 4 || args.Length > 5)
{
Console.WriteLine("You should not invoke this executable directly. It is used as part of the automatic upgrade process for portable installations.");
Console.ReadKey();
Expand All @@ -27,6 +29,7 @@ public static int Main(string[] args)
var sourcePath = args[1];
var waitForPid = Int32.Parse(args[2]);
var pathToRestartApplication = args[3];
var pathToRestartApplicationParameters = (args.Length == 5) ? args[4] : String.Empty;
var destinationPathParent = Path.GetDirectoryName(destinationPath);

try
Expand Down Expand Up @@ -185,7 +188,7 @@ public static int Main(string[] args)
}

Log($"Restarting application {pathToRestartApplication}");
Process.Start(pathToRestartApplication);
Process.Start(pathToRestartApplication, pathToRestartApplicationParameters);

return 0;
}
Expand Down
1 change: 0 additions & 1 deletion src/SyncTrayzor/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<EnableAutostartOnFirstStart>false</EnableAutostartOnFirstStart>
<CefRemoteDebuggingPort>0</CefRemoteDebuggingPort>
<Variant>Portable</Variant>
<UpdateCheckIntervalSeconds>43200</UpdateCheckIntervalSeconds>
<SyncthingConnectTimeoutSeconds>600</SyncthingConnectTimeoutSeconds>
<EnforceSingleProcessPerUser>true</EnforceSingleProcessPerUser>
<PathConfiguration>
Expand Down
7 changes: 4 additions & 3 deletions src/SyncTrayzor/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ protected override void Configure()

AppDomain.CurrentDomain.UnhandledException += (o, e) => OnAppDomainUnhandledException(e);

var logger = LogManager.GetCurrentClassLogger();
var assembly = this.Container.Get<IAssemblyProvider>();
logger.Debug("SyncTrazor version {0} ({1}) started at {2} (.NET version: {3})", assembly.FullVersion, assembly.ProcessorArchitecture, assembly.Location, DotNetVersionFinder.FindDotNetVersion());

if (AppSettings.Instance.EnforceSingleProcessPerUser)
{
if (this.Container.Get<ISingleApplicationInstanceManager>().ShouldExit())
Expand Down Expand Up @@ -180,9 +184,6 @@ protected override void OnLaunch()
}

var logger = LogManager.GetCurrentClassLogger();
var assembly = this.Container.Get<IAssemblyProvider>();
logger.Debug("SyncTrazor version {0} ({1}) started at {2} (.NET version: {3})", assembly.FullVersion, assembly.ProcessorArchitecture, assembly.Location, DotNetVersionFinder.FindDotNetVersion());

logger.Debug("Cleaning up config folder path");
this.Container.Get<ConfigFolderCleaner>().Clean();

Expand Down
Binary file modified src/SyncTrayzor/Icons/alert_tray.ico
Binary file not shown.
Binary file modified src/SyncTrayzor/Icons/default.ico
Binary file not shown.
Binary file modified src/SyncTrayzor/Icons/default_tray.ico
Binary file not shown.
Binary file modified src/SyncTrayzor/Icons/paused_tray.ico
Binary file not shown.
Binary file modified src/SyncTrayzor/Icons/stopped.ico
Binary file not shown.
Binary file modified src/SyncTrayzor/Icons/syncing_2.ico
Binary file not shown.
Binary file modified src/SyncTrayzor/Icons/syncing_3.ico
Binary file not shown.
Binary file modified src/SyncTrayzor/Icons/syncing_4.ico
Binary file not shown.
33 changes: 31 additions & 2 deletions src/SyncTrayzor/NotifyIcon/NotifyIconManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public interface INotifyIconManager : IDisposable
Dictionary<string, bool> FolderNotificationsEnabled { get; set; }
bool ShowSynchronizedBalloonEvenIfNothingDownloaded { get; set; }
bool ShowDeviceConnectivityBalloons { get; set; }
bool ShowDeviceOrFolderRejectedBalloons { get; set; }

void EnsureIconVisible();

Expand Down Expand Up @@ -69,6 +70,7 @@ public bool CloseToTray
public Dictionary<string, bool> FolderNotificationsEnabled { get; set; }
public bool ShowSynchronizedBalloonEvenIfNothingDownloaded { get; set; }
public bool ShowDeviceConnectivityBalloons { get; set; }
public bool ShowDeviceOrFolderRejectedBalloons { get; set; }

public NotifyIconManager(
IViewManager viewManager,
Expand All @@ -84,6 +86,11 @@ public NotifyIconManager(
this.syncthingManager = syncthingManager;

this.taskbarIcon = (TaskbarIcon)this.application.FindResource("TaskbarIcon");
this.taskbarIcon.TrayBalloonTipClicked += (o, e) =>
{
this.applicationWindowState.EnsureInForeground();
};

// Need to hold off until after the application is started, otherwise the ViewManager won't be set
this.application.Startup += this.ApplicationStartup;

Expand All @@ -106,6 +113,8 @@ public NotifyIconManager(
this.syncthingManager.TransferHistory.FolderSynchronizationFinished += this.FolderSynchronizationFinished;
this.syncthingManager.Devices.DeviceConnected += this.DeviceConnected;
this.syncthingManager.Devices.DeviceDisconnected += this.DeviceDisconnected;
this.syncthingManager.DeviceRejected += this.DeviceRejected;
this.syncthingManager.FolderRejected += this.FolderRejected;
}

private void ApplicationStartup(object sender, EventArgs e)
Expand All @@ -119,7 +128,7 @@ private void DeviceConnected(object sender, DeviceConnectedEventArgs e)
DateTime.UtcNow - this.syncthingManager.StartedTime > syncedDeadTime)
{
this.taskbarIcon.HideBalloonTip();
this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceConnected_Title, String.Format(Resources.TrayIcon_Balloon_DeviceConnected_Message, e.Device.Name), BalloonIcon.Info);
this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceConnected_Title, Localizer.F(Resources.TrayIcon_Balloon_DeviceConnected_Message, e.Device.Name), BalloonIcon.Info);
}
}

Expand All @@ -129,7 +138,25 @@ private void DeviceDisconnected(object sender, DeviceDisconnectedEventArgs e)
DateTime.UtcNow - this.syncthingManager.StartedTime > syncedDeadTime)
{
this.taskbarIcon.HideBalloonTip();
this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceDisconnected_Title, String.Format(Resources.TrayIcon_Balloon_DeviceDisconnected_Message, e.Device.Name), BalloonIcon.Info);
this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceDisconnected_Title, Localizer.F(Resources.TrayIcon_Balloon_DeviceDisconnected_Message, e.Device.Name), BalloonIcon.Info);
}
}

private void DeviceRejected(object sender, DeviceRejectedEventArgs e)
{
if (this.ShowDeviceOrFolderRejectedBalloons)
{
this.taskbarIcon.HideBalloonTip();
this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceRejected_Title, Localizer.F(Resources.TrayIcon_Balloon_DeviceRejected_Message, e.DeviceId, e.Address), BalloonIcon.Info);
}
}

private void FolderRejected(object sender, FolderRejectedEventArgs e)
{
if (this.ShowDeviceOrFolderRejectedBalloons)
{
this.taskbarIcon.HideBalloonTip();
this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_FolderRejected_Title, Localizer.F(Resources.TrayIcon_Balloon_FolderRejected_Message, e.Device.Name, e.FolderId), BalloonIcon.Info);
}
}

Expand Down Expand Up @@ -307,6 +334,8 @@ public void Dispose()
this.syncthingManager.TransferHistory.FolderSynchronizationFinished -= this.FolderSynchronizationFinished;
this.syncthingManager.Devices.DeviceConnected -= this.DeviceConnected;
this.syncthingManager.Devices.DeviceDisconnected -= this.DeviceDisconnected;
this.syncthingManager.DeviceRejected -= this.DeviceRejected;
this.syncthingManager.FolderRejected -= this.FolderRejected;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Stylet;
using SyncTrayzor.Services.Conflicts;
using SyncTrayzor.Syncthing;
using SyncTrayzor.Utils;
using System;
using System.Linq;
using System.Threading;
Expand All @@ -12,7 +11,6 @@
using SyncTrayzor.Properties;
using SyncTrayzor.Services;
using SyncTrayzor.Services.Config;
using System.Reactive.Threading.Tasks;
using System.Reactive.Linq;
using System.Windows.Threading;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Linq;
using Pri.LongPath;
using System.Drawing;
using SyncTrayzor.Utils;
using System.Windows.Media.Imaging;
using System.Windows.Media;
Expand Down
1 change: 0 additions & 1 deletion src/SyncTrayzor/Pages/FileTransfersTrayViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using SyncTrayzor.Syncthing.TransferHistory;
using SyncTrayzor.Utils;
using System;
using System.Drawing;
using System.Linq;
using System.Windows.Threading;
using System.Windows.Media;
Expand Down
Loading

0 comments on commit b3d490f

Please sign in to comment.