diff --git a/CHANGELOG.md b/CHANGELOG.md index c677b9df..1ffdb7ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========= +v1.1.25 +------- + + - Add touch support + - Minor UI updates (#538, #540, #541, #543) + v1.1.24 ------- diff --git a/LICENSE.txt b/LICENSE.txt index bf74aa21..e52114ed 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2017 Antony Male +Copyright (c) 2015-2021 Antony Male Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 8393749a..4fe468fe 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ If you already have SyncTrayzor installed, this will update it. ### Standalone -First, you'll need .net 4.5. [Download the offline](https://www.microsoft.com/en-gb/download/details.aspx?id=42642) or [web installer](https://www.microsoft.com/en-gb/download/details.aspx?id=42643) if you don't have it installed already. +First, you'll need .net 4.7.2. [Download the offline](https://support.microsoft.com/en-gb/help/4054530/microsoft-net-framework-4-7-2-offline-installer-for-windows) or [web installer](https://support.microsoft.com/en-gb/help/4054531/microsoft-net-framework-4-7-2-web-installer-for-windows) if you don't have it installed already. [Download `SyncTrayzorPortable-x64.zip` or `SyncTrayzorPortable-x86.zip`](https://github.com/canton7/SyncTrayzor/releases/latest). Unzip, and run `SyncTrayzor.exe`. If you're updating, you'll need to copy the `data` folder across from your previous standalone installation. diff --git a/Rakefile b/Rakefile index ebcdddcf..0392f801 100644 --- a/Rakefile +++ b/Rakefile @@ -4,13 +4,12 @@ require 'open-uri' require_relative 'build/TxClient' require_relative 'build/CsprojResxWriter' -ISCC = ENV['ISCC'] || 'C:\Program Files (x86)\Inno Setup 5\ISCC.exe' -SZIP = ENV['SZIP'] || 'C:\Program Files\7-Zip\7z.exe' +ISCC = ENV['ISCC'] || 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' +SZIP = ENV['SZIP'] || File.join(__dir__, 'build', '7za.exe') SIGNTOOL = ENV['SIGNTOOL'] || 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe' VSWHERE = 'build/vswhere.exe' CONFIG = ENV['CONFIG'] || 'Release' -MSBUILD_VERSION = '15.0' MSBUILD_LOGGER = ENV['MSBUILD_LOGGER'] SRC_DIR = 'src/SyncTrayzor' @@ -67,30 +66,24 @@ SYNCTHING_VERSIONS_TO_UPDATE = ['latest'] ARCH_CONFIG = [ArchDirConfig.new('x64', 'amd64'), ArchDirConfig.new('x86', '386')] ASSEMBLY_INFOS = FileList['**/AssemblyInfo.cs'] -def ensure_7zip - unless File.exist?(SIGNTOOL) - warn "You must install the Windows SDK" - exit 1 - end -end - def build(sln, platform, rebuild = true) if ENV['MSBUILD'] msbuild = ENV['MSBUILD'] else - path = `#{VSWHERE} -version #{MSBUILD_VERSION} -requires Microsoft.Component.MSBuild -format value -property installationPath`.chomp - msbuild = File.join(path, 'MSBuild', MSBUILD_VERSION, 'Bin', 'MSBuild.exe') + path = `#{VSWHERE} -requires Microsoft.Component.MSBuild -format value -property installationPath`.chomp + msbuild = File.join(path, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe') end puts "MSBuild is at #{msbuild}" tasks = rebuild ? 'Clean;Rebuild' : 'Build' - cmd = "\"#{msbuild}\" \"#{sln}\" /t:#{tasks} /p:Configuration=#{CONFIG};Platform=#{platform}" + cmd = "\"#{msbuild}\" \"#{sln}\" -t:#{tasks} -p:Configuration=#{CONFIG};Platform=#{platform}" if MSBUILD_LOGGER - cmd << " /logger:\"#{MSBUILD_LOGGER}\" /verbosity:minimal" + cmd << " -logger:\"#{MSBUILD_LOGGER}\" /verbosity:minimal" else - cmd << " /verbosity:quiet" + cmd << " -verbosity:quiet" end + puts cmd sh cmd end @@ -135,7 +128,11 @@ namespace :"sign-installer" do ARCH_CONFIG.each do |arch_config| desc "Sign the installer (#{arch_config.arch}). Specify PASSWORD if required" task arch_config.arch do - ensure_7zip + + unless File.exist?(SIGNTOOL) + warn "You must install the Windows SDK" + exit 1 + end unless File.exist?(PFX) warn "#{PFX} must exist" @@ -171,8 +168,6 @@ namespace :portable do ARCH_CONFIG.each do |arch_config| desc "Create the portable package (#{arch_config.arch})" task arch_config.arch do - ensure_7zip - mkdir_p File.dirname(arch_config.portable_output_file) rm arch_config.portable_output_file if File.exist?(arch_config.portable_output_file) @@ -257,6 +252,7 @@ task :package => [:clean, *ARCH_CONFIG.map{ |x| :"package:#{x.arch}" }, :"create desc 'Build chocolatey package' task :chocolatey do chocolatey_dir = File.dirname(CHOCOLATEY_NUSPEC) + cp Dir[File.join(DEPLOY_DIR, 'SyncTrayzorSetup-*.exe')], File.join(chocolatey_dir, 'tools') Dir.chdir(chocolatey_dir) do sh "choco pack" end @@ -289,8 +285,6 @@ namespace :syncthing do ARCH_CONFIG.each do |arch_config| desc "Download syncthing (#{arch_config.arch})" task arch_config.arch, [:version] => [:"build-checksum-util"] do |t, args| - ensure_7zip - Dir.mktmpdir do |tmp| download_file = File.join(tmp, File.basename(arch_config.download_uri(args[:version]))) File.open(download_file, 'wb') do |outfile| diff --git a/build/7za.exe b/build/7za.exe new file mode 100644 index 00000000..2bdd57d2 Binary files /dev/null and b/build/7za.exe differ diff --git a/chocolatey/synctrayzor.nuspec b/chocolatey/synctrayzor.nuspec index 12d81277..ba956d89 100644 --- a/chocolatey/synctrayzor.nuspec +++ b/chocolatey/synctrayzor.nuspec @@ -40,7 +40,7 @@ Features include: synctrayzor syncthing synchronization admin https://raw.githubusercontent.com/canton7/SyncTrayzor/master/LICENSE.txt false - https://cdn.rawgit.com/canton7/SyncTrayzor/develop/SyncTrayzor.png + https://cdn.statically.io/gh/canton7/SyncTrayzor/develop/SyncTrayzor.png diff --git a/chocolatey/tools/chocolateyinstall.ps1 b/chocolatey/tools/chocolateyinstall.ps1 index d2fe657b..cc86fd40 100644 --- a/chocolatey/tools/chocolateyinstall.ps1 +++ b/chocolatey/tools/chocolateyinstall.ps1 @@ -1,10 +1,13 @@ $ErrorActionPreference = 'Stop'; # stop on all errors +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $packageName= 'SyncTrayzor' -$url = "https://github.com/canton7/SyncTrayzor/releases/download/v${env:chocolateyPackageVersion}/SyncTrayzorSetup-x86.exe" -$url64 = "https://github.com/canton7/SyncTrayzor/releases/download/v${env:chocolateyPackageVersion}/SyncTrayzorSetup-x64.exe" +$file = (Join-Path $toolsDir 'SyncTrayzorSetup-x86.exe') +$file64 = (Join-Path $toolsDir 'SyncTrayzorSetup-x64.exe') $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $fileType = 'exe' $validExitCodes = @(0) -Install-ChocolateyPackage $packageName $fileType $silentArgs $url $url64 -validExitCodes $validExitCodes +Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $file $file64 -validExitCodes $validExitCodes + +Remove-Item -Force -ea 0 $file, $file64 \ No newline at end of file diff --git a/installer/common.iss b/installer/common.iss index 5ff04631..7afc1448 100644 --- a/installer/common.iss +++ b/installer/common.iss @@ -1,17 +1,17 @@ + #define AppExeName "SyncTrayzor.exe" #define AppRoot "..\.." #define AppSrc AppRoot + "\src\SyncTrayzor" #define AppBin AppRoot +"\bin\" + Arch + "\Release" #define AppExe AppBin + "\SyncTrayzor.exe" #define AppName GetStringFileInfo(AppExe, "ProductName") -#define AppVersion GetFileVersion(AppExe) +#define AppVersion GetVersionNumbersString(AppExe) #define AppPublisher "SyncTrayzor" #define AppURL "https://github.com/canton7/SyncTrayzor" #define AppDataFolder "SyncTrayzor" #define RunRegKey "Software\Microsoft\Windows\CurrentVersion\Run" -#define DotNetInstallerExe "dotNet451Setup.exe" +#define DotNetInstallerExe "dotNet472Setup.exe" #define DonateUrl "https://synctrayzor.antonymale.co.uk/donate" -#define SurveyUrl "https://synctrayzor.antonymale.co.uk/survey.php" [Setup] AppId={{#AppId} @@ -23,7 +23,7 @@ AppPublisher={#AppPublisher} AppPublisherURL={#AppURL} AppSupportURL={#AppURL} AppUpdatesURL={#AppURL} -DefaultDirName={pf}\{#AppName} +DefaultDirName={commonpf}\{#AppName} DefaultGroupName={#AppName} AllowNoIcons=yes LicenseFile={#AppRoot}\LICENSE.txt @@ -86,16 +86,15 @@ Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange( [Code] var GlobalRestartRequired: boolean; - UninstallPollPage: TNewNotebookPage; - UninstallNextButton: TNewButton; function DotNetIsMissing(): Boolean; var Exists: Boolean; Release: Cardinal; begin + // https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#minimum-version Exists := RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', Release); - Result := not Exists or (Release < 378758); + Result := not Exists or (Release < 461808); end; // Adapted from https://blogs.msdn.microsoft.com/davidrickard/2015/07/17/installing-net-framework-4-5-automatically-with-inno-setup/ @@ -166,9 +165,9 @@ end; procedure URLLabelOnClick(Sender: TObject); var - ErrorCode: Integer; + ErrorCode: Integer; begin - ShellExec('open', '{#DonateUrl}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); + ShellExec('open', '{#DonateUrl}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); end; procedure InitializeWizard; @@ -180,8 +179,8 @@ begin URLLabel.Cursor := crHand; URLLabel.Parent := WizardForm; URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline]; - URLLabel.Font.Color := clBlue; - URLLabel.Top := WizardForm.ClientHeight - URLLabel.Height - 15; + URLLabel.Font.Color := clBlue; + URLLabel.Top := WizardForm.ClientHeight - URLLabel.Height - 15; URLLabel.Left := ScaleX(10) URLLabel.OnClick := @URLLabelOnClick; end; @@ -241,11 +240,6 @@ begin end end; -procedure CurPageChanged(CurPageID: Integer); -begin - -end; - function PrepareToInstall(var NeedsRestart: Boolean): String; begin // 'NeedsRestart' only has an effect if we return a non-empty string, thus aborting the installation. @@ -288,172 +282,8 @@ begin end; end; -function SerializeBool(value: Boolean): String; -begin - if value then begin - Result := 'true'; - end else begin - Result := 'false'; - end -end; - -function EscapeJsonString(value: String): String; -var - c: Char; - i: Integer; -begin - // http://www.jrsoftware.org/ishelp/index.php?topic=isxfunc_charlength - i := 1; - while i <= Length(value) do - begin - c := value[i]; - if c = #10 then begin - Result := Result + '\n'; - end else if c = #13 then begin - Result := Result + '\r'; - end else if c = #9 then begin - Result := Result + '\t'; - end else if Ord(c) < 32 then begin - Result := Result + Format('\x%.4x', [Ord(c)]); - end else if c = '"' then begin - Result := Result + '\"'; - end else if c = '\' then begin - Result := Result + '\\' - end else begin - Result := Result + c; - end; - i := i + CharLength(value, i); - end; -end; - -// See https://stackoverflow.com/a/42550055/1086121 - -procedure UpdateUninstallWizard; -begin - if UninstallProgressForm.InnerNotebook.ActivePage = UninstallPollPage then - begin - UninstallProgressForm.PageNameLabel.Caption := 'Please Tell Us Why You''re Leaving'; - UninstallProgressForm.PageDescriptionLabel.Caption := ''; - end; - - UninstallNextButton.Caption := 'Uninstall'; - // Make the "Uninstall" button break the ShowModal loop - UninstallNextButton.ModalResult := mrOK; -end; - -procedure InitializeUninstallProgressForm(); -var - PageText: TNewStaticText; - PageNameLabel: string; - PageDescriptionLabel: string; - CancelButtonEnabled: Boolean; - CancelButtonModalResult: Integer; - Checklist: TNewCheckListBox; - CommentsText: TNewStaticText; - CommentsBox: TNewMemo; - WinHttpReq: Variant; -begin - if not UninstallSilent then - begin - // Create the poll page and make it active - UninstallPollPage := TNewNotebookPage.Create(UninstallProgressForm); - UninstallPollPage.Notebook := UninstallProgressForm.InnerNotebook; - UninstallPollPage.Parent := UninstallProgressForm.InnerNotebook; - UninstallPollPage.Align := alClient; - - PageText := TNewStaticText.Create(UninstallProgressForm); - PageText.Parent := UninstallPollPage; - PageText.AutoSize := True; - PageText.WordWrap := True; - PageText.SetBounds(UninstallProgressForm.StatusLabel.Left, UninstallProgressForm.StatusLabel.Top, UninstallProgressForm.StatusLabel.Width, UninstallProgressForm.StatusLabel.Height); - PageText.ShowAccelChar := False; - PageText.Caption := 'Sorry you''re leaving! Please tell us what you didn''t like so we can improve it.' + #13#10 + - 'No personal data will be sent. You can skip this step if you want.'; - - Checklist := TNewCheckListBox.Create(UninstallProgressForm); - Checklist.Parent := UninstallPollPage; - Checklist.SetBounds(PageText.Left, PageText.Top + PageText.Height + ScaleY(10), PageText.Width, ScaleY(20) * 5); - Checklist.BorderStyle := bsNone; - Checklist.Color := clBtnFace; - Checklist.WantTabs := True; - Checklist.MinItemHeight := ScaleY(20); - - Checklist.AddCheckBox('I couldn''t get Syncthing to work', '', 0, False, True, False, False, nil); - Checklist.AddCheckBox('Syncthing doesn''t do what I need', '', 0, False, True, False, False, nil); - Checklist.AddCheckBox('I prefer another sync tool (please say which below)', '', 0, False, True, False, False, nil); - Checklist.AddCheckBox('I don''t like SyncTrayzor - I''m going to use another wrapper', '', 0, False, True, False, False, nil); - Checklist.AddCheckBox('Other (please expand below)', '', 0, False, True, False, False, nil); - - CommentsText := TNewStaticText.Create(UninstallProgressForm); - CommentsText.Parent := UninstallPollPage; - CommentsText.AutoSize := True; - CommentsText.WordWrap := True; - CommentsText.SetBounds(PageText.Left, Checklist.Top + Checklist.Height + ScaleY(10), PageText.Width, ScaleY(15)); - CommentsText.AutoSize := False; - CommentsText.ShowAccelChar := False; - CommentsText.Caption := 'More Details / Complaints:'; - - CommentsBox := TNewMemo.Create(UninstallProgressForm); - CommentsBox.Parent := UninstallPollPage; - CommentsBox.SetBounds(PageText.Left, CommentsText.Top + CommentsText.Height + ScaleY(5), PageText.Width, ScaleY(60)); - CommentsBox.ScrollBars := ssVertical; - - UninstallProgressForm.InnerNotebook.ActivePage := UninstallPollPage; - - PageNameLabel := UninstallProgressForm.PageNameLabel.Caption; - PageDescriptionLabel := UninstallProgressForm.PageDescriptionLabel.Caption; - - UninstallNextButton := TNewButton.Create(UninstallProgressForm); - UninstallNextButton.Parent := UninstallProgressForm; - UninstallNextButton.Left := UninstallProgressForm.CancelButton.Left - UninstallProgressForm.CancelButton.Width - ScaleX(10); - UninstallNextButton.Top := UninstallProgressForm.CancelButton.Top; - UninstallNextButton.Width := UninstallProgressForm.CancelButton.Width; - UninstallNextButton.Height := UninstallProgressForm.CancelButton.Height; - - UninstallProgressForm.CancelButton.TabOrder := UninstallNextButton.TabOrder + 1; - - // Run our wizard pages - UpdateUninstallWizard; - CancelButtonEnabled := UninstallProgressForm.CancelButton.Enabled - UninstallProgressForm.CancelButton.Enabled := True; - CancelButtonModalResult := UninstallProgressForm.CancelButton.ModalResult; - UninstallProgressForm.CancelButton.ModalResult := mrCancel; - - if UninstallProgressForm.ShowModal = mrCancel then Abort; - - if Checklist.Checked[0] or Checklist.Checked[1] or Checklist.Checked[2] or Checklist.Checked[3] or Checklist.Checked[4] or (CommentsBox.Text <> '') then begin - try - begin - WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1'); - WinHttpReq.Open('POST', '{#SurveyUrl}', false); - WinHttpReq.Send('{' + - ' "version": "{#AppVersion}"' + - ', "comment": "' + EscapeJsonString(CommentsBox.Text) + '"' + - ', "checklist": {' + - ' "wontWork": '+ SerializeBool(Checklist.Checked[0]) + - ', "notWhatINeed": '+ SerializeBool(Checklist.Checked[1]) + - ', "preferAnotherSyncTool": '+ SerializeBool(Checklist.Checked[2]) + - ', "dontLikeSyncTrayzor": '+ SerializeBool(Checklist.Checked[3]) + - ', "other": '+ SerializeBool(Checklist.Checked[4]) + - ' }' + - ' }'); - end except - end; - end; - - // Restore the standard page payout - UninstallProgressForm.CancelButton.Enabled := CancelButtonEnabled; - UninstallProgressForm.CancelButton.ModalResult := CancelButtonModalResult; - - UninstallProgressForm.PageNameLabel.Caption := PageNameLabel; - UninstallProgressForm.PageDescriptionLabel.Caption := PageDescriptionLabel; - - UninstallProgressForm.InnerNotebook.ActivePage := UninstallProgressForm.InstallingPage; - end; -end; - [UninstallDelete] Type: files; Name: "{app}\ProcessRunner.exe.old" Type: files; Name: "{app}\InstallCount.txt" Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}" -Type: filesandordirs; Name: "{localappdata}\{#AppDataFolder}" \ No newline at end of file +Type: filesandordirs; Name: "{localappdata}\{#AppDataFolder}" diff --git a/installer/dotNet451Setup.exe b/installer/dotNet451Setup.exe deleted file mode 100644 index f2ddf0df..00000000 Binary files a/installer/dotNet451Setup.exe and /dev/null differ diff --git a/installer/dotNet472Setup.exe b/installer/dotNet472Setup.exe new file mode 100644 index 00000000..c7684d83 Binary files /dev/null and b/installer/dotNet472Setup.exe differ diff --git a/server/version_check.php b/server/version_check.php index 7d18d3a5..e011755f 100644 --- a/server/version_check.php +++ b/server/version_check.php @@ -65,7 +65,7 @@ function get_with_wildcard($src, $value, $default = null) } $versions = [ - '1.1.24' => [ + '1.1.25' => [ 'base_url' => 'https://github.com/canton7/SyncTrayzor/releases/download', 'installed' => [ 'direct_download_url' => [ @@ -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' => "- Fix issues caused by forward slashes in folder paths (#519, #520)", + 'release_notes' => "- Add touch support\n- Minor UI updates (#538, #540, #541, #543)", ], '1.1.21' => [ 'base_url' => 'https://synctrayzor.antonymale.co.uk/download', @@ -107,6 +107,8 @@ function get_with_wildcard($src, $value, $default = null) $upgrades = [ // No point in upgrading from 1.1.23 for something so minor + '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'], '1.1.20' => ['to' => 'latest', 'formatter' => '5'], diff --git a/src/ChecksumUtil/App.config b/src/ChecksumUtil/App.config index d0feca6f..ecdcf8a5 100644 --- a/src/ChecksumUtil/App.config +++ b/src/ChecksumUtil/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/ChecksumUtil/ChecksumUtil.csproj b/src/ChecksumUtil/ChecksumUtil.csproj index 1b4b2c46..646d9662 100644 --- a/src/ChecksumUtil/ChecksumUtil.csproj +++ b/src/ChecksumUtil/ChecksumUtil.csproj @@ -9,7 +9,7 @@ Properties ChecksumUtil ChecksumUtil - v4.5.1 + v4.7.2 512 @@ -33,10 +33,6 @@ 4 - - ..\packages\BouncyCastle.1.8.1\lib\BouncyCastle.Crypto.dll - True - @@ -57,7 +53,11 @@ - + + + + 1.8.6.1 +