diff --git a/.gitignore b/.gitignore
index d5751c7b..7ab32005 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,8 +34,9 @@ packages/
*.nupkg
#Installer
-installer/SyncTrayzor*.exe
-installer/syncthing.exe
+SyncTrayzorSetup*.exe
+SyncTrayzorPortable*
+syncthing.exe
*.gjq
*.tmp
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 92eb5cd9..9143df97 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,13 @@
Changelog
=========
+v1.0.6
+------
+
+ - Include high-quality icon (thanks to d4k0)
+ - Improve settings dialog around API key and GUI Host Address
+ - Add 32-bit build
+
v1.0.5
------
diff --git a/Contributers.md b/Contributers.md
new file mode 100644
index 00000000..cd5c5d64
--- /dev/null
+++ b/Contributers.md
@@ -0,0 +1,7 @@
+Contributers
+============
+
+The following individuals have contributed in same way towards making SyncTrayzor what it is is, and I'm very grateful to them.
+
+ - [Joel Kåberg](https://github.com/jkaberg): SyncTrayzor's first user! Caught bugs I would never have spotted.
+ - [d4k0](https://github.com/d4k0): Fixed some icon problems.
diff --git a/README.md b/README.md
index 53d92ff1..806c67da 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,15 @@ Grab the latest standalone .zip from the [releases](https://github.com/canton7/S
Unzip, and run `SyncTrayzor.exe`. If you're updating, you'll need to copy the `data` folder across from your previous standalone installation.
+What will SyncTrayzor do to Syncthing?
+--------------------------------------
+
+It's worth noting that SyncTrayzor will override the 'GUI Listen Address' and 'API Key' in Syncthing's configuration.
+This is because it needs to fully control these values, in order to ensure that it can communicate with Syncthing.
+
+However, you can set these values in File -> Settings, if you want to customise them.
+
+
What will SyncTrayzor do to my system?
--------------------------------------
diff --git a/Rakefile b/Rakefile
index 958ab740..57d0c57e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -8,41 +8,71 @@ end
ISCC = '"C:\Program Files (x86)\Inno Setup 5\ISCC.exe"'
-BIN_DIR = 'bin/x64/Release'
+BIN_DIR_64 = 'bin/x64/Release'
+BIN_DIR_86 = 'bin/x86/Release'
+
SRC_DIR = 'src/SyncTrayzor'
INSTALLER_DIR = 'installer'
-INSTALLER = File.join(INSTALLER_DIR, 'SyncTrayzorSetup.exe')
-PORTABLE_OUTPUT_DIR = File.absolute_path('SyncTrayzorPortable')
+INSTALLER_64 = File.join(INSTALLER_DIR, 'x64')
+INSTALLER_86 = File.join(INSTALLER_DIR, 'x86')
+
+INSTALLER_64_OUTPUT = File.join(INSTALLER_64, 'SyncTrayzorSetup-x64.exe')
+INSTALLER_86_OUTPUT = File.join(INSTALLER_86, 'SyncTrayzorSetup-x86.exe')
+
+PORTABLE_OUTPUT_DIR_64 = File.absolute_path('SyncTrayzorPortable-x64')
+PORTABLE_OUTPUT_DIR_86 = File.absolute_path('SyncTrayzorPortable-x86')
CONFIG = ENV['CONFIG'] || 'Release'
-PLATFORM = ENV['PLATFORM'] || 'x64'
-def cp_to_portable(src)
- dest = File.join(PORTABLE_OUTPUT_DIR, src)
+def cp_to_portable(ouput_dir, src)
+ dest = File.join(ouput_dir, src)
mkdir_p File.dirname(dest) unless File.exist?(File.dirname(dest))
cp src, dest
end
-desc 'Build the project'
-build :build do |b|
+desc 'Build the project (64-bit)'
+build :buildx64 do |b|
+ b.sln = 'src/SyncTrayzor.sln'
+ b.target = [:Clean, :Build]
+ b.prop 'Configuration', CONFIG
+ b.prop 'Platform', 'x64'
+end
+
+desc 'Build the project (32-bit)'
+build :buildx86 do |b|
b.sln = 'src/SyncTrayzor.sln'
b.target = [:Clean, :Build]
b.prop 'Configuration', CONFIG
- b.prop 'Platform', PLATFORM
+ b.prop 'Platform', 'x86'
+end
+
+desc 'Build both 64-bit and 32-bit binaries'
+task :build => [:buildx64, :buildx86]
+
+def create_installer(output_file, installer_dir, iss_name)
+ rm output_file if File.exist?(output_file)
+ sh ISCC, File.join(installer_dir, iss_name)
+end
+
+desc 'Create 64-bit installer'
+task :installerx64 do
+ create_installer(INSTALLER_64_OUTPUT, INSTALLER_64, 'installer-x64.iss')
end
-task :installer do
- rm INSTALLER if File.exist?(INSTALLER)
- sh ISCC, File.join(INSTALLER_DIR, 'installer.iss')
+desc 'Create 32-bit installer'
+task :installerx86 do
+ create_installer(INSTALLER_86_OUTPUT, INSTALLER_86, 'installer-x86.iss')
end
-desc 'Create the portable release directory'
-task :portable do
- rm_rf PORTABLE_OUTPUT_DIR
- mkdir_p PORTABLE_OUTPUT_DIR
+desc 'Create 32-bit and 64-bit installers'
+task :installer => [:installerx64, :installerx86]
- Dir.chdir(BIN_DIR) do
+def create_portable(bin_dir, output_dir, installer_platform_dir)
+ rm_rf output_dir
+ mkdir_p output_dir
+
+ Dir.chdir(bin_dir) do
files = FileList[
'*.exe',
'*.exe.config',
@@ -54,24 +84,24 @@ task :portable do
].exclude('*.vshost.*')
files.each do |file|
- cp_to_portable(file)
+ cp_to_portable(output_dir, file)
end
end
- cp File.join(SRC_DIR, 'Icons', 'default.ico'), PORTABLE_OUTPUT_DIR
+ cp File.join(SRC_DIR, 'Icons', 'default.ico'), output_dir
FileList['*.md', '*.txt'].each do |file|
- cp_to_portable(file)
+ cp_to_portable(output_dir, file)
end
-
- Dir.chdir(INSTALLER_DIR) do
+
+ Dir.chdir(installer_platform_dir) do
FileList['syncthing.exe', '*.dll'].each do |file|
- cp_to_portable(file)
+ cp_to_portable(output_dir, file)
end
end
puts 'Rewriting app.config'
- config_path = File.join(PORTABLE_OUTPUT_DIR, 'SyncTrayzor.exe.config')
+ config_path = File.join(output_dir, 'SyncTrayzor.exe.config')
doc = File.open(config_path, 'r') do |f|
doc = REXML::Document.new(f)
REXML::XPath.first(doc, '/configuration/applicationSettings//setting[@name="PortableMode"]/value').text = 'True'
@@ -82,11 +112,26 @@ task :portable do
end
end
+desc 'Create the portable (x64) release directory'
+task :portablex64 do
+ create_portable(BIN_DIR_64, PORTABLE_OUTPUT_DIR_64, INSTALLER_64)
+end
+
+desc 'Create the portable (x86) release directory'
+task :portablex86 do
+ create_portable(BIN_DIR_86, PORTABLE_OUTPUT_DIR_86, INSTALLER_86)
+end
+
+desc 'Create portable release directories for x64 and x86'
+task :portable => [:portablex64, :portablex86]
+
desc 'Build and package everything'
task :package => [:build, :installer, :portable]
desc 'Remove portable and installer'
task :clean do
- rm_rf PORTABLE_OUTPUT_DIR if File.exist?(PORTABLE_OUTPUT_DIR)
- rm INSTALLER if File.exist?(INSTALLER)
+ rm_rf PORTABLE_OUTPUT_DIR_64 if File.exist?(PORTABLE_OUTPUT_DIR_64)
+ rm_rf PORTABLE_OUTPUT_DIR_86 if File.exist?(PORTABLE_OUTPUT_DIR_86)
+ rm INSTALLER_64 if File.exist?(INSTALLER_64)
+ rm INSTALLER_86 if File.exist?(INSTALLER_86)
end
\ No newline at end of file
diff --git a/installer/installer.iss b/installer/x64/installer-x64.iss
similarity index 91%
rename from installer/installer.iss
rename to installer/x64/installer-x64.iss
index 2e58f8d5..b7a28d70 100644
--- a/installer/installer.iss
+++ b/installer/x64/installer-x64.iss
@@ -1,7 +1,8 @@
#define AppExeName "SyncTrayzor.exe"
-#define AppRoot ".."
+#define AppRoot "..\.."
+#define Arch "x64"
#define AppSrc AppRoot + "\src\SyncTrayzor"
-#define AppBin AppRoot +"\bin\x64\Release"
+#define AppBin AppRoot +"\bin\" + Arch + "\Release"
#define AppExe AppBin + "\SyncTrayzor.exe"
#define AppName GetStringFileInfo(AppExe, "ProductName")
#define AppVersion GetFileVersion(AppExe)
@@ -13,7 +14,7 @@
[Setup]
AppId={{c004dcef-b848-46a5-9c30-4dbf736396fa}
-AppName={#AppName}
+AppName={#AppName}-{#Arch}
AppVersion={#AppVersion}
;AppVerName={#AppName} {#AppVersion}
AppPublisher={#AppPublisher}
@@ -25,7 +26,7 @@ DefaultGroupName={#AppName}
AllowNoIcons=yes
LicenseFile={#AppRoot}\LICENSE.txt
OutputDir="."
-OutputBaseFilename={#AppName}Setup
+OutputBaseFilename={#AppName}Setup-{#Arch}
SetupIconFile={#AppSrc}\Icons\default.ico
Compression=lzma2/max
SolidCompression=yes
@@ -55,7 +56,7 @@ 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}"
-Source: "dotNet451Setup.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Check: FrameworkIsNotInstalled
+Source: "..\dotNet451Setup.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Check: FrameworkIsNotInstalled
[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
diff --git a/installer/msvcp110.dll b/installer/x64/msvcp110.dll
similarity index 100%
rename from installer/msvcp110.dll
rename to installer/x64/msvcp110.dll
diff --git a/installer/msvcr110.dll b/installer/x64/msvcr110.dll
similarity index 100%
rename from installer/msvcr110.dll
rename to installer/x64/msvcr110.dll
diff --git a/installer/vccorlib110.dll b/installer/x64/vccorlib110.dll
similarity index 100%
rename from installer/vccorlib110.dll
rename to installer/x64/vccorlib110.dll
diff --git a/installer/x86/installer-x86.iss b/installer/x86/installer-x86.iss
new file mode 100644
index 00000000..b38adbbb
--- /dev/null
+++ b/installer/x86/installer-x86.iss
@@ -0,0 +1,80 @@
+#define AppExeName "SyncTrayzor.exe"
+#define AppRoot "..\.."
+#define Arch "x86"
+#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 AppPublisher "SyncTrayzor"
+#define AppURL "https://github.com/canton7/SyncTrayzor"
+#define AppDataFolder "SyncTrayzor"
+#define RunRegKey "Software\Microsoft\Windows\CurrentVersion\Run"
+
+
+[Setup]
+AppId={{c9bab27b-d754-4b62-ad8c-3509e1cac15c}
+AppName={#AppName} ({#Arch})
+AppVersion={#AppVersion}
+;AppVerName={#AppName} {#AppVersion}
+AppPublisher={#AppPublisher}
+AppPublisherURL={#AppURL}
+AppSupportURL={#AppURL}
+AppUpdatesURL={#AppURL}
+DefaultDirName={pf}\{#AppName}
+DefaultGroupName={#AppName}
+AllowNoIcons=yes
+LicenseFile={#AppRoot}\LICENSE.txt
+OutputDir="."
+OutputBaseFilename={#AppName}Setup-{#Arch}
+SetupIconFile={#AppSrc}\Icons\default.ico
+Compression=lzma2/max
+SolidCompression=yes
+PrivilegesRequired=admin
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
+
+[Dirs]
+Name: "{userappdata}\{#AppDataFolder}"
+
+[Files]
+Source: "{#AppBin}\*.exe"; Excludes: "*.vshost.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#AppBin}\{#AppExeName}.config"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#AppBin}\*.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#AppBin}\*.pdb"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#AppBin}\*.pak"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#AppBin}\*.dat"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#AppBin}\locales\*"; DestDir: "{app}\locales"; 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}"
+Source: "..\dotNet451Setup.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Check: FrameworkIsNotInstalled
+
+[Icons]
+Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
+Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
+Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
+
+[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
+
+[Code]
+function FrameworkIsNotInstalled: Boolean;
+var
+ exists: boolean;
+ release: cardinal;
+begin
+ exists := RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', release);
+ result := not exists or (release < 378758);
+end;
+
+[UninstallDelete]
+Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
+Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
\ No newline at end of file
diff --git a/installer/x86/msvcp110.dll b/installer/x86/msvcp110.dll
new file mode 100644
index 00000000..93fab568
Binary files /dev/null and b/installer/x86/msvcp110.dll differ
diff --git a/installer/x86/msvcr110.dll b/installer/x86/msvcr110.dll
new file mode 100644
index 00000000..1ce960d7
Binary files /dev/null and b/installer/x86/msvcr110.dll differ
diff --git a/installer/x86/vccorlib110.dll b/installer/x86/vccorlib110.dll
new file mode 100644
index 00000000..211fcb1d
Binary files /dev/null and b/installer/x86/vccorlib110.dll differ
diff --git a/src/SyncTrayzor/Icons/default.ico b/src/SyncTrayzor/Icons/default.ico
index a171be5f..23834431 100644
Binary files a/src/SyncTrayzor/Icons/default.ico and b/src/SyncTrayzor/Icons/default.ico differ
diff --git a/src/SyncTrayzor/Icons/default_tray.ico b/src/SyncTrayzor/Icons/default_tray.ico
new file mode 100644
index 00000000..3958cbe5
Binary files /dev/null and b/src/SyncTrayzor/Icons/default_tray.ico differ
diff --git a/src/SyncTrayzor/Icons/stopped.ico b/src/SyncTrayzor/Icons/stopped.ico
index 87024354..4f1f937f 100644
Binary files a/src/SyncTrayzor/Icons/stopped.ico and b/src/SyncTrayzor/Icons/stopped.ico differ
diff --git a/src/SyncTrayzor/Icons/syncing_1.ico b/src/SyncTrayzor/Icons/syncing_1.ico
deleted file mode 100644
index 3956d21c..00000000
Binary files a/src/SyncTrayzor/Icons/syncing_1.ico and /dev/null differ
diff --git a/src/SyncTrayzor/Icons/syncing_2.ico b/src/SyncTrayzor/Icons/syncing_2.ico
index 65cfb38a..cea9e8a9 100644
Binary files a/src/SyncTrayzor/Icons/syncing_2.ico and b/src/SyncTrayzor/Icons/syncing_2.ico differ
diff --git a/src/SyncTrayzor/Icons/syncing_3.ico b/src/SyncTrayzor/Icons/syncing_3.ico
index 626ebbd1..c00d737e 100644
Binary files a/src/SyncTrayzor/Icons/syncing_3.ico and b/src/SyncTrayzor/Icons/syncing_3.ico differ
diff --git a/src/SyncTrayzor/Icons/syncing_4.ico b/src/SyncTrayzor/Icons/syncing_4.ico
index a7625aa3..6036625c 100644
Binary files a/src/SyncTrayzor/Icons/syncing_4.ico and b/src/SyncTrayzor/Icons/syncing_4.ico differ
diff --git a/src/SyncTrayzor/NotifyIcon/TaskbarIconResources.xaml b/src/SyncTrayzor/NotifyIcon/TaskbarIconResources.xaml
index 11d35001..5ae293ad 100644
--- a/src/SyncTrayzor/NotifyIcon/TaskbarIconResources.xaml
+++ b/src/SyncTrayzor/NotifyIcon/TaskbarIconResources.xaml
@@ -2,10 +2,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:tb="http://www.hardcodet.net/taskbar">
-
-
-
-
+
+
+
@@ -44,7 +43,7 @@