Skip to content

Commit

Permalink
Merge branch 'release/1.0.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
canton7 committed Apr 22, 2015
2 parents bc43007 + 1752897 commit 9f92378
Show file tree
Hide file tree
Showing 44 changed files with 518 additions and 161 deletions.
19 changes: 16 additions & 3 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
Changelog
=========

v1.0.16
-------

- Installer recommends Syncthing 0.11 (#64)
- Fix bad browser zoom after restart (#57)
- Fix display of folders which contain an underscore (#58)
- Handle duplicate devices/folders in Syncthing config (#61)
- Fix bad character encoding in Syncthing console (#62)
- Fix installer's handling of Syncthing version changes (#63)
- Clarify some UI wording/typos (#60, others)
- Remember size of Syncthing console (#56)
- Updated translations

v1.0.15
-------

- Fix crash on startup if Syncthing is slow to start (#55)
- Remember window size-position (#51)
- Zoom built-in borwser (#52)
- Add support for aribtrary environmental variables for Syncthing
- Remember window size/position (#51)
- Zoom built-in browser (#52)
- Add support for arbitrary environmental variables for Syncthing

v1.0.14
-------
Expand Down
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class ArchDirConfig
end
end

SYNCTHING_VERSIONS_TO_UPDATE = ['0.11']

ARCH_CONFIG = [ArchDirConfig.new('x64'), ArchDirConfig.new('x86')]
ASSEMBLY_INFOS = FileList['**/AssemblyInfo.cs']

Expand Down Expand Up @@ -166,7 +168,7 @@ namespace :"update-syncthing" do
ARCH_CONFIG.each do |arch_config|
desc "Update syncthing binaries (#{arch_config.arch}"
task arch_config.arch do
arch_config.syncthing_binaries.values.each do |bin|
arch_config.syncthing_binaries.values_at(*SYNCTHING_VERSIONS_TO_UPDATE).each do |bin|
path = File.join(arch_config.installer_dir, bin)
raise "Could not find #{path}" unless File.exist?(path)
sh path, '-upgrade' do; end
Expand Down
28 changes: 25 additions & 3 deletions installer/x64/installer-x64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ TouchDate=current
Name: "english"; MessagesFile: "compiler:Default.isl"

[CustomMessages]
SyncthingVersion=%nPlease select the Syncthing version.%n%n!! IMPORTANT !!%n%nv0.10 and v0.11 (beta) are incompatible. All of your devices must either use v0.10 or v0.11 (beta).
SyncthingVersion=%nPlease select the Syncthing version.%n%nv0.11 and v0.10 are incompatible. All of your devices must either use v0.11 or v0.10.%n

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "syncthing0p10"; Description: "Syncthing v0.10 (recommended)"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive
Name: "syncthing0p11"; Description: "Syncthing v0.11 (beta)"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive unchecked
Name: "syncthing0p11"; Description: "Syncthing v0.11 (recommended)"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive
Name: "syncthing0p10"; Description: "Syncthing v0.10"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive unchecked


[Dirs]
Name: "{userappdata}\{#AppDataFolder}"
Expand Down Expand Up @@ -86,12 +87,32 @@ begin
result := not exists or (release < 378758);
end;
procedure BumpInstallCount;
var
fileContents: AnsiString;
installCount: integer;
begin
{ Increment the install count in InstallCount.txt if it exists, or create it with the contents '1' if it doesn't }
if LoadStringFromFile(ExpandConstant('{app}\InstallCount.txt'), fileContents) then
begin
installCount := StrTointDef(Trim(string(fileContents)), 0) + 1;
end
else
begin
installCount := 1;
end;
SaveStringToFile(ExpandConstant('{app}\InstallCount.txt'), IntToStr(installCount), False);
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: integer;
begin
if CurStep = ssInstall then
begin
BumpInstallCount();
{ We might be being run from ProcessRunner.exe, *and* we might be trying to update it. Funsies. Let's rename it (which Windows lets us do) }
DeleteFile(ExpandConstant('{app}\ProcessRunner.exe.old'));
RenameFile(ExpandConstant('{app}\ProcessRunner.exe'), ExpandConstant('{app}\ProcessRunner.exe.old'));
Expand All @@ -114,5 +135,6 @@ end;
[UninstallDelete]
Type: files; Name: "{app}\ProcessRunner.exe.old"
Type: files; Name: "{app}\InstallCount.txt"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
27 changes: 24 additions & 3 deletions installer/x86/installer-x86.iss
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ TouchDate=current
Name: "english"; MessagesFile: "compiler:Default.isl"

[CustomMessages]
SyncthingVersion=%nPlease select the Syncthing version.%n%n!! IMPORTANT !!%n%nv0.10 and v0.11 (beta) are incompatible. All of your devices must either use v0.10 or v0.11 (beta).
SyncthingVersion=%nPlease select the Syncthing version.%n%nv0.11 and v0.10 are incompatible. All of your devices must either use v0.11 or v0.10.%n

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "syncthing0p10"; Description: "Syncthing v0.10 (recommended)"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive
Name: "syncthing0p11"; Description: "Syncthing v0.11 (beta)"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive unchecked
Name: "syncthing0p11"; Description: "Syncthing v0.11 (recommended)"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive
Name: "syncthing0p10"; Description: "Syncthing v0.10"; GroupDescription: "{cm:SyncthingVersion}"; Flags: exclusive unchecked

[Dirs]
Name: "{userappdata}\{#AppDataFolder}"
Expand Down Expand Up @@ -84,12 +84,32 @@ begin
result := not exists or (release < 378758);
end;
procedure BumpInstallCount;
var
fileContents: AnsiString;
installCount: integer;
begin
{ Increment the install count in InstallCount.txt if it exists, or create it with the contents '1' if it doesn't }
if LoadStringFromFile(ExpandConstant('{app}\InstallCount.txt'), fileContents) then
begin
installCount := StrTointDef(Trim(string(fileContents)), 0) + 1;
end
else
begin
installCount := 1;
end;
SaveStringToFile(ExpandConstant('{app}\InstallCount.txt'), IntToStr(installCount), False);
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: integer;
begin
if CurStep = ssInstall then
begin
BumpInstallCount();
{ We might be being run from ProcessRunner.exe, *and* we might be trying to update it. Funsies. Let's rename it (which Windows lets us do) }
DeleteFile(ExpandConstant('{app}\ProcessRunner.exe.old'));
RenameFile(ExpandConstant('{app}\ProcessRunner.exe'), ExpandConstant('{app}\ProcessRunner.exe.old'));
Expand All @@ -112,5 +132,6 @@ end;
[UninstallDelete]
Type: files; Name: "{app}\ProcessRunner.exe.old"
Type: files; Name: "{app}\InstallCount.txt"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
15 changes: 13 additions & 2 deletions server/version_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ function get_with_wildcard($src, $value, $default = null)
}

$versions = [
'1.0.16' => [
'installed' => [
'direct_download_url' => [
'x64' => 'https://github.com/canton7/SyncTrayzor/releases/download/v1.0.16/SyncTrayzorSetup-x64.exe',
'x86' => 'https://github.com/canton7/SyncTrayzor/releases/download/v1.0.16/SyncTrayzorSetup-x86.exe',
],
],
'release_page_url' => 'https://github.com/canton7/SyncTrayzor/releases/tag/v1.0.16',
'release_notes' => "- Installer recommends Syncthing 0.11 (#64)\n- Fix bad browser zoom after restart (#57)\n- Fix display of folders which contain an underscore (#58)\n- Handle duplicate devices/folders in Syncthing config (#61)\n- Fix bad character encoding in Syncthing console (#62)\n- Fix installer's handling of Syncthing version changes (#63)\n- Clarify some UI wording/typos (#60, others)\n- Remember size of Syncthing console (#56)\n- Updated translations",
],
'1.0.15' => [
'installed' => [
'direct_download_url' => [
Expand All @@ -73,14 +83,14 @@ function get_with_wildcard($src, $value, $default = null)
],
],
'release_page_url' => 'https://github.com/canton7/SyncTrayzor/releases/tag/v1.0.15',
'release_notes' => "- Fix crash on startup if Syncthing is slow to start (#55)\n- Remember window size-position (#51)\n- Zoom built-in borwser (#52)\n- Add support for aribtrary environmental variables for Syncthing\n",
'release_notes' => "- Fix crash on startup if Syncthing is slow to start (#55)\n- Remember window size/position (#51)\n- Zoom built-in browser (#52)\n- Add support for arbitrary environmental variables for Syncthing",
],
'1.0.14' => [
'installed' => [
'direct_download_url' => []
],
'release_page_url' => 'https://github.com/canton7/SyncTrayzor/releases/tag/v1.0.14',
'release_notes' => "- Give Syncthing more than 10 seconds to start, fixing crash (#47, #48, #50)\n- Better Syncthing API management in general\n- Add support for 150% and 200% DPI to tray icon\n- Slightly improve UI\n",
'release_notes' => "- Give Syncthing more than 10 seconds to start, fixing crash (#47, #48, #50)\n- Better Syncthing API management in general\n- Add support for 150% and 200% DPI to tray icon\n- Slightly improve UI",
],
'1.0.13' => [
'installed' => [
Expand All @@ -92,6 +102,7 @@ function get_with_wildcard($src, $value, $default = null)
];

$upgrades = [
'1.0.15' => ['to' => 'latest', 'formatter' => '2'],
'1.0.14' => ['to' => 'latest', 'formatter' => '2'],
'1.0.13' => ['to' => 'latest', 'formatter' => '1'],
'1.0.12' => ['to' => 'latest', 'formatter' => '1'],
Expand Down
4 changes: 2 additions & 2 deletions src/ProcessRunner/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.15.0")]
[assembly: AssemblyFileVersion("1.0.15.0")]
[assembly: AssemblyVersion("1.0.16.0")]
[assembly: AssemblyFileVersion("1.0.16.0")]
5 changes: 3 additions & 2 deletions src/SyncTrayzor/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<setting name="DefaultUserConfiguration" serializeAs="Xml">
<value>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="2">
xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3">
<ShowTrayIconOnlyOnClose>false</ShowTrayIconOnlyOnClose>
<MinimizeToTray>false</MinimizeToTray>
<CloseToTray>true</CloseToTray>
Expand All @@ -62,8 +62,9 @@
<NotifyOfNewVersions>true</NotifyOfNewVersions>
<ObfuscateDeviceIDs>true</ObfuscateDeviceIDs>
<UseComputerCulture>true</UseComputerCulture>
<ShowSyncthingConsole>true</ShowSyncthingConsole>
<SyncthingConsoleHeight>100</SyncthingConsoleHeight>
<SyncthingWebBrowserZoomLevel>0</SyncthingWebBrowserZoomLevel>
<LastSeenInstallCount>0</LastSeenInstallCount>
</Configuration>
</value>
</setting>
Expand Down
5 changes: 3 additions & 2 deletions src/SyncTrayzor/NotifyIcon/TaskbarIconResources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:s="https://github.com/canton7/Stylet"
xmlns:l="clr-namespace:SyncTrayzor.Localization"
xmlns:ni="clr-namespace:SyncTrayzor.NotifyIcon"
xmlns:tb="http://www.hardcodet.net/taskbar">
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:xaml="clr-namespace:SyncTrayzor.Xaml">

<BitmapImage x:Key="TaskbarStoppedIcon" UriSource="pack://application:,,,/Icons/stopped.ico"/>
<BitmapImage x:Key="TaskbarSyncing1Icon" UriSource="pack://application:,,,/Icons/default_tray.ico"/>
Expand Down Expand Up @@ -79,7 +80,7 @@
Visibility="{Binding Folders, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">
<MenuItem.ItemContainerStyle>
<Style TargetType="MenuItem">
<Setter Property="Header" Value="{Binding FolderId}"/>
<Setter Property="Header" Value="{Binding FolderId, Converter={x:Static xaml:RemoveMnemonicsConverter.Instance}}"/>
<Setter Property="Command" Value="{Binding}"/>
</Style>
</MenuItem.ItemContainerStyle>
Expand Down
5 changes: 4 additions & 1 deletion src/SyncTrayzor/Pages/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@
<ItemsControl ItemsSource="{Binding WatchedFolders}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Folder}" IsChecked="{Binding IsSelected}"/>
<CheckBox IsChecked="{Binding IsSelected}">
<!-- TextBlock needed so that underscores aren't turned into mnemonics -->
<TextBlock Text="{Binding Folder}"/>
</CheckBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Expand Down
9 changes: 5 additions & 4 deletions src/SyncTrayzor/Pages/ShellView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,23 @@

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="5*"/>
<RowDefinition/>
<RowDefinition>
<i:Interaction.Behaviors>
<xaml:CollapsingRowDefinitionBehaviour Height="5" RowVisibility="{Binding ShowConsole, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"/>
<xaml:CollapsingRowDefinitionBehaviour Height="Auto" RowVisibility="{Binding ShowConsole, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"/>
</i:Interaction.Behaviors>
</RowDefinition>
<RowDefinition>
<i:Interaction.Behaviors>
<xaml:CollapsingRowDefinitionBehaviour Height="*" MinHeight="100" RowVisibility="{Binding ShowConsole, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"/>
<xaml:CollapsingRowDefinitionBehaviour Height="{Binding ConsoleHeight, Mode=TwoWay, Converter={x:Static xaml:GridLengthToAbsoluteConverter.Instance}}"
MinHeight="100" RowVisibility="{Binding ShowConsole, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"/>
</i:Interaction.Behaviors>
</RowDefinition>
</Grid.RowDefinitions>

<ContentControl Grid.Row="0" s:View.Model="{Binding Viewer}"/>

<GridSplitter Grid.Row="1" Height="5" HorizontalAlignment="Stretch" ShowsPreview="True"/>
<GridSplitter Grid.Row="1" Height="5" VerticalAlignment="Center" HorizontalAlignment="Stretch" ShowsPreview="True" ResizeDirection="Rows"/>

<ContentControl Grid.Row="2" s:View.Model="{Binding Console}"/>
</Grid>
Expand Down
11 changes: 9 additions & 2 deletions src/SyncTrayzor/Pages/ShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class ShellViewModel : Screen

public bool WindowActivated { get; set; }
public bool ShowConsole { get; set; }
public double ConsoleHeight { get; set; }
public WindowPlacement Placement { get; set; }
public ConsoleViewModel Console { get; private set; }
public ViewerViewModel Viewer { get; private set; }
Expand Down Expand Up @@ -62,8 +63,14 @@ public ShellViewModel(
this.syncThingManager.StateChanged += (o, e) => this.SyncThingState = e.NewState;
this.syncThingManager.ProcessExitedWithError += (o, e) => this.ShowExitedWithError();

this.ShowConsole = configuration.ShowSyncthingConsole;
this.Bind(s => s.ShowConsole, (o, e) => this.configurationProvider.AtomicLoadAndSave(c => c.ShowSyncthingConsole = e.NewValue));
this.ConsoleHeight = configuration.SyncthingConsoleHeight;
this.Bind(s => s.ConsoleHeight, (o, e) => this.configurationProvider.AtomicLoadAndSave(c => c.SyncthingConsoleHeight = e.NewValue));

this.ShowConsole = configuration.SyncthingConsoleHeight > 0;
this.Bind(s => s.ShowConsole, (o, e) =>
{
this.ConsoleHeight = e.NewValue ? Configuration.DefaultSyncthingConsoleHeight : 0.0;
});

this.Placement = configuration.WindowPlacement;
this.Bind(s => s.Placement, (o, e) => this.configurationProvider.AtomicLoadAndSave(c => c.WindowPlacement = e.NewValue));
Expand Down
Loading

0 comments on commit 9f92378

Please sign in to comment.