Skip to content

Commit

Permalink
Merge branch 'release/1.0.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
canton7 committed Apr 13, 2015
2 parents 8e9692e + a339579 commit 3df1732
Show file tree
Hide file tree
Showing 118 changed files with 6,154 additions and 723 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ packages/
#Installer
SyncTrayzorSetup*.exe
SyncTrayzorPortable*
syncthing.exe
syncthing-*.exe

*.gjq
*.tmp
Coverage
RefitStubs.cs
SyncTrayzorPortable
*.pfx
*.pvk
17 changes: 17 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Changelog
=========

v1.0.12
-------

- Compatibility with Syncthing v0.11.x (beta) (#43)
- Improved auto-updates (#39)
- Add option to hide the console (#41)
- Obfuscate Device IDs in log files, as well as in the console
- Logging will take less space if Syncthing is spamming messages (#42)
- Updated translations (all langauges)
- New translations:
- Czech (thanks Václav Obrtlík)
- Greek (thanks alexxtasi and Wasilis Mandratzis-Walz)
- French (thanks princejosuah, lpoujol and Martin Erpicum)
- Russian (thanks Ivan Lapenkov)
- Slovak (thanks Lukáš Černý)
- Fix bug where 'Close to Tray' from tray context menu would not work if settings say not to close to tray

v1.0.11
-------

Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ SyncTrayzor is the tray utilty, looks like a normal Windows program, and has men
- If SyncTrayzor isn't talking to Syncthing, you're getting error dialogs, it's not auto-starting, etc, [raise an issue with SyncTrayzor](http://github.com/canton7/SyncTrayzor).
- If you're not sure, raise an issue here and I'll redirect you if appropriate.


Contributing
------------

Expand All @@ -60,6 +61,26 @@ 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.


Will SyncTrayzor phone home / give away my secrets / etc?
---------------------------------------------------------

SyncTrayzor's auto-update mechanism will periodically call a script (found in `server/version_check.php`, hosted on a server of mine) to find out if there's an upgrade available.
It will disclose your current SyncTrayzor version, and the package you downloaded (installer/portable and x64/x86).
It will also reveal your IP address, which is unavoidable.

You can turn off auto-updates in the Settings, but in that case you are responsible for manually checking for updates.

Usage information, details of your computer / network / syncthing setup / etc are not reported.


What about Syncthing 0.11 beta?
-------------------------------

The installer gives you the option of installing Syncthing 0.10 or Syncthing 0.11 beta.

The portable version includes Syncthing 0.10. If you want to change this, replace `syncthing.exe` with a 0.11 build downloaded from the [Syncthing releases page](https://github.com/syncthing/syncthing/releases)


What will SyncTrayzor do to Syncthing?
--------------------------------------

Expand All @@ -86,6 +107,8 @@ You can delete this registry key by unchecking "Automatically start on login" in
If you check "Use custom home directory or Syncthing" in the settings, then SyncTrayzor will tell Syncthing to use `C:\Users\<You>\AppData\Local\SyncTrayzor\syncthing` for its database.
This is useful if you want to keep the copy of Syncthing managed by SyncTrayzor separate from another copy running on your machine.

The auto-update mechanism may download updates to `%TEMP%\SyncTrayzor`. This location is periodically cleared out (once every few days).

### Standalone

SyncTrayzor will put its own configuration in `SyncTrayzorPortable\data`, and tell Syncthing to use `SyncTrayzorPortable\data\syncthing` for its database.
Expand Down
68 changes: 61 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@ rescue LoadError
exit 1
end

ISCC = 'C:\Program Files (x86)\Inno Setup 5\ISCC.exe'
SZIP = 'C:\Program Files\7-Zip\7z.exe'
ISCC = ENV['ISCC'] || 'C:\Program Files (x86)\Inno Setup 5\ISCC.exe'
SZIP = ENV['SZIP'] || 'C:\Program Files\7-Zip\7z.exe'
SIGNTOOL = ENV['SIGNTOOL'] || 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe'

CONFIG = ENV['CONFIG'] || 'Release'

SRC_DIR = 'src/SyncTrayzor'
INSTALLER_DIR = 'installer'
PORTABLE_DIR = 'portable'

PFX = ENV['PFX'] || File.join(INSTALLER_DIR, 'SyncTrayzorCA.pfx')

PORTABLE_SYNCTHING_VERSION = '0.10'

class ArchDirConfig
attr_reader :arch
attr_reader :bin_dir
Expand All @@ -24,6 +29,7 @@ class ArchDirConfig
attr_reader :installer_iss
attr_reader :portable_output_dir
attr_reader :portable_output_file
attr_reader :syncthing_binaries

def initialize(arch)
@arch = arch
Expand All @@ -33,6 +39,7 @@ class ArchDirConfig
@installer_iss = File.join(@installer_dir, "installer-#{@arch}.iss")
@portable_output_dir = "SyncTrayzorPortable-#{@arch}"
@portable_output_file = File.join(PORTABLE_DIR, "SyncTrayzorPortable-#{@arch}.zip")
@syncthing_binaries = { '0.10' => 'syncthing-0.10.x.exe', '0.11' => 'syncthing-0.11.x.exe' }
end
end

Expand Down Expand Up @@ -71,8 +78,35 @@ end
desc 'Build both 64-bit and 32-bit installers'
task :installer => ARCH_CONFIG.map{ |x| :"installer:#{x.arch}" }

def cp_to_portable(output_dir, src)
dest = File.join(output_dir, src)
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
unless File.exist?(SIGNTOOL)
warn "You must install the Windows SDK"
exit 1
end

unless File.exist?(PFX)
warn "#{PFX} must exist"
exit 1
end

args = ['sign', "/f #{PFX}", "/t http://timestamp.verisign.com/scripts/timstamp.dll"]
args << "/p #{ENV['PASSWORD']}" if ENV['PASSWORD']
args << "/v #{arch_config.installer_output}"

sh %Q{"#{SIGNTOOL}"}, *args
end
end
end

desc 'Sign both 64-bit and 32-bit installers. Specify PASSWORD if required'
task :"sign-installer" => ARCH_CONFIG.map{ |x| :"sign-installer:#{x.arch}" }

def cp_to_portable(output_dir, src, output_filename = nil)
dest = File.join(output_dir, output_filename || src)
raise "Cannot find #{src}" unless File.exist?(src)
# It could be an empty directory - so ignore it
# We'll create it as and when if there are any files in it
if File.file?(src)
Expand All @@ -96,7 +130,7 @@ 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')
files = FileList['**/*'].exclude('*.xml', '*.vshost.*', '*.log', '*.Installer.config', '*/FluentValidation.resources.dll', '*/System.Windows.Interactivity.resources.dll', 'syncthing.exe')

files.each do |file|
cp_to_portable(portable_dir, file)
Expand All @@ -110,9 +144,10 @@ namespace :portable do
end

Dir.chdir(arch_config.installer_dir) do
FileList['syncthing.exe', '*.dll'].each do |file|
FileList['*.dll'].each do |file|
cp_to_portable(portable_dir, file)
end
cp_to_portable(portable_dir, arch_config.syncthing_binaries[PORTABLE_SYNCTHING_VERSION], 'syncthing.exe')
end

sh %Q{"#{SZIP}"}, "a -tzip -mx=7 #{arch_config.portable_output_file} #{portable_dir}"
Expand All @@ -124,6 +159,25 @@ end
desc 'Create both 64-bit and 32-bit portable packages'
task :portable => ARCH_CONFIG.map{ |x| :"portable:#{x.arch}" }

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|
path = File.join(arch_config.installer_dir, bin)
raise "Could not find #{path}" unless File.exist?(path)
sh path, '-upgrade' do; end

old_bin = "#{path}.old"
rm old_bin if File.exist?(old_bin)
end
end
end
end

desc 'Update syncthing binaries, all architectures'
task :"update-syncthing" => ARCH_CONFIG.map{ |x| :"update-syncthing:#{x.arch}" }

namespace :clean do
ARCH_CONFIG.each do |arch_config|
desc "Clean everything (#{arch_config.arch})"
Expand All @@ -140,7 +194,7 @@ task :clean => ARCH_CONFIG.map{ |x| :"clean:#{x.arch}" }
namespace :package do
ARCH_CONFIG.each do |arch_config|
desc "Build installer and portable (#{arch_config.arch})"
task arch_config.arch => [:"clean:#{arch_config.arch}", :"installer:#{arch_config.arch}", :"portable:#{arch_config.arch}"]
task arch_config.arch => [:"clean:#{arch_config.arch}", :"update-syncthing:#{arch_config.arch}", :"installer:#{arch_config.arch}", :"sign-installer:#{arch_config.arch}", :"portable:#{arch_config.arch}"]
end
end

Expand Down
18 changes: 18 additions & 0 deletions installer/certnotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
http://blogs.msdn.com/b/httpcontext/archive/2012/05/24/how-to-digitally-sign-a-strong-named-assembly.aspx
http://www.jayway.com/2014/09/03/creating-self-signed-certificates-with-makecert-exe-for-development/

admin console:

makecert -r -pe -n "CN=TheCN" -a sha256 -cy authority -sky signature -sv MyCA.pvk MyCA.cer
pvk2pfx -pvk MyCA.pvk -spc MyCA.cer -pfx MyCA.pfx

Optional: Install MyCA.pfx into cert store by double-clicking it

appears to need cmd: git bash won't work
signtool sign /f MyCA.pfx /v theFileToSign.exe

http://stackoverflow.com/questions/24060009/checking-digital-signature-on-exe

signtool verify /v theFileToSign.exe

Check that SHA1 hash matches 'Thumbprint' of cert
19 changes: 15 additions & 4 deletions installer/x64/installer-x64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

[Setup]
AppId={{c004dcef-b848-46a5-9c30-4dbf736396fa}
AppName={#AppName}-{#Arch}
AppName={#AppName} ({#Arch})
AppVersion={#AppVersion}
;AppVerName={#AppName} {#AppVersion}
AppPublisher={#AppPublisher}
Expand All @@ -29,31 +29,42 @@ OutputDir="."
OutputBaseFilename={#AppName}Setup-{#Arch}
SetupIconFile={#AppSrc}\Icons\default.ico
Compression=lzma2/max
;Compression=None
SolidCompression=yes
PrivilegesRequired=admin
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
; Unintuitive - but we forcefully close SyncTrayzor ourselves (because the CEF subprocess doesn't exit when asked to)
; If we allow this, then the user gets a 'stopped programs?' prompt. If they hit 'no', then SyncTrayzor is still stopped, by us.
CloseApplications=no
TouchDate=current

[Languages]
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).

[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

[Dirs]
Name: "{userappdata}\{#AppDataFolder}"

[Files]
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe"; 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
Source: "{#AppRoot}\*.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "syncthing.exe"; DestDir: "{app}"

; It's important to touch, otherwise SyncTrayzor won't pick up on the modification, and won't copy it into %APPDATA%
Source: "syncthing-0.10.x.exe"; DestDir: "{app}"; DestName: "syncthing.exe"; Tasks: "syncthing0p10"; Flags: ignoreversion touch
Source: "syncthing-0.11.x.exe"; DestDir: "{app}"; DestName: "syncthing.exe"; Tasks: "syncthing0p11"; Flags: ignoreversion touch

Source: "..\dotNet451Setup.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Check: FrameworkIsNotInstalled

[Icons]
Expand All @@ -63,7 +74,7 @@ Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desk

[Run]
Filename: "{tmp}\dotNet451Setup.exe"; Parameters: "/passive /promptrestart"; Check: FrameworkIsNotInstalled; StatusMsg: "Microsoft .NET Framework 4.5.1 is being installed. Please wait..."
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall

[Code]
function FrameworkIsNotInstalled: Boolean;
Expand Down
17 changes: 14 additions & 3 deletions installer/x86/installer-x86.iss
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,40 @@ OutputDir="."
OutputBaseFilename={#AppName}Setup-{#Arch}
SetupIconFile={#AppSrc}\Icons\default.ico
Compression=lzma2/max
;Compression=None
SolidCompression=yes
PrivilegesRequired=admin
; Unintuitive - but we forcefully close SyncTrayzor ourselves (because the CEF subprocess doesn't exit when asked to)
; If we allow this, then the user gets a 'stopped programs?' prompt. If they hit 'no', then SyncTrayzor is still stopped, by us.
CloseApplications=no
TouchDate=current

[Languages]
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).

[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

[Dirs]
Name: "{userappdata}\{#AppDataFolder}"

[Files]
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe"; 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
Source: "{#AppRoot}\*.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "syncthing.exe"; DestDir: "{app}"

; It's important to touch, otherwise SyncTrayzor won't pick up on the modification, and won't copy it into %APPDATA%
Source: "syncthing-0.10.x.exe"; DestDir: "{app}"; DestName: "syncthing.exe"; Tasks: "syncthing0p10"; Flags: ignoreversion touch
Source: "syncthing-0.11.x.exe"; DestDir: "{app}"; DestName: "syncthing.exe"; Tasks: "syncthing0p11"; Flags: ignoreversion touch

Source: "..\dotNet451Setup.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Check: FrameworkIsNotInstalled

[Icons]
Expand All @@ -61,7 +72,7 @@ Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desk

[Run]
Filename: "{tmp}\dotNet451Setup.exe"; Parameters: "/passive /promptrestart"; Check: FrameworkIsNotInstalled; StatusMsg: "Microsoft .NET Framework 4.5.1 is being installed. Please wait..."
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall

[Code]
function FrameworkIsNotInstalled: Boolean;
Expand Down
Loading

0 comments on commit 3df1732

Please sign in to comment.