Skip to content

Commit

Permalink
Merge branch 'release/1.0.14'
Browse files Browse the repository at this point in the history
* release/1.0.14: (32 commits)
  Update version_check.php
  Bump version
  Update changelog
  Update translations
  Add 32x32 tray icons
  Add task to bump the version
  Replace InstallerRunner and ProcessDetacher with a unified ProcessRunner
  Bump up Syncthing start timeout to 10 minutes
  Fix process detaching
  Add 24px icons to tray icon, and ensure right size is chosen
  Be slightly clearer about what buttons/links open the browser
  Make new version alert toast look slightly nicer
  Use IProcessStartProvider everywhere, and start detached where necessary
  Reduce PreviewDirectoryChanged logging to trace
  Don't fetch all events after reconnection
  Property log Syncthing path on start
  Correctly handle Syncthing restarts
  Support change in ItemStarted and ItemFinished events
  Remove InstallerRunner from portable builds
  Teach the installer to play nicely with InstallerRunner.exe
  ...
  • Loading branch information
canton7 committed Apr 18, 2015
2 parents 152ca2e + 8accda2 commit ff8c56f
Show file tree
Hide file tree
Showing 54 changed files with 2,080 additions and 481 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ RefitStubs.cs
SyncTrayzorPortable
*.pfx
*.pvk
/src/SyncTrayzor/Icons/*.png
8 changes: 8 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

v1.0.14
-------

- Give Syncthing more than 10 seconds to start, fixing crash (#47, #48, #50)
- Better Syncthing API management in general
- Add support for 150% and 200% DPI to tray icon
- Slightly improve UI

v1.0.13
-------

Expand Down
15 changes: 14 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class ArchDirConfig
end

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

namespace :build do
ARCH_CONFIG.each do |arch_config|
Expand Down Expand Up @@ -130,7 +131,9 @@ namespace :portable do
Dir.mktmpdir do |tmp|
portable_dir = File.join(tmp, arch_config.portable_output_dir)
Dir.chdir(arch_config.bin_dir) do
files = FileList['**/*'].exclude('*.xml', '*.vshost.*', '*.log', '*.Installer.config', '*/FluentValidation.resources.dll', '*/System.Windows.Interactivity.resources.dll', 'syncthing.exe')
files = FileList['**/*'].exclude(
'*.xml', '*.vshost.*', '*.log', '*.Installer.config', '*/FluentValidation.resources.dll',
'*System.Windows.Interactivity.resources.dll', 'syncthing.exe', 'data')

files.each do |file|
cp_to_portable(portable_dir, file)
Expand Down Expand Up @@ -200,3 +203,13 @@ end

desc 'Build installer and portable for all architectures'
task :package => ARCH_CONFIG.map{ |x| :"package:#{x.arch}" }

desc "Bump version number"
task :version, [:version] do |t, args|
ASSEMBLY_INFOS.each do |info|
content = IO.read(info)
content[/\[assembly: AssemblyVersion\(\"(.+?).0\"\)\]/, 1] = args[:version]
content[/\[assembly: AssemblyFileVersion\(\"(.+?).0\"\)\]/, 1] = args[:version]
File.open(info, 'w'){ |f| f.write(content) }
end
end
7 changes: 6 additions & 1 deletion installer/x64/installer-x64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Name: "syncthing0p11"; Description: "Syncthing v0.11 (beta)"; GroupDescription:
Name: "{userappdata}\{#AppDataFolder}"

[Files]
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe,data"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\SyncTrayzor.exe.Installer.config"; DestDir: "{app}"; DestName: "SyncTrayzor.exe.config"; Flags: ignoreversion
Source: "{#AppSrc}\Icons\default.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppRoot}\*.md"; DestDir: "{app}"; Flags: ignoreversion
Expand Down Expand Up @@ -92,6 +92,10 @@ var
begin
if CurStep = ssInstall then
begin
{ 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'));
{ This is really evil, but CefSharp.BrowserSubprocess.exe doesn't like to exit if we ask it nicely, so we have to kill it }
ShellExec('open', 'taskkill.exe', '/f /t /im SyncTrayzor.exe', '', SW_HIDE, ewNoWait, ResultCode);
end
Expand All @@ -109,5 +113,6 @@ begin
end;
[UninstallDelete]
Type: files; Name: "{app}\ProcessRunner.exe.old"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
7 changes: 6 additions & 1 deletion installer/x86/installer-x86.iss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Name: "syncthing0p11"; Description: "Syncthing v0.11 (beta)"; GroupDescription:
Name: "{userappdata}\{#AppDataFolder}"

[Files]
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe,data"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\SyncTrayzor.exe.Installer.config"; DestDir: "{app}"; DestName: "SyncTrayzor.exe.config"; Flags: ignoreversion
Source: "{#AppSrc}\Icons\default.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppRoot}\*.md"; DestDir: "{app}"; Flags: ignoreversion
Expand Down Expand Up @@ -90,6 +90,10 @@ var
begin
if CurStep = ssInstall then
begin
{ 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'));
{ This is really evil, but CefSharp.BrowserSubprocess.exe doesn't like to exit if we ask it nicely, so we have to kill it }
ShellExec('open', 'taskkill.exe', '/f /t /im SyncTrayzor.exe', '', SW_HIDE, ewNoWait, ResultCode);
end
Expand All @@ -107,5 +111,6 @@ begin
end;
[UninstallDelete]
Type: files; Name: "{app}\ProcessRunner.exe.old"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
34 changes: 26 additions & 8 deletions server/version_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,43 @@ function get_with_wildcard($src, $value, $default = null)
}

$versions = [
'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",
],

'1.0.13' => [
// No direct_download_url, as it turns out the 1.0.12 auto-upgrader is a bit broken (will restart SyncTrayzor as admin)
// 'installed' => [
// 'direct_download_url' => [
// 'x64' => 'https://github.com/canton7/SyncTrayzor/releases/download/v1.0.13/SyncTrayzorSetup-x64.exe',
// 'x86' => 'https://github.com/canton7/SyncTrayzor/releases/download/v1.0.13/SyncTrayzorSetup-x86.exe'
// ],
// ],
'installed' => [
'direct_download_url' => []
],
'release_page_url' => 'https://github.com/canton7/SyncTrayzor/releases/tag/v1.0.13',
'release_notes' => "- Fix crash if 'Show tray icon only on close' is checked (#45)\n- Fix undocumented REST API change in Syncthing 0.11 (#46)\n- Check for updates on resume from sleep\n- Ensure SyncTrayzor is started as original user after auto-update",
],
];

$upgrades = [
'1.0.12' => ['to' => '1.0.13', 'formatter' => '1'],
'1.0.13' => ['to' => '1.0.14', 'formatter' => '2'],
'1.0.12' => ['to' => '1.0.14', 'formatter' => '1'],
];

$response_formatters = [
// 1.0.12 and 1.0.13 shouldn't download installers directly, as they doesn't know how to run them properly
'1' => function($arch, $variant, $to_version, $to_version_info, $overrides)
{
$data = [
'version' => $to_version,
'direct_download_url' => null,
'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;
},
// For when everything's working....
'2' => 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);

Expand Down
80 changes: 0 additions & 80 deletions src/InstallerRunner/Program.cs

This file was deleted.

File renamed without changes.
Loading

0 comments on commit ff8c56f

Please sign in to comment.