From c8e0e909b4a8d18319fc65434a10dc446434817c Mon Sep 17 00:00:00 2001
From: Daniel Wilhelm
Date: Fri, 18 Apr 2014 17:19:49 +0200
Subject: 5.3
---
Application.cpp | 66 +-
BUILD/Changelog.txt | 27 +-
BUILD/FreeFileSync.chm | Bin 663884 -> 663954 bytes
BUILD/Help/html/FreeFileSync.html | 4 +-
BUILD/Languages/chinese_simple.lng | 251 ++--
BUILD/Languages/chinese_traditional.lng | 265 ++---
BUILD/Languages/croatian.lng | 247 ++--
BUILD/Languages/czech.lng | 247 ++--
BUILD/Languages/danish.lng | 251 ++--
BUILD/Languages/dutch.lng | 263 ++---
BUILD/Languages/english_uk.lng | 248 ++--
BUILD/Languages/finnish.lng | 357 +++---
BUILD/Languages/french.lng | 249 ++--
BUILD/Languages/german.lng | 253 ++--
BUILD/Languages/greek.lng | 249 ++--
BUILD/Languages/hebrew.lng | 261 ++---
BUILD/Languages/hungarian.lng | 261 ++---
BUILD/Languages/italian.lng | 265 ++---
BUILD/Languages/japanese.lng | 251 ++--
BUILD/Languages/korean.lng | 269 ++---
BUILD/Languages/lithuanian.lng | 1487 ++++++++++++++++++++++++
BUILD/Languages/norwegian.lng | 1463 +++++++++++++++++++++++
BUILD/Languages/polish.lng | 318 +++--
BUILD/Languages/portuguese.lng | 291 +++--
BUILD/Languages/portuguese_br.lng | 265 ++---
BUILD/Languages/romanian.lng | 250 ++--
BUILD/Languages/russian.lng | 253 ++--
BUILD/Languages/slovenian.lng | 251 ++--
BUILD/Languages/spanish.lng | 263 ++---
BUILD/Languages/swedish.lng | 251 ++--
BUILD/Languages/turkish.lng | 247 ++--
BUILD/Languages/ukrainian.lng | 261 ++---
BUILD/Resources.zip | Bin 271346 -> 272579 bytes
BUILD/styles.rc | 4 +-
FreeFileSync.cbp | 16 +-
FreeFileSync.vcxproj | 63 +-
Makefile | 4 +-
RealtimeSync/RealtimeSync.cbp | 2 +-
RealtimeSync/RealtimeSync.vcxproj | 59 +-
RealtimeSync/application.cpp | 24 +-
RealtimeSync/gui_generated.cpp | 66 +-
RealtimeSync/gui_generated.h | 30 +-
RealtimeSync/main_dlg.cpp | 109 +-
RealtimeSync/main_dlg.h | 22 +-
RealtimeSync/resources.cpp | 12 +-
RealtimeSync/tray_menu.cpp | 479 ++++----
RealtimeSync/tray_menu.h | 9 +-
RealtimeSync/watcher.cpp | 138 +--
RealtimeSync/watcher.h | 16 +-
RealtimeSync/xml_ffs.cpp | 6 +-
RealtimeSync/xml_ffs.h | 3 +-
RealtimeSync/xml_proc.cpp | 16 +-
RealtimeSync/xml_proc.h | 5 +-
algorithm.cpp | 77 +-
comparison.cpp | 73 +-
comparison.h | 2 +-
file_hierarchy.cpp | 9 +-
file_hierarchy.h | 20 +-
lib/IFileOperation/FileOperation_Vista.vcxproj | 240 ----
lib/IFileOperation/dll_main.cpp | 25 -
lib/IFileOperation/file_op.cpp | 190 ---
lib/IFileOperation/file_op.h | 62 -
lib/ShadowCopy/LockFile.cpp | 5 +-
lib/ShadowCopy/Shadow_Server2003.vcxproj | 12 +-
lib/ShadowCopy/Shadow_Windows7.vcxproj | 12 +-
lib/ShadowCopy/Shadow_XP.vcxproj | 12 +-
lib/ShadowCopy/shadow.cpp | 36 +-
lib/ShadowCopy/shadow.h | 35 +-
lib/Thumbnail/thumbnail.cpp | 28 +-
lib/Thumbnail/thumbnail.h | 8 +-
lib/binary.cpp | 4 +-
lib/binary.h | 2 +-
lib/db_file.cpp | 34 +-
lib/dir_exist_async.h | 5 +-
lib/dir_lock.cpp | 407 ++++---
lib/dir_lock.h | 8 +-
lib/ffs_paths.h | 14 +-
lib/icon_buffer.cpp | 27 +-
lib/localization.cpp | 16 +-
lib/parallel_scan.cpp | 21 +-
lib/parse_plural.h | 2 +-
lib/perf_check.cpp | 259 +++++
lib/perf_check.h | 40 +
lib/process_xml.cpp | 104 +-
lib/process_xml.h | 26 +-
lib/recycler.cpp | 210 ----
lib/recycler.h | 48 -
lib/resolve_path.cpp | 241 ++--
lib/resources.cpp | 14 +-
lib/shadow.cpp | 69 +-
lib/shadow.h | 2 +-
lib/statistics.cpp | 287 -----
lib/statistics.h | 73 --
lib/status_handler.cpp | 22 +-
lib/status_handler.h | 102 +-
lib/status_handler_impl.h | 2 +-
lib/xml_base.cpp | 18 +-
process_callback.h | 27 +-
structures.cpp | 2 +-
structures.h | 6 +-
synchronization.cpp | 209 ++--
synchronization.h | 2 +-
ui/batch_config.cpp | 128 +-
ui/batch_config.h | 5 +-
ui/batch_status_handler.cpp | 200 ++--
ui/batch_status_handler.h | 12 +-
ui/check_version.cpp | 22 +-
ui/check_version.h | 6 +-
ui/custom_grid.cpp | 34 +-
ui/exec_finished_box.cpp | 3 +-
ui/folder_history_box.cpp | 8 +-
ui/folder_pair.h | 8 +-
ui/grid_view.cpp | 15 +-
ui/grid_view.h | 12 +-
ui/gui_generated.cpp | 139 +--
ui/gui_generated.h | 18 +-
ui/gui_status_handler.cpp | 238 ++--
ui/gui_status_handler.h | 19 +-
ui/main_dlg.cpp | 521 +++++----
ui/main_dlg.h | 1 +
ui/msg_popup.cpp | 34 +-
ui/msg_popup.h | 11 +-
ui/progress_indicator.cpp | 1168 +++++++++----------
ui/progress_indicator.h | 43 +-
ui/search.cpp | 36 +-
ui/search.h | 4 +-
ui/small_dlgs.cpp | 103 +-
ui/small_dlgs.h | 31 +-
ui/sorting.h | 17 +-
ui/sync_cfg.cpp | 17 +-
ui/sync_cfg.h | 7 +-
ui/taskbar.cpp | 4 +-
ui/taskbar.h | 2 +-
ui/tray_icon.cpp | 22 +-
ui/tray_icon.h | 6 +-
ui/tree_view.cpp | 8 +-
ui/tree_view.h | 2 +-
version/version.h | 2 +-
version/version.rc | 4 +-
wx+/context_menu.h | 40 +-
wx+/graph.cpp | 3 +-
wx+/grid.cpp | 21 +-
wx+/serialize.h | 109 +-
wx+/shell_execute.h | 36 +-
wx+/string_conv.h | 8 +
wx+/toggle_button.h | 8 +-
wxWidgets-Fix/apply-patches.cmd | 5 -
wxWidgets-Fix/settings.cpp.patch | 60 -
zen/FindFilePlus/find_file_plus.cpp | 2 +-
zen/FindFilePlus/find_file_plus.h | 16 +-
zen/IFileOperation/FileOperation_Vista.vcxproj | 244 ++++
zen/IFileOperation/dll_main.cpp | 25 +
zen/IFileOperation/file_op.cpp | 349 ++++++
zen/IFileOperation/file_op.h | 76 ++
zen/com_error.h | 11 +-
zen/dir_watcher.cpp | 65 +-
zen/dst_hack.cpp | 17 +-
zen/dst_hack.h | 8 +-
zen/file_error.h | 15 +-
zen/file_handling.cpp | 1400 +++++++++++-----------
zen/file_handling.h | 14 +-
zen/file_io.cpp | 21 +-
zen/file_traverser.cpp | 81 +-
zen/file_update_handle.h | 4 +-
zen/guid.h | 3 +-
zen/long_path_prefix.h | 2 +-
zen/notify_removal.cpp | 45 +-
zen/perf.h | 100 +-
zen/privilege.cpp | 14 +-
zen/process_priority.h | 59 +
zen/process_status.h | 59 -
zen/recycler.cpp | 280 +++++
zen/recycler.h | 48 +
zen/stl_tools.h | 1 +
zen/string_base.h | 8 +-
zen/string_tools.h | 105 +-
zen/symlink_target.h | 8 +-
zen/thread.h | 119 +-
zen/tick_count.h | 114 ++
zen/time.h | 6 +-
zen/win_ver.h | 24 +-
zen/zstring.cpp | 2 +-
zen/zstring.h | 17 +-
183 files changed, 11786 insertions(+), 8892 deletions(-)
create mode 100644 BUILD/Languages/lithuanian.lng
create mode 100644 BUILD/Languages/norwegian.lng
delete mode 100644 lib/IFileOperation/FileOperation_Vista.vcxproj
delete mode 100644 lib/IFileOperation/dll_main.cpp
delete mode 100644 lib/IFileOperation/file_op.cpp
delete mode 100644 lib/IFileOperation/file_op.h
create mode 100644 lib/perf_check.cpp
create mode 100644 lib/perf_check.h
delete mode 100644 lib/recycler.cpp
delete mode 100644 lib/recycler.h
delete mode 100644 lib/statistics.cpp
delete mode 100644 lib/statistics.h
delete mode 100644 wxWidgets-Fix/apply-patches.cmd
delete mode 100644 wxWidgets-Fix/settings.cpp.patch
create mode 100644 zen/IFileOperation/FileOperation_Vista.vcxproj
create mode 100644 zen/IFileOperation/dll_main.cpp
create mode 100644 zen/IFileOperation/file_op.cpp
create mode 100644 zen/IFileOperation/file_op.h
create mode 100644 zen/process_priority.h
delete mode 100644 zen/process_status.h
create mode 100644 zen/recycler.cpp
create mode 100644 zen/recycler.h
create mode 100644 zen/tick_count.h
diff --git a/Application.cpp b/Application.cpp
index 5b6fa2d8..899c86c8 100644
--- a/Application.cpp
+++ b/Application.cpp
@@ -45,7 +45,7 @@ void onTerminationRequested()
std::wstring msg = ::GetCurrentThreadId() == mainThreadId ?
L"Termination requested in main thread!\n\n" :
L"Termination requested in worker thread!\n\n";
- msg += L"Please take a screenshot and file a bug report on: http://sourceforge.net/projects/freefilesync";
+ msg += L"Please take a screenshot and file a bug report at: http://sourceforge.net/projects/freefilesync";
::MessageBox(0, msg.c_str(), _("An exception occurred!").c_str(), 0);
std::abort();
@@ -77,13 +77,13 @@ void Application::OnStartApplication(wxIdleEvent&)
{
Disconnect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), nullptr, this);
- //wxWidgets app exit handling is quite weird... we want the app to exit only if the logical main window is closed
+ //wxWidgets app exit handling is weird... we want the app to exit only if the logical main window is closed
wxTheApp->SetExitOnFrameDelete(false); //avoid popup-windows from becoming temporary top windows leading to program exit after closure
- wxApp* app = wxTheApp;
+ auto app = wxTheApp; //fix lambda/wxWigets/VC fuck up
ZEN_ON_SCOPE_EXIT(if (!mainWindowWasSet()) app->ExitMainLoop();); //quit application, if no main window was set (batch silent mode)
//if appname is not set, the default is the executable's name!
- SetAppName(wxT("FreeFileSync"));
+ SetAppName(L"FreeFileSync");
#ifdef FFS_WIN
//Quote: "Best practice is that all applications call the process-wide SetErrorMode function with a parameter of
@@ -91,12 +91,10 @@ void Application::OnStartApplication(wxIdleEvent&)
::SetErrorMode(SEM_FAILCRITICALERRORS);
#elif defined FFS_LINUX
- gtk_init(nullptr, nullptr);
-
+ ::gtk_init(nullptr, nullptr);
::gtk_rc_parse((getResourceDir() + "styles.rc").c_str()); //remove inner border from bitmap buttons
#endif
-
#if wxCHECK_VERSION(2, 9, 1)
#ifdef FFS_WIN
wxToolTip::SetMaxWidth(-1); //disable tooltip wrapping -> Windows only (as of 2.9.2)
@@ -104,7 +102,6 @@ void Application::OnStartApplication(wxIdleEvent&)
wxToolTip::SetAutoPop(7000); //tooltip visibilty in ms, 5s seems to be default for Windows
#endif
-
try //load global settings from XML: they are written on exit, so read them FIRST
{
if (fileExists(toZ(getGlobalConfigFile())))
@@ -123,7 +120,6 @@ void Application::OnStartApplication(wxIdleEvent&)
//set program language
setLanguage(globalSettings.programLanguage);
-
//determine FFS mode of operation
std::vector commandArgs; //wxWidgets screws up once again making "argv implicitly convertible to a wxChar**" in 2.9.3,
for (int i = 1; i < argc; ++i) //so we are forced to use this pitiful excuse for a range construction!!
@@ -142,7 +138,6 @@ void Application::OnStartApplication(wxIdleEvent&)
for (auto iter = commandArgs.begin(); iter != commandArgs.end(); ++iter)
{
size_t index = iter - commandArgs.begin();
- Zstring dirname = toZ(*iter);
FolderPairEnh& fp = [&]() -> FolderPairEnh&
{
@@ -154,9 +149,9 @@ void Application::OnStartApplication(wxIdleEvent&)
}();
if (index % 2 == 0)
- fp.leftDirectory = dirname;
+ fp.leftDirectory = toZ(*iter);
else if (index % 2 == 1)
- fp.rightDirectory = dirname;
+ fp.rightDirectory = toZ(*iter);
}
runGuiMode(guiCfg, globalSettings);
@@ -165,23 +160,23 @@ void Application::OnStartApplication(wxIdleEvent&)
{
for (auto iter = commandArgs.begin(); iter != commandArgs.end(); ++iter)
{
- wxString& filename = *iter;
+ const Zstring& filename = toZ(*iter);
- if (!fileExists(toZ(filename))) //be a little tolerant
+ if (!fileExists(filename)) //be a little tolerant
{
- if (fileExists(toZ(filename) + Zstr(".ffs_batch")))
- filename += L".ffs_batch";
- else if (fileExists(toZ(filename) + Zstr(".ffs_gui")))
- filename += L".ffs_gui";
+ if (fileExists(filename + Zstr(".ffs_batch")))
+ *iter += L".ffs_batch";
+ else if (fileExists(filename + Zstr(".ffs_gui")))
+ *iter += L".ffs_gui";
else
{
- wxMessageBox(_("File does not exist:") + L" \"" + filename + L"\"", _("Error"), wxOK | wxICON_ERROR);
+ wxMessageBox(replaceCpy(_("Cannot find file %x."), L"%x", fmtFileName(filename)), _("Error"), wxOK | wxICON_ERROR);
return;
}
}
}
- switch (getMergeType(commandArgs)) //throw ()
+ switch (getMergeType(toZ(commandArgs))) //throw ()
{
case MERGE_BATCH: //pure batch config files
if (commandArgs.size() == 1)
@@ -200,11 +195,11 @@ void Application::OnStartApplication(wxIdleEvent&)
std::find_if(commandArgs.begin(), commandArgs.end(),
[](const wxString& filename) -> bool
{
- switch (getXmlType(filename)) //throw()
+ switch (getXmlType(toZ(filename))) //throw()
{
case XML_TYPE_GLOBAL:
case XML_TYPE_OTHER:
- wxMessageBox(wxString(_("The file does not contain a valid configuration:")) + wxT(" \"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR);
+ wxMessageBox(_("The file does not contain a valid configuration:") + L" " + fmtFileName(toZ(filename)), _("Error"), wxOK | wxICON_ERROR);
return true;
case XML_TYPE_GUI:
@@ -234,7 +229,7 @@ int Application::OnRun()
}
catch (const std::exception& e) //catch all STL exceptions
{
- //unfortunately it's not always possible to display a message box in this erroneous situation, however (non-stream) file output always works!
+ //it's not always possible to display a message box, e.g. corrupted stack, however (non-stream) file output works!
wxFile safeOutput(toWx(getConfigDir()) + L"LastError.txt", wxFile::write);
safeOutput.Write(utf8CvrtTo(e.what()));
@@ -243,10 +238,12 @@ int Application::OnRun()
}
catch (...) //catch the rest
{
+ const wxString& msg = L"Unknown error.";
+
wxFile safeOutput(toWx(getConfigDir()) + L"LastError.txt", wxFile::write);
- safeOutput.Write(wxT("Unknown exception!"));
+ safeOutput.Write(msg);
- wxSafeShowMessage(_("An exception occurred!"), L"Unknown exception!");
+ wxSafeShowMessage(_("An exception occurred!"), msg);
return -9;
}
@@ -306,7 +303,7 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
XmlBatchConfig batchCfg; //structure to receive gui settings
try
{
- readConfig(filename, batchCfg);
+ readConfig(toZ(filename), batchCfg);
}
catch (const xmlAccess::FfsXmlError& error)
{
@@ -348,13 +345,18 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
}
//batch mode: place directory locks on directories during both comparison AND synchronization
- LockHolder dummy(allowPwPrompt);
- std::for_each(cmpConfig.begin(), cmpConfig.end(),
- [&](const FolderPairCfg& fpCfg)
+
+ std::unique_ptr dummy;
+ if (globSettings.createLockFile)
{
- dummy.addDir(fpCfg.leftDirectoryFmt, statusHandler);
- dummy.addDir(fpCfg.rightDirectoryFmt, statusHandler);
- });
+ dummy.reset(new LockHolder(allowPwPrompt));
+ std::for_each(cmpConfig.begin(), cmpConfig.end(),
+ [&](const FolderPairCfg& fpCfg)
+ {
+ dummy->addDir(fpCfg.leftDirectoryFmt, statusHandler);
+ dummy->addDir(fpCfg.rightDirectoryFmt, statusHandler);
+ });
+ }
//COMPARE DIRECTORIES
CompareProcess cmpProc(globSettings.fileTimeTolerance,
diff --git a/BUILD/Changelog.txt b/BUILD/Changelog.txt
index c62c13e5..f300e42c 100644
--- a/BUILD/Changelog.txt
+++ b/BUILD/Changelog.txt
@@ -2,9 +2,34 @@
|FreeFileSync|
--------------
+Changelog v5.3
+--------------
+Show which processes lock a file during synchronization (Windows Vista and later)
+Use unbuffered copy to speed up copying large files (Windows Vista and later)
+Preserve NTFS sparse files
+Support referencing all logical volumes by name (including FreeOTFE virtual drives)
+Fixed lag showing "Searching for directory" on comparison
+New context menu filter option: exclude by short name
+Use clicked-on row rather than anchor when determining action for shift-selection
+Refresh grid after pressing "CTRL + A"
+Add base folder pairs to CSV export
+Show full path in tooltip if multiple folder pairs are used
+Show child dialogs on same monitor as parent dialog on multiple monitor systems
+Added statistics at beginning of batch log file
+Fixed batch mode final speed statistic and reset graph after binary comparison
+RealtimeSync: Automatically retry after 15 seconds if an error occurrs
+Show button images untrimmed (Linux)
+Fixed problems with auto-closing progress dialog (Linux)
+Fixed unresponsive progress dialog and systray icon (Linux)
+New option in GlobalSettings.xml: "LockDirectoriesDuringSync"
+Added Lithuanian translation
+Added Norwegian translation
+Updated translation files
+
+
Changelog v5.2
--------------
-Fixed runtime error "Error comparing strings! (LCMapString)" (Windows XP only)
+Fixed runtime error "Error comparing strings! (LCMapString)" (Windows 2000, XP only)
Changelog v5.1
diff --git a/BUILD/FreeFileSync.chm b/BUILD/FreeFileSync.chm
index 5a59e94d..497b848e 100644
Binary files a/BUILD/FreeFileSync.chm and b/BUILD/FreeFileSync.chm differ
diff --git a/BUILD/Help/html/FreeFileSync.html b/BUILD/Help/html/FreeFileSync.html
index fe9457ad..446a5aa0 100644
--- a/BUILD/Help/html/FreeFileSync.html
+++ b/BUILD/Help/html/FreeFileSync.html
@@ -5,7 +5,7 @@
-
+
@@ -99,6 +99,8 @@ Features
as a batch job
Transactional
diff --git a/BUILD/Languages/chinese_simple.lng b/BUILD/Languages/chinese_simple.lng
index fd5cbaf8..e40d8afc 100644
--- a/BUILD/Languages/chinese_simple.lng
+++ b/BUILD/Languages/chinese_simple.lng
@@ -19,6 +19,9 @@
浏览目录
+
+取消请求: 正在等待当前操作完成...
+
实时同步 - 自动同步
@@ -115,8 +118,8 @@
Linux错误代码 %x:
-
-解决符号链接出错:
+
+无法解决 %x 的符号连接.
%x MB
@@ -135,35 +138,41 @@
%x 字节
-
-从同步数据库中读取时出错:
+
+无法读取文件 %x .
-
-向同步数据库中写入时出错:
+
+无法写入文件 %x .
-
-不兼容的同步数据库格式:
+
+数据库文件 %x 不兼容.
初始化同步:
-
-FreeFileSync数据库文件其中一个不存在:
+
+数据库文件 %x 还未存在.
-
-数据库文件没不共享一个公共的同步段
+
+内存不足!
+
+
+数据库文件并未共享一个公共会话.
发生异常!
-
-读取文件属性出错:
+
+无法读取 %x 的文件属性.
+
+
+无法取得进程信息.
由于目录已锁定而正在等待(%x)...
-
-设置目录锁定时出错:
+
+无法设置目录锁定 %x .