diff --git a/CHANGELOG.md b/CHANGELOG.md
index d469e1e..62d53a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,20 @@
+v2.0 (12 January 2017)
+* now download and install update is working in background
++ added tray icon and show it when new version found
++ added download control option
++ added "ChromiumBinary" option to set custom Chromium binary file name
+- increased download buffer size
+- fixed run Chromium when directory contain spaces
+- fixed race conditions on download
+- fixed relative/environment path generation
+- fixed open links if chrlauncher set as default browser
+- removed PPAPI from package
+- updated readme
+- code cleanup
+
v1.9.4 (16 September 2016)
-- fixed localization (issue #32)
+ output debug strings on silent mode
+- fixed localization (issue #32)
v1.9.3 (15 September 2016)
+ command line arguments
diff --git a/LICENSE b/LICENSE
index 4457f9e..0e97fb7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2016, Henry++.
+Copyright (c) 2015-2017, Henry++.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/README.md b/README.md
index 223e4d9..e414159 100644
--- a/README.md
+++ b/README.md
@@ -4,75 +4,98 @@
Small and very fast portable launcher and updater for Chromium.
-```
-To set as default internet browser run SetDefaultBrowser.bat (as admin).
-```
+#### Default browser:
+chrlauncher has feature to use portable Chromium as default browser and it will be open links from another programs through chrlauncher.
+- start "SetDefaultBrowser.bat" (as admin).
+- start "Control panel" -> "Default programs" -> "Set your default programs" -> "chrlauncher" and set all checkboxes on.
-#### Command line
+#### Command line:
+There is list of arguments overrides .ini options
```
-/f - forced update checking
-/q - no error messages visible (quiet)
+/a - auto download new version of Chromium if present
+/b - bring chrlauncher to front on download started
+/f - force update checking
+/q - no error messages will be shown (quiet)
```
-#### Supported browser
+#### Supported browser:
- Launcher - Chromium and their clones (like Google Chrome, Yandex Browser and other legitimate trojans!).
- Updater - Chromium only.
-#### Folder structure
-- \bin - binaries directory.
-- \profile - profile directory.
+#### Flash Player:
+chrlauncher has feature for use portable Flash Player PPAPI.
+- download portable Flash Player PPAPI 32-bit/64-bit: http://effect8.ru/soft/media/adobe-flash-player-portable.html
+- unpack archive to the "Plugins" folder.
+- open "chrlauncher.ini" and find "FlashPlayerPath" option and then set ".\Plugins\%flash_player_dll_name_here%"
-#### Settings
+#### Settings:
~~~
[chrlauncher]
-# Command line for Chromium:
-#
-# See here:
-# http://peter.sh/experiments/chromium-command-line-switches/
-#
+# Command line for Chromium (string):
+# See here: http://peter.sh/experiments/chromium-command-line-switches/
ChromiumCommandLine=--user-data-dir=..\profile --no-default-browser-check --allow-outdated-plugins --disable-component-update
-# Chromium binaries directory:
-#
+# Chromium binaries directory (string):
ChromiumDirectory=.\bin
-# Adobe Flash Player PPAPI DLL path:
-#
-# See here:
-# http://effect8.ru/soft/media/adobe-flash-player-portable.html
-#
+# Chromium binary file name (string):
+ChromiumBinary=chrome.exe
+
+# Adobe Flash Player PPAPI portable library path (string):
+# Download here: http://effect8.ru/soft/media/adobe-flash-player-portable.html
FlashPlayerPath=.\plugins\pepflashplayer.dll
-# Set Chromium binaries architecture:
+# Set Chromium binaries architecture (integer):
#
# 0 -> autodetect (default)
# 64 -> 64-bit
# 32 -> 32-bit
-#
ChromiumArchitecture=0
-# Type of Chromium builds:
+# Auto download updates if founded (boolean)
#
-# dev-official -> official development builds from snapshots repository (default)
-# dev-codecs-sync -> unofficial development builds with codecs from "github.com/henrypp/chromium"
-# stable-codecs-sync -> unofficial stable builds with codecs from "github.com/henrypp/chromium"
-# dev-codecs-nosync -> unofficial development builds with codecs and without the profile button from "github.com/henrypp/chromium"
-# stable-codecs-nosync -> unofficial stable builds with codecs and without the profile button from "github.com/henrypp/chromium"
+# false -> show tray tip if update found, downloading manually (default)
+# true -> auto download update and install it!
+ChromiumAutoDownload=falseboolean
+
+# Bring chrlauncher window when download started (boolean)
+#
+# false -> don't bring main window to front automatically (default)
+# true -> bring chrlauncher window to front when download started
+ChromiumBringToFront=false
+
+# Set error mode (boolean):
+#
+# false -> show warning messages (default)
+# true -> no error messages will be shown
+ChromiumIsSilent=false
+
+# Type of Chromium builds:
#
+# dev-official -> official development builds from snapshots repository "commondatastorage.googleapis.com/chromium-browser-snapshots/index.html"
+# dev-codecs-sync -> unofficial development builds with codecs from "github.com/henrypp/chromium/releases" (default)
+# stable-codecs-sync -> unofficial stable builds with codecs from "github.com/henrypp/chromium/releases"
+# dev-codecs-nosync -> unofficial development builds with codecs and without the profile button from "github.com/henrypp/chromium/releases"
+# stable-codecs-nosync -> unofficial stable builds with codecs and without the profile button from "github.com/henrypp/chromium/releases"
ChromiumType=dev-codecs-sync
-# Check for new Chromium version once in X days:
+# Check for new Chromium version once in X days (integer):
#
+# 1 -> check updates once in a 1 day (default)
# 0 -> disable update checking
-# 1 -> once in day (default)
-#
+# -1 -> force update checking
ChromiumCheckPeriod=1
-# Last update checking timestamp:
-#
-ChromiumCheckPeriodLast=0
+# Last cached founded build date of Chromium in unix-time format(integer):
+ChromiumLastBuild=0
+
+# Last cached update checking timestamp (integer):
+ChromiumLastCheck=0
+
+# Last cached founded version of Chromium (string):
+ChromiumLastVersion=
~~~
Website: www.henrypp.org
Support: support@henrypp.org
-(c) 2016 Henry++
+(c) 2015-2017 Henry++
diff --git a/bin/History.txt b/bin/History.txt
index bd0484a..b114d95 100644
--- a/bin/History.txt
+++ b/bin/History.txt
@@ -1,3 +1,17 @@
+v2.0 (12 January 2017)
+* now download and install update is working in background
++ added tray icon and show it when new version found
++ added download control option
++ added "ChromiumBinary" option to set custom Chromium binary file name
+- increased download buffer size
+- fixed run Chromium when directory contain spaces
+- fixed race conditions on download
+- fixed relative/environment path generation
+- fixed open links if chrlauncher set as default browser
+- removed PPAPI from package
+- updated readme
+- code cleanup
+
v1.9.4 (16 September 2016)
+ output debug strings on silent mode
- fixed localization (issue #32)
diff --git a/bin/License.txt b/bin/License.txt
index 7b1f2fd..3a484c4 100644
--- a/bin/License.txt
+++ b/bin/License.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2016, Henry++.
+Copyright (c) 2015-2017, Henry++.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/bin/Readme.txt b/bin/Readme.txt
index 9b5e114..2f923fc 100644
--- a/bin/Readme.txt
+++ b/bin/Readme.txt
@@ -1,71 +1,97 @@
chrlauncher
Small and very fast portable launcher and updater for Chromium.
-To set as default internet browser run SetDefaultBrowser.bat (as admin).
+
+Default browser:
+chrlauncher has feature to use portable Chromium as default browser and it will be open links from another programs through chrlauncher.
+- start "SetDefaultBrowser.bat" (as admin).
+- start "Control panel" -> "Default programs" -> "Set your default programs" -> "chrlauncher" and set all checkboxes on.
Command line:
-/f - forced update checking
-/q - no error messages visible (quiet)
+There is list of arguments overrides .ini options.
+/a - auto download new version of Chromium if present
+/b - bring chrlauncher to front on download started
+/f - force update checking
+/q - no error messages will be shown (quiet)
Supported browser:
- Launcher - Chromium and their clones (like Google Chrome, Yandex Browser and other legitimate trojans!).
- Updater - Chromium only.
-Folder structure:
-- \bin - binaries directory.
-- \profile - profile directory.
+Flash Player:
+chrlauncher has feature for use portable Flash Player PPAPI.
+- download portable Flash Player PPAPI 32-bit/64-bit: http://effect8.ru/soft/media/adobe-flash-player-portable.html
+- unpack archive to the "Plugins" folder.
+- open "chrlauncher.ini" and find "FlashPlayerPath" option and then set ".\Plugins\%flash_player_dll_name_here%"
Settings:
[chrlauncher]
-# Command line for Chromium:
-#
-# See here:
-# http://peter.sh/experiments/chromium-command-line-switches/
-#
+# Command line for Chromium (string):
+# See here: http://peter.sh/experiments/chromium-command-line-switches/
ChromiumCommandLine=--user-data-dir=..\profile --no-default-browser-check --allow-outdated-plugins --disable-component-update
-# Chromium binaries directory:
-#
+# Chromium binaries directory (string):
ChromiumDirectory=.\bin
-# Adobe Flash Player PPAPI DLL path:
-#
-# See here:
-# http://effect8.ru/soft/media/adobe-flash-player-portable.html
-#
+# Chromium binary file name (string):
+ChromiumBinary=chrome.exe
+
+# Adobe Flash Player PPAPI portable library path (string):
+# Download here: http://effect8.ru/soft/media/adobe-flash-player-portable.html
FlashPlayerPath=.\plugins\pepflashplayer.dll
-# Set Chromium binaries architecture:
+# Set Chromium binaries architecture (integer):
#
# 0 -> autodetect (default)
# 64 -> 64-bit
# 32 -> 32-bit
-#
ChromiumArchitecture=0
-# Type of Chromium builds:
+# Auto download updates if founded (boolean)
#
-# dev-official -> official development builds from snapshots repository (default)
-# dev-codecs-sync -> unofficial development builds with codecs from "github.com/henrypp/chromium"
-# stable-codecs-sync -> unofficial stable builds with codecs from "github.com/henrypp/chromium"
-# dev-codecs-nosync -> unofficial development builds with codecs and without the profile button from "github.com/henrypp/chromium"
-# stable-codecs-nosync -> unofficial stable builds with codecs and without the profile button from "github.com/henrypp/chromium"
+# false -> show tray tip if update found, downloading manually (default)
+# true -> auto download update and install it!
+ChromiumAutoDownload=falseboolean
+
+# Bring chrlauncher window when download started (boolean)
#
-ChromiumType=dev-official
+# false -> don't bring main window to front automatically (default)
+# true -> bring chrlauncher window to front when download started
+ChromiumBringToFront=false
-# Check for new Chromium version once in X days:
+# Set error mode (boolean):
#
-# 0 -> disable update checking
-# 1 -> once in day (default)
+# false -> show warning messages (default)
+# true -> no error messages will be shown
+ChromiumIsSilent=false
+
+# Type of Chromium builds:
#
-ChromiumCheckPeriod=1
+# dev-official -> official development builds from snapshots repository "commondatastorage.googleapis.com/chromium-browser-snapshots/index.html"
+# dev-codecs-sync -> unofficial development builds with codecs from "github.com/henrypp/chromium/releases" (default)
+# stable-codecs-sync -> unofficial stable builds with codecs from "github.com/henrypp/chromium/releases"
+# dev-codecs-nosync -> unofficial development builds with codecs and without the profile button from "github.com/henrypp/chromium/releases"
+# stable-codecs-nosync -> unofficial stable builds with codecs and without the profile button from "github.com/henrypp/chromium/releases"
+ChromiumType=dev-codecs-sync
-# Last update checking timestamp:
+# Check for new Chromium version once in X days (integer):
#
-ChromiumCheckPeriodLast=0
+# 1 -> check updates once in a 1 day (default)
+# 0 -> disable update checking
+# -1 -> force update checking
+ChromiumCheckPeriod=1
+
+# Last cached founded build date of Chromium in unix-time format(integer):
+ChromiumLastBuild=0
+
+# Last cached update checking timestamp (integer):
+ChromiumLastCheck=0
+
+# Last cached founded version of Chromium (string):
+ChromiumLastVersion=
Website: www.henrypp.org
Support: support@henrypp.org
-(c) 2016 Henry++
+(c) 2015-2017 Henry++
diff --git a/bin/SetDefaultBrowser.bat b/bin/SetDefaultBrowser.bat
index 469910b..d3e4c8c 100644
--- a/bin/SetDefaultBrowser.bat
+++ b/bin/SetDefaultBrowser.bat
@@ -43,7 +43,7 @@ if not exist "%CHRLAUNCHER_PATH%" (
reg add "HKLM\Software\Clients\StartMenuInternet\chrlauncher\Capabilities" /v "ApplicationIcon" /t REG_SZ /d "%CHRLAUNCHER_ICON%" /f
reg add "HKLM\Software\Clients\StartMenuInternet\chrlauncher\Capabilities" /v "ApplicationName" /t REG_SZ /d "chrlauncher" /f
- reg add "HKLM\Software\Clients\StartMenuInternet\chrlauncher\Capabilities" /v "ApplicationDescription" /t REG_SZ /d "Chromium (portable)" /f
+ reg add "HKLM\Software\Clients\StartMenuInternet\chrlauncher\Capabilities" /v "ApplicationDescription" /t REG_SZ /d "Chromium portable launcher and updater" /f
reg add "HKLM\Software\Clients\StartMenuInternet\chrlauncher\Capabilities\FileAssociations" /v ".htm" /t REG_SZ /d "chrlauncherHTML" /f
reg add "HKLM\Software\Clients\StartMenuInternet\chrlauncher\Capabilities\FileAssociations" /v ".html" /t REG_SZ /d "chrlauncherHTML" /f
diff --git a/bin/chrlauncher.ini b/bin/chrlauncher.ini
index 80c166c..71819b7 100644
--- a/bin/chrlauncher.ini
+++ b/bin/chrlauncher.ini
@@ -1,48 +1,65 @@
[chrlauncher]
-# Command line for Chromium:
-#
-# See here:
-# http://peter.sh/experiments/chromium-command-line-switches/
-#
+# Command line for Chromium (string):
+# See here: http://peter.sh/experiments/chromium-command-line-switches/
ChromiumCommandLine=--user-data-dir=..\profile --no-default-browser-check --allow-outdated-plugins --disable-component-update
-# Chromium binaries directory:
-#
+# Chromium binaries directory (string):
ChromiumDirectory=.\bin
-# Adobe Flash Player PPAPI DLL path:
-#
-# See here:
-# http://effect8.ru/soft/media/adobe-flash-player-portable.html
-#
+# Chromium binary file name (string):
+ChromiumBinary=chrome.exe
+
+# Adobe Flash Player PPAPI portable library path (string):
+# Download here: http://effect8.ru/soft/media/adobe-flash-player-portable.html
FlashPlayerPath=.\plugins\pepflashplayer.dll
-# Set Chromium binaries architecture:
+# Set Chromium binaries architecture (integer):
#
# 0 -> autodetect (default)
# 64 -> 64-bit
# 32 -> 32-bit
-#
ChromiumArchitecture=0
-# Type of Chromium builds:
+# Auto download updates if founded (boolean)
+#
+# false -> show tray tip if update found, downloading manually (default)
+# true -> auto download update and install it!
+ChromiumAutoDownload=falseboolean
+
+# Bring chrlauncher window when download started (boolean)
+#
+# false -> don't bring main window to front automatically (default)
+# true -> bring chrlauncher window to front when download started
+ChromiumBringToFront=false
+
+# Set error mode (boolean):
#
-# dev-official -> official development builds from snapshots repository (default)
-# dev-codecs-sync -> unofficial development builds with codecs from "github.com/henrypp/chromium"
-# stable-codecs-sync -> unofficial stable builds with codecs from "github.com/henrypp/chromium"
-# dev-codecs-nosync -> unofficial development builds with codecs and without the profile button from "github.com/henrypp/chromium"
-# stable-codecs-nosync -> unofficial stable builds with codecs and without the profile button from "github.com/henrypp/chromium"
+# false -> show warning messages (default)
+# true -> no error messages will be shown
+ChromiumIsSilent=false
+
+# Type of Chromium builds:
#
+# dev-official -> official development builds from snapshots repository "commondatastorage.googleapis.com/chromium-browser-snapshots/index.html"
+# dev-codecs-sync -> unofficial development builds with codecs from "github.com/henrypp/chromium/releases" (default)
+# stable-codecs-sync -> unofficial stable builds with codecs from "github.com/henrypp/chromium/releases"
+# dev-codecs-nosync -> unofficial development builds with codecs and without the profile button from "github.com/henrypp/chromium/releases"
+# stable-codecs-nosync -> unofficial stable builds with codecs and without the profile button from "github.com/henrypp/chromium/releases"
ChromiumType=dev-codecs-sync
-# Check for new Chromium version once in X days:
+# Check for new Chromium version once in X days (integer):
#
+# 1 -> check updates once in a 1 day (default)
# 0 -> disable update checking
-# 1 -> once in day (default)
-#
+# -1 -> force update checking
ChromiumCheckPeriod=1
-# Last update checking timestamp:
-#
-ChromiumCheckPeriodLast=0
+# Last cached founded build date of Chromium in unix-time format(integer):
+ChromiumLastBuild=0
+
+# Last cached update checking timestamp (integer):
+ChromiumLastCheck=0
+
+# Last cached founded version of Chromium (string):
+ChromiumLastVersion=
diff --git a/chrlauncher.vcxproj b/chrlauncher.vcxproj
index 16dc78b..7c86f9e 100644
--- a/chrlauncher.vcxproj
+++ b/chrlauncher.vcxproj
@@ -125,7 +125,7 @@
Sync
false
true
- _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;%(PreprocessorDefinitions)
+ _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;_APP_HAVE_TRAY;_APP_STARTMINIMIZED;%(PreprocessorDefinitions)
@@ -166,7 +166,7 @@
Sync
false
true
- _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;%(PreprocessorDefinitions)
+ _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;_APP_HAVE_TRAY;_APP_STARTMINIMIZED;%(PreprocessorDefinitions)
@@ -212,7 +212,7 @@
None
- _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;%(PreprocessorDefinitions)
+ _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;_APP_HAVE_TRAY;_APP_STARTMINIMIZED;%(PreprocessorDefinitions)
true
@@ -257,7 +257,7 @@
None
- _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;%(PreprocessorDefinitions)
+ _UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_APP_NO_SETTINGS;_APP_NO_UPDATES;_APP_HAVE_TRAY;_APP_STARTMINIMIZED;%(PreprocessorDefinitions)
false
diff --git a/src/main.cpp b/src/main.cpp
index 60344f5..1bf7ce5 100644
Binary files a/src/main.cpp and b/src/main.cpp differ
diff --git a/src/main.h b/src/main.h
index b36829e..036a1ab 100644
Binary files a/src/main.h and b/src/main.h differ
diff --git a/src/resource.h b/src/resource.h
index 1c6f6ec..6b7162f 100644
--- a/src/resource.h
+++ b/src/resource.h
@@ -7,16 +7,18 @@
// Menu Id
#define IDM_MAIN 100
+#define IDM_TRAY 101
// Dialogs
#define IDD_MAIN 100
// Main Dlg
-#define IDC_PROGRESS 1001
-#define IDC_BROWSER 1002
-#define IDC_CURRENTVERSION 1003
-#define IDC_VERSION 1004
-#define IDC_DATE 1005
+#define IDC_PROGRESS 1000
+#define IDC_BROWSER 1001
+#define IDC_CURRENTVERSION 1002
+#define IDC_VERSION 1003
+#define IDC_DATE 1004
+#define IDC_START_BTN 1005
#define IDC_STATUSBAR 1006
// Main Menu
@@ -25,6 +27,13 @@
#define IDM_DONATE 2002
#define IDM_ABOUT 2003
+// Tray Menu
+#define IDM_TRAY_SHOW 3000
+#define IDM_TRAY_START 3001
+#define IDM_TRAY_WEBSITE 3002
+#define IDM_TRAY_ABOUT 3003
+#define IDM_TRAY_EXIT 3004
+
// Icons
#define IDI_MAIN 100
@@ -38,10 +47,9 @@
#define IDS_STATUS_DOWNLOAD 1005
#define IDS_STATUS_INSTALL 1006
-#define IDS_STATUS_ERROR 1007
-#define IDS_STATUS_CLOSEBROWSER 1008
-#define IDS_STATUS_NOTFOUND 1009
+#define IDS_STATUS_FOUND 1007
+#define IDS_STATUS_ERROR 1008
-#define IDS_QUESTION_BUSY 1010
+#define IDS_QUESTION_STOP 1009
#endif // __RESOURCE_H__
diff --git a/src/resource.rc b/src/resource.rc
index f71e27c..f3e0f4a 100644
Binary files a/src/resource.rc and b/src/resource.rc differ