Skip to content

Commit

Permalink
Merge branch 'release/1.1.28'
Browse files Browse the repository at this point in the history
  • Loading branch information
canton7 committed Mar 6, 2021
2 parents 4c35fcc + 896b401 commit b746bf1
Show file tree
Hide file tree
Showing 19 changed files with 227 additions and 33 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: ['https://github.com/canton7/synctrayzor/blob/develop/DONATING.md#donating']
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

v1.1.28
-------

- Work around Intel X2 Graphics driver bug which causes Syncthing's UI to appear blank (#606)
- Fix chocolatey package (#614)

v1.1.27
-------

Expand Down
38 changes: 38 additions & 0 deletions DONATING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Donating
========

Syncthing and SyncTrayzor are free software, and you don't need to pay a penny to use them.
However, if you find them useful, please consider giving a small amount to one of the causes below.

Syncthing
---------

SyncTrayzor is just the wrapper around [Syncthing](https://syncthing.net), which makes it look and behave like a native Windows application.
The heavy lifting is being done by Syncthing.

While development is done for free by a fantastic team, running the infrastructure which lets your devices find and talk to each other costs money, as does hosting things like the [website](https://syncthing.net) and [forum](https://forum.syncthing.net).
If you make use of these, I kindly ask that you consider sending a small amount towards funding Syncthing's running costs and future development.
Donations are handled by the Syncthing Foundation, whose accounts are public.

[Donate to Syncthing](https://syncthing.net/donations/).


SyncTrayzor Charity Fundraiser
------------------------------

I've put a lot of my free time into writing and maintaining SyncTrayzor.
If you use it and appreciate it, I'd be very grateful if you could show your thanks by
donating a small amount (the price of a beer) to charity.

I've been running charity fundraisers for many years, and very kind people from all over the world have helped raise thousands for people who really need it, which is absolutely amazing.

Please consider [donating to the current appeal](https://synctrayzor.antonymale.co.uk/fundraiser).


Buy me a beer
-------------

If you want to buy me a coffee (or beer!), you'll absolutely make my day.
Thank you!

I'm on [Ko-fi](https://ko-fi.com/canton7) or [PayPal](https://www.paypal.com/donate?hosted_button_id=92FADFBYS42MU).
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Quick Links

- [Download and install SyncTrayzor now](#installation)
- [Something went wrong](#something-went-wrong)
- [Find SyncTrayzor useful? Please donate!](#find-synctrayzor-useful-please-donate)
- [Find Syncthing/SyncTrayzor useful? Please donate!](DONATING.md#donating)


Introduction
Expand Down Expand Up @@ -80,15 +80,10 @@ Multi-lingual? SyncTrayzor needs you! Please read [Localization](https://github.
Want to make a contribution? Fantastic, and thank you! Please read [Contributing](https://github.com/canton7/SyncTrayzor/wiki/Contributing) first.


Find SyncTrayzor useful? Please donate!
---------------------------------------
Find Syncthing/SyncTrayzor useful? Please donate!
-------------------------------------------------

I develop SyncTrayzor in my free time because I enjoy it.
SyncTrayzor will never become paid-for.

However, if you find SyncTrayzor useful and want to say thanks, please consider [donating to my charity fundraiser](https://synctrayzor.antonymale.co.uk/donate).
I'm currently raising money for Médecins Sans Frontières (Doctors Without Borders).
Thanks!
Please see [DONATING](DONATING.md#donating).


Will SyncTrayzor phone home / give away my secrets / etc?
Expand Down
2 changes: 2 additions & 0 deletions chocolatey/synctrayzor.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Features include:
<dependencies>
<!-- Chocolatey 0.9.9 required in order to access the chocolateyPackageName and chocolateyPackageVersion environment variables -->
<dependency id="chocolatey" version="0.9.9" />
<!-- Make sure that .Net 4.7.2 or better is installed -->
<dependency id="dotnetfx" version="4.7.2" />
</dependencies>
<releaseNotes>https://github.com/canton7/SyncTrayzor/blob/master/CHANGELOG.md</releaseNotes>
<!--<provides></provides>-->
Expand Down
2 changes: 1 addition & 1 deletion chocolatey/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definitio
$packageName= 'SyncTrayzor'
$file = (Join-Path $toolsDir 'SyncTrayzorSetup-x86.exe')
$file64 = (Join-Path $toolsDir 'SyncTrayzorSetup-x64.exe')
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /SkipDotNetInstall'
$fileType = 'exe'
$validExitCodes = @(0)

Expand Down
29 changes: 16 additions & 13 deletions installer/common.iss
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,27 @@ begin
end
end;
function CmdLineParamGiven(const Value: String): Boolean;
var
I: Integer;
begin
// Can't use {param}, as it doesn't match flags with no value
Result := False;
for I := 1 to ParamCount do
if CompareText(ParamStr(I), Value) = 0 then
begin
Result := True;
Exit;
end;
end;
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
// 'NeedsRestart' only has an effect if we return a non-empty string, thus aborting the installation.
// If the installers indicate that they want a restart, this should be done at the end of installation.
// Therefore we set the global 'restartRequired' if a restart is needed, and return this from NeedRestart()
if DotNetIsMissing() then
if not CmdLineParamGiven('/SkipDotNetInstall') and DotNetIsMissing() then
begin
Result := InstallDotNet();
end;
Expand All @@ -268,19 +282,8 @@ begin
end;
function ShouldStartSyncTrayzor(): Boolean;
var
flagPassed: Boolean;
i: Integer;
begin
// Can't use {param}, as it doesn't match flags with no value
flagPassed := False;
for i := 0 to ParamCount do begin
if ParamStr(i) = '/StartSyncTrayzor' then begin
flagPassed := True;
break;
end;
end;
Result := (not WizardSilent()) or flagPassed;
Result := (not WizardSilent()) or CmdLineParamGiven('/StartSyncTrayzor');
end;
function SyncTrayzorStartFlags(param: String): String;
Expand Down
11 changes: 6 additions & 5 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.27' => [
'1.1.28' => [
'base_url' => 'https://github.com/canton7/SyncTrayzor/releases/download',
'installed' => [
'direct_download_url' => [
Expand All @@ -82,7 +82,7 @@ function get_with_wildcard($src, $value, $default = null)
'sha1sum_download_url' => "{base_url}/v{version}/sha1sum.txt.asc",
'sha512sum_download_url' => "{base_url}/v{version}/sha512sum.txt.asc",
'release_page_url' => 'https://github.com/canton7/SyncTrayzor/releases/tag/v{version}',
'release_notes' => "- Add touch support\n- Minor UI updates (#538, #540, #541, #543)\n- Wrap text on Settings screen (#540)\n- Improve appearance on high-DPI displays (#559)\n- Uninstaller tries to remove autostart registry keys (#586)",
'release_notes' => "Add a workaround for an Intel Xe graphics driver bug which causes Syncthing's UI to appear blank.\n\nIf you are not affected by this, you do not need to upgrade.",
],
'1.1.21' => [
'base_url' => 'https://synctrayzor.antonymale.co.uk/download',
Expand All @@ -106,9 +106,10 @@ function get_with_wildcard($src, $value, $default = null)
];

$upgrades = [
'1.1.26' => ['to' => 'latest', 'formatter' => '5', 'overrides' => ['release_notes' => "- Fix crashes on a small number of machines (#602, #603)\n- Wrap text on Settings screen (#540)\n- Improve appearance on high-DPI displays (#559)"]],
'1.1.25' => ['to' => 'latest', 'formatter' => '5', 'overrides' => ['release_notes' => "- Fix the problems in v1.1.25 (#594, #595, #596, #597, #602, #603)\n- Wrap text on Settings screen (#540)\n- Improve appearance on high-DPI displays (#559)\n- Uninstaller tries to remove autostart registry keys (#586)"]],
'1.1.24' => ['to' => 'latest', 'formatter' => '5', 'overrides' => ['release_notes' => "- Add touch support\n- Wrap text on Settings screen (#540)\n- Improve appearance on high-DPI displays (#559)\n- Uninstaller tries to remove autostart registry keys (#586)"]],
'1.1.27' => ['to' => 'latest', 'formatter' => '5'],
'1.1.26' => ['to' => 'latest', 'formatter' => '5'],
'1.1.25' => ['to' => 'latest', 'formatter' => '5'],
'1.1.24' => ['to' => 'latest', 'formatter' => '5'],
'1.1.23' => ['to' => 'latest', 'formatter' => '5'],
'1.1.22' => ['to' => 'latest', 'formatter' => '5'],
'1.1.21' => ['to' => 'latest', 'formatter' => '5'],
Expand Down
9 changes: 9 additions & 0 deletions src/SyncTrayzor/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
using SyncTrayzor.Localization;
using SyncTrayzor.Services.Ipc;
using System.Net;
using System.Windows.Media;
using System.Windows.Interop;

namespace SyncTrayzor
{
Expand Down Expand Up @@ -195,6 +197,13 @@ protected override void Configure()
MessageBoxViewModel.DefaultFlowDirection = Localizer.FlowDirection;

RecycleBinDeleter.Logger = s => LogManager.GetLogger(typeof(RecycleBinDeleter).FullName).Error(s);

// Workaround for Intel Xe processors, which mess up CefSharp unless we disable hardware
// rendering for WPF. See #606.
if (configuration.DisableHardwareRendering)
{
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
}
}

protected override void Launch()
Expand Down
20 changes: 19 additions & 1 deletion src/SyncTrayzor/Pages/BarAlerts/BarAlertsViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Stylet;
using SyncTrayzor.Pages.ConflictResolution;
using SyncTrayzor.Services;
using SyncTrayzor.Services.Config;
using SyncTrayzor.Syncthing;
using System;
using System.Collections.Generic;
Expand All @@ -12,23 +13,33 @@ public class BarAlertsViewModel : Conductor<IBarAlert>.Collection.AllActive
private readonly IAlertsManager alertsManager;
private readonly ISyncthingManager syncthingManager;
private readonly Func<ConflictResolutionViewModel> conflictResolutionViewModelFactory;
private readonly Func<IntelXeGraphicsAlertViewModel> intelXeGraphicsAlertViewModelFactory;
private readonly IWindowManager windowManager;
private readonly IConfigurationProvider configurationProvider;
private readonly GraphicsCardDetector graphicsCardDetector;

public BarAlertsViewModel(
IAlertsManager alertsManager,
ISyncthingManager syncthingManager,
Func<ConflictResolutionViewModel> conflictResolutionViewModelFactory,
IWindowManager windowManager)
Func<IntelXeGraphicsAlertViewModel> intelXeGraphicsAlertViewModelFactory,
IWindowManager windowManager,
IConfigurationProvider configurationProvider,
GraphicsCardDetector graphicsCardDetector)
{
this.alertsManager = alertsManager;
this.syncthingManager = syncthingManager;
this.conflictResolutionViewModelFactory = conflictResolutionViewModelFactory;
this.intelXeGraphicsAlertViewModelFactory = intelXeGraphicsAlertViewModelFactory;
this.windowManager = windowManager;
this.configurationProvider = configurationProvider;
this.graphicsCardDetector = graphicsCardDetector;
}

protected override void OnInitialActivate()
{
this.alertsManager.AlertsStateChanged += this.AlertsStateChanged;
this.configurationProvider.ConfigurationChanged += this.AlertsStateChanged;
this.Load();
}

Expand Down Expand Up @@ -69,6 +80,12 @@ private void Load()
var vm = new PausedDevicesFromMeteringViewModel(pausedDeviceNames);
this.Items.Add(vm);
}

var configuration = this.configurationProvider.Load();
if (!configuration.DisableHardwareRendering && !configuration.HideIntelXeWarningMessage && this.graphicsCardDetector.IsIntelXe)
{
this.Items.Add(this.intelXeGraphicsAlertViewModelFactory());
}
}

private void OpenConflictResolver()
Expand All @@ -80,6 +97,7 @@ private void OpenConflictResolver()
protected override void OnClose()
{
this.alertsManager.AlertsStateChanged -= this.AlertsStateChanged;
this.configurationProvider.ConfigurationChanged -= this.AlertsStateChanged;
}
}
}
21 changes: 21 additions & 0 deletions src/SyncTrayzor/Pages/BarAlerts/IntelXeGraphicsAlertView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<UserControl x:Class="SyncTrayzor.Pages.BarAlerts.IntelXeGraphicsAlertView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:l="clr-namespace:SyncTrayzor.Localization"
xmlns:local="clr-namespace:SyncTrayzor.Pages.BarAlerts"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:IntelXeGraphicsAlertViewModel}">
<StackPanel>
<TextBlock TextWrapping="Wrap"
Text="{l:Loc BarAlertsView_IntelXeGraphics_AlertText}"/>
<TextBlock>
<Hyperlink Command="{s:Action Dismiss}">
<TextBlock Text="{l:Loc BarAlertsView_IntelXeGraphics_DismissLink}"/>
</Hyperlink>
</TextBlock>
</StackPanel>
</UserControl>
22 changes: 22 additions & 0 deletions src/SyncTrayzor/Pages/BarAlerts/IntelXeGraphicsAlertViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Stylet;
using SyncTrayzor.Services.Config;

namespace SyncTrayzor.Pages.BarAlerts
{
public class IntelXeGraphicsAlertViewModel : Screen, IBarAlert
{
private readonly IConfigurationProvider configurationProvider;

public AlertSeverity Severity => AlertSeverity.Info;

public IntelXeGraphicsAlertViewModel(IConfigurationProvider configurationProvider)
{
this.configurationProvider = configurationProvider;
}

public void Dismiss()
{
this.configurationProvider.AtomicLoadAndSave(config => config.HideIntelXeWarningMessage = true);
}
}
}
7 changes: 4 additions & 3 deletions src/SyncTrayzor/Pages/ViewerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ protected override void OnInitialActivate()

if (configuration.DisableHardwareRendering)
{
settings.CefCommandLineArgs.Add("disable-gpu", "1");
settings.CefCommandLineArgs.Add("disable-gpu-vsync", "1");
settings.CefCommandLineArgs.Add("disable-application-cache", "1");
settings.CefCommandLineArgs.Add("disable-gpu");
settings.CefCommandLineArgs.Add("disable-gpu-vsync");
settings.CefCommandLineArgs.Add("disable-gpu-compositing");
settings.CefCommandLineArgs.Add("disable-application-cache");
}

Cef.Initialize(settings);
Expand Down
18 changes: 18 additions & 0 deletions src/SyncTrayzor/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/SyncTrayzor/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -995,4 +995,11 @@ Please donate to my charity fundraising campaign.</value>
<value>_Rescan All Folders</value>
<comment>Menu option available when right-clicking the tray icon. Allows the user to re-scan all folders</comment>
</data>
<data name="BarAlertsView_IntelXeGraphics_AlertText" xml:space="preserve">
<value>The area below may be blank when using Intel Xe graphics cards. Please disable hardware rendering under File&#160;-&#8288;&gt;&#160;Settings if you encounter this.</value>
<comment>Warning shown at the top of a page if Intel Xe graphics are detected</comment>
</data>
<data name="BarAlertsView_IntelXeGraphics_DismissLink" xml:space="preserve">
<value>Dismiss</value>
</data>
</root>
5 changes: 4 additions & 1 deletion src/SyncTrayzor/Services/Config/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public string LatestNotifiedVersionRaw
public string SyncthingCustomPath { get; set; }
public string SyncthingCustomHomePath { get; set; }
public bool DisableHardwareRendering { get; set; }
public bool HideIntelXeWarningMessage { get; set; }
public bool EnableFailedTransferAlerts { get; set; }
public bool EnableConflictFileMonitoring { get; set; }

Expand Down Expand Up @@ -100,6 +101,7 @@ public Configuration()
this.SyncthingCustomPath = null;
this.SyncthingCustomHomePath = null;
this.DisableHardwareRendering = false;
this.HideIntelXeWarningMessage = false;
this.EnableFailedTransferAlerts = true;
this.EnableConflictFileMonitoring = true;
this.ConflictResolverDeletesToRecycleBin = true;
Expand Down Expand Up @@ -137,6 +139,7 @@ public Configuration(Configuration other)
this.SyncthingCustomPath = other.SyncthingCustomPath;
this.SyncthingCustomHomePath = other.SyncthingCustomHomePath;
this.DisableHardwareRendering = other.DisableHardwareRendering;
this.HideIntelXeWarningMessage = other.HideIntelXeWarningMessage;
this.EnableFailedTransferAlerts = other.EnableFailedTransferAlerts;
this.EnableConflictFileMonitoring = other.EnableConflictFileMonitoring;
this.ConflictResolverDeletesToRecycleBin = other.ConflictResolverDeletesToRecycleBin;
Expand All @@ -160,7 +163,7 @@ public override string ToString()
$"ObfuscateDeviceIDs={this.ObfuscateDeviceIDs} UseComputerCulture={this.UseComputerCulture} SyncthingConsoleHeight={this.SyncthingConsoleHeight} WindowPlacement={this.WindowPlacement} " +
$"SyncthingWebBrowserZoomLevel={this.SyncthingWebBrowserZoomLevel} LastSeenInstallCount={this.LastSeenInstallCount} SyncthingCustomPath={this.SyncthingCustomPath} " +
$"SyncthingCustomHomePath={this.SyncthingCustomHomePath} ShowSynchronizedBalloonEvenIfNothingDownloaded={this.ShowSynchronizedBalloonEvenIfNothingDownloaded} " +
$"DisableHardwareRendering={this.DisableHardwareRendering} EnableFailedTransferAlerts={this.EnableFailedTransferAlerts} " +
$"DisableHardwareRendering={this.DisableHardwareRendering} HideIntelXeWarningMessage={this.HideIntelXeWarningMessage} EnableFailedTransferAlerts={this.EnableFailedTransferAlerts} " +
$"EnableConflictFileMonitoring={this.EnableConflictFileMonitoring} " +
$"ConflictResolverDeletesToRecycleBin={this.ConflictResolverDeletesToRecycleBin} PauseDevicesOnMeteredNetworks={this.PauseDevicesOnMeteredNetworks} " +
$"HaveDonated={this.HaveDonated} IconAnimationMode={this.IconAnimationMode} OpenFolderCommand={this.OpenFolderCommand} ShowFileInFolderCommand={this.ShowFileInFolderCommand}" +
Expand Down
Loading

0 comments on commit b746bf1

Please sign in to comment.