summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:07:15 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:07:15 +0200
commit8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395 (patch)
tree975c6e590c31e56007006a23e7b15d0245d75b08
parent3.6 (diff)
downloadFreeFileSync-8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395.tar.gz
FreeFileSync-8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395.tar.bz2
FreeFileSync-8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395.zip
3.7
-rw-r--r--Application.cpp47
-rw-r--r--BUILD/Changelog.txt26
-rw-r--r--BUILD/FreeFileSync.chmbin340160 -> 361168 bytes
-rw-r--r--BUILD/Help/FreeFileSync.hhp1
-rw-r--r--BUILD/Help/Table of Contents.hhc4
-rw-r--r--BUILD/Help/html/Links.html6
-rw-r--r--BUILD/Help/html/advanced/Batch Scripting.html91
-rw-r--r--BUILD/Help/html/advanced/CmpSettings.pngbin0 -> 17093 bytes
-rw-r--r--BUILD/Help/html/advanced/RealtimeSync.html19
-rw-r--r--BUILD/Help/html/advanced/RunAsService.html23
-rw-r--r--BUILD/Help/html/advanced/ShadowCopy.html17
-rw-r--r--BUILD/Help/html/advanced/SymbolicLinks.html81
-rw-r--r--BUILD/Invisible.vbs17
-rw-r--r--BUILD/Languages/chinese_simple.lng102
-rw-r--r--BUILD/Languages/chinese_traditional.lng98
-rw-r--r--BUILD/Languages/czech.lng106
-rw-r--r--BUILD/Languages/dutch.lng96
-rw-r--r--BUILD/Languages/english_uk.lng100
-rw-r--r--BUILD/Languages/finnish.lng102
-rw-r--r--BUILD/Languages/french.lng108
-rw-r--r--BUILD/Languages/german.lng98
-rw-r--r--BUILD/Languages/hungarian.lng96
-rw-r--r--BUILD/Languages/italian.lng98
-rw-r--r--BUILD/Languages/japanese.lng108
-rw-r--r--BUILD/Languages/polish.lng128
-rw-r--r--BUILD/Languages/portuguese.lng88
-rw-r--r--BUILD/Languages/portuguese_br.lng116
-rw-r--r--BUILD/Languages/romanian.lng106
-rw-r--r--BUILD/Languages/russian.lng98
-rw-r--r--BUILD/Languages/slovenian.lng102
-rw-r--r--BUILD/Languages/spanish.lng120
-rw-r--r--BUILD/Languages/swedish.lng104
-rw-r--r--BUILD/Languages/turkish.lng92
-rw-r--r--BUILD/Resources.datbin292409 -> 295575 bytes
-rw-r--r--Cleanup.cmd45
-rw-r--r--FreeFileSync.cbp213
-rw-r--r--FreeFileSync.vcproj17
-rw-r--r--Makefile26
-rw-r--r--RealtimeSync/RealtimeSync.cbp62
-rw-r--r--RealtimeSync/RealtimeSync.vcproj4
-rw-r--r--RealtimeSync/mainDialog.cpp3
-rw-r--r--RealtimeSync/makefile8
-rw-r--r--RealtimeSync/trayMenu.cpp79
-rw-r--r--RealtimeSync/watcher.cpp208
-rw-r--r--RealtimeSync/watcher.h14
-rw-r--r--RealtimeSync/xmlProcessing.h2
-rw-r--r--algorithm.cpp151
-rw-r--r--comparison.cpp182
-rw-r--r--comparison.h7
-rw-r--r--copySource7
-rw-r--r--fileHierarchy.cpp2
-rw-r--r--fileHierarchy.h45
-rw-r--r--library/CustomGrid.cpp40
-rw-r--r--library/CustomGrid.h10
-rw-r--r--library/Recycler_Vista/recycler.cpp148
-rw-r--r--library/Recycler_Vista/recycler.h30
-rw-r--r--library/ShadowCopy/shadow.h39
-rw-r--r--library/binary.cpp112
-rw-r--r--library/dbFile.cpp178
-rw-r--r--library/filter.cpp26
-rw-r--r--library/filter.h24
-rw-r--r--library/pch.h6
-rw-r--r--library/processXml.cpp42
-rw-r--r--library/processXml.h19
-rw-r--r--library/resources.cpp2
-rw-r--r--library/softFilter.h18
-rw-r--r--library/statistics.cpp8
-rw-r--r--library/statistics.h2
-rw-r--r--shared/IFileOperation/FileOperation_Vista.vcproj (renamed from library/Recycler_Vista/Recycler_Vista.vcproj)28
-rw-r--r--shared/IFileOperation/dllmain.cpp (renamed from library/Recycler_Vista/dllmain.cpp)0
-rw-r--r--shared/IFileOperation/fileOp.cpp264
-rw-r--r--shared/IFileOperation/fileOp.h47
-rw-r--r--shared/ShadowCopy/Shadow_2003.vcproj (renamed from library/ShadowCopy/Shadow_2003.vcproj)0
-rw-r--r--shared/ShadowCopy/Shadow_XP.vcproj (renamed from library/ShadowCopy/Shadow_XP.vcproj)0
-rw-r--r--shared/ShadowCopy/dllmain.cpp (renamed from library/ShadowCopy/dllmain.cpp)0
-rw-r--r--shared/ShadowCopy/shadow.cpp (renamed from library/ShadowCopy/shadow.cpp)0
-rw-r--r--shared/ShadowCopy/shadow.h55
-rw-r--r--shared/Taskbar_Seven/Taskbar_Seven.vcproj (renamed from library/Taskbar_Seven/Taskbar_Seven.vcproj)0
-rw-r--r--shared/Taskbar_Seven/dllmain.cpp (renamed from library/Taskbar_Seven/dllmain.cpp)0
-rw-r--r--shared/Taskbar_Seven/taskbar.cpp (renamed from library/Taskbar_Seven/taskbar.cpp)0
-rw-r--r--shared/Taskbar_Seven/taskbar.h (renamed from library/Taskbar_Seven/taskbar.h)8
-rw-r--r--shared/appMain.cpp1
-rw-r--r--shared/customComboBox.cpp5
-rw-r--r--shared/debugNew.cpp59
-rw-r--r--shared/debugNew.h95
-rw-r--r--shared/fileError.h6
-rw-r--r--shared/fileHandling.cpp720
-rw-r--r--shared/fileHandling.h36
-rw-r--r--shared/fileIO.cpp24
-rw-r--r--shared/fileTraverser.cpp41
-rw-r--r--shared/fileTraverser.h7
-rw-r--r--shared/globalFunctions.cpp4
-rw-r--r--shared/globalFunctions.h183
-rw-r--r--shared/localization.cpp2
-rw-r--r--shared/loki/ScopeGuard.h2
-rw-r--r--shared/ossp_uuid/.libs/libuuid++.abin0 -> 83704 bytes
-rw-r--r--shared/ossp_uuid/.libs/libuuid++.la41
-rw-r--r--shared/ossp_uuid/.libs/libuuid++.lai41
-rw-r--r--shared/ossp_uuid/.libs/libuuid.abin0 -> 48408 bytes
-rw-r--r--shared/ossp_uuid/.libs/libuuid.la41
-rw-r--r--shared/ossp_uuid/.libs/libuuid.lai41
-rw-r--r--shared/ossp_uuid/Makefile357
-rw-r--r--shared/ossp_uuid/confdefs.h49
-rw-r--r--shared/ossp_uuid/config.h217
-rw-r--r--shared/ossp_uuid/config.log1434
-rw-r--r--shared/ossp_uuid/config.status2094
-rw-r--r--shared/ossp_uuid/libtool8521
-rw-r--r--shared/ossp_uuid/libuuid++.la41
-rw-r--r--shared/ossp_uuid/libuuid.la41
-rw-r--r--shared/ossp_uuid/uuidbin0 -> 49158 bytes
-rw-r--r--shared/ossp_uuid/uuid++.lo12
-rw-r--r--shared/ossp_uuid/uuid++.obin0 -> 34452 bytes
-rw-r--r--shared/ossp_uuid/uuid-config145
-rw-r--r--shared/ossp_uuid/uuid.h120
-rw-r--r--shared/ossp_uuid/uuid.lo12
-rw-r--r--shared/ossp_uuid/uuid.obin0 -> 12344 bytes
-rw-r--r--shared/ossp_uuid/uuid.pc42
-rw-r--r--shared/ossp_uuid/uuid_cli.obin0 -> 7876 bytes
-rw-r--r--shared/ossp_uuid/uuid_mac.lo12
-rw-r--r--shared/ossp_uuid/uuid_mac.obin0 -> 1232 bytes
-rw-r--r--shared/ossp_uuid/uuid_md5.lo12
-rw-r--r--shared/ossp_uuid/uuid_md5.obin0 -> 4408 bytes
-rw-r--r--shared/ossp_uuid/uuid_prng.lo12
-rw-r--r--shared/ossp_uuid/uuid_prng.obin0 -> 2188 bytes
-rw-r--r--shared/ossp_uuid/uuid_sha1.lo12
-rw-r--r--shared/ossp_uuid/uuid_sha1.obin0 -> 3120 bytes
-rw-r--r--shared/ossp_uuid/uuid_str.lo12
-rw-r--r--shared/ossp_uuid/uuid_str.obin0 -> 7264 bytes
-rw-r--r--shared/ossp_uuid/uuid_time.lo12
-rw-r--r--shared/ossp_uuid/uuid_time.obin0 -> 920 bytes
-rw-r--r--shared/ossp_uuid/uuid_ui128.lo12
-rw-r--r--shared/ossp_uuid/uuid_ui128.obin0 -> 7876 bytes
-rw-r--r--shared/ossp_uuid/uuid_ui64.lo12
-rw-r--r--shared/ossp_uuid/uuid_ui64.obin0 -> 6924 bytes
-rw-r--r--shared/recycler.cpp27
-rw-r--r--shared/serialize.h12
-rw-r--r--shared/shadow.cpp23
-rw-r--r--shared/standardPaths.cpp2
-rw-r--r--shared/staticAssert.h2
-rw-r--r--shared/taskbar.cpp10
-rw-r--r--shared/taskbar.h2
-rw-r--r--shared/tinyxml/tinystr.cpp92
-rw-r--r--shared/tinyxml/tinyxml.cpp2270
-rw-r--r--shared/tinyxml/tinyxmlerror.cpp40
-rw-r--r--shared/tinyxml/tinyxmlparser.cpp2822
-rw-r--r--shared/util.cpp62
-rw-r--r--shared/util.h2
-rw-r--r--shared/xmlBase.cpp282
-rw-r--r--shared/xmlBase.h130
-rw-r--r--shared/xmlError.h41
-rw-r--r--shared/zstring.cpp4
-rw-r--r--shared/zstring.h114
-rw-r--r--structures.cpp3
-rw-r--r--structures.h35
-rw-r--r--synchronization.cpp158
-rw-r--r--synchronization.h2
-rw-r--r--ui/MainDialog.cpp539
-rw-r--r--ui/MainDialog.h50
-rw-r--r--ui/SmallDialogs.cpp116
-rw-r--r--ui/SmallDialogs.h10
-rw-r--r--ui/batchConfig.cpp802
-rw-r--r--ui/batchConfig.h96
-rw-r--r--ui/batchStatusHandler.cpp35
-rw-r--r--ui/batchStatusHandler.h4
-rw-r--r--ui/folderPair.h33
-rw-r--r--ui/gridView.cpp8
-rw-r--r--ui/gridView.h4
-rw-r--r--ui/guiGenerated.cpp739
-rw-r--r--ui/guiGenerated.h132
-rw-r--r--ui/guiStatusHandler.cpp49
-rw-r--r--ui/guiStatusHandler.h2
-rw-r--r--ui/isNullFilter.h24
-rw-r--r--ui/messagePopup.cpp12
-rw-r--r--ui/messagePopup.h8
-rw-r--r--ui/progressIndicator.cpp20
-rw-r--r--ui/search.cpp1
-rw-r--r--ui/settingsDialog.cpp1389
-rw-r--r--ui/switchToGui.cpp27
-rw-r--r--ui/switchToGui.h29
-rw-r--r--ui/syncConfig.cpp477
-rw-r--r--ui/syncConfig.h (renamed from ui/settingsDialog.h)100
-rw-r--r--version/version.h2
182 files changed, 21923 insertions, 8029 deletions
diff --git a/Application.cpp b/Application.cpp
index cda76616..4d0fd65f 100644
--- a/Application.cpp
+++ b/Application.cpp
@@ -17,6 +17,7 @@
#include <wx/file.h>
#include "shared/xmlBase.h"
#include "library/resources.h"
+#include "ui/switchToGui.h"
#include "shared/standardPaths.h"
#include "shared/localization.h"
#include "shared/appMain.h"
@@ -29,6 +30,7 @@
#endif
using FreeFileSync::CustomLocale;
+using FreeFileSync::SwitchToGui;
IMPLEMENT_APP(Application)
@@ -48,6 +50,8 @@ bool Application::OnInit()
void Application::OnStartApplication(wxIdleEvent&)
{
+ using namespace FreeFileSync;
+
Disconnect(wxEVT_IDLE, wxIdleEventHandler(Application::OnStartApplication), NULL, this);
struct HandleAppExit //wxWidgets app exit handling is a bit weird... we want the app to exit only if the logical main window is closed
@@ -82,11 +86,11 @@ void Application::OnStartApplication(wxIdleEvent&)
{
const wxString filename(argv[1]);
- if (wxFileExists(filename)) //load file specified by %1 parameter:
+ if (fileExists(wxToZ(filename))) //load file specified by %1 parameter:
cfgFilename = filename;
- else if (wxFileExists(filename + wxT(".ffs_batch")))
+ else if (fileExists(wxToZ(filename + wxT(".ffs_batch"))))
cfgFilename = filename + wxT(".ffs_batch");
- else if (wxFileExists(filename + wxT(".ffs_gui")))
+ else if (fileExists(wxToZ(filename + wxT(".ffs_gui"))))
cfgFilename = filename + wxT(".ffs_gui");
else
{
@@ -99,19 +103,17 @@ void Application::OnStartApplication(wxIdleEvent&)
try //load global settings from XML
{
- xmlAccess::readGlobalSettings(globalSettings);
+ if (fileExists(wxToZ(xmlAccess::getGlobalConfigFile())))
+ xmlAccess::readGlobalSettings(globalSettings);
+ //else: globalSettings already has default values
}
catch (const xmlAccess::XmlError& error)
{
- if (wxFileExists(xmlAccess::getGlobalConfigFile()))
- {
- //show messagebox and continue
- if (error.getSeverity() == xmlAccess::XmlError::WARNING)
- wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING);
- else
- wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
- }
- //else: globalSettings already has default values
+ //show messagebox and continue
+ if (error.getSeverity() == xmlAccess::XmlError::WARNING)
+ ; //wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING); -> ignore parsing errors: should be migration problems only *cross-fingers*
+ else
+ wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
}
//set program language
@@ -190,12 +192,8 @@ int Application::OnExit()
void Application::runGuiMode(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings& settings)
{
- MainDialog* frame = new MainDialog(NULL, cfgFileName, settings);
- frame->SetIcon(*GlobalResources::getInstance().programIcon); //set application icon
+ MainDialog* frame = new MainDialog(cfgFileName, settings);
frame->Show();
-
- //notify about (logical) application main window
- FreeFileSync::AppMainWindow::setMainWindow(frame);
}
@@ -222,16 +220,19 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
try //begin of synchronization process (all in one try-catch block)
{
+ const SwitchToGui switchBatchToGui(batchCfg, globSettings); //prepare potential operational switch
+
//class handling status updates and error messages
std::auto_ptr<BatchStatusHandler> statusHandler; //delete object automatically
if (batchCfg.silent)
- statusHandler.reset(new BatchStatusHandler(true, filename, &batchCfg.logFileDirectory, batchCfg.handleError, returnValue));
+ statusHandler.reset(new BatchStatusHandler(true, filename, &batchCfg.logFileDirectory, batchCfg.handleError, switchBatchToGui, returnValue));
else
- statusHandler.reset(new BatchStatusHandler(false, filename, NULL, batchCfg.handleError, returnValue));
+ statusHandler.reset(new BatchStatusHandler(false, filename, NULL, batchCfg.handleError, switchBatchToGui, returnValue));
//COMPARE DIRECTORIES
FreeFileSync::FolderComparison folderCmp;
- FreeFileSync::CompareProcess comparison(batchCfg.mainCfg.hidden.traverseDirectorySymlinks,
+ FreeFileSync::CompareProcess comparison(batchCfg.mainCfg.processSymlinks,
+ batchCfg.mainCfg.traverseDirectorySymlinks,
batchCfg.mainCfg.hidden.fileTimeTolerance,
globSettings.ignoreOneHourDiff,
globSettings.optDialogs,
@@ -250,8 +251,8 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
//START SYNCHRONIZATION
FreeFileSync::SyncProcess synchronization(
- batchCfg.mainCfg.hidden.copyFileSymlinks,
- batchCfg.mainCfg.hidden.traverseDirectorySymlinks,
+ batchCfg.mainCfg.copyFileSymlinks,
+ batchCfg.mainCfg.traverseDirectorySymlinks,
globSettings.optDialogs,
batchCfg.mainCfg.hidden.verifyFileCopy,
globSettings.copyLockedFiles,
diff --git a/BUILD/Changelog.txt b/BUILD/Changelog.txt
index fd8a3fd1..83e18b6f 100644
--- a/BUILD/Changelog.txt
+++ b/BUILD/Changelog.txt
@@ -2,9 +2,33 @@
|FreeFileSync|
--------------
+Changelog v3.7
+--------------
+RealtimeSync: Trigger commandline only if all directories are existing
+Allow for drag and drop of very large files
+Batch modus: New "Switch" button opens GUI modus when warnings occur
+Support copying old 8.3 filenames correctly
+Handling of Symbolic Links configurable via GUI
+Fine tuned calculation of remaining disk space for custom deletion directories
+Save default config files only if actually changed
+NSIS installer: Support for /D and /S switches
+Fixed resource loading if installation folder is not working directory (Linux build)
+Consolidated batch creation dialog
+<Automatic> mode: Detect conflict when a directory shall be deleted while new sub-elements are to be copied
+Automatically mark left behind temporary files (*.ffs_tmp) for deletion with next sync
+New Project website: http://freefilesync.sourceforge.net
+A lot of small GUI fixes
+Updated translation files
+
+
+Changelog v3.6
+--------------
+Fixed occasional crash when starting FreeFileSync
+
+
Changelog v3.5
--------------
-Allow <automatic> mode syncs between 32 bit, 64 bit, Windows and Linux builds
+Allow <Automatic> mode syncs between 32 bit, 64 bit, Windows and Linux builds
Show progess indicator in window title
Support for progess indicator in Windows 7 Superbar
Reduced progress indicator flicker
diff --git a/BUILD/FreeFileSync.chm b/BUILD/FreeFileSync.chm
index cf9d84f5..5018530c 100644
--- a/BUILD/FreeFileSync.chm
+++ b/BUILD/FreeFileSync.chm
Binary files differ
diff --git a/BUILD/Help/FreeFileSync.hhp b/BUILD/Help/FreeFileSync.hhp
index 96e57799..02e45e53 100644
--- a/BUILD/Help/FreeFileSync.hhp
+++ b/BUILD/Help/FreeFileSync.hhp
@@ -28,6 +28,7 @@ html\advanced\EnvironmentVariables.html
html\advanced\RealtimeSync.html
html\advanced\ShadowCopy.html
html\advanced\RunAsService.html
+html\advanced\Batch Scripting.html
[INFOTYPES]
diff --git a/BUILD/Help/Table of Contents.hhc b/BUILD/Help/Table of Contents.hhc
index 9c8c7330..e57b8399 100644
--- a/BUILD/Help/Table of Contents.hhc
+++ b/BUILD/Help/Table of Contents.hhc
@@ -29,6 +29,10 @@
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Batch Scripting">
+ <param name="Local" value="html\advanced\Batch Scripting.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Compare by filesize">
<param name="Local" value="html\advanced\CompareFileSize.html">
</OBJECT>
diff --git a/BUILD/Help/html/Links.html b/BUILD/Help/html/Links.html
index 3986f2a2..f35a3641 100644
--- a/BUILD/Help/html/Links.html
+++ b/BUILD/Help/html/Links.html
@@ -3,9 +3,9 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20100323;22205400">
+ <META NAME="CHANGED" CONTENT="20100402;19064500">
<STYLE TYPE="text/css">
<!--
@page { margin: 2cm }
@@ -19,6 +19,8 @@
</HEAD>
<BODY LANG="de-DE" DIR="LTR">
<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif">Links</FONT></H3>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Homepage:</FONT></P>
+<P STYLE="margin-bottom: 0cm"><A HREF="http://freefilesync.sourceforge.net/"><FONT COLOR="#000080"><FONT FACE="Tahoma, sans-serif"><SPAN LANG="zxx"><U>http://freefilesync.sourceforge.net</U></SPAN></FONT></FONT></A></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync
diff --git a/BUILD/Help/html/advanced/Batch Scripting.html b/BUILD/Help/html/advanced/Batch Scripting.html
new file mode 100644
index 00000000..3629edf3
--- /dev/null
+++ b/BUILD/Help/html/advanced/Batch Scripting.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
+ <TITLE></TITLE>
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)">
+ <META NAME="CREATED" CONTENT="20091206;16574000">
+ <META NAME="CHANGED" CONTENT="20100418;14135000">
+ <META NAME="Info 1" CONTENT="">
+ <META NAME="Info 2" CONTENT="">
+ <META NAME="Info 3" CONTENT="">
+ <META NAME="Info 4" CONTENT="">
+ <STYLE TYPE="text/css">
+ <!--
+ @page { margin: 2cm }
+ P { margin-bottom: 0.21cm }
+ H3 { margin-bottom: 0.21cm }
+ H3.western { font-family: "Arial", sans-serif }
+ H3.cjk { font-family: "MS Mincho" }
+ A:link { so-language: zxx }
+ -->
+ </STYLE>
+</HEAD>
+<BODY LANG="en-US" DIR="LTR">
+<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif">Batch Scripting
+<SPAN STYLE="font-weight: normal">(Windows)</SPAN></FONT></H3>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">In
+order to facilitate using FreeFileSync and RealtimeSync in advanced
+synchronization scenarios, creating batch files is a good way to
+provide additional functionality. The following section will give
+some general hints for custom *.cmd and *.bat files.</FONT></P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B>
+(A simple locking facility when sync'ing with multiple computers in
+parallel)</FONT></P>
+<UL>
+ <P><SPAN ID="Rahmen5" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Courier New, monospace">:tryAgain<BR>if not exist
+ \\share\folder\lock (<BR>&nbsp;&nbsp;</FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::create
+ the lock<BR></B></I></FONT></FONT><FONT COLOR="#808080">&nbsp;&nbsp;</FONT><FONT FACE="Courier New, monospace">echo
+ This is a lock file &gt; \\share\folder\lock<BR>&nbsp;&nbsp;</FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::execute
+ the synchronization batch job synchronously<BR>&nbsp;&nbsp;</B></I></FONT></FONT><FONT FACE="Courier New, monospace">&quot;C:\Program
+ Files\FreeFileSync\FreeFileSync.exe&quot;
+ &quot;C:\MySyncJob.ffs_batch&quot;<BR>&nbsp;&nbsp;del
+ \\share\folder\lock<BR>) else (<BR>&nbsp;&nbsp;</FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::wait
+ 5 seconds then try starting sync again:<BR></B></I></FONT></FONT><FONT COLOR="#808080">&nbsp;&nbsp;</FONT><FONT FACE="Courier New, monospace">choice
+ /C:AB /T:5 /D:A &gt; NUL<BR>&nbsp;&nbsp;goto tryAgain<BR>)</FONT></P>
+ </SPAN><BR CLEAR=LEFT>
+ </P>
+</UL>
+<OL>
+ <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT COLOR="#808080">&nbsp;</FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">When
+ starting a batch file from RealtimeSync be sure to make synchronous
+ calls to FreeFileSync only. This will prevent RealtimeSync from
+ detecting changes while synchronization is still in progress.</FONT></P>
+ <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT COLOR="#808080">&nbsp;</FONT></P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">During
+ execution of a Batch file a black console window is shown. You can
+ hide this window by using the Visual Basic script &quot;Invisible.vbs&quot;
+ located in the FreeFileSync installation directory.</FONT></P>
+ <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Usage:</B></FONT></P>
+ <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><SPAN ID="Rahmen7" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Courier New, monospace">wscript C:\Program
+ files\FreeFileSync\Invisible.vbs C:\MyBatchFile.cmd</FONT></P>
+ </SPAN><BR CLEAR=LEFT><FONT COLOR="#808080">&nbsp;</FONT>
+ </P>
+</OL>
+<OL START=3>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync
+ returns with an Errorlevel below zero if unresolved problems remain:</FONT></P>
+ <P><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Courier New, monospace">&quot;C:\Program
+ Files\FreeFileSync\FreeFileSync.exe&quot;
+ &quot;H:\Silent_Config.ffs_batch&quot;<BR>if not errorlevel 0
+ (<BR>&nbsp;&nbsp;</FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::if
+ something went wrong, add special treatment here<BR></B></I></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">&nbsp;&nbsp;echo
+ Errors occurred during synchronization...</SPAN></SPAN></FONT></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B><BR></B></I></FONT></FONT><FONT FACE="Courier New, monospace">&nbsp;&nbsp;pause<BR>)</FONT></P>
+ </SPAN><BR CLEAR=LEFT>
+ </P>
+</OL>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/BUILD/Help/html/advanced/CmpSettings.png b/BUILD/Help/html/advanced/CmpSettings.png
new file mode 100644
index 00000000..618f4057
--- /dev/null
+++ b/BUILD/Help/html/advanced/CmpSettings.png
Binary files differ
diff --git a/BUILD/Help/html/advanced/RealtimeSync.html b/BUILD/Help/html/advanced/RealtimeSync.html
index 156409ba..5aabe112 100644
--- a/BUILD/Help/html/advanced/RealtimeSync.html
+++ b/BUILD/Help/html/advanced/RealtimeSync.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20100125;20445600">
+ <META NAME="CHANGED" CONTENT="20100428;21351600">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -68,8 +68,9 @@ to begin monitoring.</FONT></P>
<FONT FACE="Tahoma, sans-serif">Starting the tool can be automated
by passing a RealtimeSync configuration file (<FONT FACE="Courier New, monospace">*.ffs_real</FONT>)
OR a FreeFileSync Batch file (<FONT FACE="Courier New, monospace">*.ffs_batch</FONT>)
- as first command-line argument. This allows for integration with
- your operating system's autostart facility:</FONT></P>
+ as first command-line argument. Latter is implicitly converted to
+ a *.ffs_real file with default settings. This allows for
+ integration with your operating system's autostart facility:</FONT></P>
</UL>
</SPAN><BR CLEAR=LEFT>
</P>
@@ -131,15 +132,15 @@ batch file similar to this one:</FONT></P>
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
<FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::first
check whether USB-stick contains a sync-configuration at all</B></I></FONT></FONT><FONT FACE="Courier New, monospace"><BR>@if
- exist &quot;H:\Silent_Config.ffs_batch&quot; (<BR></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::configuration
- found, now execute the synchronization batch job</B></I></FONT></FONT><FONT FACE="Courier New, monospace"><BR>&quot;C:\Program
+ exist &quot;H:\Silent_Config.ffs_batch&quot; (<BR></FONT><FONT COLOR="#808080">&nbsp;&nbsp;</FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::configuration
+ found, now execute the synchronization batch job</B></I></FONT></FONT><FONT FACE="Courier New, monospace"><BR></FONT><FONT COLOR="#808080">&nbsp;&nbsp;</FONT><FONT FACE="Courier New, monospace">&quot;C:\Program
Files\FreeFileSync\FreeFileSync.exe&quot;
- &quot;H:\Silent_Config.ffs_batch&quot;<BR>@if not errorlevel 0
- (<BR></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::if
+ &quot;H:\Silent_Config.ffs_batch&quot;<BR></FONT><FONT COLOR="#808080">&nbsp;&nbsp;</FONT><FONT FACE="Courier New, monospace">@if
+ not errorlevel 0 (<BR></FONT><FONT COLOR="#808080">&nbsp;&nbsp;&nbsp;&nbsp;</FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::if
something went wrong, start FreeFileSync in GUI
- mode</B></I></FONT></FONT><FONT FACE="Courier New, monospace"><BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE="Courier New, monospace">&quot;C:\Program
+ mode</B></I></FONT></FONT><FONT FACE="Courier New, monospace"><BR></FONT><FONT COLOR="#808080">&nbsp;&nbsp;&nbsp;&nbsp;</FONT><FONT FACE="Courier New, monospace">&quot;C:\Program
Files\FreeFileSync\FreeFileSync.exe&quot;
- &quot;H:\GUI_Config.ffs_gui&quot;<BR>)<BR>)</FONT></P>
+ &quot;H:\GUI_Config.ffs_gui&quot;<BR></FONT><FONT COLOR="#808080">&nbsp;&nbsp;</FONT><FONT FACE="Courier New, monospace">)<BR>)</FONT></P>
</SPAN><BR CLEAR=LEFT>
</P>
</UL>
diff --git a/BUILD/Help/html/advanced/RunAsService.html b/BUILD/Help/html/advanced/RunAsService.html
index ea1e4f2c..499d0d4d 100644
--- a/BUILD/Help/html/advanced/RunAsService.html
+++ b/BUILD/Help/html/advanced/RunAsService.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20100218;105200">
+ <META NAME="CHANGED" CONTENT="20100420;20042700">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -58,10 +58,8 @@ the new Service with RealtimeSync:</FONT></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Open
the Registry editor (Regedit.exe) and navigate to key
&quot;</FONT><FONT FACE="Courier New, monospace">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\&lt;ServiceName&gt;</FONT><FONT FACE="Tahoma, sans-serif">&quot;</FONT></P>
- <P STYLE="margin-bottom: 0cm"></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Add
a new key &quot;</FONT><FONT FACE="Courier New, monospace">Parameters</FONT><FONT FACE="Tahoma, sans-serif">&quot;.<BR><IMG SRC="bf02de4e-7b45-4353-97e8-85b55cff3ac5.jpeg" NAME="Grafik8" ALIGN=BOTTOM WIDTH=249 HEIGHT=101 BORDER=0></FONT></P>
- <P STYLE="margin-bottom: 0cm"></P>
<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Add
a new String value named &quot;</FONT><FONT FACE="Courier New, monospace">Application</FONT><FONT FACE="Tahoma, sans-serif">&quot;
and specify a command line that shall be executed as value.<BR><IMG SRC="RunAsService_html_m3be0f332.jpg" NAME="Grafik10" ALIGN=BOTTOM WIDTH=620 HEIGHT=58 BORDER=0></FONT></P>
@@ -72,7 +70,24 @@ the new Service with RealtimeSync:</FONT></P>
it!</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><BR>
+<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Tahoma, sans-serif"><B>Attention:</B><BR>When running
+ RealtimeSync as a service the application has no means to interact
+ with the user. Therefore any popup dialog will stop the process
+ flow! Consequently consider the following rules when setting up a
+ FreeFileSync batch job:</FONT></P>
+ <UL>
+ <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Enable
+ checkbox &quot;<I>Silent mode</I>&quot; to prevent showing a status
+ dialog at the end of the process.</FONT></P>
+ <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Set
+ &quot;<I>Error handling</I>&quot; to either &quot;<I>Exit
+ instantly</I>&quot; or &quot;<I>Ignore errors</I>&quot;.</FONT></P>
+ </UL>
+</SPAN><BR CLEAR=LEFT><BR>
+</P>
+<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The new
service can now be started via commandline or Windows Service
diff --git a/BUILD/Help/html/advanced/ShadowCopy.html b/BUILD/Help/html/advanced/ShadowCopy.html
index 09b64e6a..d726ad76 100644
--- a/BUILD/Help/html/advanced/ShadowCopy.html
+++ b/BUILD/Help/html/advanced/ShadowCopy.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20100323;22190200">
+ <META NAME="CHANGED" CONTENT="20100413;18262600">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -33,9 +33,18 @@ Copy of the source drive. To enable this feature go to </FONT><FONT FACE="Tahoma
<UL>
<P><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
- <FONT FACE="Tahoma, sans-serif"><B>Note:</B><BR>This functionality
- is applied to locked files only. Regular files will not use Volume
- Shadow Copy Service when being synchronized.</FONT></P>
+ <FONT FACE="Tahoma, sans-serif"><B>Note:</B></FONT></P>
+ <UL>
+ <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">This
+ functionality is applied to locked files only. Regular files will
+ not use Volume Shadow Copy Service when being synchronized.</FONT></P>
+ <P ALIGN=LEFT STYLE="margin-bottom: 0cm"></P>
+ </UL>
+ <UL>
+ <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal">Creating
+ Volume Snapshots using VSS requires the application to be started
+ with Administrator rights.</SPAN></FONT></P>
+ </UL>
</SPAN><BR CLEAR=LEFT>
</P>
</UL>
diff --git a/BUILD/Help/html/advanced/SymbolicLinks.html b/BUILD/Help/html/advanced/SymbolicLinks.html
index b85c6bbd..fc385f8f 100644
--- a/BUILD/Help/html/advanced/SymbolicLinks.html
+++ b/BUILD/Help/html/advanced/SymbolicLinks.html
@@ -5,7 +5,7 @@
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)">
<META NAME="CREATED" CONTENT="20091206;16574000">
- <META NAME="CHANGED" CONTENT="20091213;19145800">
+ <META NAME="CHANGED" CONTENT="20100420;21220800">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
@@ -28,46 +28,67 @@ Linux)</SPAN></FONT></H3>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync
-offers the following two advanced options contained in each
-*.ffs_gui/*.ffs_batch file to configure processing of Symbolic Links
-(also called Symlinks or Soft Links):</FONT></P>
+offers three advanced options to configure processing of Symbolic
+Links (also called Symlinks or Soft Links). They can be configured
+directly within a *.ffs_gui/ffs_batch file via a text editor. Only
+the first option is presented on GUI:</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Default
-Settings (View and edit these in the text editor of your choice):</FONT></P>
-<UL>
- <P><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
- <UL>
- <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Courier New, monospace">&lt;CopyFileSymlinks&gt;true&lt;/CopyFileSymlinks&gt;<BR>&lt;TraverseDirectorySymlinks&gt;false&lt;/TraverseDirectorySymlinks&gt;</FONT></P>
- </UL>
+<OL>
+ <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><SPAN ID="Rahmen7" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
+ <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
+ <FONT FACE="Courier New, monospace">&lt;IncludeSymlinks&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/IncludeSymlinks&gt;<BR>&lt;TraverseDirectorySymlinks&gt;true&nbsp;&lt;/TraverseDirectorySymlinks&gt;<BR>&lt;CopyFileSymlinks&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/CopyFileSymlinks&gt;</FONT></P>
</SPAN><BR CLEAR=LEFT>
</P>
+</OL>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<UL>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Enable
+ &quot;<I>Include Symbolic Links</I>&quot; in order to process
+ Symbolic Links at all, i.e. add them to the file and directory
+ listing.<BR></FONT>&nbsp;</P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">&quot;<I>Traverse
+ Directory Links</I>&quot; specifies handling of Symbolic Links to
+ directories:<BR>If this option is enabled, they are traversed like
+ ordinary directories during comparison. When synchronizing, the
+ target of the Symbolic Link will be copied. If disabled, Symbolic
+ Links are not traversed. During synchronization, copying them
+ results in a copy of the Symbolic Link.<BR></FONT>&nbsp;</P>
+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">&quot;<I>Copy
+ File Links</I>&quot; defines the behavior for copying Symbolic Links
+ pointing to files:<BR>If checked, the Symbolic Link itself will be
+ copied. If unchecked, the target of the Link will be copied instead.</FONT></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">&quot;<I>CopyFileSymlinks</I>&quot;
-defines the behavior for copying Symbolic Links pointing to files:</FONT></P>
-<P STYLE="margin-left: 2cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If
-set to <I>true</I> it copies the Symbolik Link to its destination.<BR>If
-set to <I>false</I> the target of the link, in this case a file, is
-being copied instead.</FONT></P>
+<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">On GUI
+only the first option is available for configuration, while &quot;<I>Traverse
+Directory Links</I>&quot; is implicitly enabled and </FONT><FONT FACE="Tahoma, sans-serif">&quot;</FONT><FONT FACE="Tahoma, sans-serif"><I>Copy
+File Links</I></FONT><FONT FACE="Tahoma, sans-serif">&quot; disabled.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">&quot;<I>TraverseDirectorySymlinks</I>&quot;
-specifies handling of Symbolic Links to directories:</FONT></P>
-<P STYLE="margin-left: 2cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If
-<I>true</I>, they are being traversed like regular directories during
-comparison and are copied as if they were regular directories (i.e.
-not as Symbolic Links) during synchronization.<BR>If <I>false</I> is
-selected, these Symbolic Links are not traversed at all. During
-synchronization copying them results in a direct copy of the Symbolic
-Link, not the target directory.</FONT></P>
-<P STYLE="margin-left: 2cm; margin-bottom: 0cm"><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
+<P STYLE="margin-bottom: 0cm"><IMG SRC="CmpSettings.png" NAME="Grafik1" ALIGN=BOTTOM WIDTH=292 HEIGHT=225 BORDER=0></P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
- <FONT FACE="Tahoma, sans-serif"><B>Note:</B><BR>As the link's
- content is not parsed by FreeFileSync, this usually only makes sense
- when you use relative paths within your Symolic Links.</FONT></P>
+ <FONT FACE="Tahoma, sans-serif"><B>Note:</B></FONT></P>
+ <UL>
+ <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">In
+ the Windows build the options described above always apply to
+ </FONT><FONT FACE="Tahoma, sans-serif"><I>&quot;Reparse Points&quot;</I></FONT><FONT FACE="Tahoma, sans-serif">.
+ Reparse Points are a more general concept including for example
+ Symbolic Links, Junctions and Mount Points. The term </FONT><FONT FACE="Tahoma, sans-serif"><I>&quot;Symbolic
+ Link&quot; </I></FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal">has
+ been retained nevertheless for harmonization with Linux.</SPAN></FONT></P>
+ <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal"><FONT FACE="Tahoma, sans-serif">Creating
+ or copying Symbolic Links requires the application to be started
+ with Administrator rights.</FONT></P>
+ </UL>
</SPAN><BR CLEAR=LEFT><BR>
</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
</BODY>
</HTML> \ No newline at end of file
diff --git a/BUILD/Invisible.vbs b/BUILD/Invisible.vbs
new file mode 100644
index 00000000..47c60726
--- /dev/null
+++ b/BUILD/Invisible.vbs
@@ -0,0 +1,17 @@
+set argIn = WScript.Arguments
+num = argIn.Count
+
+if num = 0 then
+ WScript.Echo "Call a batch file silently" & VbCrLf & VbCrLf &_
+ "Usage: WScript Invisible.vbs MyBatchfile.cmd <command line arguments>"
+ WScript.Quit 1
+end if
+
+argOut = ""
+for i = 0 to num - 1
+ argOut = argOut & """" & argIn.Item(i) & """ "
+next
+
+set WshShell = WScript.CreateObject("WScript.Shell")
+
+WshShell.Run argOut, 0, True \ No newline at end of file
diff --git a/BUILD/Languages/chinese_simple.lng b/BUILD/Languages/chinese_simple.lng
index a8d02a01..f3fe6dc7 100644
--- a/BUILD/Languages/chinese_simple.lng
+++ b/BUILD/Languages/chinese_simple.lng
@@ -22,8 +22,6 @@
秒
%x / %y objects deleted successfully
%x / %y 个对象被æˆåŠŸåˆ é™¤
-%x Percent
-百分之%x
%x directories
%x 目录
%x files,
@@ -34,6 +32,8 @@
%x of %y 横å‘视图
%x of 1 row in view
%x of 1 行视图
+%x%
+%x%
&Abort
å–消(&A)
&About...
@@ -86,14 +86,14 @@
é‡è¯•(&R)
&Save
ä¿å­˜(&S)
+&Switch
+切æ¢(&S)
&Yes
是(&Y)
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(请注æ„åªæœ‰FAT/FAT32分区å—此问题影å“!\n在所有其他情况下你å¯ç¦ç”¨\"忽略一å°æ—¶å·®å¼‚\"这一选项.)
(Requires an Internet connection!)
(需è¦å› ç‰¹ç½‘连接!)
-,
-.
- Other side's counterpart to %dir
- å¦ä¸€ä¾§å‚ç…§ %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- å³ä¾§
- right newer
- å³ä¾§è¾ƒæ–°
--Open-Source file synchronization-
--å¼€æºæ–‡ä»¶åŒæ­¥å™¨-
-.
-,
/sec
/秒
1 directory
@@ -168,8 +164,6 @@ About
关于
Action
动作
-Activate filter
-激活过滤器
Add folder
添加文件夹
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
至少有一个目录输入字段是空的.
Auto-adjust columns
自动调整æ å®½
-Automatic mode
-自动模å¼
Batch execution
批处ç†æ‰§è¡Œ
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
在最åŽçš„åŒæ­¥ä¹‹åŽä¸¤è¾¹å‡å·²æ”¹å˜!
Browse
æµè§ˆ
+Browse directory
+æµè§ˆç›®å½•
Build:
å¼€å‘:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
找ä¸åˆ° %x
Category
分类
+Clear filter settings
+清除过滤器设置
Comma separated list
逗å·åˆ†éš”的列表
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
通过文件大å°å’Œæ—¥æœŸæ¯”较
Compare by...
比较选项...
-Comparing content
-正在比较内容
Comparing content of files %x
正在比较文件内容的百分比 %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
创建一个批处ç†ä½œä¸š
Creating folder %x
正创建文件夹 %x
-Current operation:
-当å‰æ“作:
Custom
自定义
Customize columns
@@ -306,10 +298,6 @@ D-Click
åŒå‡»
DECISION TREE
决策树
-Data remaining:
-剩余数æ®:
-Data transferred:
-已传é€çš„æ•°æ®:
Data verification error: Source and target file have different content!
æ•°æ®æ ¡éªŒé”™è¯¯:æºæ–‡ä»¶å’Œç›®æ ‡æ–‡ä»¶å†…容ä¸åŒ!
Date
@@ -364,10 +352,14 @@ Download now?
ç«‹å³ä¸‹è½½?
Drag && drop
拖拽
+Elements found:
+已找到的元素:
+Elements processed:
+已处ç†çš„元素:
+Elements remaining:
+剩余的元素:
Email
邮箱
-Enable filter to exclude files from synchronization
-åŒæ­¥æ—¶ä½¿ç”¨è¿‡æ»¤æŽ’除文件。
Endless loop when traversing directory:
é历目录时出现无é™å¾ªçŽ¯:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
如果文件内容相åŒåˆ™è®¤ä¸ºä¸¤è€…相åŒ
Files are found equal if\n - filesize\n - last write time and date\nare the same
如果文件大å°å’Œæœ€åŽä¿®æ”¹æ—¶é—´å’Œæ—¥æœŸç›¸åŒåˆ™è®¤ä¸ºä¸¤è€…相åŒ
-Files remaining:
-剩余文件:
Files that are equal on both sides
两边文件相åŒ
-Files that exist on both sides and have different content
-两侧都有并且内容ä¸åŒçš„文件
Files that exist on both sides, left one is newer
两侧都有,左侧较新的文件
Files that exist on both sides, right one is newer
两侧都有,å³ä¾§è¾ƒæ–°çš„文件
-Files/folders found:
-找到的文件/文件夹数:
-Files/folders processed:
-已处ç†çš„文件/文件夹:
-Files/folders remaining:
-文件/文件夹剩余:
+Files that have different content
+有ä¸åŒå†…容的文件
Files/folders that exist on left side only
仅在左侧存在的文件/文件夹
Files/folders that exist on right side only
仅在å³ä¾§å­˜åœ¨çš„文件/文件夹
-Filter
-过滤
Filter files
过滤文件
-Filter has been selected
-过滤器已选择
+Filter is active
+过滤器已激活
Filter settings have changed!
过滤设置已改å˜!
Filter view
过滤查看
-Filtering is deactivated
-过滤为éžæ´»è·ƒçŠ¶æ€
+Filter: All pairs
+过滤器:所有的é…对
+Filter: Single pair
+过滤器:å•ä¸€çš„é…对
Find
查找
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
文件夹比较与åŒæ­¥
Free disk space available:
å¯ç”¨ç£ç›˜ç©ºé—´:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - 文件夹比较与åŒæ­¥
FreeFileSync Batch Job
FreeFileSync 批处ç†ä½œä¸š
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
正在生æˆæ•°æ®åº“...
Generating file list...
生æˆæ–‡ä»¶åˆ—表...
-Global filter
-全局过滤器
Global settings
全局设置
Help
@@ -578,12 +558,10 @@ Ignore errors
忽略错误
Ignore subsequent errors
忽略éšåŽçš„错误
-Ignore this error, retry or abort synchronization?
-忽略这个错误,é‡è¯•æˆ–å–消åŒæ­¥?
-Ignore this error, retry or abort?
-忽略这个错误,é‡è¯•æˆ–å–消?
Include
包括
+Include Symbolic Links
+包å«ç¬¦å·è¿žç»“
Include all rows
包括所有行
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
åˆå§‹åŒ–åŒæ­¥:
Integrate external applications into context menu. The following macros are available:
集æˆå¤–部应用程åºåˆ°å³é”®èœå•. 如下å®å¯ç”¨:
-Last synchronization not completed!
-最åŽä¸€æ¬¡åŒæ­¥æœªå®Œæˆ!
Leave as unresolved conflict
é—留为未解决的冲çª
Left
@@ -612,8 +588,6 @@ Load configuration from file
从文件加载é…ç½®
Load configuration history (press DEL to delete items)
加载é…置历å²è®°å½•(按DEL键删除项目)
-Local filter
-局部过滤器
Log-messages:
日志信æ¯:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
FreeFileSyncæ•°æ®åº“文件其中一个ä¸å­˜åœ¨:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
åªæœ‰é€šè¿‡è¿‡æ»¤çš„文件/文件夹能被选择用于åŒæ­¥. 过滤中的路径å‡ä¸ºåŒæ­¥åŸºç¡€æ–‡ä»¶å¤¹çš„相对路径.
-Open directly
-直接打开
Open with Explorer
用Explorer打开
-Open with Konqueror
-用Konqueror打开
+Open with default application
+用默认应用软件打开
Operation aborted!
æ“作已å–消!
Operation:
@@ -680,8 +652,12 @@ Pause
æš‚åœ
Paused
已暂åœ
+Planned directory deletion is in conflict with its subdirectories and -files!
+计划的目录删除与其å­ç›®å½•å’Œæ–‡ä»¶æœ‰å†²çª!
Please run a Compare first before synchronizing!
åŒæ­¥ä¹‹å‰è¯·å…ˆè¿›è¡Œå¯¹æ¯”
+Press \"Switch\" to open FreeFileSync GUI modus.
+按\"切æ¢\"å¯æ‰“å¼€FreeFileSync图形用户界é¢æ¨¡å—.
Processing folder pair:
正在处ç†æˆå¯¹æ–‡ä»¶å¤¹:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Automated Synchronization
RealtimeSync configuration
实时åŒæ­¥é…ç½®
Recycle Bin not yet supported for this system!
-
+此系统上ä¸æ”¯æŒå›žæ”¶ç«™!
Relative path
相对路径
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
删除文件夹
Remove folder pair
删除文件夹对
-Remove local filter settings
-移除局部过滤器
Renaming file %x to %y
å°† %x é‡å‘½å为 %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
选择å˜åŒ–çš„:
Set direction:
设置方å‘:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
设置默认的åŒæ­¥æ–¹å‘:旧文件会被新文件覆盖.
Show conflicts
显示冲çª
@@ -783,7 +757,7 @@ Silent mode
Size
大å°
Source code written completely in C++ utilizing:
-æºä»£ç å®Œå…¨ä½¿ç”¨C++工具编写:
+æºä»£ç ç”¨ä»¥ä¸‹å·¥å…·å®Œå…¨ä½¿ç”¨C++编写:
Source directory does not exist anymore:
æºç›®å½•å·²ç»ä¸å­˜åœ¨:
Speed:
@@ -794,10 +768,14 @@ Start synchronization
开始åŒæ­¥
Statistics
统计
+Status feedback
+状况å馈
Stop
åœæ­¢
Swap sides
两侧互æ¢
+Switching to FreeFileSync GUI modus...
+切æ¢è‡³FreeFileSync图形用户界é¢æ¨¡å—...
Synchronization Preview
åŒæ­¥é¢„览
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
åŒæ­¥çŠ¶æ€
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
åŒæ­¥æ‰€æœ‰ .doc, .zipå’Œ .exe 文件, 除了\"temp\"中的一切.
-Synchronize both sides using a database. Deletions are detected automatically
-使用数æ®åº“åŒæ­¥ä¸¤ä¾§. 删除会被自动检测到
Synchronize...
åŒæ­¥...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
有如下情况时此命令行会执行:\n- 一个文件夹å˜æˆå¯ç”¨æ—¶(例如:æ’å…¥U盘)\n- 这些文件夹或其å­æ–‡ä»¶å¤¹ä¸­çš„文件被改动
The file does not contain a valid configuration:
该文件ä¸åŒ…å«æœ‰æ•ˆçš„é…ç½®:
+The file was not processed by last synchronization!
+此文件在最åŽä¸€æ¬¡åŒæ­¥ä¸­æœªè¢«å¤„ç†!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
æ­¤å˜åŒ–评估两个文件å相åŒçš„文件,åªæœ‰å½“他们有åŒæ ·çš„文件大å°å¹¶ä¸”最åŽä¿®æ”¹æ—¥æœŸå’Œæ—¶é—´ä¹Ÿç›¸åŒ\næ—¶æ‰è®¤ä¸ºå®ƒä»¬æ˜¯ç›¸åŒçš„.
Time
@@ -868,6 +846,8 @@ Verifying file %x
校验文件 %x
Volume name %x not part of filename %y!
å·å %x 并éžæ–‡ä»¶å %y 的一部分!
+Waiting for all directories to become available...
+等待所有目录转为å¯ç”¨çŠ¶æ€...
Warning
警告
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/chinese_traditional.lng b/BUILD/Languages/chinese_traditional.lng
index b4e69adc..5c03027b 100644
--- a/BUILD/Languages/chinese_traditional.lng
+++ b/BUILD/Languages/chinese_traditional.lng
@@ -22,8 +22,6 @@
秒
%x / %y objects deleted successfully
%x / %y 個物件已删除æˆåŠŸ
-%x Percent
-百分之 %x
%x directories
%x 目錄
%x files,
@@ -34,6 +32,8 @@
顯示 %y 之 %x 行
%x of 1 row in view
顯示 1 之 %x 行
+%x%
+
&Abort
å–消(&A)
&About...
@@ -86,14 +86,14 @@
é‡è©¦(&R)
&Save
儲存(&S)
+&Switch
+
&Yes
是
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(請注æ„åªæœ‰ FAT/FAT32 ç£ç¢Ÿæ©Ÿæœƒå—到此å•é¡Œçš„影響ï¼\n在所有其他狀æ³ä¸‹ï¼Œå¯ä»¥é—œé–‰é€™å€‹è¨­å®š\"忽略1å°æ™‚的誤差\"。)
(Requires an Internet connection!)
(需è¦é€£æŽ¥åˆ°ç¶²éš›ç¶²è·¯ï¼)
-,
-.
- Other side's counterpart to %dir
- å¦ä¸€é‚Šå°æ‡‰åˆ° %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- å³é‚Š
- right newer
- å³é‚Šè¼ƒæ–°
--Open-Source file synchronization-
--開放原始碼檔案åŒæ­¥-
-.
-,
/sec
/秒
1 directory
@@ -168,8 +164,6 @@ About
關於
Action
動作
-Activate filter
-啟動篩é¸å™¨
Add folder
新增資料夾
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
至少有一個目錄輸入欄ä½æ˜¯ç©ºçš„。
Auto-adjust columns
自動調整欄寬
-Automatic mode
-自動模å¼
Batch execution
批次處ç†åŸ·è¡Œ
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
自上次åŒæ­¥å¾Œï¼Œå…©é‚Šå‡å·²æ›´æ”¹éŽï¼
Browse
ç€è¦½
+Browse directory
+
Build:
建立:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
找ä¸åˆ° %x
Category
分類
+Clear filter settings
+
Comma separated list
逗號分隔清單
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
以檔案大å°å’Œæ—¥æœŸæ¯”å°
Compare by...
比å°é¸é …...
-Comparing content
-正在比å°å†…容
Comparing content of files %x
正在比å°æª”案内容的百分比 %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
新建一個批次處ç†ä½œæ¥­
Creating folder %x
正在新建資料夾 %x
-Current operation:
-ç›®å‰æ“作:
Custom
自訂
Customize columns
@@ -306,10 +298,6 @@ D-Click
點兩下
DECISION TREE
決策樹
-Data remaining:
-剩餘資料:
-Data transferred:
-已傳輸資料:
Data verification error: Source and target file have different content!
資料驗證錯誤:來æºå’Œç›®çš„檔案內容ä¸åŒï¼
Date
@@ -364,10 +352,14 @@ Download now?
è¦ç«‹å³ä¸‹è¼‰å—Žï¼Ÿ
Drag && drop
拖放
+Elements found:
+
+Elements processed:
+
+Elements remaining:
+
Email
ä¿¡ç®±
-Enable filter to exclude files from synchronization
-啟用篩é¸å™¨å¾žåŒæ­¥ä¸­æŽ’除檔案
Endless loop when traversing directory:
當é歷目錄時無é™å¾ªç’°ï¼š
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
如果檔案内容相åŒå‰‡åˆ¤æ–·å…©è€…相åŒ
Files are found equal if\n - filesize\n - last write time and date\nare the same
如果檔案大å°å’Œæœ€å¾Œä¿®æ”¹æ™‚間和日期相åŒå‰‡åˆ¤æ–·å…©è€…相åŒ
-Files remaining:
-剩餘檔案:
Files that are equal on both sides
兩邊相åŒçš„檔案
-Files that exist on both sides and have different content
-檔案存在於兩邊而且內容ä¸åŒ
Files that exist on both sides, left one is newer
檔案存在於兩邊,左邊檔案較新
Files that exist on both sides, right one is newer
檔案存在於兩邊,å³é‚Šæª”案較新
-Files/folders found:
-找到的檔案/資料夾:
-Files/folders processed:
-已處ç†çš„檔案/資料夾:
-Files/folders remaining:
-剩餘的檔案/資料夾:
+Files that have different content
+
Files/folders that exist on left side only
åªå­˜åœ¨æ–¼å·¦é‚Šçš„檔案/資料夾
Files/folders that exist on right side only
åªå­˜åœ¨æ–¼å³é‚Šçš„檔案/資料夾
-Filter
-篩é¸å™¨
Filter files
篩é¸æª”案
-Filter has been selected
-å·²é¸æ“‡ç¯©é¸å™¨
+Filter is active
+
Filter settings have changed!
篩é¸å™¨è¨­å®šå·²æ›´æ”¹ï¼
Filter view
篩é¸æª¢è¦–
-Filtering is deactivated
-篩é¸å·²åœç”¨
+Filter: All pairs
+
+Filter: Single pair
+
Find
尋找
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
資料夾比å°å’ŒåŒæ­¥
Free disk space available:
å¯ç”¨çš„ç£ç¢Ÿç©ºé–“:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - 資料夾比å°å’ŒåŒæ­¥
FreeFileSync Batch Job
FreeFileSync 批次處ç†ä½œæ¥­
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
產生資料庫...
Generating file list...
產生檔案清單...
-Global filter
-整體性篩é¸å™¨
Global settings
整體設定
Help
@@ -578,12 +558,10 @@ Ignore errors
忽略錯誤
Ignore subsequent errors
忽略後續錯誤
-Ignore this error, retry or abort synchronization?
-忽略此錯誤ã€é‡è©¦æˆ–中止åŒæ­¥å—Žï¼Ÿ
-Ignore this error, retry or abort?
-忽略此錯誤ã€é‡è©¦æˆ–中止嗎?
Include
包括
+Include Symbolic Links
+
Include all rows
包括所有行
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
åˆå§‹åŒ–åŒæ­¥ï¼š
Integrate external applications into context menu. The following macros are available:
æ•´åˆä¸Šä¸‹æ–‡åŠŸèƒ½è¡¨ä¸­çš„外部應用程å¼ã€‚å¯ä»¥ä½¿ç”¨ä¸‹é¢çš„巨集:
-Last synchronization not completed!
-最後一次åŒæ­¥æœªå®Œæˆï¼
Leave as unresolved conflict
ä¿ç•™çµ¦æœªè§£æ±ºçš„è¡çª
Left
@@ -612,8 +588,6 @@ Load configuration from file
從檔案載入é…ç½®
Load configuration history (press DEL to delete items)
載入é…置的歷å²è¨˜éŒ„(按DELéµåˆªé™¤é …ç›®)
-Local filter
-局部性篩é¸å™¨
Log-messages:
日誌訊æ¯ï¼š
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
其中一個 FreeFileSync 資料庫檔案ä¸å­˜åœ¨ï¼š
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
åªæœ‰è¢«é¸ä¸­ç¯©é¸çš„檔案/目錄會進行åŒæ­¥ã€‚篩é¸å™¨å°‡å¥—用到基本åŒæ­¥ç›®éŒ„的相å°å稱。
-Open directly
-直接開啟
Open with Explorer
使用檔案總管開啟
-Open with Konqueror
-使用 Konqueror 開啟
+Open with default application
+
Operation aborted!
中止æ“作ï¼
Operation:
@@ -680,8 +652,12 @@ Pause
æš«åœ
Paused
已暫åœ
+Planned directory deletion is in conflict with its subdirectories and -files!
+
Please run a Compare first before synchronizing!
請執行åŒæ­¥å‰å…ˆæ¯”å°ï¼
+Press \"Switch\" to open FreeFileSync GUI modus.
+
Processing folder pair:
處ç†å…©å€‹è³‡æ–™å¤¾ï¼š
Published under the GNU General Public License:
@@ -706,8 +682,6 @@ Remove folder
移除資料夾
Remove folder pair
移除兩個資料夾
-Remove local filter settings
-移除局部性篩é¸å™¨è¨­å®š
Renaming file %x to %y
檔案é‡æ–°å‘½å %x 為 %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
é¸æ“‡è®Šæ•¸ï¼š
Set direction:
設定方å‘:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
設定é è¨­åŒæ­¥æ–¹å‘:舊檔案會被較新的檔案覆蓋。
Show conflicts
顯示è¡çª
@@ -794,10 +768,14 @@ Start synchronization
開始åŒæ­¥
Statistics
統計
+Status feedback
+
Stop
åœæ­¢
Swap sides
兩邊交æ›
+Switching to FreeFileSync GUI modus...
+
Synchronization Preview
åŒæ­¥é è¦½
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
åŒæ­¥ç‹€æ…‹
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
åŒæ­¥æ‰€æœ‰ .doc, .zip å’Œ .exe 檔案,除了\"temp\"中的一切。
-Synchronize both sides using a database. Deletions are detected automatically
-é›™å‘åŒæ­¥ä½¿ç”¨ä¸€å€‹è³‡æ–™åº«ã€‚自動檢測è¦åˆªé™¤çš„檔案
Synchronize...
åŒæ­¥...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
命令列æ¯æ¬¡åŸ·è¡Œï¼š\n- å¯ç”¨çš„目錄(例如æ’å…¥USB隨身碟)\n- 檔案在這些目錄或å­ç›®éŒ„會被修改
The file does not contain a valid configuration:
該檔案ä¸åŒ…å«æœ‰æ•ˆçš„é…置:
+The file was not processed by last synchronization!
+
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
此變數計算çµæžœç‚ºå…©å€‹æª”å相åŒçš„檔案,åªæœ‰ç•¶ä»–們的檔案大å°å’Œæœ€å¾Œä¿®æ”¹æ—¥æœŸæ™‚間也相åŒï¼Œæ‰æœƒåˆ¤æ–·ä»–們是相åŒçš„檔案。
Time
@@ -868,6 +846,8 @@ Verifying file %x
驗證檔 %x
Volume name %x not part of filename %y!
å·å %x 並éžæª”å %y 的一部份ï¼
+Waiting for all directories to become available...
+
Warning
警告
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/czech.lng b/BUILD/Languages/czech.lng
index a5ea8e98..c88b97b3 100644
--- a/BUILD/Languages/czech.lng
+++ b/BUILD/Languages/czech.lng
@@ -22,8 +22,6 @@
s
%x / %y objects deleted successfully
%x / %y objektů úspěšně smazáno
-%x Percent
-%x procent
%x directories
adresářů: %x
%x files,
@@ -34,6 +32,8 @@ souborů: %x;
%x z %y řádků
%x of 1 row in view
%x z 1 řádku
+%x%
+%x%
&Abort
&Přerušit
&About...
@@ -86,14 +86,14 @@ U&konÄit
&Opakovat
&Save
&Uložit
+&Switch
+&Přepnout
&Yes
&Ano
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Platí pouze pro souborové systémy FAT/FAT32. V ostatních případech můžete nastavení \"Ignorovat 1 hodinu rozdílu v Äase mezi soubory\" nechat vypnuté.)
(Requires an Internet connection!)
(Vyžaduje připojení k internetu!)
-,
-
- Other side's counterpart to %dir
- pouze cesta z opaÄného panelu
- Other side's counterpart to %name
@@ -122,10 +122,6 @@ U&konÄit
- vpravo
- right newer
- vpravo novější
--Open-Source file synchronization-
--synchronizace souborů Open-Source-
-.
-,
/sec
/s
1 directory
@@ -168,8 +164,6 @@ About
O Programu
Action
Akce
-Activate filter
-Povolit filtr
Add folder
Přidat adresář
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Alespoň jedno zadání adresáře je prázdné.
Auto-adjust columns
Automaticky přizpůsobit šířku
-Automatic mode
-Automatický mód
Batch execution
Spuštění dávky
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Došlo ke změně obou stran od poslední synchronizace!
Browse
Procházet
+Browse directory
+Procházet adresář
Build:
Build:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Nelze najít %x
Category
Kategorie
+Clear filter settings
+Smazat nastavení filtru
Comma separated list
Text oddÄ›lený Äárkami
Command line
@@ -217,7 +213,7 @@ Příkazová řádka
Command line is empty!
Příkazová řádka je prázdná!
Compare
-Porovnat
+Porovnání
Compare both sides
Porovnat obÄ› strany
Compare by \"File content\"
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Porovnat \"podle velikosti a data souboru\"
Compare by...
Porovnat ...
-Comparing content
-Porovnání obsahu
Comparing content of files %x
Porovnávání obsahu souborů %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Vytvořit dávku
Creating folder %x
Vytváření adresáře %x
-Current operation:
-Aktuální operace:
Custom
Vlastní
Customize columns
@@ -306,10 +298,6 @@ D-Click
Dvojklik
DECISION TREE
ROZHODOVÃNÃ
-Data remaining:
-Zbývá dat:
-Data transferred:
-Přeneseno dat:
Data verification error: Source and target file have different content!
Chyba verifikace dat: Zdrojový a cílový soubor mají rozdílný obsah!
Date
@@ -364,10 +352,14 @@ Download now?
Stáhnout nyní?
Drag && drop
Drag && Drop
+Elements found:
+Nalezeno položek:
+Elements processed:
+Zpracováno položek:
+Elements remaining:
+Zbývá položek:
Email
Email
-Enable filter to exclude files from synchronization
-Povolit filtr pro vynechání souborů ze synchronizace
Endless loop when traversing directory:
Zacyklení při procházení adresáře:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Soubory jsou shodné jestliže\n - obsah souboru\nje stejný
Files are found equal if\n - filesize\n - last write time and date\nare the same
Soubory jsou shodné jestliže\n - velikost souboru\n - datum i Äas poslední zmÄ›ny\njsou stejné
-Files remaining:
-Zbývá souborů:
Files that are equal on both sides
Soubory shodné na obou stranách
-Files that exist on both sides and have different content
-Soubory, které existují na obou stranách a liší se obsahem
Files that exist on both sides, left one is newer
Soubory, které existují na obou stranách, z nichž vlevo je novější
Files that exist on both sides, right one is newer
Soubory, které existují na obou stranách, z nichž vpravo je novější
-Files/folders found:
-Nalezené soubory/adresáře:
-Files/folders processed:
-Zpracované soubory/adresáře:
-Files/folders remaining:
-Zbývá souborů/adresářů:
+Files that have different content
+Soubory, které mají rozdílný obsah
Files/folders that exist on left side only
Soubory/adresáře, které existují pouze vlevo
Files/folders that exist on right side only
Soubory/adresáře, které existují pouze vpravo
-Filter
-Filtr
Filter files
-Filtrovat soubory
-Filter has been selected
-Filtr je zapnut
+Filtr souborů
+Filter is active
+Filtr je zapnutý
Filter settings have changed!
Nastavení filtru bylo změněno!
Filter view
Filtrovat seznam
-Filtering is deactivated
-Filtr je vypnut
+Filter: All pairs
+Filtr: Všechny páry
+Filter: Single pair
+Filtr: Jeden pár
Find
Najít
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Porovnání a Synchronizace adresářů
Free disk space available:
Volné místo k dispozici:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Porovnání a Synchronizace adresářů
FreeFileSync Batch Job
FreeFileSync Dávkové zpracování
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Vytváření databáze...
Generating file list...
Vytváření seznamu souborů...
-Global filter
-Globální filtr
Global settings
Nastavení programu
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignorovat chyby
Ignore subsequent errors
Ignorovat další chyby
-Ignore this error, retry or abort synchronization?
-Ignorovat chybu, opakovat nebo přerušit synchronizaci.
-Ignore this error, retry or abort?
-Ignorovat chybu, opakovat nebo přerušit?
Include
Přidat
+Include Symbolic Links
+Zahrnout symboliké odkazy
Include all rows
Použít všechny řádky
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Prvotní synchronizace:
Integrate external applications into context menu. The following macros are available:
Integrace externí aplikace do kontextového menu. K dispozici jsou následující makra:
-Last synchronization not completed!
-Poslední synchronizace nebyla dokonÄena!
Leave as unresolved conflict
Ponechat jako nevyřešený konflikt
Left
@@ -612,8 +588,6 @@ Load configuration from file
NaÄíst konfiguraci ze souboru
Load configuration history (press DEL to delete items)
NaÄíst historii konfigurace (pomocí DEL můžete položku smazat)
-Local filter
-Místní filtr
Log-messages:
Záznamy:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Některý z databázových souborů FreeFileSync neexistuje:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Pouze soubory/adresáře odpovídající nastavenému filtru budou vybrány pro synchronizaci. Filtr je aplikován relativně(!) k cestě synchronizovaných adresářů.
-Open directly
-Otevřít přímo
Open with Explorer
Otevřít v Průzkumníkovi
-Open with Konqueror
-Otevřít v ProhlížeÄi
+Open with default application
+Otevřít výchozí aplikací
Operation aborted!
Operace zrušena!
Operation:
@@ -680,8 +652,12 @@ Pause
Pauza
Paused
Pauza
+Planned directory deletion is in conflict with its subdirectories and -files!
+Naplánované smazání adresáře je v konfliktu s podadresáři a/nebo soubory!
Please run a Compare first before synchronizing!
Prosím proveÄte nejdřív porovnání pÅ™ed synchronizací!
+Press \"Switch\" to open FreeFileSync GUI modus.
+TalÄítkem \"PÅ™epnout\" otevÅ™ete okno FreeFileSync.
Processing folder pair:
Zpracovávání adresářové páru:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Automatická synchronizace
RealtimeSync configuration
Konfigurace RealtimeSync
Recycle Bin not yet supported for this system!
-
+Koš není na tomto systému zatím podporován!
Relative path
Relativní cesta
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Odstranit adresář
Remove folder pair
Odstranit dvojici adresářů
-Remove local filter settings
-Odstranit nastavení místního filtru
Renaming file %x to %y
Přejmenovávání souboru %x na %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Vyberte variantu:
Set direction:
Nastavit asresář:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Nastaven výchozí způsob synchronizace: Staré soubory budou nahrazeny novými.
Show conflicts
Zobrazit konflikty
@@ -794,10 +768,14 @@ Start synchronization
Start synchronizace
Statistics
Statistika
+Status feedback
+Běh programu
Stop
Stop
Swap sides
Změna stran
+Switching to FreeFileSync GUI modus...
+Otevírání okna FreeFileSync...
Synchronization Preview
Náhled synchronizace
Synchronization aborted!
@@ -812,10 +790,8 @@ Synchronization status
Stav synchronizace
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Synchronizovat všechny soubory .doc, .zip a .exe s výjimkou všeho v podadresáři \"temp\"
-Synchronize both sides using a database. Deletions are detected automatically
-Synchronizovat obÄ› strany pomocí databáze. Mazání je urÄeno automaticky
Synchronize...
-Synchronizace...
+Synchronizace
Synchronizing...
Synchronizuji...
System out of memory!
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Příkazová řádka je spuštěna pokaždé když:\n- je k dispozici daný adresář (např. vložením USB disku)\n- dojde ke změně souborů v adresáři nebo podadresářích
The file does not contain a valid configuration:
Soubor neobsahuje platnou konfiguraci:
+The file was not processed by last synchronization!
+Soubor nebyl poslední synchronizací zpracován!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Tato varianta vyhodnotí dva stejnÄ› pojmenované soubory jako shodné pokud mají i stejnou velikost A ZÃROVEŇ i datum a Äas poslední zmÄ›ny.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Kontroluji soubor %x
Volume name %x not part of filename %y!
Disk %x není souÄástí jména souboru %y!
+Waiting for all directories to become available...
+Čekání na zpřístupnění všech adresářů...
Warning
Varování
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/dutch.lng b/BUILD/Languages/dutch.lng
index 78af082b..c0cff493 100644
--- a/BUILD/Languages/dutch.lng
+++ b/BUILD/Languages/dutch.lng
@@ -22,8 +22,6 @@
sec
%x / %y objects deleted successfully
%x / %y objecten succesvol verwijderd
-%x Percent
-%x procent
%x directories
%x paden
%x files,
@@ -34,6 +32,8 @@
%x van de %y rijen in zicht
%x of 1 row in view
%x van 1 rij in zicht
+%x%
+
&Abort
&Afbreken
&About...
@@ -86,14 +86,14 @@
&Opnieuw proberen
&Save
&Opslaan
+&Switch
+
&Yes
&Ja
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Alleen FAT/FAT32 schijven hebben last van dit probleem!\nIn alle andere gevallen kunt u deze instelling uitschakelen \"negeer 1-uur tijdsverschil\".)
(Requires an Internet connection!)
(Vereist een internetverbinding)
-,
-.
- Other side's counterpart to %dir
- Tegenhander andere kant naar %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- rechts
- right newer
- rechts is nieuwer
--Open-Source file synchronization-
--Open-Source bestandssynchronisatie-
-.
-,
/sec
/sec
1 directory
@@ -168,8 +164,6 @@ About
Informatie
Action
Actie
-Activate filter
-Activeer filter
Add folder
Map toevoegen
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Er is minimaal één locatie-veld leeg.
Auto-adjust columns
Kolommen automatisch aanpassen
-Automatic mode
-Automatische modus
Batch execution
Batch taak uitvoeren
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Beide zijden zijn veranderd sinds de laatste synchronisatie!
Browse
Map opzoeken
+Browse directory
+
Build:
Gebouwd:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Category
Categorie
+Clear filter settings
+
Comma separated list
Komma gescheiden lijst
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Vergelijk met \"bestandsgrootte en -datum\"
Compare by...
Vergelijk met...
-Comparing content
-Vergelijken van inhoud
Comparing content of files %x
De inhoud van %x bestanden wordt vergeleken
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Creëer batchjob
Creating folder %x
Map %x wordt aangemaakt
-Current operation:
-Huidige operatie:
Custom
Eigen regels
Customize columns
@@ -306,10 +298,6 @@ D-Click
Dubbele klik
DECISION TREE
BESLISSINGSBOOM
-Data remaining:
-Resterende data:
-Data transferred:
-
Data verification error: Source and target file have different content!
Dataverificatie-fout: Bron en doelbestand hebben verschillende inhoud!
Date
@@ -364,10 +352,14 @@ Download now?
Nu downloaden?
Drag && drop
Drag en drop
+Elements found:
+
+Elements processed:
+
+Elements remaining:
+
Email
E-mail
-Enable filter to exclude files from synchronization
-Filter gebruiken om bestanden uit te sluiten van synchronisatie
Endless loop when traversing directory:
Oneindige lus bij het nalopen van locatie:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Bestanden worden gelijk beschouwd als,\n - de inhoud\novereenkomt
Files are found equal if\n - filesize\n - last write time and date\nare the same
Bestanden worden gelijk beschouwd als,\n - de grootte\n - datum en tijdstip van de laatste wijziging\novereenkomt
-Files remaining:
-Resterende bestanden:
Files that are equal on both sides
Bestanden die aan beide kanten gelijk zijn
-Files that exist on both sides and have different content
-Bestanden die aan beide kanten bestaan maar een verschillende inhoud hebben
Files that exist on both sides, left one is newer
Bestanden die aan beide kanten bestaan, maar waarvan de linkerkant nieuwer is
Files that exist on both sides, right one is newer
Bestanden die aan beide kanten bestaan, maar waarvan de rechterkant nieuwer is
-Files/folders found:
-Gevonden bestanden/mappen:
-Files/folders processed:
+Files that have different content
-Files/folders remaining:
-Resterende bestanden/mappen:
Files/folders that exist on left side only
Bestanden/mappen die alleen aan de linkerkant bestaan
Files/folders that exist on right side only
Bestanden/mappen die alleen aan de rechterkant bestaan
-Filter
-Filter
Filter files
Filter bestanden
-Filter has been selected
-Filter is geselecteerd
+Filter is active
+
Filter settings have changed!
Filter instellingen opgeslagen!
Filter view
Bekijk het filter
-Filtering is deactivated
-Filteren is uitgeschakeld
+Filter: All pairs
+
+Filter: Single pair
+
Find
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Mappen vergelijken en synchroniseren
Free disk space available:
Beschikbare vrije schijfruimte :
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Mappen vergelijken en synchroniseren
FreeFileSync Batch Job
FreeFileSync batchjob
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Database genereren...
Generating file list...
Bestandslijst genereren...
-Global filter
-Algemeen filter
Global settings
Algemene instellingen
Help
@@ -578,12 +558,10 @@ Ignore errors
Negeer foutmeldingen
Ignore subsequent errors
Negeer verdere foutmeldingen
-Ignore this error, retry or abort synchronization?
-Negeer deze fout, opnieuw proberen of afbreken van deze synchronisatie?
-Ignore this error, retry or abort?
-Negeer deze fout, opnieuw proberen of de handeling afbreken?
Include
Gebruiken
+Include Symbolic Links
+
Include all rows
Alle rijen gebruiken
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Initiële synchronisatie:
Integrate external applications into context menu. The following macros are available:
Integreer externe applicaties in het context menu. De volgende macros zijn beschikbaar:
-Last synchronization not completed!
-
Leave as unresolved conflict
Beschouwen als onopgelost conflict
Left
@@ -612,8 +588,6 @@ Load configuration from file
Laad configuratie uit bestand
Load configuration history (press DEL to delete items)
Laad configuratiegeschiedenis (druk op DEL om items te verwijderen)
-Local filter
-Lokaal filter
Log-messages:
Logberichten:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Alleen bestanden /locatie die niet worden gefilterd zullen worden gesynchroniseerd. Het filter word toegepast op de relatieve(!) naam van de basislocatie van de synchronisatie.
-Open directly
-Direct openen
Open with Explorer
Openen met Explorer
-Open with Konqueror
-Openen met Konqueror
+Open with default application
+
Operation aborted!
Operatie afgebroken!
Operation:
@@ -680,8 +652,12 @@ Pause
Pause
Paused
Gepauseerd
+Planned directory deletion is in conflict with its subdirectories and -files!
+
Please run a Compare first before synchronizing!
Voer eerst een Vergelijking uit voordat u synchroniseerd.
+Press \"Switch\" to open FreeFileSync GUI modus.
+
Processing folder pair:
Verwerken van gekoppelde folder:
Published under the GNU General Public License:
@@ -706,8 +682,6 @@ Remove folder
Verwijder map
Remove folder pair
Verwijder 1 paar gekoppelde mappen
-Remove local filter settings
-Verwijder lokale filter instellingen
Renaming file %x to %y
Hernoemen van bestand %x naar %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Selecteer een variant:
Set direction:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Show conflicts
Geef conflicten weer
@@ -794,10 +768,14 @@ Start synchronization
Start synchroniseren
Statistics
Statistieken
+Status feedback
+
Stop
Stop
Swap sides
Wissel zijdes
+Switching to FreeFileSync GUI modus...
+
Synchronization Preview
Synchronisatie voorbeeldweergave
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Synchronisatie: status
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Synchroniseer alle .doc, .zip en .exe bestanden uitgezonderd alles in submap \"temp\"
-Synchronize both sides using a database. Deletions are detected automatically
-Synchroniseer beide zijdes met gebruik van een database. Verwijderde bestanden worden automatisch opgemerkt
Synchronize...
Synchroniseer...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
The file does not contain a valid configuration:
Het bestand bevat geen geldige configuratie:
+The file was not processed by last synchronization!
+
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Deze variant ziet twee gelijknamige bestanden als gelijk wanneer ze dezelfde bestandsgrootte EN tijdstempel hebben.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Verifiëren bestand %x
Volume name %x not part of filename %y!
Volume naam %x maakt niet deel uit van bestandsnaam %y!
+Waiting for all directories to become available...
+
Warning
Attentie
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/english_uk.lng b/BUILD/Languages/english_uk.lng
index ff59c909..af174b6b 100644
--- a/BUILD/Languages/english_uk.lng
+++ b/BUILD/Languages/english_uk.lng
@@ -22,8 +22,6 @@
sec
%x / %y objects deleted successfully
%x / %y objects deleted successfully
-%x Percent
-%x Percent
%x directories
%x directories
%x files,
@@ -34,6 +32,8 @@
%x of %y rows in view
%x of 1 row in view
%x of 1 row in view
+%x%
+%x%
&Abort
&Abort
&About...
@@ -86,14 +86,14 @@
&Retry
&Save
&Save
+&Switch
+&Switch
&Yes
&Yes
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Requires an Internet connection!)
(Requires an Internet connection!)
-,
-,
- Other side's counterpart to %dir
- Other side's counterpart to %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- right
- right newer
- right newer
--Open-Source file synchronization-
--Open-Source file synchronisation-
-.
-.
/sec
/sec
1 directory
@@ -168,8 +164,6 @@ About
About
Action
Action
-Activate filter
-Activate filter
Add folder
Add folder
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
At least one directory input field is empty.
Auto-adjust columns
Auto-adjust columns
-Automatic mode
-Automatic mode
Batch execution
Batch execution
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Both sides have changed since last synchronisation!
Browse
Browse
+Browse directory
+Browse directory
Build:
Build:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Cannot find %x
Category
Category
+Clear filter settings
+Clear filter settings
Comma separated list
Comma separated list
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Compare by \"File size and date\"
Compare by...
Compare by...
-Comparing content
-Comparing content
Comparing content of files %x
Comparing content of files %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Create a batch job
Creating folder %x
Creating folder %x
-Current operation:
-Current operation:
Custom
Custom
Customize columns
@@ -306,10 +298,6 @@ D-Click
D-Click
DECISION TREE
DECISION TREE
-Data remaining:
-Data remaining:
-Data transferred:
-Data transferred:
Data verification error: Source and target file have different content!
Data verification error: Source and target file have different content!
Date
@@ -364,10 +352,14 @@ Download now?
Download now?
Drag && drop
Drag && drop
+Elements found:
+Elements found:
+Elements processed:
+Elements processed:
+Elements remaining:
+Elements remaining:
Email
E-mail
-Enable filter to exclude files from synchronization
-Enable filter to exclude files from synchronisation
Endless loop when traversing directory:
Endless loop when traversing directory:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Files are found equal if\n - file content\nis the same
Files are found equal if\n - filesize\n - last write time and date\nare the same
Files are found equal if\n - filesize\n - last write time and date\nare the same
-Files remaining:
-Files remaining:
Files that are equal on both sides
Files that are equal on both sides
-Files that exist on both sides and have different content
-Files that exist on both sides and have different content
Files that exist on both sides, left one is newer
Files that exist on both sides, left one is newer
Files that exist on both sides, right one is newer
Files that exist on both sides, right one is newer
-Files/folders found:
-Files/folders found:
-Files/folders processed:
-Files/folders processed:
-Files/folders remaining:
-Files/folders remaining:
+Files that have different content
+Files that have different content
Files/folders that exist on left side only
Files/folders that exist on left side only
Files/folders that exist on right side only
Files/folders that exist on right side only
-Filter
-Filter
Filter files
Filter files
-Filter has been selected
-Filter has been selected
+Filter is active
+Filter is active
Filter settings have changed!
Filter settings have changed!
Filter view
Filter view
-Filtering is deactivated
-Filtering is deactivated
+Filter: All pairs
+Filter: All pairs
+Filter: Single pair
+Filter: Single pair
Find
Find
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Folder Comparison and Synchronisation
Free disk space available:
Free disk space available:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Folder Comparison and Synchronisation
FreeFileSync Batch Job
FreeFileSync Batch Job
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Generating database...
Generating file list...
Generating file list...
-Global filter
-Global filter
Global settings
Global settings
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignore errors
Ignore subsequent errors
Ignore subsequent errors
-Ignore this error, retry or abort synchronization?
-Ignore this error, retry or abort synchronisation?
-Ignore this error, retry or abort?
-Ignore this error, retry or abort?
Include
Include
+Include Symbolic Links
+Include Symbolic Links
Include all rows
Include all rows
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Initial synchronisation:
Integrate external applications into context menu. The following macros are available:
Integrate external applications into context menu. The following macros are available:
-Last synchronization not completed!
-Last synchronisation not completed!
Leave as unresolved conflict
Leave as unresolved conflict
Left
@@ -612,8 +588,6 @@ Load configuration from file
Load configuration from file
Load configuration history (press DEL to delete items)
Load configuration history (press DEL to delete items)
-Local filter
-Local filter
Log-messages:
Log-messages:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
One of the FreeFileSync database files is not yet existing:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Only files/directories that pass filtering will be selected for synchronisation. The filter will be applied to the name relative(!) to the base synchronisation directories.
-Open directly
-Open directly
Open with Explorer
Open with Explorer
-Open with Konqueror
-Open with Konqueror
+Open with default application
+Open with default application
Operation aborted!
Operation aborted!
Operation:
@@ -680,8 +652,12 @@ Pause
Pause
Paused
Paused
+Planned directory deletion is in conflict with its subdirectories and -files!
+Planned directory deletion is in conflict with its subdirectories and -files!
Please run a Compare first before synchronizing!
Please run a Compare first before synchronising!
+Press \"Switch\" to open FreeFileSync GUI modus.
+Press \"Switch\" to open FreeFileSync GUI modus.
Processing folder pair:
Processing folder pair:
Published under the GNU General Public License:
@@ -706,8 +682,6 @@ Remove folder
Remove folder
Remove folder pair
Remove folder pair
-Remove local filter settings
-Remove local filter settings
Renaming file %x to %y
Renaming file %x to %y
Report translation error
@@ -740,8 +714,8 @@ Select variant:
Select variant:
Set direction:
Set direction:
-Setting default synchronization directions: Old files will be overwritten by newer files.
-Setting default synchronisation directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Show conflicts
Show conflicts
Show files that are different
@@ -794,10 +768,14 @@ Start synchronization
Start synchronisation
Statistics
Statistics
+Status feedback
+Status feedback
Stop
Stop
Swap sides
Swap sides
+Switching to FreeFileSync GUI modus...
+Switching to FreeFileSync GUI modus...
Synchronization Preview
Synchronisation Preview
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Synchronisation status
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Synchronise all .doc, .zip and .exe files except everything in subfolder \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Synchronise both sides using a database. Deletions are detected automatically
Synchronize...
Synchronise...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
The command line is executed each time:\n- a directory becomes available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified
The file does not contain a valid configuration:
The file does not contain a valid configuration:
+The file was not processed by last synchronization!
+The file was not processed by last synchronisation!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Verifying file %x
Volume name %x not part of filename %y!
Volume name %x not part of filename %y!
+Waiting for all directories to become available...
+Waiting for all directories to become available...
Warning
Warning
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/finnish.lng b/BUILD/Languages/finnish.lng
index 968f34c6..2c134237 100644
--- a/BUILD/Languages/finnish.lng
+++ b/BUILD/Languages/finnish.lng
@@ -22,8 +22,6 @@
Sek.
%x / %y objects deleted successfully
%x / %y Kohteiden poisto onnistui
-%x Percent
-%x Prosenttia
%x directories
%x hakemistoja
%x files,
@@ -34,6 +32,8 @@
%x riviä %y rivistä näytössä
%x of 1 row in view
%x 1 rivistä näytössä
+%x%
+%x%
&Abort
&Keskeytä
&About...
@@ -86,14 +86,14 @@ Asetusten &lataus...
&Uudestaan
&Save
&Tallenna
+&Switch
+&Vaihda
&Yes
&Kyllä
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(HUOM: Tämä ongelma vaikuttaa vain FAT/FAT32 ohjaimiin!\nOptio voidaan poistaa kaikissa muissa tapauksissa \"jätetään 1. tunnin ero huomiotta\".)
(Requires an Internet connection!)
(Vaatii Internet-yhteyden!)
-,
-.
- Other side's counterpart to %dir
- Toisen puolen vastaavuus on %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@ Asetusten &lataus...
- oikea
- right newer
- uudempi oikealla
--Open-Source file synchronization-
--Open-Source tiedoston täsmäytys-
-.
-,
/sec
/s
1 directory
@@ -168,8 +164,6 @@ About
Ohje
Action
Suorita
-Activate filter
-Käynnistä suodatus
Add folder
Lisää hakemisto
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Vähintäin yksi hakemiston syöttökenttä on tyhjä.
Auto-adjust columns
Säädä sarakeleveys automaattisesti
-Automatic mode
-Automaattinen toimi
Batch execution
Eräajo
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Molemmat puolet muuttuneet edellisestä täsmäytyksestä!
Browse
Selaa
+Browse directory
+Selaa hakemistoa
Build:
Luotu:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
En löydä %x
Category
Luokka
+Clear filter settings
+Nollaa suodin
Comma separated list
CSV-muotoinen lista
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Vertaa: \"tiedoston koko ja -päiväys\"
Compare by...
Vertaile...
-Comparing content
-Vertaa tietosisältöä
Comparing content of files %x
Vertaa tiedostojen %x tietosisältöä
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Eräajon luonti
Creating folder %x
Luo hakemisto %x
-Current operation:
-Tämä toiminto:
Custom
Oma määritelmä
Customize columns
@@ -306,10 +298,6 @@ D-Click
Klikkaa D
DECISION TREE
PÄÄTÖSPUU
-Data remaining:
-Dataa jäljellä:
-Data transferred:
-Siirrettyä dataa:
Data verification error: Source and target file have different content!
Tiedon varmennusvirhe: Lähteellä ja kohteella on eri sisältö!
Date
@@ -364,10 +352,14 @@ Download now?
Lataa nyt?
Drag && drop
Vedä ja pudota
+Elements found:
+Osia löytyi:
+Elements processed:
+Osia käsitelty:
+Elements remaining:
+Osia jäljellä:
Email
S-posti
-Enable filter to exclude files from synchronization
-Aktivoi tiedostojen täsmäytyksen suodattimia
Endless loop when traversing directory:
Suorita hakemiston läpikulku jatkuvana:
Error
@@ -379,7 +371,7 @@ Virhe kopioitaessa tiedostoa:
Error copying locked file %x!
Virhe kopioitaessa lukittua tiedostoa %x!
Error copying symbolic link:
-Symboolisen linkin kopiointi epäonnistui:
+Symbolisen linkin kopiointi epäonnistui:
Error creating directory:
Virhe tapahtui hakemistoa luotassa:
Error deleting directory:
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Tiedostot samat jos, \n - tiedoston sisältö\non sama
Files are found equal if\n - filesize\n - last write time and date\nare the same
Tiedosto samat jos, \n - koko\n - viimeinen aikaleima\non sama
-Files remaining:
-Tiedostoja jäljellä:
Files that are equal on both sides
Tiedosto sama molemmilla puolilla
-Files that exist on both sides and have different content
-Tiedosto löytyy molemmilla puolilla mutta eri sisältö
Files that exist on both sides, left one is newer
Tiedosto löytyy molemmilla puolilla, vasen on uudempi
Files that exist on both sides, right one is newer
Tiedosto löytyy molemmilla puolilla, oikea on uudempi
-Files/folders found:
-Löydetty tiedostoja/hakemistoja:
-Files/folders processed:
-Käsiteltyjä tiedostoja/hakemistoja:
-Files/folders remaining:
-Tiedostoja/hakemistoja jäljellä:
+Files that have different content
+Tiedostoja joissa eri sisältö
Files/folders that exist on left side only
Tiedostoja/hakemistoja vain vasemmalla
Files/folders that exist on right side only
Tiedostoja/hakemistoja vain oikealla
-Filter
-Suodatin
Filter files
Suodata tiedostoja
-Filter has been selected
-Suodin valittu
+Filter is active
+Suodin aktivoitu
Filter settings have changed!
Suodinasetukset muutettu!
Filter view
Näytä suodattimet
-Filtering is deactivated
-Suodatus pois päältä
+Filter: All pairs
+Suodata: kaikki parit
+Filter: Single pair
+Suodata: Yksi pari
Find
Etsi
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Hakemistojen vertailu ja täsmäytys
Free disk space available:
Levytilaa jäljellä:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - hakemisto vertailu ja täsmäytys
FreeFileSync Batch Job
FreeFileSync Eräajo
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Luodaan tietokantaa...
Generating file list...
Luodaan tiedostolista...
-Global filter
-Globaali suodin
Global settings
Yleiset asetukset
Help
@@ -578,12 +558,10 @@ Ignore errors
Älä huomioi virheitä
Ignore subsequent errors
Jätä toistuvia virheitä huomiotta
-Ignore this error, retry or abort synchronization?
-Jätä virhe huomiotta, kokeile uudestaan tai keskeytä täsmäytys?
-Ignore this error, retry or abort?
-Jätä virhe huomiotta, kokeile uudestaan tai keskeytä?
Include
Sisällytä
+Include Symbolic Links
+Sisällytä symbolisia linkkejä
Include all rows
Sisällytä kaikki rivit
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Ensi täsmäytys:
Integrate external applications into context menu. The following macros are available:
Liitä ulkoinen sovellus viitekehysvalikkoon. Seuraavat makrot ovat valittavissa:
-Last synchronization not completed!
-Viimeine täsmäytys jäi kesken!
Leave as unresolved conflict
Jätä ratkaisemattomana virheenä
Left
@@ -612,8 +588,6 @@ Load configuration from file
Lataa asetuksia tiedostosta
Load configuration history (press DEL to delete items)
Lataa asetusten historia (DEL poistaa osia - paina DEL)
-Local filter
-Paikallinen suodin
Log-messages:
Lokin viestit:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Jokin FreeFileSynk tietokannan tiedostoista puuttuu vielä:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Täsmäytykseen valitaan vain suodatetut tiedostot/hakemistot. Suodatus suoritetaan täsmäytyksen perus hakemistojen mukaisiin suhteellisiin nimiin.
-Open directly
-Suora avaus
Open with Explorer
Avaa Explorerilla
-Open with Konqueror
-Avaa Konquerorilla
+Open with default application
+Avaa oletus sovelluksessa
Operation aborted!
Toiminto keskeytetty!
Operation:
@@ -680,8 +652,12 @@ Pause
Tauko
Paused
Pysäytetty
+Planned directory deletion is in conflict with its subdirectories and -files!
+Suunniteltu hakemiston poistaminen on ristiriidassa alihakemiston ja tiedostojen kanssa!
Please run a Compare first before synchronizing!
Aja tarkistus ennen täsmäytystä.
+Press \"Switch\" to open FreeFileSync GUI modus.
+Paina \"Vaihda\" Avaa FreeFileSync GUI toimintoa.
Processing folder pair:
Käsitellään hakemistoparia:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Automaattinen täsmäytys
RealtimeSync configuration
RealtimeSync Asetukset
Recycle Bin not yet supported for this system!
-
+Roskakori ei vielä tue tätä järjestelmää!
Relative path
Suhteellinen polku
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Poista hakemisto
Remove folder pair
Poista hakemistopari
-Remove local filter settings
-Poista paikalliset suotimet
Renaming file %x to %y
Nimeän tiedostoa %x nimellä %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Valitse vaihtoehto:
Set direction:
Aseta suunta:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Aseta oletu suunta täsmäytykselle: Vanhat tiedostot ylikirjoitetaan uudemilla tiedostoilla.
Show conflicts
Näytä ristiriidat
@@ -794,10 +768,14 @@ Start synchronization
Käynnistä täsmäytys
Statistics
Tilastot
+Status feedback
+Tilan palaute
Stop
Stop
Swap sides
Puolten vaihto
+Switching to FreeFileSync GUI modus...
+Siirtyminen FreeFileSync GUI toimintoon...
Synchronization Preview
Täsmäytyksen esikatselu
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Täsmäytyksen status
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Täsmäytä kaikki .doc, .zip und .exe tiedostot paitsi hakemistossa \"temp\" oleva.
-Synchronize both sides using a database. Deletions are detected automatically
-Täsmäytetään molemmat puolet käyttäen tietokantaa. Poistot suoritetaan automaattisesti
Synchronize...
Täsmäytä...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Komentokehote suoritetaan joka kerta kun:\n- hakemisto on saatavilla (esim. USB tikku asennetaan)\n- tiedostot näissä hakemistoisa ja alihakemistoissa muutetaan
The file does not contain a valid configuration:
Asetustiedosto ei ole kelvollinen:
+The file was not processed by last synchronization!
+Tiedostoa ei käsitelty viime täsmäytyksessä!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Tämä vaihtoehto todennetaan kaksi samannimistä tiedostoa samaksi, jos koko JA viimeinen tallennusaika on sama.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Tarkistan tiedosto %x
Volume name %x not part of filename %y!
Osan nimi %x ei esiinny tiedostonimessä %y!
+Waiting for all directories to become available...
+Odotan että kaikki hakemistot ovat saatavilla ...
Warning
Varoitus
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/french.lng b/BUILD/Languages/french.lng
index 5ead6ef5..d5a1e24b 100644
--- a/BUILD/Languages/french.lng
+++ b/BUILD/Languages/french.lng
@@ -22,8 +22,6 @@
sec
%x / %y objects deleted successfully
%x / %y objets détruits avec succès
-%x Percent
-%x Pourcents
%x directories
%x dossiers
%x files,
@@ -34,6 +32,8 @@
%x sur %y lignes affichées
%x of 1 row in view
%x sur 1 ligne affichée
+%x%
+%x %
&Abort
&Abandonner
&About...
@@ -86,18 +86,18 @@
&Réessayer
&Save
&Sauvegarder
+&Switch
+&Changer
&Yes
&Oui
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Notez que seuls les lecteurs FAT/FAT32 sont concernés par ce problème !\nDans tous les autres cas, vous pouvez désactiver le paramètre \"ignorer la différence d'une heure\".)
(Requires an Internet connection!)
(Nécessite une connexion internet)
-,
-
- Other side's counterpart to %dir
-- lié de l'autre côté à %dir
+- équivalent de %dir de l'autre côté
- Other side's counterpart to %name
-- lié de l'autre côté à %name
+- équivalent de %name de l'autre côté
- conflict
- conflit
- conflict (same date, different size)
@@ -122,10 +122,6 @@
- à droite
- right newer
- fichier de droite plus récent
--Open-Source file synchronization-
--Synchronisation de fichiers Open-Source-
-.
-,
/sec
/sec
1 directory
@@ -168,8 +164,6 @@ About
A propos de
Action
Action
-Activate filter
-Activer le filtre
Add folder
Ajout d'un dossier
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Au moins un champ répertoire est vide.
Auto-adjust columns
Auto-ajustement des colonnes
-Automatic mode
-Mode automatique
Batch execution
Exécution du traitement par lots
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Les deux côtés ont changé depuis la dernière synchronisation !
Browse
Parcourir
+Browse directory
+Prcourir le dossier
Build:
Créé le :
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Impossible de trouver %x
Category
Catégorie
+Clear filter settings
+Effecer la configuration du filtrage
Comma separated list
Liste d'éléments séparés par une virgule
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Comparaison par \"Date et taille des fichiers\"
Compare by...
Comparaison par...
-Comparing content
-Comparaison du contenu
Comparing content of files %x
Comparaison du contenu des fichiers %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Créer une tâche de traitement par lots
Creating folder %x
Création du dossier %x
-Current operation:
-Opération en cours :
Custom
Personnaliser
Customize columns
@@ -306,10 +298,6 @@ D-Click
Clic Droit
DECISION TREE
ARBRE DE DECISION
-Data remaining:
-Données restantes :
-Data transferred:
-Données transférées
Data verification error: Source and target file have different content!
Erreur lors du contrôle des données : Les fichiers source et destination ont des contenus différents !
Date
@@ -364,10 +352,14 @@ Download now?
Télécharger maintenant ?
Drag && drop
Glisser && Déposer
+Elements found:
+Elements trouvés :
+Elements processed:
+Elements traités :
+Elements remaining:
+Elements restants :
Email
Email
-Enable filter to exclude files from synchronization
-Activer le filtrage pour exclure les fichiers de la synchronisation
Endless loop when traversing directory:
Boucle sans fin lors du parcours du répertoire :
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Les fichiers sont considérés comme identiques, si\n - leur contenu\nest identique
Files are found equal if\n - filesize\n - last write time and date\nare the same
Les fichiers sont considérés comme identiques, si\n - leur taille\n - leur date et heure de dernière modification\nsont identiques
-Files remaining:
-Fichiers restants :
Files that are equal on both sides
Fichiers identiques des deux côtés
-Files that exist on both sides and have different content
-Les fichiers existent des deux côtés et ont des contenus différents
Files that exist on both sides, left one is newer
Fichiers existants des deux côtés, celui de gauche est plus récent
Files that exist on both sides, right one is newer
Fichiers existants des deux côtés, celui de droite est plus récent
-Files/folders found:
-Fichiers/Dossiers trouvés :
-Files/folders processed:
-Fichiers/dossiers traités :
-Files/folders remaining:
-Fichiers/dossiers restants :
+Files that have different content
+Fichiers ayant un contenu différent
Files/folders that exist on left side only
Fichiers/répertoires existant seulement à gauche
Files/folders that exist on right side only
Fichiers/répertoires existant seulement à droite
-Filter
-Filtrage
Filter files
Filtrage des fichiers
-Filter has been selected
-Le filtre a été sélectionné
+Filter is active
+Le filtre est actif
Filter settings have changed!
La configuration du filtre a changé !
Filter view
Filtrage de la vue
-Filtering is deactivated
-Le filtrage est désactivé
+Filter: All pairs
+Filtre : Toutes les paires
+Filter: Single pair
+Filtre : Une seule paire
Find
Chercher
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Comparaison de Dossiers et Synchronisation
Free disk space available:
Espace disque disponible :
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Comparaison et synchronisation de répertoires
FreeFileSync Batch Job
FreeFileSync Fichier de commandes
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Génération de la base de données...
Generating file list...
Génération de la liste des fichiers...
-Global filter
-Filtre global
Global settings
Paramètres généraux
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignorer les erreurs
Ignore subsequent errors
Ignorer les erreurs ultérieures
-Ignore this error, retry or abort synchronization?
-Ignorer l'erreur, réessayer ou abandonner la synchronisation ?
-Ignore this error, retry or abort?
-Ignorer l'erreur, réessayer ou abandonner ?
Include
Inclure
+Include Symbolic Links
+Inclure les liens symboliques
Include all rows
Inclure toutes les lignes
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Première synchronisation :
Integrate external applications into context menu. The following macros are available:
Inclure les applications externes dans le menu contextuel. Les macros suivantes sont disponibles :
-Last synchronization not completed!
-La dernière syncronisation n'a pas été totalement terminée !
Leave as unresolved conflict
Abandonner en tant que conflit non résolu
Left
@@ -612,8 +588,6 @@ Load configuration from file
Charger la configuration à partir du fichier
Load configuration history (press DEL to delete items)
Charger l'historique des configurations (appuyez sur Suppr pour supprimer des éléments)
-Local filter
-Filtre local
Log-messages:
Messages log :
Logging
@@ -659,17 +633,15 @@ Nombre de fichiers et de répertoires qui seront supprimés
Number of files that will be overwritten
Nombre de fichiers qui seront remplacés
One of the FreeFileSync database entries within the following file is not yet existing:
-L'une des entrées de la base de données FreeFileSync n'exite plus dans le fichier :
+L'une des entrées de la base de données FreeFileSync n'existe plus dans le fichier :
One of the FreeFileSync database files is not yet existing:
-L'une des entrées de la base de données FreeFileSync n'exite plus :
+L'une des entrées de la base de données FreeFileSync n'existe plus :
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Seuls les fichiers/répertoires filtrés seront sélectionnés pour la synchronisation. Le filtre sera appliqué au nom relatif (!) pour les répertoires de synchroniqation de base.
-Open directly
-Ouvrir directement
Open with Explorer
Ouvrir avec Explorer
-Open with Konqueror
-Ouvrir avec Konqueror
+Open with default application
+Ouvrir avec l'application par défaut
Operation aborted!
Opération abandonnée !
Operation:
@@ -680,8 +652,12 @@ Pause
Pause
Paused
En pause
+Planned directory deletion is in conflict with its subdirectories and -files!
+Le répertoire de suppression choisi est en conflit avec ses sous répertoires et -fichiers !
Please run a Compare first before synchronizing!
Veuillez lancer une Comparaison avant de lancer la synchronisation !
+Press \"Switch\" to open FreeFileSync GUI modus.
+Appuyer sur \"Changer \" pour ouvrir le mode FreeFileSync GUI
Processing folder pair:
Traitement de la paire de dossiers :
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Synchronisation Automatisée
RealtimeSync configuration
Configuration RealtimeSync
Recycle Bin not yet supported for this system!
-
+La corbeille n'est pas supportée par ce système !
Relative path
Chemin relatif
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Supprimer le dossier
Remove folder pair
Supprimer le couple de dossiers
-Remove local filter settings
-Supprimer la configuration locale de filtrage
Renaming file %x to %y
Renommage des fichiers %x en %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Choisissez une variante :
Set direction:
Choix de la direction :
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Directions de la synchronisation par défaut : les anciens fichiers seront remplacés par les nouveaux.
Show conflicts
Afficher les conflits
@@ -794,10 +768,14 @@ Start synchronization
Démarrer la synchronisation
Statistics
Statistiques
+Status feedback
+Retour d'informations
Stop
Arrêt
Swap sides
Permuter les côtés
+Switching to FreeFileSync GUI modus...
+Changement en mode FreeFileSync GUI...
Synchronization Preview
Prévisualisation de la Synchronisation
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Etat de la synchronisation
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Synchroniser tous les fichiers .doc, .zip et .exe sauf ceux du dossier \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Synchronisation des deux côtés à l'aide d'une base de données. Les suppressions sont détectées automatiquement
Synchronize...
Synchroniser...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
La ligne de commande est exécutée chaque fois : \n- qu'un répertoire est disponible (insertion d'une clé USB)\n- que les fichiers de ces répertoires ou sous-répertoires sont mofifiés
The file does not contain a valid configuration:
Le fichier ne contient pas de configuration valide :
+The file was not processed by last synchronization!
+Le ficgier n'a pas été traité par la dernière synchronisation !
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Cette variante définit comme identiques deux fichiers de même nom lorsqu'ils ont la même taille ET le même date et heure de modification.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Contrôle du fichier %x
Volume name %x not part of filename %y!
Le nom de volume %x ne fait pas partie du nom de fichier %y !
+Waiting for all directories to become available...
+En attente de la disponibilité de tous les dossiers...
Warning
Attention
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/german.lng b/BUILD/Languages/german.lng
index b6d8b800..ac781ed4 100644
--- a/BUILD/Languages/german.lng
+++ b/BUILD/Languages/german.lng
@@ -33,7 +33,7 @@
%x of 1 row in view
%x von 1 Zeile zur Ansicht
%x%
-
+%x%
&Abort
&Abbrechen
&About...
@@ -86,6 +86,8 @@ Konfiguration &laden...
&Wiederholen
&Save
&Speichern
+&Switch
+&Wechseln
&Yes
&Ja
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
@@ -120,8 +122,6 @@ Konfiguration &laden...
- rechts
- right newer
- rechts neuer
--Open-Source file synchronization-
--Open-Source Datei-Synchronisation-
/sec
/s
1 directory
@@ -164,8 +164,6 @@ About
Ãœber
Action
Aktion
-Activate filter
-Aktiviere Filter
Add folder
Verzeichnis hinzufügen
Add folder pair
@@ -184,8 +182,6 @@ At least one directory input field is empty.
Mindestens ein Verzeichniseingabefeld ist leer.
Auto-adjust columns
Spalten automatisch ausrichten
-Automatic mode
-Automatik Modus
Batch execution
Batchlauf
Batch file created successfully!
@@ -198,6 +194,8 @@ Both sides have changed since last synchronization!
Beide Seiten wurden seit der letzten Synchronisation verändert!
Browse
Auswählen
+Browse directory
+Verzeichnis öffnen
Build:
Build:
Cannot determine sync-direction:
@@ -206,6 +204,8 @@ Cannot find %x
%x wurde nicht gefunden.
Category
Kategorie
+Clear filter settings
+Filtereinstellungen zurücksetzen
Comma separated list
Kommagetrennte Liste
Command line
@@ -222,8 +222,6 @@ Compare by \"File size and date\"
Vergleich nach \"Dateigröße und -datum\"
Compare by...
Vergleichen nach...
-Comparing content
-Vergleiche Dateiinhalt
Comparing content of files %x
Vergleiche Inhalt der Dateien %x
Comparing content...
@@ -290,8 +288,6 @@ Create a batch job
Batch-Job erstellen
Creating folder %x
Erstelle Verzeichnis %x
-Current operation:
-Aktuelle Operation:
Custom
Eigene
Customize columns
@@ -302,10 +298,6 @@ D-Click
D-Klick
DECISION TREE
ENTSCHEIDUNGSBAUM
-Data remaining:
-Verbleibende Daten:
-Data transferred:
-Kopierte Daten:
Data verification error: Source and target file have different content!
Verifizierungsfehler: Quell- und Zieldatei haben unterschiedlichen Inhalt!
Date
@@ -360,10 +352,14 @@ Download now?
Jetzt herunterladen?
Drag && drop
Drag && Drop
+Elements found:
+Gefundene Elemente:
+Elements processed:
+Verarbeitete Elemente:
+Elements remaining:
+Verbleibende Elemente:
Email
Email
-Enable filter to exclude files from synchronization
-Aktiviere Filter, um Dateien von der Synchronisation auszuschließen
Endless loop when traversing directory:
Endlosschleife beim Lesen des Verzeichnisses:
Error
@@ -458,40 +454,30 @@ Files are found equal if\n - file content\nis the same
Dateien gelten als gleich, wenn\n - der Inhalt\ngleich ist
Files are found equal if\n - filesize\n - last write time and date\nare the same
Dateien gelten als gleich, wenn\n - die Größe\n - Datum und Uhrzeit der letzten Änderung\ngleich sind
-Files remaining:
-Verbleibende Dateien:
Files that are equal on both sides
Auf beiden Seiten gleiche Dateien
Files that exist on both sides, left one is newer
Auf beiden Seiten existierende Dateien; linke Datei ist neuer
Files that exist on both sides, right one is newer
Auf beiden Seiten existierende Dateien; rechte Datei ist neuer
-Files that exist on both sides and have different content
-Auf beiden Seiten existierende Dateien mit unterschiedlichem Inhalt
Files that have different content
-
-Files/folders found:
-Gefundene Dateien/Ordner:
-Files/folders processed:
-Verarbeitete Dateien/Ordner:
-Files/folders remaining:
-Verbleibende Dateien/Ordner:
+Dateien mit verschiedenem Inhalt
Files/folders that exist on left side only
Nur links exisitierende Dateien/Verzeichnisse
Files/folders that exist on right side only
Nur rechts exisitierende Dateien/Verzeichnisse
-Filter
-Filter
Filter files
Dateien filtern
-Filter has been selected
-Filter ist ausgewählt
+Filter is active
+Filter ist aktiv
Filter settings have changed!
Die Filtereinstellungen wurden geändert!
Filter view
Ansicht filtern
-Filtering is deactivated
-Filter ist deaktiviert
+Filter: All pairs
+Filter: Alle Verzeichnispaare
+Filter: Single pair
+Filter: Einzelnes Verzeichnispaar
Find
Suchen
Find what:
@@ -500,8 +486,6 @@ Folder Comparison and Synchronization
Verzeichnisvergleich und Synchronisation
Free disk space available:
Verfügbarer freier Speicherplatz:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Verzeichnisvergleich und -synchronisation
FreeFileSync Batch Job
FreeFileSync Batch-Job
FreeFileSync at Sourceforge
@@ -518,8 +502,6 @@ Generating database...
Erzeuge Synchronisationsdatenbank...
Generating file list...
Erzeuge Dateiliste...
-Global filter
-Globaler Filter
Global settings
Globale Einstellungen
Help
@@ -576,12 +558,10 @@ Ignore errors
Fehler ignorieren
Ignore subsequent errors
Nachfolgende Fehler ignorieren
-Ignore this error, retry or abort synchronization?
-Fehler ignorieren, wiederholen oder Synchronisation abbrechen?
-Ignore this error, retry or abort?
-Fehler ignorieren, wiederholen oder abbrechen?
Include
Einschließen
+Include Symbolic Links
+Symbolische Links aufnehmen
Include all rows
Alle Zeilen einschließen
Include temporarily
@@ -598,8 +578,6 @@ Initial synchronization:
Erstmalige Synchronisation:
Integrate external applications into context menu. The following macros are available:
Integriert externe Anwendungen in das Kontextmenu. Die folgenden Makros stehen zur Verfügung:
-Last synchronization not completed!
-Letzte Synchronisation nicht vollendet!
Leave as unresolved conflict
Als unbehandelten Konflikt belassen
Left
@@ -610,8 +588,6 @@ Load configuration from file
Konfiguration aus Datei laden
Load configuration history (press DEL to delete items)
Lade Konfigurationshistorie (DEL-Taste löscht Einträge)
-Local filter
-Lokaler Filter
Log-messages:
Protokollmeldungen:
Logging
@@ -662,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Eine der FreeFileSync Datenbankdateien existiert noch nicht:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Für die Synchronisation werden nur die Dateien/Verzeichnisse berücksichtigt, die den Filtereinstellungen genügen. Der Filter wird dabei auf den Dateinamen relativ(!) zu den Basis-Synchronisationsverzeichnissen angewandt.
-Open directly
-Direkt öffnen
Open with Explorer
Mit Explorer öffnen
-Open with Konqueror
-Mit Konqueror öffnen
+Open with default application
+Mit Standardanwendung öffnen
Operation aborted!
Vorgang abgebrochen!
Operation:
@@ -678,10 +652,14 @@ Pause
Pause
Paused
Angehalten
+Planned directory deletion is in conflict with its subdirectories and -files!
+Das geplante Löschen des Verzeichnisses steht in Konflikt mit seinen Unterverzeichnissen und -dateien
Please run a Compare first before synchronizing!
Vor der Synchronisation bitte zuerst einen Vergleich ausführen!
+Press \"Switch\" to open FreeFileSync GUI modus.
+\"Wechseln\" öffnet FreeFileSync in der graphischen Ansicht.
Processing folder pair:
-Verarbeite Verzeichnispaar:
+Bearbeite Verzeichnispaar:
Published under the GNU General Public License:
Veröffentlicht unter der GNU General Public License:
Question
@@ -695,7 +673,7 @@ RealtimeSync - Automatisierte Synchronisation
RealtimeSync configuration
RealtimeSync Konfiguration
Recycle Bin not yet supported for this system!
-
+Der Papierkorb wird für dieses System noch nicht unterstützt!
Relative path
Relativer Pfad
Remove alternate settings
@@ -704,8 +682,6 @@ Remove folder
Verzeichnis entfernen
Remove folder pair
Verzeichnispaar entfernen
-Remove local filter settings
-Lokale Filtereinstellungen entfernen
Renaming file %x to %y
Benenne Datei %x um nach %y
Report translation error
@@ -717,7 +693,7 @@ Rechts
Run minimized and write status information to a logfile
Minimiert ausführen und Statusinformationen in eine Logdatei schreiben
S&ave configuration...
-Konfiguration s&peichern ...
+Konfiguration s&peichern...
S&witch view
Ansicht &wechseln
Save changes to current configuration?
@@ -738,7 +714,7 @@ Select variant:
Variante auswählen:
Set direction:
Setze Richtung:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Setze Standardwerte für Synchronisationsrichtungen: Alte Dateien werden durch neuere überschrieben.
Show conflicts
Konflikte zeigen
@@ -792,10 +768,14 @@ Start synchronization
Synchronisation starten
Statistics
Statistiken
+Status feedback
+Statusbericht
Stop
Stop
Swap sides
Seiten vertauschen
+Switching to FreeFileSync GUI modus...
+Wechsle in die graphische Ansicht...
Synchronization Preview
Vorschau auf Synchronisation
Synchronization aborted!
@@ -810,8 +790,6 @@ Synchronization status
Synchronisationsstatus
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Alle .doc, .zip und .exe Dateien mit Ausnahme des Verzeichnisses \"temp\" werden synchronisiert.
-Synchronize both sides using a database. Deletions are detected automatically
-Beide Seiten mit Hilfe einer Datenbank synchronisieren. Löschungen werden automatisch erkannt
Synchronize...
Synchronisieren
Synchronizing...
@@ -826,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Die Befehlszeile wird ausgeführt wenn:\n- ein Verzeichnis verfügbar wird (z.B. beim Anschluss eines USB Sticks)\n- Dateien innerhalb dieser Verzeichnisse oder Unterverzeichnisse geändert werden
The file does not contain a valid configuration:
Die Datei enthält keine gültige Konfiguration:
+The file was not processed by last synchronization!
+Die Datei wurde in der letzten Synchronisation nicht verarbeitet!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Diese Variante identifiziert zwei gleichnamige Dateien als gleich, wenn sie die gleiche Dateigröße haben UND der Zeitpunkt der letzten Änderung derselbe ist.
Time
@@ -866,6 +846,8 @@ Verifying file %x
Verifiziere Datei %x
Volume name %x not part of filename %y!
Laufwerksname %x ist kein Teil des Dateinamens %y!
+Waiting for all directories to become available...
+Warte, bis alle Verzeichnisse verfügbar sind...
Warning
Warnung
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/hungarian.lng b/BUILD/Languages/hungarian.lng
index 2c865d7c..dcd595aa 100644
--- a/BUILD/Languages/hungarian.lng
+++ b/BUILD/Languages/hungarian.lng
@@ -22,8 +22,6 @@
másodperc
%x / %y objects deleted successfully
%X / %Y objektum sikeresen törölve
-%x Percent
-%x százalék
%x directories
%x mappa
%x files,
@@ -34,6 +32,8 @@ A(z) %x nem megfelelő FreeFileSync kötegelt feladat fájl!
%x sor látható a(z) %y sorból
%x of 1 row in view
%x sor látható az 1 sorból
+%x%
+
&Abort
&Megszakít
&About...
@@ -86,14 +86,14 @@ A(z) %x nem megfelelő FreeFileSync kötegelt feladat fájl!
&Ismét
&Save
&Mestés
+&Switch
+
&Yes
&Igen
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Megjegyzés: Csak a FAT/FAT32 meghajtókat érinti ez a probléma!\nMinden más esetben ki lehet kapcsolni az \"1 órás különbség figyelmen kívül hagyása\" beállítást.)
(Requires an Internet connection!)
(Internetkapcsolat szükséges!)
-,
-.
- Other side's counterpart to %dir
- A %dir másik oldalon szereplő párja
- Other side's counterpart to %name
@@ -122,10 +122,6 @@ A(z) %x nem megfelelő FreeFileSync kötegelt feladat fájl!
- jobb oldali
- right newer
- a jobb oldali újabb
--Open-Source file synchronization-
--Nyílt forráskódú fájlszinkronizálás-
-.
-,
/sec
/másodperc
1 directory
@@ -168,8 +164,6 @@ About
A programról
Action
Művelet
-Activate filter
-Szűrő aktiválása
Add folder
Mappa hozzáadása
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Legalább az egyik mappa beviteli mező üres.
Auto-adjust columns
Oszlopok automatikus igazítása
-Automatic mode
-Automatikus mód
Batch execution
Kötegelt végrehajtás
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Mindkét oldal megváltozott az utolsó szikronizálás óta!
Browse
Tallózás
+Browse directory
+
Build:
Build:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Category
Kategória
+Clear filter settings
+
Comma separated list
Comma separated values
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Összehasonlítás \"fájlméret és dátum alapján\"
Compare by...
Összehasonlítás
-Comparing content
-Tartalom összehasonlítása
Comparing content of files %x
%x fájlok tartalmának összehasonlítása
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Kötegelt feladat létrehozása
Creating folder %x
%x mappa létrehozása
-Current operation:
-Aktuális művelet:
Custom
Egyedi
Customize columns
@@ -306,10 +298,6 @@ D-Click
D-Klikk
DECISION TREE
DÖNTÉSI FA
-Data remaining:
-Hátralévő adat:
-Data transferred:
-
Data verification error: Source and target file have different content!
Adatellenőrzési hiba: A forrás és cél fájl tartalma különbözik!
Date
@@ -364,10 +352,14 @@ Download now?
Letöltsem most?
Drag && drop
Húzd && Ejtsd
+Elements found:
+
+Elements processed:
+
+Elements remaining:
+
Email
E-mail
-Enable filter to exclude files from synchronization
-Szűrő engedélyezése fájlok a szinkronizációból való kizárásához
Endless loop when traversing directory:
Végtelen hurok a mappák bejárásakor:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
A fájlok megegyező ha\n - a fájlok tartalma\nmegegyezik
Files are found equal if\n - filesize\n - last write time and date\nare the same
A fájlok megegyező ha\n - a fájlméret\n - az utolsó módosítás dátuma\nmegegyezik
-Files remaining:
-Hátralévő fájlok:
Files that are equal on both sides
Megegyező fájlok mindkét oldalon
-Files that exist on both sides and have different content
-Mindkét oldalon létező fájlok különböző tartalommal
Files that exist on both sides, left one is newer
Mindkét oldalon létező fájlok, de a bal oldali újabb
Files that exist on both sides, right one is newer
Mindkét oldalon létező fájlok, de a jobb oldali újabb
-Files/folders found:
-Talált fájlok/mappák:
-Files/folders processed:
+Files that have different content
-Files/folders remaining:
-Hátralévő fájlok/mappák:
Files/folders that exist on left side only
Csak a bal oldalon létező fájlok/mappák
Files/folders that exist on right side only
Csak a jobb oldalon létező fájlok/mappák
-Filter
-Szűrő
Filter files
Fájlok szűrése
-Filter has been selected
-Szűrő kiválasztva
+Filter is active
+
Filter settings have changed!
A szűrőbeállítások megváltoztak!
Filter view
Szűrő nézet
-Filtering is deactivated
-A szűrés kikapcsolva
+Filter: All pairs
+
+Filter: Single pair
+
Find
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Mappa összehasonlítás és szinkronizáció
Free disk space available:
Szabad lemezterület:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Mappa összehasonlítás és szinkronizáció
FreeFileSync Batch Job
FreeFileSync kötegelt feladat
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Adatbázis generálása...
Generating file list...
Fájllista generálása...
-Global filter
-Globális szűrő
Global settings
Globális beállítások
Help
@@ -578,12 +558,10 @@ Ignore errors
Hibák figyelmen kívül hagyása
Ignore subsequent errors
Későbbi hibák figyelmen kívül hagyása
-Ignore this error, retry or abort synchronization?
-Figyelmen kívül hagyja ezt a hibát, újra megpróbálja vagy megszakítja a szinkronizálást?
-Ignore this error, retry or abort?
-Figyelmen kívül hagyja ezt a hibát, újra megpróbálja vagy megszakítja?
Include
Csatol
+Include Symbolic Links
+
Include all rows
Minden sort csatolni
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Első szinkronizáció:
Integrate external applications into context menu. The following macros are available:
Külső alkalmazás integrálása a helyi menübe. Az elérhető makrók a következők:
-Last synchronization not completed!
-
Leave as unresolved conflict
Feloldatlan ütközésként hagyni
Left
@@ -612,8 +588,6 @@ Load configuration from file
Beállítások betöltése fájlból
Load configuration history (press DEL to delete items)
Beállítások előzményeinek a betöltése (Nyomja meg a DEL gombot a törléshez)
-Local filter
-Lokális szűrő
Log-messages:
Naplóbejegyzések:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Csak a szűrésnek megfelelő fájlok/mappák lesznek kijelölve szinkronizáláshoz. A szűrő a szinkronizálás alap mappáihoz relatív fájl- és mappanevekre lesz alkalmazva.
-Open directly
-Megnyitás közvetlenül
Open with Explorer
Megnyitás Explorerrel
-Open with Konqueror
-Megnyitás Konquerorral
+Open with default application
+
Operation aborted!
Művelet megszakítva!
Operation:
@@ -680,8 +652,12 @@ Pause
Szünet
Paused
Szüneteltetve
+Planned directory deletion is in conflict with its subdirectories and -files!
+
Please run a Compare first before synchronizing!
Kérjük, futtass le egy összehasonlítást mielőtt szinkronizálnál!
+Press \"Switch\" to open FreeFileSync GUI modus.
+
Processing folder pair:
Mappapár feldolgozása:
Published under the GNU General Public License:
@@ -706,8 +682,6 @@ Remove folder
Mappa eltávolítása
Remove folder pair
Mappa párok eltávolítása
-Remove local filter settings
-Lokális szűrőbeállítások eltávolítása
Renaming file %x to %y
%x fájl átnevezése %y névre
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Változat kiválasztása:
Set direction:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Show conflicts
Ütközések mutatása
@@ -794,10 +768,14 @@ Start synchronization
Szinkronizáció indítása
Statistics
Statisztikák
+Status feedback
+
Stop
Megállítás
Swap sides
Oldalak felcserélése
+Switching to FreeFileSync GUI modus...
+
Synchronization Preview
Szinkronizáció előnézete
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Szinkronizáció állapota
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Minden .doc, .zip és .exe fájl szinkronizálása a \"temp\" almappában találhatók kivételével.
-Synchronize both sides using a database. Deletions are detected automatically
-Mindkét oldal szinkronizálása adatbázis segítségével. A törlések automatikusan felismerődnek
Synchronize...
Szinkronizálás
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
The file does not contain a valid configuration:
A következő fájl nem tartalmaz érvényes beállításokat:
+The file was not processed by last synchronization!
+
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Ez a változat akkor tekint egyezőnek két azonos nevű fájlt, ha azok mérete ÉS az utolsó módosításuk ideje azonos.
Time
@@ -868,6 +846,8 @@ Verifying file %x
%x fájl ellenőrzése
Volume name %x not part of filename %y!
A(z) %x kötetnevet nem tartalmazza a(z) %y fájlnév!
+Waiting for all directories to become available...
+
Warning
Figyelem
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/italian.lng b/BUILD/Languages/italian.lng
index ac3c3903..6439dfd5 100644
--- a/BUILD/Languages/italian.lng
+++ b/BUILD/Languages/italian.lng
@@ -22,8 +22,6 @@
sec
%x / %y objects deleted successfully
%x / %y oggetti cancellati con successo
-%x Percent
-%x Percento
%x directories
%x cartelle
%x files,
@@ -34,6 +32,8 @@
%x di %y righe visualizzate
%x of 1 row in view
%x di 1 riga visualizzata
+%x%
+
&Abort
&Abbandona
&About...
@@ -86,14 +86,14 @@
&Riprova
&Save
&Salva
+&Switch
+
&Yes
&Si
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Solo volumi con file-system FAT/FAT32 risentono di questo problema!\nIn tutti gli altri casi puoi disabilitare l'impostazione \"ignora differenze di 1 ora\".)
(Requires an Internet connection!)
(Richiede una connessione Internet!)
-,
-,
- Other side's counterpart to %dir
- L'altro lato e' equivalente a %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- a destra
- right newer
- file di destra più recente
--Open-Source file synchronization-
--Sincronizzazione Open-Source-
-.
-,
/sec
/sec
1 directory
@@ -168,8 +164,6 @@ About
A proposito di
Action
Azioni
-Activate filter
-Attiva filtro
Add folder
Aggiungi cartella
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Almeno un campo di inserimento cartella e' vuoto.
Auto-adjust columns
Larghezza automatica colonne
-Automatic mode
-Modalita' automatica
Batch execution
Esecuzione in batch
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Entrambi i lati sono cambiati dall'ultima sincronizzazione!
Browse
Sfoglia
+Browse directory
+
Build:
Build:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Impossibile trovare %x
Category
Categoria
+Clear filter settings
+
Comma separated list
Lista di elementi separati da virgola
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Compara per \"Data e dimensione\"
Compare by...
Compara per...
-Comparing content
-Comparazione contenuto
Comparing content of files %x
Comparazione contenuto del file %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Creazione di un job batch
Creating folder %x
Creazione cartella %x
-Current operation:
-Operazione corrente:
Custom
Personalizza
Customize columns
@@ -306,10 +298,6 @@ D-Click
D-Click
DECISION TREE
ALBERO DELLE DECISIONI
-Data remaining:
-Dati rimanenti:
-Data transferred:
-Dati trasferiti:
Data verification error: Source and target file have different content!
Errore in verifica data: I file sorgente e destinazione hanno differente contenuto!
Date
@@ -364,10 +352,14 @@ Download now?
Scaricare ora?
Drag && drop
Drag && drop
+Elements found:
+
+Elements processed:
+
+Elements remaining:
+
Email
Email
-Enable filter to exclude files from synchronization
-Abilita il filtro per escludere files dalla sincronizzazione
Endless loop when traversing directory:
Loop senza fine attraverso le directory:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
I file sono considerati identici se\n - il contenuto\nè identico
Files are found equal if\n - filesize\n - last write time and date\nare the same
I file sono considerati identici se\n - dimensione\n - data e ora sono identici
-Files remaining:
-File rimanenti:
Files that are equal on both sides
Files identici su entrambi i lati
-Files that exist on both sides and have different content
-Files esistenti su entrambi i lati e aventi differente contenuto
Files that exist on both sides, left one is newer
Files esistenti su entrambi i lati, più recenti a sinistra
Files that exist on both sides, right one is newer
Files esistenti su entrambi i lati, più recenti a destra
-Files/folders found:
-Files/cartelle trovati:
-Files/folders processed:
-Files/cartelle processati:
-Files/folders remaining:
-Files/cartelle restanti:
+Files that have different content
+
Files/folders that exist on left side only
Files/cartelle esistenti solo a sinistra
Files/folders that exist on right side only
Files/cartelle esistenti solo a destra
-Filter
-Filtro
Filter files
Filtro dei files
-Filter has been selected
-Filtro selezionato
+Filter is active
+
Filter settings have changed!
Le impostazioni del filtro sono cambiate!
Filter view
Filtro della vista
-Filtering is deactivated
-Filtro disattivato
+Filter: All pairs
+
+Filter: Single pair
+
Find
Trova
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Comparazione di Cartelle e Sincronizzazione
Free disk space available:
Spazio libero su disco disponibile:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Comparazione e sincronizzazione di directory
FreeFileSync Batch Job
FreeFileSync Batch Job
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Generazione database...
Generating file list...
Generazione lista dei file...
-Global filter
-Filtro globale
Global settings
Preferenze
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignora gli errori
Ignore subsequent errors
Ignora gli errori successivi
-Ignore this error, retry or abort synchronization?
-Ignora questo errore, riprova o abbandona la sincronizzazione?
-Ignore this error, retry or abort?
-Ignora questo errore, riprova o abbandona?
Include
Includi
+Include Symbolic Links
+
Include all rows
Includi tutte le righe
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Prima sincronizzazione:
Integrate external applications into context menu. The following macros are available:
Integra applicazioni esterne nel menu contestuale. Sono disponibili le seguenti macro:
-Last synchronization not completed!
-Ultima sincronizzazione non completata!
Leave as unresolved conflict
Lascia come conflitti irrisolti
Left
@@ -612,8 +588,6 @@ Load configuration from file
Carica configurazione da file
Load configuration history (press DEL to delete items)
Carica la cronologia delle configurazioni (premi DEL per eliminare elementi)
-Local filter
-Filtro locale
Log-messages:
Log-messages:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Un file database di FreeFileSync non è ancora stato creato:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Solo file e directory che passano il filtro saranno selezionati per la sincronizzazione. Il filtro verrà applicato al nome relativo(!) sulla base delle directory di sincronizzazione.
-Open directly
-Apri direttamente
Open with Explorer
Apri con Explorer
-Open with Konqueror
-Apri con Konqueror
+Open with default application
+
Operation aborted!
Operazione abortita!
Operation:
@@ -680,8 +652,12 @@ Pause
Pausa
Paused
In pausa
+Planned directory deletion is in conflict with its subdirectories and -files!
+
Please run a Compare first before synchronizing!
Prima di sincronizzare effettua una Comparazione!
+Press \"Switch\" to open FreeFileSync GUI modus.
+
Processing folder pair:
Elaborazione coppia di cartelle:
Published under the GNU General Public License:
@@ -706,8 +682,6 @@ Remove folder
Rimuovi cartella
Remove folder pair
Elimina la coppia di cartelle
-Remove local filter settings
-Rimuovi impostazioni di filtro locale
Renaming file %x to %y
Rinomina file %x in %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Selezionare una variante:
Set direction:
Imposta direzione:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Imposta direzioni di sincronizzazione di default: I vecchi file saranno sovrascritti dai nuovi.
Show conflicts
Mostra conflitti
@@ -794,10 +768,14 @@ Start synchronization
Avvia sincronizzazione
Statistics
Statistiche
+Status feedback
+
Stop
Stop
Swap sides
Inverti i lati
+Switching to FreeFileSync GUI modus...
+
Synchronization Preview
Anteprima Sincronizzazione
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Stato della sincronizzazione
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Sincronizza tutti i file .doc, .zip e .exe eccetto tutti quelli nella cartella \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Sincronizza entrmbi i lati usando un database. Le cancellazioni sono rilevate automaticamente
Synchronize...
Sincronizza...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
La linea di comando è eseguita ogni volta che:\n- una directory diviene disponibile (es: inserimento USB key)\n- file all'interno di queste directory o sotto-directory vengono modificati
The file does not contain a valid configuration:
Il file non contiene una configurazione valida
+The file was not processed by last synchronization!
+
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Questa variante definisce identici due file con lo stesso nome quando hanno la stessa dimensione E la stessa data e ora.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Verifica di file %x
Volume name %x not part of filename %y!
Il nome volume %x non è parte del nome file %y!
+Waiting for all directories to become available...
+
Warning
Attenzione
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/japanese.lng b/BUILD/Languages/japanese.lng
index 5e0e9077..fa96854f 100644
--- a/BUILD/Languages/japanese.lng
+++ b/BUILD/Languages/japanese.lng
@@ -22,8 +22,6 @@
秒
%x / %y objects deleted successfully
%x / %y ã®ã‚ªãƒ–ジェクトを削除ã—ã¾ã—ãŸ
-%x Percent
-%x パーセント
%x directories
%x ディレクトリ
%x files,
@@ -34,6 +32,8 @@
%x / %y 行を表示
%x of 1 row in view
%x / 1 行を表示
+%x%
+%x%
&Abort
情報(&A)
&About...
@@ -86,14 +86,14 @@
å†è©¦è¡Œ(&R)
&Save
ä¿å­˜(&S)
+&Switch
+切り替ãˆ(&S)
&Yes
ã¯ã„(&Y)
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(注æ„: FAT/FAT32 ドライブã®ã¿ã“ã®å½±éŸ¿ã‚’å—ã‘ã¾ã™! \n ãã®ä»–ã®ã‚±ãƒ¼ã‚¹ã§ã¯è¨­å®šã‚’無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"1 時間ã®å·®ç•°ã¯ç„¡è¦–" )
(Requires an Internet connection!)
(インターãƒãƒƒãƒˆæŽ¥ç¶šã‚’å¿…è¦ã¨ã—ã¾ã™!)
-,
-.
- Other side's counterpart to %dir
- %dir ã®å対å´ã®å¯¾è±¡
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- å³å´
- right newer
- å³å´ã®æ–¹ãŒæ–°ã—ã„
--Open-Source file synchronization-
--Open-Source ファイルåŒæœŸãƒ„ール-
-.
-,
/sec
/秒
1 directory
@@ -168,8 +164,6 @@ About
情報
Action
æ“作
-Activate filter
-フィルターを有効化
Add folder
フォルダを追加
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
å°‘ãªãã¨ã‚‚ã²ã¨ã¤ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’é¸æŠžã—ã¦ãã ã•ã„
Auto-adjust columns
列ã®è‡ªå‹•èª¿æ•´
-Automatic mode
-自動モード
Batch execution
一括処ç†ã‚’実行
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
å‰å›žæœ€å¾Œã®åŒæœŸå‡¦ç†ä»¥é™ã€ä¸¡å´ã¨ã‚‚変更ãŒã‚ã‚Šã¾ã™!
Browse
å‚ç…§
+Browse directory
+ディレクトリをå‚ç…§
Build:
ビルド:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
%x ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“
Category
カテゴリ
+Clear filter settings
+フィルター設定をクリア
Comma separated list
カンマ区切り
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
\"ファイルサイズã¨æ—¥ä»˜\" を比較
Compare by...
比較対象...
-Comparing content
-内容ã®æ¯”較中
Comparing content of files %x
ファイル %x ã®å†…容を比較中
Comparing content...
@@ -251,13 +245,13 @@ Configuration saved!
Configure filter
フィルター設定
Configure your own synchronization rules.
-ã‚ãªãŸã®è¨­å®šã—ãŸåŒæœŸè¦å‰‡
+ã‚ãªãŸã®è¨­å®šã—ãŸåŒæœŸè¦å‰‡ã‚’使用ã—ã¾ã™ã€‚
Confirm
確èª
Conflict detected:
検出ã•ã‚ŒãŸç«¶åˆ:
Conflicts/files that cannot be categorized
-ファイルã«ç«¶åˆãŒã‚ã‚‹ãŸã‚分類ã§ãã¾ã›ã‚“
+分類ã®ã§ããªã„競åˆ/ファイル
Continue
続行
Conversion error:
@@ -294,8 +288,6 @@ Create a batch job
一括ジョブを作æˆ
Creating folder %x
フォルダ %x を作æˆä¸­
-Current operation:
-ç¾åœ¨ã®æ“作:
Custom
カスタム
Customize columns
@@ -303,13 +295,9 @@ Customize columns
Customize...
カスタマイズ...
D-Click
-D-クリック
+W-クリック
DECISION TREE
[判定ツリー]
-Data remaining:
-残りã®ãƒ‡ãƒ¼ã‚¿:
-Data transferred:
-転é€æ¸ˆãƒ‡ãƒ¼ã‚¿:
Data verification error: Source and target file have different content!
データ検証エラー: ソースã¨å¯¾è±¡ãƒ•ã‚¡ã‚¤ãƒ«ã«ç•°ãªã‚‹å†…容ãŒå«ã¾ã‚Œã¦ã„ã¾ã™!
Date
@@ -364,10 +352,14 @@ Download now?
ダウンロードã—ã¾ã™ã‹?
Drag && drop
ドラッグ && ドロップ
+Elements found:
+見ã¤ã‹ã£ãŸè¦ç´ :
+Elements processed:
+処ç†ã•ã‚ŒãŸè¦ç´ :
+Elements remaining:
+残りã®è¦ç´ :
Email
E-メール
-Enable filter to exclude files from synchronization
-åŒæœŸå‡¦ç†ã®éš›ã€é™¤å¤–ファイルフィルターを有効ã«ã™ã‚‹ã€‚
Endless loop when traversing directory:
ディレクトリ移動中ã«ç„¡é™ãƒ«ãƒ¼ãƒ—ãŒç™ºç”Ÿ:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
ファイルãŒåŒæ§˜ã ã£ãŸå ´åˆ\n - ファイル内容\nã§åˆ¤æ–­ã™ã‚‹
Files are found equal if\n - filesize\n - last write time and date\nare the same
ファイルãŒåŒæ§˜ã ã£ãŸå ´åˆ\n - ファイルサイズ\n - 最終書ãè¾¼ã¿æ™‚é–“ã¨æ—¥ä»˜\nã§åˆ¤æ–­ã™ã‚‹
-Files remaining:
-残りã®ãƒ•ã‚¡ã‚¤ãƒ«:
Files that are equal on both sides
両å´ã§åŒæ§˜ã®ãƒ•ã‚¡ã‚¤ãƒ«
-Files that exist on both sides and have different content
-両å´ã«å­˜åœ¨ã™ã‚‹ãŒã€å†…容ãŒç•°ãªã‚‹ãƒ•ã‚¡ã‚¤ãƒ«
Files that exist on both sides, left one is newer
両å´ã«å­˜åœ¨ã™ã‚‹ãŒã€å·¦å´ã®æ–¹ãŒã‚ˆã‚Šæ–°ã—ã„
Files that exist on both sides, right one is newer
両å´ã«å­˜åœ¨ã™ã‚‹ãŒã€å³å´ã®æ–¹ãŒã‚ˆã‚Šæ–°ã—ã„
-Files/folders found:
-発見ã—ãŸãƒ•ã‚¡ã‚¤ãƒ«/フォルダ:
-Files/folders processed:
-処ç†æ¸ˆãƒ•ã‚¡ã‚¤ãƒ«/フォルダ:
-Files/folders remaining:
-リãƒãƒ¼ãƒ ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«/フォルダ:
+Files that have different content
+内容ãŒç•°ãªã‚‹ãƒ•ã‚¡ã‚¤ãƒ«
Files/folders that exist on left side only
å·¦å´ã®ã¿ã«å­˜åœ¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«/フォルダ
Files/folders that exist on right side only
å³å´ã®ã¿ã«å­˜åœ¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«/フォルダ
-Filter
-フィルター
Filter files
ファイルフィルター
-Filter has been selected
-フィルターã¯é¸æŠžæ¸ˆã¿ã§ã™
+Filter is active
+フィルターを有効化
Filter settings have changed!
フィルター設定ã¯å¤‰æ›´ã•ã‚Œã¦ã„ã¾ã™!
Filter view
表示フィルター
-Filtering is deactivated
-フィルタリングã¯éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã™
+Filter: All pairs
+フィルター:ã™ã¹ã¦ã®ãƒšã‚¢
+Filter: Single pair
+フィルター:å˜ä¸€ãƒšã‚¢
Find
検索
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
フォルダã®æ¯”較ã¨åŒæœŸ
Free disk space available:
利用å¯èƒ½ãªãƒ‡ã‚£ã‚¹ã‚¯ç©ºã容é‡:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - フォルダ比較ã¨åŒæœŸå‡¦ç†
FreeFileSync Batch Job
FreeFileSync 一括ジョブ
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
データベースを作æˆä¸­...
Generating file list...
ファイル一覧を作æˆä¸­...
-Global filter
-全般フィルター
Global settings
全般的ãªè¨­å®š
Help
@@ -578,12 +558,10 @@ Ignore errors
エラーを無視
Ignore subsequent errors
以é™ã®ã‚¨ãƒ©ãƒ¼ã‚’無視
-Ignore this error, retry or abort synchronization?
-ã“ã®ã‚¨ãƒ©ãƒ¼ã‚’無視ã—ã¦å†è©¦è¡Œã€æˆ–ã„ã¯åŒæœŸã‚’中止ã—ã¾ã™ã‹?
-Ignore this error, retry or abort?
-ã“ã®ã‚¨ãƒ©ãƒ¼ã‚’無視ã—ã¦å†è©¦è¡Œ/中断ã—ã¾ã™ã‹?
Include
å«ã‚ã‚‹
+Include Symbolic Links
+シンボリックリンクをå«ã‚ã‚‹
Include all rows
ã™ã¹ã¦ã®è¡Œã‚’å«ã‚ã‚‹
Include temporarily
@@ -600,10 +578,8 @@ Initial synchronization:
åŒæœŸå‡¦ç†ã®åˆæœŸåŒ–:
Integrate external applications into context menu. The following macros are available:
外部ã®ã‚¢ãƒ—リケーションをコンテキストメニューã«çµ±åˆã€ä»¥ä¸‹ã®ãƒžã‚¯ãƒ­ãŒåˆ©ç”¨ã§ãã¾ã™:
-Last synchronization not completed!
-最後ã®åŒæœŸãŒå®Œäº†ã—ã¦ã„ã¾ã›ã‚“!
Leave as unresolved conflict
-未解決ã®ç«¶åˆã‚’残ã™
+未解決ã®ç«¶åˆã¯ãã®ã¾ã¾æ®‹ã™
Left
å·¦å´
Legend
@@ -612,8 +588,6 @@ Load configuration from file
外部ファイルã‹ã‚‰æ§‹æˆè¨­å®šã‚’読ã¿è¾¼ã¿ã¾ã™
Load configuration history (press DEL to delete items)
構æˆè¨­å®šå±¥æ­´ã®èª­ã¿è¾¼ã¿(DELキーã§ã‚¢ã‚¤ãƒ†ãƒ ã‚’削除)
-Local filter
-ローカルフィルター
Log-messages:
ログメッセージ:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
FreeFileSync データベースファイルãŒå­˜åœ¨ã—ã¾ã›ã‚“:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
フィルターã«é©åˆã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«/ディレクトリã®ã¿åŒæœŸå¯¾è±¡ã«é¸æŠžã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯ã€åŒæœŸåŸºæº–ディレクトリã¸ã®ç›¸å¯¾çš„(!)ãªåå‰ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚
-Open directly
-ディレクトリを開ã
Open with Explorer
エクスプローラã§é–‹ã
-Open with Konqueror
-Konqueror ã§é–‹ã
+Open with default application
+既定アプリケーションã§é–‹ã
Operation aborted!
æ“作ã®ä¸­æ–­!
Operation:
@@ -680,8 +652,12 @@ Pause
一時åœæ­¢
Paused
一時åœæ­¢ä¸­
+Planned directory deletion is in conflict with its subdirectories and -files!
+ディレクトリを削除ã™ã‚‹ã¨ã€ã‚µãƒ–ディレクトリã€ãƒ•ã‚¡ã‚¤ãƒ«ã®ç«¶åˆãŒèµ·ã“ã‚‹å¯èƒ½å§“ãŒã‚ã‚Šã¾ã™!
Please run a Compare first before synchronizing!
åŒæœŸå‡¦ç†ã‚’実行ã™ã‚‹å‰ã«æ¯”較を行ã£ã¦ãã ã•ã„!
+Press \"Switch\" to open FreeFileSync GUI modus.
+ \"切り替ãˆ\" を押ã™ã¨ FreeFileSync GUI モードã§é–‹ãã¾ã™
Processing folder pair:
フォルダペアを処ç†ä¸­:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Automated Synchronization
RealtimeSync configuration
リアルタイムåŒæœŸã®æ§‹æˆè¨­å®š
Recycle Bin not yet supported for this system!
-
+ã“ã®ã‚·ã‚¹ãƒ†ãƒ ã§ã¯ã€ã‚´ãƒŸç®±ã«å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“!
Relative path
相対パス
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
フォルダ除去
Remove folder pair
フォルダペアを除去
-Remove local filter settings
-ローカルフィルター設定を除去
Renaming file %x to %y
ファイル %x ã‚’ %y ã«ãƒªãƒãƒ¼ãƒ ä¸­
Report translation error
@@ -740,7 +714,7 @@ Select variant:
変数をé¸æŠž:
Set direction:
æ–¹å‘ã®è¨­å®š:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
åŒæœŸæ–¹å‘ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®š: å¤ã„ファイルã«æ–°ã—ã„ファイルを上書ã
Show conflicts
ä¸ä¸€è‡´ã‚’表示
@@ -794,10 +768,14 @@ Start synchronization
åŒæœŸã®é–‹å§‹
Statistics
統計
+Status feedback
+状態 フィードãƒãƒƒã‚¯
Stop
åœæ­¢
Swap sides
パãƒãƒ«ã‚’入れ替ãˆ
+Switching to FreeFileSync GUI modus...
+FreeFileSync GUI モードã®åˆ‡ã‚Šæ›¿ãˆä¸­...
Synchronization Preview
åŒæœŸå‡¦ç†ã®ãƒ—レビュー
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
åŒæœŸå‡¦ç†: ステータス
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
\"temp\" ã®ã‚µãƒ–フォルダを除ã„ã¦ã€ã™ã¹ã¦ã®.docã€.zipã€ãŠã‚ˆã³.exeファイルをåŒæœŸ
-Synchronize both sides using a database. Deletions are detected automatically
-データベースを利用ã—ã¦ä¸¡å´ã‚’åŒæœŸã€å‰Šé™¤ã•ã‚ŒãŸã‚‚ã®ã¯è‡ªå‹•çš„ã«æ¤œå‡ºã•ã‚Œã¾ã™
Synchronize...
åŒæœŸå‡¦ç†...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
ã“ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã¯é€æ¬¡å®Ÿè¡Œã•ã‚Œã¾ã™:\n- ディレクトリã«åˆ©ç”¨å¯èƒ½ã§ã™(例.USBメモリã€ãƒ‰ãƒ©ã‚¤ãƒ–ãªã©)\n- ã“れらディレクトリ/サブディレクトリã®ãƒ•ã‚¡ã‚¤ãƒ«ã®æ›´æ–°
The file does not contain a valid configuration:
ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯æœ‰åŠ¹ãªæ§‹æˆãŒå«ã¾ã‚Œã¦ã„ã¾ã›ã‚“:
+The file was not processed by last synchronization!
+ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯æœ€å¾Œã®åŒæœŸæ“作時ã«å‡¦ç†ã•ã‚Œã¦ã„ã¾ã›ã‚“!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
ã“ã®å¤‰æ•°ã§ã¯ã€ãµãŸã¤ã®åŒåファイルãŒå­˜åœ¨ã—ãŸå ´åˆã€ ãã‚Œãžã‚Œã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚µã‚¤ã‚ºã¨æœ€çµ‚更新日付/時間を比較ã—ã¾ã™ã€‚
Time
@@ -868,6 +846,8 @@ Verifying file %x
ファイル %x ã®æ¤œè¨¼ä¸­
Volume name %x not part of filename %y!
ボリュームå %x ã«ãƒ•ã‚¡ã‚¤ãƒ«å %y ã¯ã‚ã‚Šã¾ã›ã‚“!
+Waiting for all directories to become available...
+ã™ã¹ã¦ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒåˆ©ç”¨å¯èƒ½ã«ãªã‚‹ã¾ã§å¾…機中...
Warning
警告
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/polish.lng b/BUILD/Languages/polish.lng
index bb276c1e..11efd3a8 100644
--- a/BUILD/Languages/polish.lng
+++ b/BUILD/Languages/polish.lng
@@ -22,8 +22,6 @@
sekundy
%x / %y objects deleted successfully
%x / %y usuniętych obiektów
-%x Percent
-%x Procent
%x directories
%x katalogi
%x files,
@@ -34,6 +32,8 @@
%x z %y wierszy w widoku
%x of 1 row in view
%x z 1 wiersza w widoku
+%x%
+%x%
&Abort
&Przerwij
&About...
@@ -57,7 +57,7 @@
&File
&Plik
&Find next
-
+&Znajdź następny
&Global settings...
&Ustawienia programu...
&Help
@@ -86,14 +86,14 @@
&Powtórz
&Save
&Zapisz
+&Switch
+&Zamień
&Yes
&Tak
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Pamiętaj, że ten problem dotyczy tylko FAT/FAT32!\nW każdym innym przypadku możesz wyłączyć opcję \"Ignoruj 1-godzinną różnicę\".)
(Requires an Internet connection!)
(Wymaga połączenia z Internetem!)
-,
-.
- Other side's counterpart to %dir
- Odpowiednik %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- prawy
- right newer
- prawy jest nowszy
--Open-Source file synchronization-
--synchronizacja plików Open-Source-
-.
-,
/sec
/sekundÄ™
1 directory
@@ -161,15 +157,13 @@ Dostępna jest nowa wersja FreeFileSync:
Abort requested: Waiting for current operation to finish...
Żądanie przerwania: Czekaj na koniec aktualnie wykonywanego zadania...
Abort synchronization immediately
-
+Natychmiast zakończ synchronizację
Aborted
Przerwana
About
O Programie
Action
Akcja
-Activate filter
-Aktywuj filtr
Add folder
Dodaj folder
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Przynajmniej jedno pole jest puste.
Auto-adjust columns
Autodopasowanie kolumn
-Automatic mode
-Tryb automatyczny
Batch execution
Uruchomienie pliku wsadowego
Batch file created successfully!
@@ -202,14 +194,18 @@ Both sides have changed since last synchronization!
Obie strony uległy zmianie od ostatniej synchronizacji!
Browse
PrzeglÄ…daj
+Browse directory
+PrzeglÄ…daj katalog
Build:
Buduj:
Cannot determine sync-direction:
Nie można określić kierunku synchronizacji:
Cannot find %x
-
+Nie można znaleźć %x
Category
Kategoria
+Clear filter settings
+Wyczyść ustawienia filtra
Comma separated list
Lista oddzielona przecinkami
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Porównaj przez \"Rozmiar i data pliku\"
Compare by...
Porównaj przez...
-Comparing content
-Porównuję zawartość
Comparing content of files %x
Porównywanie zawartości plików %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Twórz plik wsadowy
Creating folder %x
Tworzenie folderu %x
-Current operation:
-Aktualna operacja:
Custom
WÅ‚asne
Customize columns
@@ -306,10 +298,6 @@ D-Click
Podw. kliknięcie
DECISION TREE
DRZEWO DECYZYJNE
-Data remaining:
-Pozostałe dane:
-Data transferred:
-
Data verification error: Source and target file have different content!
Błąd weryfikacji danych: Plik źródłowy i docelowy różnią się zawartością!
Date
@@ -364,10 +352,14 @@ Download now?
Pobrać teraz?
Drag && drop
Drag && Drop
+Elements found:
+Znalezione elementy:
+Elements processed:
+Przetworzeone elementy:
+Elements remaining:
+Pozostałe elementy:
Email
Poczta
-Enable filter to exclude files from synchronization
-Włącz filtr aby wykluczyć pliki z procesu synchronizacji
Endless loop when traversing directory:
Zapętlenie podczas przeglądania katalogu:
Error
@@ -379,7 +371,7 @@ BÅ‚Ä…d podczas kopiowania pliku:
Error copying locked file %x!
BÅ‚Ä…d podczas kopiowania zablokowanego pliku %x!
Error copying symbolic link:
-
+BÅ‚Ä…d podczas kopiowania dowiÄ…zania symbolicznego (symlink)
Error creating directory:
BÅ‚Ä…d podczas tworzenia katalogu:
Error deleting directory:
@@ -431,9 +423,9 @@ Wyklucz tymczasowo
Exclude via filter:
Dodaj filtr:
Exit instantly
-
+Wyjdź natychmiastowo
Extension
-
+Rozszerzenie
External applications
Aplikacje zewnętrzne
Fatal Error
@@ -462,48 +454,38 @@ Files are found equal if\n - file content\nis the same
Pliki są jednakowe jeżeli\n - zawartość pliku\njest identyczna
Files are found equal if\n - filesize\n - last write time and date\nare the same
Pliki są jednakowe jeżeli\n - rozmiar pliku\n - czas i data modyfikacji\nsą identyczne
-Files remaining:
-Pozostałe pliki:
Files that are equal on both sides
Pliki równe po obu stronach
-Files that exist on both sides and have different content
-Pliki, które istnieją po obu stronach i różnią się zawartością
Files that exist on both sides, left one is newer
Pliki, które istnieją po obu stronach, lewa strona jest nowsza
Files that exist on both sides, right one is newer
Pliki, które istnieją po obu stronach, prawa strona jest nowsza
-Files/folders found:
-Znalezione pliki/katalogi:
-Files/folders processed:
-
-Files/folders remaining:
-Pozostałe Pliki/katalogi:
+Files that have different content
+Pliki, które mają różną zawartość
Files/folders that exist on left side only
Pliki/katalogi istniejÄ…ce tylko po lewej stronie
Files/folders that exist on right side only
Pliki/katalogi istniejÄ…ce tylko po prawej stronie
-Filter
-Filtr
Filter files
Filtruj pliki
-Filter has been selected
-Filtr został zaznaczony
+Filter is active
+Filtr jest aktywny
Filter settings have changed!
Ustawienia filtra uległy zmianie!
Filter view
Filtr podglÄ…du
-Filtering is deactivated
-Filtrowanie jest wyłączone
+Filter: All pairs
+Filtr: Wszystkie pary
+Filter: Single pair
+Filtr: Pojedyńcza para
Find
-
+Znajdź
Find what:
-
+Co:
Folder Comparison and Synchronization
Porównywanie i Synchronizacja folderów
Free disk space available:
Wolne miejsce:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Porównywanie i Synchronizacja folderów
FreeFileSync Batch Job
FreeFileSync plik wsadowy
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Generowanie bazy danych...
Generating file list...
Generowanie listy plików...
-Global filter
-Filtr globalny
Global settings
Ustawienia programu
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignoruj błędy
Ignore subsequent errors
Ignoruj kolejne błędy
-Ignore this error, retry or abort synchronization?
-Ignoruj, powtórz albo przerwij synchronizacje.
-Ignore this error, retry or abort?
-Ignorować błąd, powtórzyć albo zakończyć?
Include
Dołącz
+Include Symbolic Links
+Dołącz dowiązania symboliczne (symlinks)
Include all rows
Dołącz wszystkie rzędy
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Wstępna synchronizacja:
Integrate external applications into context menu. The following macros are available:
Dołącz zewnętrzną aplikację do menu kontekstowego. Dostępne macra:
-Last synchronization not completed!
-
Leave as unresolved conflict
Zostaw jako nierozwiÄ…zany konflikt
Left
@@ -612,8 +588,6 @@ Load configuration from file
Wczytaj konfiguracjÄ™ z pliku
Load configuration history (press DEL to delete items)
Wczytaj historie konfiguracji (naciśnij Del aby usunąć element)
-Local filter
-Filtr lokalny
Log-messages:
Logi:
Logging
@@ -621,7 +595,7 @@ Tworzenie logów
Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.
Tworzenie Shadow Copies dla WOW64 nie jest obsługiwane. Zainstaluj 64 bitową wersję FreeFileSync.
Match case
-
+Uwzględnij wielkość liter
Mirror ->>
Lustrzana ->>
Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization.
@@ -659,17 +633,15 @@ Liczba plików i katalogów, które zostaną usunięte
Number of files that will be overwritten
Liczba plików, które zostaną nadpisane
One of the FreeFileSync database entries within the following file is not yet existing:
-
+Jeden z wpisów bazy danych FreeFileSync dotyczący pliku nie istnieje:
One of the FreeFileSync database files is not yet existing:
-
+Jeden z plików bazy danych FreeFileSync nie istnieje:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Tylko pliki/katalogi zaakceptowane przez filtr będą synchronizowane. Filtr działa dla nazw nazw relatywnych(!) względem katalogu bazowego.
-Open directly
-Otwórz bezpośrednio
Open with Explorer
Otwórz za pomocą Explorer
-Open with Konqueror
-Otwórz za pomocą Konqueror
+Open with default application
+Otwórz za pomocą domyślnej aplikacji
Operation aborted!
Operacja przerwana!
Operation:
@@ -680,8 +652,12 @@ Pause
Pauza
Paused
Pauza
+Planned directory deletion is in conflict with its subdirectories and -files!
+Usunięcie katalogów jest w konflikcie podkatalogami oraz plikami!
Please run a Compare first before synchronizing!
Przed synchronizacją należy uruchomić Porównaj!
+Press \"Switch\" to open FreeFileSync GUI modus.
+Naciśnij \"Przełącz\" aby otworzyć moduł GUI.
Processing folder pair:
Przetwarzanie folderów:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Automatyczna Synchronizacja
RealtimeSync configuration
RealtimeSync konfiguracja
Recycle Bin not yet supported for this system!
-
+Kosz nie jest jeszcze wspierany dla tej wersji systemu!
Relative path
Relatywna ścieżka
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Usuń folder
Remove folder pair
Usuń parę folderów
-Remove local filter settings
-Usuń ustawienia lokalnego filtra
Renaming file %x to %y
Zmiana nazwy pliku %X na %Y
Report translation error
@@ -739,9 +713,9 @@ Wybierz katalog z logami:
Select variant:
Wybierz wariant:
Set direction:
-
-Setting default synchronization directions: Old files will be overwritten by newer files.
-
+Kierunek synchronizacji:
+Setting default synchronization directions: Old files will be overwritten with newer files.
+Ustawianie domyślnego kierunku synchronizacji: Stare pliki zostaną nadpisane nowszymi.
Show conflicts
Pokaż konflikty
Show files that are different
@@ -794,10 +768,14 @@ Start synchronization
Rozpocznij synchronizacjÄ™
Statistics
Statystyki
+Status feedback
+Opinia statusu
Stop
Zatrzymaj
Swap sides
Zamień stronami
+Switching to FreeFileSync GUI modus...
+Przełączanie do trybu GUI FreeFileSync
Synchronization Preview
PodglÄ…d synchronizacji
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Status synchronizacji
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Synchronizuj wszystkie pliki .doc, .zip i exe z wyjÄ…tkiem folderu \"temp\"
-Synchronize both sides using a database. Deletions are detected automatically
-Synchronizuj strony przy użyciu bazy danych. Usunięcia wykrywane są automatycznie
Synchronize...
Synchronizuj...
Synchronizing...
@@ -825,9 +801,11 @@ Katalog docelowy już istnieje!
Target file already existing!
Plik docelowy już istnieje!
The command line is executed each time:\n- a directory becomes available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified
-
+Komenda jest wykonywana za każdym razem gdy:\n- katalog stanie się dostepny (np. włożenie USB)\n- pliki w katalogach ulegną zmianie
The file does not contain a valid configuration:
Nieprawidłowy format pliku:
+The file was not processed by last synchronization!
+Plik nie został przetworzony podczas ostatniej synchronizacji!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Ten wariant traktuje dwa pliki jako równe w przypadku gdy mają jednakowy rozmiar oraz tą samą datę i czas ostatniej modyfikacji.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Weryfikowanie pliku %x
Volume name %x not part of filename %y!
Dysk %x nie jest częścią pliku %y!
+Waiting for all directories to become available...
+Oczekiwanie aż katalogi staną się dostępne...
Warning
Uwaga
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/portuguese.lng b/BUILD/Languages/portuguese.lng
index d9176ab3..2518dbe6 100644
--- a/BUILD/Languages/portuguese.lng
+++ b/BUILD/Languages/portuguese.lng
@@ -86,6 +86,8 @@
&Tentar de Novo
&Save
&Guardar
+&Switch
+
&Yes
&Sim
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
@@ -162,8 +164,6 @@ About
Sobre
Action
Acção
-Activate filter
-Activar filtro
Add folder
Adicionar pasta
Add folder pair
@@ -182,8 +182,6 @@ At least one directory input field is empty.
Pelo menos um dos campos está vazio.
Auto-adjust columns
Auto ajustar colunas
-Automatic mode
-Modo automático
Batch execution
Execução do batch
Batch file created successfully!
@@ -196,6 +194,8 @@ Both sides have changed since last synchronization!
Ambos os lados tiveram alterações desde a última sincronização!
Browse
Procurar
+Browse directory
+
Build:
Criado:
Cannot determine sync-direction:
@@ -204,6 +204,8 @@ Cannot find %x
Não é possível descobrir %x
Category
Categoria
+Clear filter settings
+
Comma separated list
Lista de itens separados por virgula
Command line
@@ -220,8 +222,6 @@ Compare by \"File size and date\"
Comparar por \"Data e tamanho dos ficheiros\"
Compare by...
Comparar por...
-Comparing content
-A comparar conteúdo
Comparing content of files %x
A comparar o conteúdo do ficheiro %x
Comparing content...
@@ -288,8 +288,6 @@ Create a batch job
Criar ficheiro batch
Creating folder %x
Criar pasta %x
-Current operation:
-Operação actual:
Custom
Personalizado
Customize columns
@@ -300,10 +298,6 @@ D-Click
Duplo Clique
DECISION TREE
ÃRVORE DE DECISÃO
-Data remaining:
-Dados em falta:
-Data transferred:
-Dados transferidos:
Data verification error: Source and target file have different content!
Erro na verificação de dados: ficheiro fonte e de destino têm conteúdo diferente!
Date
@@ -358,10 +352,14 @@ Download now?
Fazer download agora?
Drag && drop
Pegar && largar
+Elements found:
+
+Elements processed:
+
+Elements remaining:
+
Email
Email
-Enable filter to exclude files from synchronization
-Ligar filtro para excluir ficheiros da sincronização
Endless loop when traversing directory:
Loop infinito ao percorrer directório:
Error
@@ -456,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Os ficheiros são considerados iguais se\n - o conteúdo é o mesmo
Files are found equal if\n - filesize\n - last write time and date\nare the same
Os ficheiros são considerados iguais se\n - o tamanho\n - data e hora são iguais
-Files remaining:
-Ficheiros restantes:
Files that are equal on both sides
Ficheiros iguais dos dois lados
-Files that exist on both sides and have different content
-Ficheiros existentes dos dois lados e com conteúdo diferente
Files that exist on both sides, left one is newer
Ficheiros existentes dos dois lados, à esquerda é mais recente
Files that exist on both sides, right one is newer
Ficheiros existentes dos dois lados, à direita é mais recente
-Files/folders found:
-Ficheiros/pastas encontrados:
-Files/folders processed:
-Ficheiros/pastas processados:
-Files/folders remaining:
-Ficheiros/pastas restantes:
+Files that have different content
+
Files/folders that exist on left side only
Ficheiros/pastas existentes somente à esquerda
Files/folders that exist on right side only
Ficheiros/pastas existentes somente à direita
-Filter
-Filtro
Filter files
Filtrar ficheiros
-Filter has been selected
-Filtro seleccionado
+Filter is active
+
Filter settings have changed!
Opções de filtro alteradas!
Filter view
Filtrar vista
-Filtering is deactivated
-Filtragem desactivada
+Filter: All pairs
+
+Filter: Single pair
+
Find
Procurar
Find what:
@@ -496,8 +486,6 @@ Folder Comparison and Synchronization
Comparação e Sincronização de pastas
Free disk space available:
Espaço livre em disco:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Comparação e Sincronização de pastas
FreeFileSync Batch Job
FreeFileSync Ficheiro batch
FreeFileSync at Sourceforge
@@ -514,8 +502,6 @@ Generating database...
A gerar base de dados...
Generating file list...
A gerar lista ficheiros...
-Global filter
-Filtro global
Global settings
Opções
Help
@@ -572,12 +558,10 @@ Ignore errors
Ignorar erros
Ignore subsequent errors
Ignorar erros subsequentes
-Ignore this error, retry or abort synchronization?
-Ignorar erro, tentar de novo ou abortar a sincronização?
-Ignore this error, retry or abort?
-Ignorar erro, tentar de novo ou abortar?
Include
Incluir
+Include Symbolic Links
+
Include all rows
Incluir todas as linhas
Include temporarily
@@ -594,8 +578,6 @@ Initial synchronization:
Sincronização inicial:
Integrate external applications into context menu. The following macros are available:
Integrar aplicações externas no menu de contexto. As seguintes macros estão disponíveis:
-Last synchronization not completed!
-Última sincronização incompleta!
Leave as unresolved conflict
Deixar como conflito
Left
@@ -606,8 +588,6 @@ Load configuration from file
Carregar configuração do ficheiro
Load configuration history (press DEL to delete items)
Carregar histórico de configuração (pressione DEL para apagar itens)
-Local filter
-Filtro local
Log-messages:
Log de mensagens:
Logging
@@ -658,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Um dos ficheiros da base de dados não existe:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Apenas ficheiros/directórios que passem o filtro serão seleccionados para sincronização. O filtro será aplicado ao nome relativo(!) ao directório base de sincronização.
-Open directly
-Abrir
Open with Explorer
Abrir com o Explorer
-Open with Konqueror
-Abrir com o Konqueror
+Open with default application
+
Operation aborted!
Operação abortada!
Operation:
@@ -674,8 +652,12 @@ Pause
Pausa
Paused
Em pausa
+Planned directory deletion is in conflict with its subdirectories and -files!
+
Please run a Compare first before synchronizing!
Use Comparar antes da primeira sincronização!
+Press \"Switch\" to open FreeFileSync GUI modus.
+
Processing folder pair:
A processar o par do directorio:
Published under the GNU General Public License:
@@ -700,8 +682,6 @@ Remove folder
Remover pasta(s)
Remove folder pair
Remover o par de pastas
-Remove local filter settings
-Remover as opções de filtro local
Renaming file %x to %y
Mudar o nome de %x para %y
Report translation error
@@ -734,7 +714,7 @@ Select variant:
Seleccione uma variante:
Set direction:
Escolher direcção:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Escolher direcção de sincronização por defeito: Os ficheiros antigos serão substituídos pelos novos.
Show conflicts
Mostrar conflitos
@@ -788,10 +768,14 @@ Start synchronization
Iniciar a sincronização
Statistics
Estatísticas
+Status feedback
+
Stop
Parar
Swap sides
Trocar lados
+Switching to FreeFileSync GUI modus...
+
Synchronization Preview
Previsualizar sincronização
Synchronization aborted!
@@ -806,8 +790,6 @@ Synchronization status
Estado da sincronização
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Sincronizar todos os ficheiros .doc, .zip e .exe excepto os da pasta \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Sincronizar ambos os lados usando uma base de dados. Eliminações são detectadas automaticamente
Synchronize...
Sincronizar...
Synchronizing...
@@ -822,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Linha de comnados a executar sempre que: \n- um directorio fica disponível (i.e. pen USB)\n- ficheiros dentro deste directórios ou sub-directórios forem alterados
The file does not contain a valid configuration:
O ficheiro não contém uma configuração válida:
+The file was not processed by last synchronization!
+
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Esta variante avalia dois ficheiros de nome igual como iguais quando têm o mesmo tamanho e a mesma data e hora de modificação.
Time
@@ -862,6 +846,8 @@ Verifying file %x
A verificar ficheiro %x
Volume name %x not part of filename %y!
Nome do volume %x não faz parte do ficheiro %y!
+Waiting for all directories to become available...
+
Warning
Atenção
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/portuguese_br.lng b/BUILD/Languages/portuguese_br.lng
index ea1df759..1ab38b28 100644
--- a/BUILD/Languages/portuguese_br.lng
+++ b/BUILD/Languages/portuguese_br.lng
@@ -22,8 +22,6 @@
seg
%x / %y objects deleted successfully
%x / %y objetos apagados com sucesso
-%x Percent
-%x Porcento
%x directories
%x diretórios
%x files,
@@ -34,6 +32,8 @@
%x de %y arquivos
%x of 1 row in view
%x de 1 linha
+%x%
+%x%
&Abort
&Abortar
&About...
@@ -45,9 +45,9 @@
&Check for new version
&Procurar novas versões
&Content
-Conteúdo
+&Conteúdo
&Create batch job...
-&Criar um arquivo batch...
+C&riar um arquivo batch...
&Default
&Config. Padrão
&Exit
@@ -86,14 +86,14 @@ Conteúdo
&Tentar Novamente
&Save
&Salvar
+&Switch
+&Alterar
&Yes
&Sim
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Note que apenas discos FAT/FAT32 são afetados por este problema!\nEm todos os outros casos pode-se desabilitar esta opção \"ignorar diferença de 1 hora\".)
(Requires an Internet connection!)
(Requer conexão com a Internet!)
-,
-.
- Other side's counterpart to %dir
- Correspondente do outro lado a %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@ Conteúdo
- direita
- right newer
- mais recente à direita
--Open-Source file synchronization-
--Sincronização de Arquivos Open-Source-
-.
-,
/sec
/seg
1 directory
@@ -133,13 +129,13 @@ Conteúdo
1 file,
1 arquivo,
1. &Compare
-1. &Comparar
+1. C&omparar
1. Enter relative file or directory names separated by ';' or a new line.
1. Entre os nomes dos arquivos ou diretórios relativos separados por ';' ou uma nova linha.
1. Select directories to monitor.
1. Selecione os diretórios para monitorar.
2. &Synchronize...
-2. &Sincronizar...
+2. S&incronizar...
2. Enter a command line.
2. Entre uma linha de comando.
2. Use wildcard characters '*' and '?'.
@@ -168,8 +164,6 @@ About
Sobre
Action
Ação
-Activate filter
-Ativar filtro
Add folder
Adicionar pasta
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Pelo menos um dos campos de entrada de diretório está vazio.
Auto-adjust columns
Autoajustar colunas
-Automatic mode
-Modo automático
Batch execution
Execução do batch
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Ambos os lados foram alterados desde a última sincronização!
Browse
Procurar
+Browse directory
+Navegar pelo diretório
Build:
Criado:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Não foi possível encontrar %x
Category
Categoria
+Clear filter settings
+Limpar configurações do filtro
Comma separated list
Lista de itens separada por vírgula
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Comparar por \"Data e tamanho dos arquivos\"
Compare by...
Comparar por...
-Comparing content
-Comparando conteúdo
Comparing content of files %x
Comparando conteúdo do arquivo %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Criar arquivo batch
Creating folder %x
Criando pasta %x
-Current operation:
-Operação atual:
Custom
Personalizado
Customize columns
@@ -306,10 +298,6 @@ D-Click
Duplo Click
DECISION TREE
ÃRVORE DE DECISÃO
-Data remaining:
-Dados faltantes:
-Data transferred:
-Dados transferidos:
Data verification error: Source and target file have different content!
Erro de verificação de dados: Arquivo de origem e destino têm o mesmo conteúdo!
Date
@@ -364,10 +352,14 @@ Download now?
Baixar agora?
Drag && drop
Arrastar && Soltar
+Elements found:
+Elementos encontrados:
+Elements processed:
+Elementos processados:
+Elements remaining:
+Elementos faltantes:
Email
Email
-Enable filter to exclude files from synchronization
-Habilitar filtro para excluir arquivos da sincronização
Endless loop when traversing directory:
Loop infinito quando percorrendo diretório:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Os arquivos são considerados iguais se\n - o conteúdo do arquivo\né o mesmo
Files are found equal if\n - filesize\n - last write time and date\nare the same
Os arquivos são considerados iguais se\n - o tamanho\n - e a data e hora da última modificação\nsão iguais
-Files remaining:
-Arquivos restantes:
Files that are equal on both sides
Arquivos que são iguais em ambos os lados
-Files that exist on both sides and have different content
-Arquivos que existem nos dois lados e têm conteúdo diferente
Files that exist on both sides, left one is newer
Arquivos que existem nos dois lados, sendo à esquerda mais recentes
Files that exist on both sides, right one is newer
Arquivos que existem nos dois lados, sendo à direita mais recentes
-Files/folders found:
-Arquivos/pastas encontrados:
-Files/folders processed:
-Arquivos/pastas processadas:
-Files/folders remaining:
-Arquivos/pastas restantes:
+Files that have different content
+Arquivos que possuem conteúdo diferente
Files/folders that exist on left side only
Arquivos/pastas que existem somente à esquerda
Files/folders that exist on right side only
Arquivos/pastas que existem somente à direita
-Filter
-Filtro
Filter files
Filtrar arquivos
-Filter has been selected
-Filtro foi selecionado
+Filter is active
+Filtro está ativo
Filter settings have changed!
As configurações do filtro foram alteradas!
Filter view
Filtrar vista
-Filtering is deactivated
-Filtragem está desativada
+Filter: All pairs
+Filtro: Todos os pares
+Filter: Single pair
+Filtro: Apenas um par
Find
Localizar
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Comparação e Sincronização de Pastas
Free disk space available:
Espaço livre em disco:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Comparação e Sincronização de Pastas
FreeFileSync Batch Job
FreeFileSync Arquivo batch
FreeFileSync at Sourceforge
@@ -520,14 +502,12 @@ Generating database...
Gerando banco de dados...
Generating file list...
Gerando lista de arquivos...
-Global filter
-Filtro global
Global settings
Configurações
Help
Ajuda
Hidden dialogs:
-Diálogos ocultos:
+Diálogos ocultados:
Hide all error and warning messages
Ocultar todas as mensagens de erro ou aviso
Hide conflicts
@@ -578,12 +558,10 @@ Ignore errors
Ignorar erros
Ignore subsequent errors
Ignorar erros subsequentes
-Ignore this error, retry or abort synchronization?
-Ignorar este erro, tentar novamente ou abortar a sincronização?
-Ignore this error, retry or abort?
-Ignorar este erro, tentar novamente ou abortar?
Include
Incluir
+Include Symbolic Links
+Incluir Links Simbólicos
Include all rows
Incluir todas as linhas
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Sincronização inicial:
Integrate external applications into context menu. The following macros are available:
Integrar aplicações externas no menu de contexto. As seguintes macros estão disponíveis:
-Last synchronization not completed!
-Última sincronização não completada!
Leave as unresolved conflict
Deixar como conflito não resolvido
Left
@@ -612,8 +588,6 @@ Load configuration from file
Carregar configuração do arquivo
Load configuration history (press DEL to delete items)
Carregar histórico de configuração (pressione DEL para apagar itens)
-Local filter
-Filtro local
Log-messages:
Log de mensagens:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Um dos arquivos de bancos de dados do FreeFileSync ainda não existe:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Apenas arquivos/diretórios que passarem o filtro serão selecionados para sincronização. O filtro será aplicado ao nome relativo(!) aos diretórios base de sincronização.
-Open directly
-Abrir diretamente
Open with Explorer
Abrir com Explorer
-Open with Konqueror
-Abrir com Konqueror
+Open with default application
+Abrir com aplicativo padrão
Operation aborted!
Operação cancelada!
Operation:
@@ -680,8 +652,12 @@ Pause
Pausa
Paused
Pausado
+Planned directory deletion is in conflict with its subdirectories and -files!
+O diretório a ser apagado está em conflito com seus subdiretórios e -arquivos!
Please run a Compare first before synchronizing!
Por favor execute primeiro a Comparação antes de sincronizar!
+Press \"Switch\" to open FreeFileSync GUI modus.
+Pressione \"Alterar\" para abrir o modo GUI do FreeFileSync.
Processing folder pair:
Processando par de pastas:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Sincronização Automátizada
RealtimeSync configuration
Configuração do RealtimeSync
Recycle Bin not yet supported for this system!
-
+Lixeira ainda não suportada por esse sistema!
Relative path
Caminho relativo
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Remover pasta
Remove folder pair
Remover par de pastas
-Remove local filter settings
-Remover configurações locais de filtro
Renaming file %x to %y
Renomeando arquivo %x para %y
Report translation error
@@ -737,10 +711,10 @@ Selecionar configuração de sincronização alternativa
Select logfile directory:
Escolha um diretório para salvar o arquivo log:
Select variant:
-Selecione uma variante:
+Selecione um modo:
Set direction:
Configurar direção
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Configurando direções padrões de sincronização: Arquivos antigos serão substituídos por arquivos mais novos.
Show conflicts
Mostrar conflitos
@@ -771,7 +745,7 @@ Mostrar arquivos que serão substituídos no lado direito
Show files that won't be copied
Mostrar arquivos que não serão copiados
Show hidden dialogs
-Mostrar diálogos ocultos
+Mostrar diálogos ocultados
Show popup
Mostrar popup
Show popup on errors or warnings
@@ -794,10 +768,14 @@ Start synchronization
Iniciar sincronização
Statistics
Estatísticas
+Status feedback
+Informação do Status
Stop
Parar
Swap sides
Inverter lados
+Switching to FreeFileSync GUI modus...
+Alterando para o modo GUI do FreeFileSync...
Synchronization Preview
Pré-visualização da Sincronização
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Estado da sincronização
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Sincronizar todos arquivos .doc, .zip e .exe exceto tudo que estiver na subpasta \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Sincronizar ambos os lados usando um banco de dados. Eliminações são detectadas automaticamente
Synchronize...
Sincronizar...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
A linha de comando é executada cada vez que:\n- um diretório fica disponível (ex. é inserido um pendrive)\n- arquivos dentro desses diretórios ou subdiretórios são modificados
The file does not contain a valid configuration:
O arquivo não contém uma configuração válida:
+The file was not processed by last synchronization!
+O arquivo não foi processado pela última sincronização!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Esta variante avalia dois arquivos de nomes equivalentes como sendo iguais quando têm o mesmo tamanho E a mesma data e hora de modificação.
Time
@@ -863,11 +841,13 @@ Diretório especificado
User-defined directory for deletion was not specified!
Diretório especificado para arquivos apagados não foi definido!
Variant
-Variante
+Modo
Verifying file %x
Verificando arquivo %x
Volume name %x not part of filename %y!
Nome do volume %x não é parte do arquivo %y!
+Waiting for all directories to become available...
+Esperando que todos os diretóricos fiquem disponíveis...
Warning
Atenção
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/romanian.lng b/BUILD/Languages/romanian.lng
index 3111590b..b81e6824 100644
--- a/BUILD/Languages/romanian.lng
+++ b/BUILD/Languages/romanian.lng
@@ -22,8 +22,6 @@
sec
%x / %y objects deleted successfully
%x / %y obiecte șterse cu succes
-%x Percent
-%x Procente
%x directories
%x dosare
%x files,
@@ -34,6 +32,8 @@
%x din %y rînduri afișate
%x of 1 row in view
%x din 1 rînd afișat
+%x%
+%x%
&Abort
&Anulează
&About...
@@ -86,14 +86,14 @@
&Reîncearcă
&Save
&Salvează
+&Switch
+&Comută
&Yes
&Da
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Doar dispozitivele FAT/FAT32 sînt afectate de această problemă!\nÎn celelalte cazuri, puteți dezactiva setarea \"ignoră diferența de 1-oră\".)
(Requires an Internet connection!)
(Necesită o conexiune la internet!)
-,
-.
- Other side's counterpart to %dir
- corespondentul din partea opusă al lui %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- dreapta
- right newer
- cel mai nou e în dreapta
--Open-Source file synchronization-
--Soft cu sursă deschisă pentru sincronizarea de fișiere-
-.
-,
/sec
/sec
1 directory
@@ -168,8 +164,6 @@ About
Despre
Action
Acțiune
-Activate filter
-Activează filtrul
Add folder
Adaugă Dosar
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Cel puțin un cîmp de introducere a dosarului este gol.
Auto-adjust columns
Autoajustează Coloanele
-Automatic mode
-Mod inteligent
Batch execution
Execută Fișierul Lot
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Ambele părți s-au modificat de la ultima sincronizare!
Browse
Explorează
+Browse directory
+Explorează Dosarul
Build:
Compilat la:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Nu pot găsi %x
Category
Categorie
+Clear filter settings
+Curăță Setările Filtrului
Comma separated list
Listă de elemente separate prin virgulă
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Compară după \"Data și Mărimea Fișierelor\"
Compare by...
Compară după:
-Comparing content
-Compar conținutul
Comparing content of files %x
Compar conținutul fișierelor %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Creează o Sarcină Lot
Creating folder %x
Creez dosarul %x
-Current operation:
-Operațiunea Curentă:
Custom
Sincronizare Personalizată
Customize columns
@@ -306,10 +298,6 @@ D-Click
Clic-Dreapta
DECISION TREE
ARBORE DECIZIONAL
-Data remaining:
-Date Rămase:
-Data transferred:
-Date Transferate:
Data verification error: Source and target file have different content!
Eroare la verificarea datelor: Fișierele sursă și țintă au conținut diferit!
Date
@@ -364,10 +352,14 @@ Download now?
Descarc acum ?
Drag && drop
Trageți un dosar peste compartiment sau folosiți butonul Explorează
+Elements found:
+Elemente găsite:
+Elements processed:
+Elemente procesate:
+Elements remaining:
+Elemente rămase:
Email
E-mail
-Enable filter to exclude files from synchronization
-Se activează filtrul pentru excluderea fișierelor din sincronizare
Endless loop when traversing directory:
Buclă infinită la parcurgerea dosarului:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Fișierele sînt considerate identice dacă\n - conținutul\neste identic
Files are found equal if\n - filesize\n - last write time and date\nare the same
Fișierele sînt considerate identice dacă\n - mărimea\n - și data ultimei modificări\nsînt identice
-Files remaining:
-Fișiere Rămase:
Files that are equal on both sides
Fișiere identice în ambele părți
-Files that exist on both sides and have different content
-Fișiere care există în ambele părți și au conținut diferit
Files that exist on both sides, left one is newer
Fișiere care există în ambele părți, cel din stînga fiind mai nou
Files that exist on both sides, right one is newer
Fișiere care există în ambele părți, cel din dreapta fiind mai nou
-Files/folders found:
-Fișiere/dosare găsite:
-Files/folders processed:
-Fișiere/dosare procesate:
-Files/folders remaining:
-Itemuri Rămase:
+Files that have different content
+Fișiere care au conținut diferit
Files/folders that exist on left side only
Fișiere sau dosare care există doar în partea stîngă
Files/folders that exist on right side only
Fișiere sau dosare care există doar în partea dreaptă
-Filter
-Filtrare
Filter files
Filtrează Fișierele
-Filter has been selected
-Filtrul a fost selectat
+Filter is active
+Filtrul este activ
Filter settings have changed!
Setările filtrului au fost schimbate!
Filter view
Filtru de Vedere
-Filtering is deactivated
-Filtrarea este dezactivată
+Filter: All pairs
+Filtru: Toate perechile
+Filter: Single pair
+Filtru: O singură pereche
Find
Găsește
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Comparare și Sincronizare de Dosare
Free disk space available:
Spațiu de stocare disponibil:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Comparare și Sincronizare de Dosare
FreeFileSync Batch Job
FreeFileSync Sarcină cu Lot de Comenzi
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Generez baza de date...
Generating file list...
Generez lista de fișiere...
-Global filter
-Filtru Global
Global settings
Setări Globale
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignoră erorile
Ignore subsequent errors
Ignoră (nu lua în seamă) erorile ulterioare
-Ignore this error, retry or abort synchronization?
-Ignorați eroarea, reîncercați sau anulați sincronizarea?
-Ignore this error, retry or abort?
-Ignorați eroarea, reîncercați sau anulați?
Include
Incluse
+Include Symbolic Links
+Include Legăturile Simbolice
Include all rows
Include Toate Rîndurile
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Sincronizare inițială:
Integrate external applications into context menu. The following macros are available:
Include aplicațiile externe în meniul contextual. Sînt disponibile următoarele macrocomenzi:
-Last synchronization not completed!
-Ultima sinconizare nu a fost terminată!
Leave as unresolved conflict
Lasă ca Conflict Nerezolvat
Left
@@ -612,8 +588,6 @@ Load configuration from file
Încarcă configurația dintr-un fișier
Load configuration history (press DEL to delete items)
Încarcă istoricul configurației (apăsați tasta DEL pentru a șterge itemuri)
-Local filter
-Filtru Local
Log-messages:
Mesaje de jurnalizare:
Logging
@@ -659,17 +633,15 @@ Numărul de fișiere și dosare care vor fi șterse
Number of files that will be overwritten
Numărul de fișiere care vor fi suprascrise
One of the FreeFileSync database entries within the following file is not yet existing:
-Una din intrările în baza de date FreeFileSync din fișierul următor nu există:
+Una dintre intrările în baza de date FreeFileSync din fișierul următor nu există:
One of the FreeFileSync database files is not yet existing:
-Una din părți nu are un fișier de tip bază de date FreeFileSync:
+Una dintre părți nu are un fișier de tip bază de date FreeFileSync:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Doar fișierele sau dosarele care trec de filtru vor fi selecționate pentru sincronizare. Filtrul va fi aplicat la numele elementelor aflate ierarhic sub dosarul de sincronizat.
-Open directly
-Deschide Direct
Open with Explorer
-Deschide cu Windows Explorer
-Open with Konqueror
-Deschide cu Konqueror
+Deschide în Windows Explorer
+Open with default application
+Deschide cu Aplicația Implicită
Operation aborted!
Operațiune abandonată!
Operation:
@@ -680,8 +652,12 @@ Pause
Pauză
Paused
Pauzat
+Planned directory deletion is in conflict with its subdirectories and -files!
+Ștergerea plănuită a dosarului intră în conflict cu subdosarele și fișierele sale!
Please run a Compare first before synchronizing!
Rulați compararea înainte de a sincroniza!
+Press \"Switch\" to open FreeFileSync GUI modus.
+Apăsați \"Comută\" pentru a deschide modul grafic al FreeFileSync
Processing folder pair:
Procesez perechea de dosare:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Sincronizare Inteligentă
RealtimeSync configuration
RealtimeSync configurație
Recycle Bin not yet supported for this system!
-
+Reciclatorul nu este încă suportat pentru acest sistem de operare!
Relative path
Calea Relativă
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Înlătură Dosarul
Remove folder pair
Înlătură Perechea de Dosare
-Remove local filter settings
-Înlătură Configurația Filtrului Local
Renaming file %x to %y
Redenumesc fișierul %x în %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Selectați Varianta de Sincronizare:
Set direction:
Setează Acțiunea ca în Iconița Alăturată:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Va fi setat sensul implicit de sincronizare: Fișierele vechi vor fi suprascrise de cele noi.
Show conflicts
Arată conflictele
@@ -794,10 +768,14 @@ Start synchronization
Pornește Sincronizarea
Statistics
Statistici
+Status feedback
+Evoluția stării
Stop
Oprește
Swap sides
Schimbă părțile între ele
+Switching to FreeFileSync GUI modus...
+Comut la modul grafic al FreeFileSync...
Synchronization Preview
Previzionarea Sincronizării
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Starea Sincronizării
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Sincronizează fișierele .doc, .zip și .exe, cu excepția celor din dosarul \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Sincronizare simultană a celor două părți folosind o bază de date. Ștergerile sînt detectate automat
Synchronize...
Sincronizează
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Linia de comandă este executată de fiecare dată cînd:\n- un dosar devine disponibil (de ex. se introduce un dispozitiv USB)\n- fișierele conținute în aceste dosare sau subdosare sînt modificate
The file does not contain a valid configuration:
Fișierul nu conține o configurație validă:
+The file was not processed by last synchronization!
+Fișierul nu a fost procesat la ultima sincronizare!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Această variantă definește două fișiere cu același nume ca fiind identice atunci cînd au aceeași mărime ȘI aceeași dată și oră a ultimei modificări.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Verific fișierul %x
Volume name %x not part of filename %y!
Numele volumului %x nu face parte din numele fișierului %y !
+Waiting for all directories to become available...
+Aștept ca toate dosarele să devină disponibile...
Warning
Avertisment
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/russian.lng b/BUILD/Languages/russian.lng
index 5af9b57e..aab58510 100644
--- a/BUILD/Languages/russian.lng
+++ b/BUILD/Languages/russian.lng
@@ -22,8 +22,6 @@
Ñек.
%x / %y objects deleted successfully
%x / %y объектов удалено удачно
-%x Percent
-%x %
%x directories
%x папки
%x files,
@@ -34,6 +32,8 @@
%x из %y Ñтрок(и) показано
%x of 1 row in view
%x из 1 Ñтрока показана
+%x%
+
&Abort
&Отмена
&About...
@@ -86,14 +86,14 @@
&Повторить
&Save
&Сохранить
+&Switch
+
&Yes
&Да
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Помните, что только диÑки FAT/FAT32 Ñтрадают от Ñтой проблемы!\nВо вÑех оÑтальных ÑлучаÑÑ… вы можете отключить параметр \"игнорировать 1-чаÑовую разницу\".)
(Requires an Internet connection!)
(ТребуетÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ðµ к Интернету!)
-,
-.
- Other side's counterpart to %dir
- Ð°Ð½Ð°Ð»Ð¾Ð³Ð¸Ñ‡Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ° Ñ Ð´Ñ€ÑƒÐ³Ð¾Ð¹ Ñтороны
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- правые
- right newer
- правые новее
--Open-Source file synchronization-
-Синхронизатор файлов Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ñ‹Ð¼ иÑходным кодом
-.
-,
/sec
/Ñек.
1 directory
@@ -168,8 +164,6 @@ About
О программе
Action
ДейÑтвие
-Activate filter
-Включить фильтр
Add folder
Добавить папку
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
По крайней мере, одно поле путей папок не заполнено.
Auto-adjust columns
Ðвтовыравнивание ширины колонок
-Automatic mode
-ÐвтоматичеÑкий режим
Batch execution
Выполнение пакетного заданиÑ
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Со времени поÑледней Ñинхронизации Ñ Ð¾Ð±ÐµÐ¸Ñ… Ñторон произошли изменениÑ!
Browse
Обзор
+Browse directory
+
Build:
Сборка:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Ðевозможно найти %x
Category
КатегориÑ
+Clear filter settings
+
Comma separated list
СпиÑок, разделÑемый запÑтыми
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Сравнивать по размеру и дате
Compare by...
Критерии ÑравнениÑ
-Comparing content
-Сравнивать Ñодержание
Comparing content of files %x
Сравнение ÑÐ¾Ð´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Создать пакетное задание
Creating folder %x
Создание папки %x
-Current operation:
-Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ:
Custom
Выборочно
Customize columns
@@ -306,10 +298,6 @@ D-Click
Двойной клик
DECISION TREE
Древо решений
-Data remaining:
-ОÑталоÑÑŒ:
-Data transferred:
-Данных передано:
Data verification error: Source and target file have different content!
Ошибка проверки данных: иÑходный и конечный файлы имеют разное Ñодержание!
Date
@@ -364,10 +352,14 @@ Download now?
Загрузить ÑейчаÑ?
Drag && drop
Drag && drop
+Elements found:
+
+Elements processed:
+
+Elements remaining:
+
Email
Почта
-Enable filter to exclude files from synchronization
-Применить фильтр, чтобы иÑключить файлы из Ð·Ð°Ð´Ð°Ð½Ð¸Ñ Ð½Ð° Ñинхронизацию
Endless loop when traversing directory:
Зацикливание при вÑтрече переÑекающихÑÑ Ð¿ÑƒÑ‚ÐµÐ¹:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Файлы ÑчитаютÑÑ Ñ€Ð°Ð²Ð½Ñ‹Ð¼Ð¸, еÑли Ñодержание файлов одинаковое
Files are found equal if\n - filesize\n - last write time and date\nare the same
Файлы ÑчитаютÑÑ Ñ€Ð°Ð²Ð½Ñ‹Ð¼Ð¸, еÑли одинаковые\n - размер файла\n - дата и Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ñледнего изменениÑ
-Files remaining:
-Файлов оÑталоÑÑŒ:
Files that are equal on both sides
Файлы, одинаковые Ñ Ð¾Ð±ÐµÐ¸Ñ… Ñторон
-Files that exist on both sides and have different content
-Файлы, ÑущеÑтвующие на обоих Ñторонах и имеющие разное Ñодержание
Files that exist on both sides, left one is newer
Файлы, ÑущеÑтвующие на обоих Ñторонах, левый новее
Files that exist on both sides, right one is newer
Файлы, ÑущеÑтвующие на обоих Ñторонах, правый новее
-Files/folders found:
-Файлов/папок найдено:
-Files/folders processed:
-Файлов/папок обработано:
-Files/folders remaining:
-Файлов/папок оÑталоÑÑŒ:
+Files that have different content
+
Files/folders that exist on left side only
Файлы/папки, ÑущеÑтвующие только на левой Ñтороне
Files/folders that exist on right side only
Файлы/папки, ÑущеÑтвующие только на правой Ñтороне
-Filter
-Фильтр
Filter files
Фильтр файлов
-Filter has been selected
-Фильтр уÑтановлен
+Filter is active
+
Filter settings have changed!
ÐаÑтройки фильтра были изменены!
Filter view
Вид фильтра
-Filtering is deactivated
-Ð¤Ð¸Ð»ÑŒÑ‚Ñ€Ð°Ñ†Ð¸Ñ Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°
+Filter: All pairs
+
+Filter: Single pair
+
Find
Ðайти
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Сравнение и ÑинхронизациÑ
Free disk space available:
ДоÑтупно Ñвободного меÑта на диÑке:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Сравнение и ÑинхронизациÑ
FreeFileSync Batch Job
Пакетное задание FreeFileSync
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Создание базы данных...
Generating file list...
Создание ÑпиÑка файлов...
-Global filter
-Глобальный фильтр
Global settings
Глобальные наÑтройки
Help
@@ -578,12 +558,10 @@ Ignore errors
Игнорировать ошибки
Ignore subsequent errors
Игнорировать поÑледующие ошибки
-Ignore this error, retry or abort synchronization?
-Игнорировать Ñту ошибку, повторить или отменить Ñинхронизацию?
-Ignore this error, retry or abort?
-Игнорировать Ñту ошибку, повторить или отменить?
Include
Включить
+Include Symbolic Links
+
Include all rows
Отметить вÑе
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
ÐŸÐµÑ€Ð²Ð¾Ð½Ð°Ñ‡Ð°Ð»ÑŒÐ½Ð°Ñ ÑинхронизациÑ:
Integrate external applications into context menu. The following macros are available:
Интегрирует внешние Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð² контекÑтное меню.\nСледующие команды доÑтупны:
-Last synchronization not completed!
-ПоÑледнÑÑ ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð½Ðµ была завершена!
Leave as unresolved conflict
ОÑтавить как нерешенный конфликт
Left
@@ -612,8 +588,6 @@ Load configuration from file
Загрузить конфигурацию из файла
Load configuration history (press DEL to delete items)
Выбрать конфигурацию из ÑпиÑка (нажмите DEL Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð¿ÑƒÐ½ÐºÑ‚Ð¾Ð²)
-Local filter
-Локальный фильтр
Log-messages:
Лог-ÑообщениÑ:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Файла базы данных FreeFileSync еще не ÑущеÑтвует:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Только файлы/папки, которые проходÑÑ‚ фильтрацию будут отобраны Ð´Ð»Ñ Ñинхронизации. Фильтр будет применÑÑ‚ÑŒÑÑ ÐºÐ¾ вÑем именам, отноÑÑщимÑÑ Ðº оÑновным Ñинхронизируемым папкам.
-Open directly
-Открыть
Open with Explorer
Открыть путь в Проводнике
-Open with Konqueror
-Открыть путь в Konqueror
+Open with default application
+
Operation aborted!
ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¾Ñ‚Ð¼ÐµÐ½ÐµÐ½Ð°!
Operation:
@@ -680,8 +652,12 @@ Pause
Пауза
Paused
Пауза
+Planned directory deletion is in conflict with its subdirectories and -files!
+
Please run a Compare first before synchronizing!
ПожалуйÑта, запуÑтите Ñравнение перед Ñинхронизацией!
+Press \"Switch\" to open FreeFileSync GUI modus.
+
Processing folder pair:
Обработка пары папок:
Published under the GNU General Public License:
@@ -706,8 +682,6 @@ Remove folder
Удалить папку
Remove folder pair
Удалить пару папок
-Remove local filter settings
-Удалить наÑтройки локального фильтра
Renaming file %x to %y
Переименование файла %x в %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Выберите вариант:
Set direction:
Выберите направление:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
ÐаÑтройка Ð½Ð°Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñинхронизации по умолчанию:\nСтарые файлы будут заменены более новыми файлами.
Show conflicts
Показать конфликтующие файлы
@@ -794,10 +768,14 @@ Start synchronization
Ðачать Ñинхронизацию
Statistics
СтатиÑтика
+Status feedback
+
Stop
Стоп
Swap sides
ПоменÑÑ‚ÑŒ направление
+Switching to FreeFileSync GUI modus...
+
Synchronization Preview
ПредпроÑмотр Ñинхронизации
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Ð¡Ñ‚Ð°Ñ‚ÑƒÑ Ñинхронизации
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Синхронизировать вÑе .doc, .zip и .exe файлы, за иÑключением вÑех файлов из подпапки \"temp\"
-Synchronize both sides using a database. Deletions are detected automatically
-Синхронизировать обе Ñтороны, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð±Ð°Ð·Ñƒ данных\nУдаленные файлы/папки определÑÑŽÑ‚ÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑки
Synchronize...
Синхронизировать
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
ÐšÐ¾Ð¼Ð°Ð½Ð´Ð½Ð°Ñ Ñтрока выполнÑетÑÑ, еÑли:\n- папка ÑтановитÑÑ Ð´Ð¾Ñтупной (например, при подключении USB флеш-накопителÑ);\n- файлы в обозначенных папках или подпапках были изменены.
The file does not contain a valid configuration:
Файл не Ñодержит дейÑтвительную конфигурацию:
+The file was not processed by last synchronization!
+
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Этот вариант Ñравнивает два файла Ñ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ñ‹Ð¼Ð¸ именами и Ñчитает их равными, еÑли они имеют одинаковый размер файла и одинаковую дату и Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ñледнего изменениÑ.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Проверка файла %x
Volume name %x not part of filename %y!
Ð˜Ð¼Ñ Ñ‚Ð¾Ð¼Ð° %x не ÑвлÑетÑÑ Ñ‡Ð°Ñтью имени файла %y!
+Waiting for all directories to become available...
+
Warning
Внимание
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/slovenian.lng b/BUILD/Languages/slovenian.lng
index 15d30fe4..f959623b 100644
--- a/BUILD/Languages/slovenian.lng
+++ b/BUILD/Languages/slovenian.lng
@@ -22,8 +22,6 @@
sek
%x / %y objects deleted successfully
%x / %y objektov uspešno izbrisanih
-%x Percent
-%x Procentov
%x directories
%x imeniki
%x files,
@@ -34,6 +32,8 @@
%x od %y vrstic prikazanih
%x of 1 row in view
%x od 1 vrstice prikazane
+%x%
+%x%
&Abort
&Prekini
&About...
@@ -86,14 +86,14 @@ Na&loži konfiguracijo...
&Ponovi
&Save
&Shrani
+&Switch
+&Zamenjaj
&Yes
&Da
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Vedite, da samo na pogonih s FAT/FAT32 lahko pride do teh težav!\nV vseh drugih primerih lahko onemogoÄite nastavitev \"prezri 1-urno razliko\".)
(Requires an Internet connection!)
(Zahteva povezavo z Internetom!)
-,
-,
- Other side's counterpart to %dir
Duplikat z druge strani od %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@ Duplikat z druge strani od %name
- desno
- right newer
- desna novejša
--Open-Source file synchronization-
--Odprto-kodna sinhronizacija datotek-
-.
-,
/sec
/sek
1 directory
@@ -135,7 +131,7 @@ Duplikat z druge strani od %name
1. &Compare
1. &Primerjaj
1. Enter relative file or directory names separated by ';' or a new line.
-1. Vnesite relativna imena datotek ali imenikov loÄenih z ';' ali novo vrstico.
+1. Vnesite relativna imena datotek ali imenikov loÄenih s ';' ali novo vrstico.
1. Select directories to monitor.
1. Izberite imenike za nadziranje
2. &Synchronize...
@@ -168,8 +164,6 @@ About
O programu(1)
Action
Ukrep
-Activate filter
-Aktiviraj filter
Add folder
Dodaj mapo
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Vsaj eno vnosno polje za vpis imenika je prazno.
Auto-adjust columns
Samo-prilagodi stolpce
-Automatic mode
-Samodejni naÄin
Batch execution
Batch izvajanje
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Obe strani sta se spremenili od zadnje sinhronizacije!
Browse
Brskaj
+Browse directory
+Brskaj po imeniku
Build:
Izgradnja:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Ne najdem %x
Category
Kategorija
+Clear filter settings
+PoÄisti nastavitve filtra
Comma separated list
Seznam loÄen z vejico
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Primerjaj po \"Datumu in velikosti\"
Compare by...
Primerjaj po...
-Comparing content
-Primerjam vsebino
Comparing content of files %x
Primerjam vsebino datotek %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Ustvari batch opravilo
Creating folder %x
Ustvarjam mapo %x
-Current operation:
-Trenutna operacija:
Custom
Po meri
Customize columns
@@ -306,10 +298,6 @@ D-Click
D-Klik
DECISION TREE
DREVO ODLOÄŒITEV
-Data remaining:
-Preostanek podatkov:
-Data transferred:
-Prenesenih podatkov:
Data verification error: Source and target file have different content!
Napaka pri preverjanju podatkov: izvorna in tarÄna datoteka imata razliÄno vsebino!
Date
@@ -364,10 +352,14 @@ Download now?
Prenesem sedaj?
Drag && drop
Povleci && spusti
+Elements found:
+Najdenih elementov:
+Elements processed:
+Obdelanih elementov:
+Elements remaining:
+Preostalih elementov:
Email
Email
-Enable filter to exclude files from synchronization
-OmogoÄi filter da se datoteke izkljuÄi iz sinhronizacije
Endless loop when traversing directory:
NeskonÄna zanka pri prehodu imenika:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Datoteki sta enaki, Äe\n - je vsebina datoteke\nenaka
Files are found equal if\n - filesize\n - last write time and date\nare the same
Datoteki sta enaki, Äe so\n - velikost datoteke\n - zadnji Äas spremembe in datum\nenaki
-Files remaining:
-Preostale datoteke:
Files that are equal on both sides
Datoteki, ki sta enaki na obeh straneh
-Files that exist on both sides and have different content
-Datoteke, ki obstajajo na obeh straneh in imajo razliÄno vesbino
Files that exist on both sides, left one is newer
Datoteke, ki obstajajo na obeh straneh, leva je novejša
Files that exist on both sides, right one is newer
Datoteke, ki obstajajo na obeh straneh, desna je novejša
-Files/folders found:
-Najdene datoteke/mape:
-Files/folders processed:
-Obdelane datoteke/mape:
-Files/folders remaining:
-Preostale datoteke/mape:
+Files that have different content
+Datoteke, ki imajo razliÄno vsebino
Files/folders that exist on left side only
Datoteke/mape, ki obstajajo samo na levi strani
Files/folders that exist on right side only
Datoteke/mape, ki obstajajo samo na desni strani
-Filter
-Filter
Filter files
Filtriraj datoteke
-Filter has been selected
-Filter je bil izbran
+Filter is active
+Filterj je aktiven
Filter settings have changed!
Nastavitve filtra so bile spremenjene!
Filter view
Filtriran pogled
-Filtering is deactivated
-Filter je deaktiviran
+Filter: All pairs
+Filtriraj: Vse pare
+Filter: Single pair
+Filtriraj: En sam par
Find
Najdi
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Primerjava in sinhronizacija imenika
Free disk space available:
Prosti disk, ki je na voljo:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Primerjava in sinhronizacija map
FreeFileSync Batch Job
FreeFileSync Batch opravilo
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Ustvarjam podatkovno bazo...
Generating file list...
Ustvarjam seznam datotek...
-Global filter
-Globalni filter
Global settings
Globalne nastavitve
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignoriraj napake
Ignore subsequent errors
Ignoriraj vse nadaljnje napake
-Ignore this error, retry or abort synchronization?
-Ignoriraj to napako, poskusi ponovno ali prekini sinhronizacijo?
-Ignore this error, retry or abort?
-Ignoriraj to napako, poskusi ponovno ali prekini?
Include
VkljuÄi
+Include Symbolic Links
+VkljuÄi simboliÄne povezave
Include all rows
VkljuÄi se vrstice
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
ZaÄetna sinhronizacija:
Integrate external applications into context menu. The following macros are available:
Integriraj zunanje aplikacije v kontekstni menu. Na voljo so naslednji makri:
-Last synchronization not completed!
-Zadnja sinhronizacija se ni zakljuÄila!
Leave as unresolved conflict
Pusti kot nerešeni spor
Left
@@ -612,8 +588,6 @@ Load configuration from file
Naloži konfiguracijo iz datoteke
Load configuration history (press DEL to delete items)
Naloži zgodovino konfiguracije (pritisnite DEL za brisanje predmetov)
-Local filter
-Lokalni filter
Log-messages:
SporoÄila beleženja:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Ena od FreeFileSync datotek podatkovne baze Å¡e en obstaja:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Samo datoteke/imeniki, ki preidejo filtriranje bodo izbrani za sinhronizacijo. Filter bo uveljavljnen k imenu relativno(!) na bazo sinhroniziranih imenikov.
-Open directly
-Odpri neposredno
Open with Explorer
Odpri z Raziskovalcem
-Open with Konqueror
-Odpri s Konquerorjem
+Open with default application
+Odpri s privzeto aplikacijo
Operation aborted!
Operacija prekinjena!
Operation:
@@ -680,8 +652,12 @@ Pause
Premor
Paused
Na premoru
+Planned directory deletion is in conflict with its subdirectories and -files!
+NaÄrtovano brisanje imenika je v sporu z njegovimi podimeniki in -datotekami!
Please run a Compare first before synchronizing!
Prosim najprej zaženite Primerjaj preden sinhronizirate!
+Press \"Switch\" to open FreeFileSync GUI modus.
+Pritisnite \"Zamenjaj\", da odprete FreeFileSync GUI naÄin.
Processing folder pair:
Obdelujem par map:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Avtomatizirana sinhronizacija
RealtimeSync configuration
RealtimeSync nastavitve
Recycle Bin not yet supported for this system!
-
+Koš še ni podprt za ta sistem!
Relative path
Relativna pot
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Odstrani v mapo
Remove folder pair
Odstrani par imenikov
-Remove local filter settings
-Odstrani nastavitve lokalnega filtra
Renaming file %x to %y
Preimenujem datoteko %x v %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Izberite varianto:
Set direction:
Nastavi smer:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Nastavljanje privzetih smeri sinhronizacije: Stare datoteke bodo prepisane z novimi datotekami.
Show conflicts
Prikaži spore
@@ -794,10 +768,14 @@ Start synchronization
ZaÄni sinhronizacijo
Statistics
Statistika
+Status feedback
+Povratne informacije statusa
Stop
Ustavi
Swap sides
Zamenjaj strani
+Switching to FreeFileSync GUI modus...
+Preklapljam v FreeFileSync GUI naÄin...
Synchronization Preview
Predogled sinhronizacije
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Status sinhronizacije
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Sinhroniziraj vse .doc, .zip in .exe datoteke, razen iz podmape \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Sinhroniziraj obe strani z uporabo podatkovne baze. Izbrisi so zaznani samodejno
Synchronize...
Sinhroniziraj...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Ukazna vrstica se izvrÅ¡i vsakiÄ ko:\n- postane imenik na voljo (npr. vstavitem USB kljuÄa)\n- datoteke znotraj teh imenikov ali podimenikov so spremenjene
The file does not contain a valid configuration:
Datoteka ne vsebuje veljavne konfiguracije:
+The file was not processed by last synchronization!
+Datoteka ni bila obdelana z zadnjo sinhronizacijo!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Ta varianta oceni dve datoteki z enakim imenom kot enaki, ko imata enako velikost IN enak datum ter Äas zadnjega spreminjanja.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Preverjam datoteko %x
Volume name %x not part of filename %y!
Ime volumna %x ni del imena datoteke %y!
+Waiting for all directories to become available...
+ÄŒakam, da bodo vsi imeniki na voljo...
Warning
Pozor
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/spanish.lng b/BUILD/Languages/spanish.lng
index 763be45d..b20d3130 100644
--- a/BUILD/Languages/spanish.lng
+++ b/BUILD/Languages/spanish.lng
@@ -22,8 +22,6 @@
seg
%x / %y objects deleted successfully
%x / %y objetos borrados satisfactoriamente
-%x Percent
-%x Por ciento
%x directories
%x directorios
%x files,
@@ -34,6 +32,8 @@
%x de %y filas en vista
%x of 1 row in view
%x de 1 fila en vista
+%x%
+%x%
&Abort
&Abortar
&About...
@@ -86,14 +86,14 @@
&Reintentar
&Save
&Guardar
+&Switch
+&Cambiar
&Yes
&Yes
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Tenga en cuenta que sólo las unidades FAT/FAT32 se ven afectadas por este problema!\nEn los demás casos puede deshabilitar la opción \"ignorar 1-hora de diferencia\".)
(Requires an Internet connection!)
(¡Conexión a Internet necesaria!)
-,
-,
- Other side's counterpart to %dir
- El otro lado equivale a %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- derecha
- right newer
- más reciente en la derecha
--Open-Source file synchronization-
--Sincronización de archivos Open-Source-
-.
-.
/sec
/seg
1 directory
@@ -141,7 +137,7 @@
2. &Synchronize...
2. &Sincronizar...
2. Enter a command line.
-2. Introduzca una línea de comando.
+2. Introduzca una línea de comandos.
2. Use wildcard characters '*' and '?'.
2. Usar caracteres comodín '*' y '?'.
3. Exclude files directly on main grid via context menu.
@@ -168,12 +164,10 @@ About
Acerca de
Action
Acción
-Activate filter
-Activar filtro
Add folder
Añadir carpeta
Add folder pair
-Añadir múltiples carpetas
+Añadir un par de carpetas
All directories in sync!
¡Todos los directorios en sincronización!
An exception occured!
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Almenos un campo de entrada del directorio está vacío.
Auto-adjust columns
Ajustar automáticamente las columnas
-Automatic mode
-Modo automático
Batch execution
Ejecución batch
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
¡Ambos lados han cambiado desde la última sincronizacion!
Browse
Examinar
+Browse directory
+Examinar directorio
Build:
Realizado:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
No se puede encontrar %x
Category
Categoría
+Clear filter settings
+Limpiar opciones del filtrado
Comma separated list
Lista separada por comas
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Comparar por \"Tamaño y fecha del archivo\"
Compare by...
Comparar por...
-Comparing content
-Comparación del contenido
Comparing content of files %x
Comparación del contenido de los archivos %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Crear una tarea batch
Creating folder %x
Creando carpeta %x
-Current operation:
-Operación actual:
Custom
Personalizado
Customize columns
@@ -306,10 +298,6 @@ D-Click
Doble click
DECISION TREE
ÃRBOL DE DECISIÓN
-Data remaining:
-Datos restantes:
-Data transferred:
-Datos transferidos:
Data verification error: Source and target file have different content!
Error de verificación de datos: ¡Los archivos de origen y destino tienen un contenido diferente!
Date
@@ -363,11 +351,15 @@ Donar a través de PayPal
Download now?
¿Descargar ahora?
Drag && drop
-Arrastrar && soltar
+Arrastrar y soltar
+Elements found:
+Elementos encontrados:
+Elements processed:
+Elementos procesados:
+Elements remaining:
+Elementos restantes:
Email
Correo electrónico
-Enable filter to exclude files from synchronization
-Activar filtro para excluir archivos de la sincronización
Endless loop when traversing directory:
Bucle infinito al buscar en el directorio:
Error
@@ -443,7 +435,7 @@ Comentarios y sugerencias son bienvenidos en:
File %x has an invalid date!
¡El archivo %x tiene una fecha inválida!
File already exists. Overwrite?
-El archivo ya existe. ¿Sobreescribir?
+El archivo ya existe. ¿Quiere sobreescribirlo?
File content
Contenido del archivo
File does not exist:
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Los archivos serán considerados iguales si\n - el contenido del archivo\nes el mismo
Files are found equal if\n - filesize\n - last write time and date\nare the same
Los archivos serán considerados iguales si\n - tamaño del archivo\n - la hora y fecha de la última escritura\nson iguales
-Files remaining:
-Archivos restantes:
Files that are equal on both sides
Archivos que son iguales en ambos lados
-Files that exist on both sides and have different content
-Archivos que existen en ambos lados y tienen un contenido diferente
Files that exist on both sides, left one is newer
Archivos que existen en ambos lados, el de la izquierda es más reciente
Files that exist on both sides, right one is newer
Archivos que existen en ambos lados, el de la derecha es más reciente
-Files/folders found:
-Archivos/carpetas encontrados:
-Files/folders processed:
-Archivos/carpetas procesadas:
-Files/folders remaining:
-Archivos/carpetas restantes:
+Files that have different content
+Archivos que tienen un contenido diferente
Files/folders that exist on left side only
Archivos/carpetas que existen sólo en el lado izquierdo
Files/folders that exist on right side only
Archivos/carpetas que existen sólo en el lado derecho
-Filter
-Filtro
Filter files
Filtrar archivos
-Filter has been selected
-El filtro ha sido seleccionado
+Filter is active
+Filtro activo
Filter settings have changed!
¡Las opciones de filtrado han cambiado!
Filter view
Vista del filtro
-Filtering is deactivated
-El filtrado está desactivado
+Filter: All pairs
+Filtro: Todos los pares
+Filter: Single pair
+Filtro: Sólo un par
Find
Buscar
Find what:
@@ -502,16 +486,14 @@ Folder Comparison and Synchronization
Comparación y Sincronización de Carpetas
Free disk space available:
Espacio de disco disponible:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Comparación y Sincronización de Carpetas
FreeFileSync Batch Job
Tarea batch de FreeFileSync
FreeFileSync at Sourceforge
FreeFileSync en Sourceforge
FreeFileSync batch file
-archivo batch de FreeFileSync
+Archivo batch de FreeFileSync
FreeFileSync configuration
-configuración de FreeFileSync
+Configuración de FreeFileSync
FreeFileSync is up to date!
¡FreeFileSync está actualizado!
Full path
@@ -520,8 +502,6 @@ Generating database...
Generando base de datos...
Generating file list...
Generando lista de archivos...
-Global filter
-Filtro global
Global settings
Opciones globales
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignorar errores
Ignore subsequent errors
Ignorar errores posteriores
-Ignore this error, retry or abort synchronization?
-¿Ignorar este error, reintentar o abortar sincronización?
-Ignore this error, retry or abort?
-¿Ignorar este error, reintentar o abortar?
Include
Incluir
+Include Symbolic Links
+Incluir enlaces simbólicos
Include all rows
Incluir todas las filas
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Sincronización inicial:
Integrate external applications into context menu. The following macros are available:
Integrar aplicaciones externas en el menú de contexto. Los siguientes macros están disponibles:
-Last synchronization not completed!
-¡La última sincronización no se ha completado!
Leave as unresolved conflict
Dejar como conflicto sin resolver
Left
@@ -612,8 +588,6 @@ Load configuration from file
Cargar configuración desde archivo
Load configuration history (press DEL to delete items)
Cargar historial de configuración (presionar DEL para borrar elementos)
-Local filter
-Filtro local
Log-messages:
Registro de mensajes:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Uno de los archivos de la base de datos de FreeFileSync aún no existe:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Sólo los archivos/directorios que pasen el filtrado serán seleccionados para la sincronización. El filtro será aplicado al nombre relativo(!) a la base de directorios de sincronización.
-Open directly
-Abrir directamente
Open with Explorer
Abrir con Explorer
-Open with Konqueror
-Abrir con Konqueror
+Open with default application
+Abrir con la aplicación por defecto
Operation aborted!
¡Operación abortada!
Operation:
@@ -680,10 +652,14 @@ Pause
Pausa
Paused
Pausado
+Planned directory deletion is in conflict with its subdirectories and -files!
+¡La eliminación planeada del directorio se encuentra en conflicto con sus subdirectorios y archivos!
Please run a Compare first before synchronizing!
¡Por favor, ejecute la comparación antes de la sincronización!
+Press \"Switch\" to open FreeFileSync GUI modus.
+Presionar \"Cambiar\" para abrir el modo GUI de FreeFileSync.
Processing folder pair:
-Procesar múltiples carpetas:
+Procesar un par de carpetas:
Published under the GNU General Public License:
Publicado bajo "GNU General Public License":
Question
@@ -697,7 +673,7 @@ RealtimeSync - Sincronización Automática
RealtimeSync configuration
Configuración de RealtimeSync
Recycle Bin not yet supported for this system!
-
+¡La papelera de reciclaje no esta soportada en este sistema!
Relative path
Ruta relativa
Remove alternate settings
@@ -705,9 +681,7 @@ Eliminar opciones alternativas
Remove folder
Eliminar carpeta
Remove folder pair
-Eliminar múltiples carpetas
-Remove local filter settings
-Eliminar las opciones locales de filtrado
+Eliminar un par de carpetas
Renaming file %x to %y
Renombrando archivo %x a %y
Report translation error
@@ -725,9 +699,9 @@ C&ambiar vista
Save changes to current configuration?
¿Guardar los cambios de la configuración actual?
Save current configuration to file
-Guardar la configuración actual en un archivo
+Guardar configuración actual en un archivo
Scanning...
-Escanenado...
+Escaneando...
Scanning:
Escanear:
Select a folder
@@ -740,7 +714,7 @@ Select variant:
Seleccione un tipo:
Set direction:
Indicar dirección:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Fijando direcciones de sincronización por defecto: Los archivos viejos serán sobreescritos por los archivos nuevos.
Show conflicts
Mostrar conflictos
@@ -794,10 +768,14 @@ Start synchronization
Iniciar sincronización
Statistics
Estadística
+Status feedback
+Status feedback
Stop
Detener
Swap sides
Intercambiar lados
+Switching to FreeFileSync GUI modus...
+Cambiando al modo GUI de FreeFileSync...
Synchronization Preview
Previsualización de la sincronización
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Estado de la sincronización
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Sincronizar todos los archivos .doc, .zip y .exe excepto el contenido de la subcarpeta \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Sincronizar ambos lados usando una base de datos. Las eliminaciones son detectadas automáticamente.
Synchronize...
Sincronizar...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Cada vez que la línea de comandos se ejecuta:\n- un directorio se muestra disponible (por ejemplo, la inserción de una memoria USB)\n- los archivos dentro de estos directorios o subdirectorios son modificados
The file does not contain a valid configuration:
El archivo no contiene una configuración válida:
+The file was not processed by last synchronization!
+¡El archivo no fue procesado por la última sincronización!
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Este tipo evalúa dos archivos con el mismo nombre como iguales cuando tienen el mismo tamaño de archivo y la misma fecha de modificación.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Verificación del archivo %x
Volume name %x not part of filename %y!
El nombre del volumen %x no es una parte del nombre de archivo %y
+Waiting for all directories to become available...
+Esperando a que todos los directorios esten disponibles...
Warning
Atención
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/swedish.lng b/BUILD/Languages/swedish.lng
index 19528a48..f32e7d53 100644
--- a/BUILD/Languages/swedish.lng
+++ b/BUILD/Languages/swedish.lng
@@ -22,8 +22,6 @@
sek.
%x / %y objects deleted successfully
%x / %y objekt borttagna
-%x Percent
-%x Procent
%x directories
%x kataloger
%x files,
@@ -34,6 +32,8 @@
%x rader av %y i vyn
%x of 1 row in view
%x av 1 rad i vyn
+%x%
+%x%
&Abort
&Avbryt
&About...
@@ -86,14 +86,14 @@
&Försök igen
&Save
&Spara
+&Switch
+&Växla
&Yes
&Ja
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Notera att endast FAT/FAT32-formaterade diskar berörs av detta problem!\nI alla andra fall kan du inaktivera alternativet \"Ignorera sommartid\".)
(Requires an Internet connection!)
(Kräver Internetuppkoppling!)
-,
-,
- Other side's counterpart to %dir
- Andra sidans motsvarighet till %dir
- Other side's counterpart to %name
@@ -122,10 +122,6 @@
- höger
- right newer
- höger nyare
--Open-Source file synchronization-
--Öppen källkod filsynkronisering-
-.
-.
/sec
/s
1 directory
@@ -168,8 +164,6 @@ About
Om
Action
Aktivitet
-Activate filter
-Aktivera filter
Add folder
Lägg till katalog
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Minst 1 adressfält är tomt.
Auto-adjust columns
Autojustera kollumner
-Automatic mode
-Autoläge
Batch execution
Batch-körning
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
Båda sidor har ändrats sedan senaste synkroniseringen!
Browse
Bläddra
+Browse directory
+Sök upp katalog
Build:
Bygg:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Kan inte hitta %x
Category
Kategori
+Clear filter settings
+Rensa filterinställningar
Comma separated list
Komma-separerad lista
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
Jämför: \"Filstorlek och datum\"
Compare by...
Jämför...
-Comparing content
-Jämför innehåll
Comparing content of files %x
Jämför filinnehåll för %x
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Skapa ett batch-jobb
Creating folder %x
Skapar katalog %x
-Current operation:
-Aktuell uppgift:
Custom
Anpassat
Customize columns
@@ -306,10 +298,6 @@ D-Click
HÃ¥ll ner D
DECISION TREE
BESLUTSTRÄD
-Data remaining:
-Återstående data:
-Data transferred:
-Överförd data:
Data verification error: Source and target file have different content!
Verifikationsfel: Källfil och målfil har olika innehåll!
Date
@@ -364,10 +352,14 @@ Download now?
Ladda ner nu?
Drag && drop
Dra && släpp
+Elements found:
+Funna poster:
+Elements processed:
+Processade poster
+Elements remaining:
+Återstående poster:
Email
e-post
-Enable filter to exclude files from synchronization
-Aktivera filter för att undanta filer från synkronisering
Endless loop when traversing directory:
Oändlig loop vid accessförsök på katalog:
Error
@@ -462,38 +454,30 @@ Files are found equal if\n - file content\nis the same
Filerna betecknas som lika om, \n - filinnehållet\när lika
Files are found equal if\n - filesize\n - last write time and date\nare the same
Filerna betecknas som lika om, \n - filstorlek\n - 'senast använd' och datum\när lika
-Files remaining:
-Filer kvar:
Files that are equal on both sides
Filer som är lika på båda sidor
-Files that exist on both sides and have different content
-Filer som finns på båda sidor och har olika innehåll
Files that exist on both sides, left one is newer
Filer som finns på båda sidor, vänster är nyare
Files that exist on both sides, right one is newer
Filer som finns på båda sidor, höger är nyare
-Files/folders found:
-Funna filer/kataloger:
-Files/folders processed:
-Filer/kataloger klara:
-Files/folders remaining:
-Filer/kataloger kvar:
+Files that have different content
+Filer som har olika innehåll
Files/folders that exist on left side only
Filer/kataloger som finns på vänster sida enbart
Files/folders that exist on right side only
Filer/kataloger som finns på höger sida enbart
-Filter
-Filter
Filter files
Undantag
-Filter has been selected
-Filter aktiverat
+Filter is active
+Filter är aktiverat
Filter settings have changed!
Filterinställningar har ändrats!
Filter view
Filtervy
-Filtering is deactivated
-Filter inaktiverat
+Filter: All pairs
+Filter: Generella undantag
+Filter: Single pair
+Filter: Enstaka undantag
Find
Sök
Find what:
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Katalogjämförelse och synkronisering
Free disk space available:
Ledigt diskutrymme:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Jämför och Synkronisera
FreeFileSync Batch Job
FreeFileSync Batch-jobb
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Skapar databas...
Generating file list...
Skapar fillista...
-Global filter
-Allmänt filter
Global settings
Allmäna inställningar
Help
@@ -578,12 +558,10 @@ Ignore errors
Ignorera fel
Ignore subsequent errors
Ignorera följdfel
-Ignore this error, retry or abort synchronization?
-Ignorera felet, försök igen eller avbryt synkroniseringen?
-Ignore this error, retry or abort?
-Ignorera felet, försök igen eller avbryt?
Include
Inkludera
+Include Symbolic Links
+Inkludera symboliska länkar
Include all rows
Inkludera alla rader
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Initial synkronisering:
Integrate external applications into context menu. The following macros are available:
Integrera externa program i högerklicksmeny. Följande variabler finns tillgängliga:
-Last synchronization not completed!
-Senaste synkronisering ej slutförd!
Leave as unresolved conflict
Ignorera konflikt
Left
@@ -612,8 +588,6 @@ Load configuration from file
Hämta inställningar från fil
Load configuration history (press DEL to delete items)
Konfigurationshistoria (Tryck DEL för att ta bort objekt)
-Local filter
-Lokalt filter
Log-messages:
Log-meddelanden:
Logging
@@ -659,17 +633,15 @@ Antal filer och kataloger som kommer att tas bort
Number of files that will be overwritten
Antal filer som kommer att skrivas över
One of the FreeFileSync database entries within the following file is not yet existing:
-Ett av FreeFileSync´s databasobjekt i följande fil saknas:
+Ett av FreeFileSyncs databasobjekt saknas i följande fil:
One of the FreeFileSync database files is not yet existing:
-En av FreeFileSync´s databasfiler saknas:
+En av FreeFileSyncs databasfiler saknas:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Endast filer/kataloger som kvarstår efter filtrering, kommer att markeras för synkronisering.
-Open directly
-Öppna fil
Open with Explorer
Öppna katalog
-Open with Konqueror
-Öppna med Konqueror
+Open with default application
+Öppna med standardprogram
Operation aborted!
Processen avbruten!
Operation:
@@ -680,8 +652,12 @@ Pause
Paus
Paused
Pausad
+Planned directory deletion is in conflict with its subdirectories and -files!
+Planerad katalogborttagning är i konflikt med sina underkataloger och filer
Please run a Compare first before synchronizing!
Du måste trycka \"Jämför\" innan du kan synkronisera.
+Press \"Switch\" to open FreeFileSync GUI modus.
+Tryck på \"Växla\" för att öppna FreeFileSyncs grafiska läge
Processing folder pair:
Processar katalogpar:
Published under the GNU General Public License:
@@ -697,7 +673,7 @@ RealtimeSync - Automatiserad synkronisering
RealtimeSync configuration
RealtimeSync konfiguration
Recycle Bin not yet supported for this system!
-
+Stödet för papperskorg finns ännu inte i detta system
Relative path
Sökväg
Remove alternate settings
@@ -706,8 +682,6 @@ Remove folder
Ta bort katalog
Remove folder pair
Ta bort katalogpar
-Remove local filter settings
-Ta bort lokala filterinställningar
Renaming file %x to %y
Byter namn på %x till %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Välj variant:
Set direction:
Ange riktning:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Standardsynkronisering: Gamla filer kommer att skrivas över av nyare versioner.
Show conflicts
Visa konflikter
@@ -794,10 +768,14 @@ Start synchronization
Starta synkronisering
Statistics
Statistik
+Status feedback
+Status
Stop
Stopp
Swap sides
Byt sida
+Switching to FreeFileSync GUI modus...
+Växlar till FreeFileSyncs grafiska läge
Synchronization Preview
Förhandsvisning
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Synkroniseringsstatus
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
Synkronisera alla filer, .doc, .zip och .exe men inga undermappar \"temp\".
-Synchronize both sides using a database. Deletions are detected automatically
-Synkronisera båda sidor med hjälp av databas. Borttagningar upptäcks automatiskt
Synchronize...
Synkronisera
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
Kommandot kommer att verkställas varje gång:\n- målkatalogen blir tillgänglig (t.ex USB-anslutning)\n- filer i dessa kataloger eller underkataloger ändras
The file does not contain a valid configuration:
Filen är ingen giltig konfigureringsfil:
+The file was not processed by last synchronization!
+Filen bearbetades inte vid senaste synkroniseringen
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Denna variant betecknar 2 filer med samma namn som lika, när dom har samma storlek OCH samma tidsstämpling.
Time
@@ -868,6 +846,8 @@ Verifying file %x
Verifierar %x
Volume name %x not part of filename %y!
Volymnamn %x saknas i filnamn %y!
+Waiting for all directories to become available...
+Väntar på att alla sökvägar skall bli åtkommliga...
Warning
Varning
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Languages/turkish.lng b/BUILD/Languages/turkish.lng
index 94edb764..4ad70178 100644
--- a/BUILD/Languages/turkish.lng
+++ b/BUILD/Languages/turkish.lng
@@ -22,8 +22,6 @@
san
%x / %y objects deleted successfully
%x / %y obje başarıyla silindi
-%x Percent
-Yüzde %x
%x directories
%x dizin
%x files,
@@ -34,6 +32,8 @@ Yüzde %x
%y satırdan %x'i görüntüleniyor
%x of 1 row in view
1 satırdan %x'i görüntüleniyor
+%x%
+
&Abort
Va&zgeç
&About...
@@ -86,14 +86,14 @@ Ge&ri yükle
&Yeniden dene
&Save
&Kaydet
+&Switch
+
&Yes
&Evet
(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)
(Not: Sadece FAT/FAT32 olarak biçimlendirilmiş sürücüler bu problemden etkilenir!\nDiğer durumlarda, \"1-saat'lik zaman farkını yoksay\" ayarı devre dışı bırakılabilir.)
(Requires an Internet connection!)
-,
-,
- Other side's counterpart to %dir
- %dir'e diğer tarafın karşılığı
- Other side's counterpart to %name
@@ -122,10 +122,6 @@ Ge&ri yükle
- saÄŸ
- right newer
- saÄŸdaki daha yeni
--Open-Source file synchronization-
--Açık kaynak dosya senkronizasyonu
-.
-.
/sec
/san
1 directory
@@ -168,8 +164,6 @@ About
Hakkında
Action
Ä°ÅŸlem
-Activate filter
-
Add folder
Klasör ekle
Add folder pair
@@ -188,8 +182,6 @@ At least one directory input field is empty.
Auto-adjust columns
Kolonları otomatik olarak hizala
-Automatic mode
-Otomatik mod
Batch execution
Komut (batch) çalıştırılması
Batch file created successfully!
@@ -202,6 +194,8 @@ Both sides have changed since last synchronization!
En son senkronizasyondan sonra her iki tarafta deðiþmiþ bulunuyor!
Browse
Araştır
+Browse directory
+
Build:
Derleme:
Cannot determine sync-direction:
@@ -210,6 +204,8 @@ Cannot find %x
Category
Kategori
+Clear filter settings
+
Comma separated list
Virgül ile ayrılmış liste
Command line
@@ -226,8 +222,6 @@ Compare by \"File size and date\"
\"Dosya ebadı ve tarihi\" ile karşılaştır
Compare by...
ile karşılaştır...
-Comparing content
-İçerik karşılaştırılıyor
Comparing content of files %x
%x dosyasının içeriği karşılaştırılıyor
Comparing content...
@@ -294,8 +288,6 @@ Create a batch job
Komut (batch) görevi oluştur
Creating folder %x
%x klasörü oluşturuluyor
-Current operation:
-Halihazırdaki işlem:
Custom
Özel
Customize columns
@@ -306,10 +298,6 @@ D-Click
D-TuÅŸu
DECISION TREE
Karar Şeması
-Data remaining:
-Kalan veri:
-Data transferred:
-
Data verification error: Source and target file have different content!
Veri doğrulama hatası: Kaynak ve hedef dosyası içeriği farklı!
Date
@@ -364,10 +352,14 @@ Download now?
Åžimdi indirilsinmi?
Drag && drop
Sürükle bırak
+Elements found:
+
+Elements processed:
+
+Elements remaining:
+
Email
Eposta
-Enable filter to exclude files from synchronization
-Senkronizasyon sırasında dosya hariç tutmayı etkinleştir
Endless loop when traversing directory:
Dizin işleminde sonsuz döngü:
Error
@@ -462,37 +454,29 @@ Files are found equal if\n - file content\nis the same
\n - dosya içeriği\naynı ise dosyalar eşit kabul edilir
Files are found equal if\n - filesize\n - last write time and date\nare the same
\n - dosya ebadı\n - son değişiklik tarihi\naynı ise dosyalar eşit kabul edilir
-Files remaining:
-Kalan dosyalar:
Files that are equal on both sides
Her iki tarafta eÅŸit olan dosyalar
-Files that exist on both sides and have different content
-Her iki tarafta aynı fakat içerikleri farklı dosyalar
Files that exist on both sides, left one is newer
Her iki tarafta mevcut olup solda olanı yeni olan dosyalar
Files that exist on both sides, right one is newer
Her iki tarafta mevcut olup sağda olanı yeni olan dosyalar
-Files/folders found:
-Bulunan dosyalar/klasörler:
-Files/folders processed:
+Files that have different content
-Files/folders remaining:
-Kalan dosyalar/klasörler:
Files/folders that exist on left side only
Sadece sol tarafta mevcut olan dosyalar/klasörler
Files/folders that exist on right side only
Sadece sağ tarafta mevcut olan dosyalar/klasörler
-Filter
-Filtre
Filter files
Fltre dosyaları
-Filter has been selected
+Filter is active
Filter settings have changed!
Filter view
Filtre görünümü
-Filtering is deactivated
+Filter: All pairs
+
+Filter: Single pair
Find
@@ -502,8 +486,6 @@ Folder Comparison and Synchronization
Klasör Karşılaştırması ve Senkronizasyonu
Free disk space available:
Boşta kullanılabilir disk alanı:
-FreeFileSync - Folder Comparison and Synchronization
-FreeFileSync - Klasör Karşılaştırması ve Senkronizasyonu
FreeFileSync Batch Job
FreeFileSync Komut (Batch) Görevi
FreeFileSync at Sourceforge
@@ -520,8 +502,6 @@ Generating database...
Veri tabaný yaratýlýyor...
Generating file list...
Dosya listesi oluÅŸturuluyor...
-Global filter
-
Global settings
Genel ayarlar
Help
@@ -578,12 +558,10 @@ Ignore errors
Hataları yoksay
Ignore subsequent errors
Takibeden hataları yoksay
-Ignore this error, retry or abort synchronization?
-Bu hatayı yoksay, yeniden dene veya senkronizasyondan vazgeç?
-Ignore this error, retry or abort?
-Bu hatayı yoksay, yeniden dene veya vazgeç?
Include
Dahil et
+Include Symbolic Links
+
Include all rows
Include temporarily
@@ -600,8 +578,6 @@ Initial synchronization:
Baþlangýç senkronizasyonu:
Integrate external applications into context menu. The following macros are available:
Harici uygulamaları içerik menüsüne ekle. Şu makro’lar temin edilebilir:
-Last synchronization not completed!
-
Leave as unresolved conflict
Çözülmemiş tutarsızlık olarak bırak
Left
@@ -612,8 +588,6 @@ Load configuration from file
Dosyadan konfigürasyonu yükle
Load configuration history (press DEL to delete items)
Konfigürasyon geçmişini yükle (Öğeleri silmek için DEL’e basın)
-Local filter
-
Log-messages:
Kayıt mesajları:
Logging
@@ -664,12 +638,10 @@ One of the FreeFileSync database files is not yet existing:
Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories.
Senkronizasyon için sadece filtrelenmiş dosyalar/dizinler seçilecek. Senkronizasyon taban dizinlerine göreceli isimlere filtereleme uygulanacaktır.
-Open directly
-Doðrudan aç
Open with Explorer
Gezgin ile aç
-Open with Konqueror
-Konqueror ile aç
+Open with default application
+
Operation aborted!
İşlemden vazgeçildi!
Operation:
@@ -680,8 +652,12 @@ Pause
Duraklat
Paused
Duraklatıldı
+Planned directory deletion is in conflict with its subdirectories and -files!
+
Please run a Compare first before synchronizing!
+Press \"Switch\" to open FreeFileSync GUI modus.
+
Processing folder pair:
Published under the GNU General Public License:
@@ -706,8 +682,6 @@ Remove folder
Klasörü kaldır
Remove folder pair
Klasör çiftini kaldır
-Remove local filter settings
-
Renaming file %x to %y
Report translation error
@@ -740,7 +714,7 @@ Select variant:
Değişkeni seç:
Set direction:
-Setting default synchronization directions: Old files will be overwritten by newer files.
+Setting default synchronization directions: Old files will be overwritten with newer files.
Show conflicts
Tutarsızlıkları göster
@@ -794,10 +768,14 @@ Start synchronization
Senkronizasyonu baÅŸlat
Statistics
Ä°statistik
+Status feedback
+
Stop
Durdur
Swap sides
Tarafları ters çevir
+Switching to FreeFileSync GUI modus...
+
Synchronization Preview
Senkronizasyon Önizlemesi
Synchronization aborted!
@@ -812,8 +790,6 @@ Synchronization status
Senkronizasyon durumu
Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\".
\"temp\" alt klasöründeki herşey hariç, tüm .doc, .zip ve .exe dosyalarını senkronize et.
-Synchronize both sides using a database. Deletions are detected automatically
-Bir veritabaný kullanarak iki tarafý senkronize et. Silmeler otomatik olarak algýlanýr
Synchronize...
Senkronize et...
Synchronizing...
@@ -828,6 +804,8 @@ The command line is executed each time:\n- a directory becomes available (e.g. U
The file does not contain a valid configuration:
Dosya geçerli bir konfigürasyon içermiyor:
+The file was not processed by last synchronization!
+
This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time.
Bu değişken, aynı isimli iki dosyanın, aynı ebata ve aynı son değişikik tarihine sahip olması durumunda eşit olması anlamına gelir.
Time
@@ -868,6 +846,8 @@ Verifying file %x
%x dosyası doğrulanıyor
Volume name %x not part of filename %y!
%x birim adı, %y dosya adının bölümü değil!
+Waiting for all directories to become available...
+
Warning
Uyarı
Warning: Synchronization failed for %x item(s):
diff --git a/BUILD/Resources.dat b/BUILD/Resources.dat
index d53d59e7..b9b73aa7 100644
--- a/BUILD/Resources.dat
+++ b/BUILD/Resources.dat
Binary files differ
diff --git a/Cleanup.cmd b/Cleanup.cmd
index cd3c2110..7424db08 100644
--- a/Cleanup.cmd
+++ b/Cleanup.cmd
@@ -34,25 +34,26 @@ del BUILD\RealtimeSync_Win32.exe
del BUILD\RealtimeSync_x64.exe
del BUILD\gmon.out
-del library\ShadowCopy\ShadowCopy.ncb
-attrib library\ShadowCopy\ShadowCopy.suo -h
-del library\ShadowCopy\ShadowCopy.suo
-del library\ShadowCopy\Shadow_2003.vcproj.*.user
-del library\ShadowCopy\Shadow_XP.vcproj.*.user
-del library\ShadowCopy\ShadowTest.vcproj.*.user
-del library\ShadowCopy\Shadow.pdb
-del library\ShadowCopy\Shadow.ilk
-del library\ShadowCopy\Shadow.exp
-del library\ShadowCopy\Shadow.lib
-del library\ShadowCopy\ShadowTest.ilk
-del library\ShadowCopy\ShadowTest.pdb
-
-del library\Recycler\Recycler_Vista.ncb
-attrib library\Recycler\Recycler_Vista.suo -h
-del library\Recycler\Recycler_Vista.suo
-del library\Recycler\Recycler_Vista.vcproj.*.user
-del library\Recycler\Test.vcproj.*.user
-
-attrib library\Taskbar_Seven\Taskbar_Seven.suo -h
-del library\Taskbar_Seven\Taskbar_Seven.suo
-del library\Taskbar_Seven\Taskbar_Seven.vcproj.*.user
+del shared\ShadowCopy\ShadowCopy.ncb
+attrib shared\ShadowCopy\ShadowCopy.suo -h
+del shared\ShadowCopy\ShadowCopy.suo
+del shared\ShadowCopy\Shadow_2003.vcproj.*.user
+del shared\ShadowCopy\Shadow_XP.vcproj.*.user
+del shared\ShadowCopy\ShadowTest.vcproj.*.user
+del shared\ShadowCopy\Shadow.pdb
+del shared\ShadowCopy\Shadow.ilk
+del shared\ShadowCopy\Shadow.exp
+del shared\ShadowCopy\Shadow.lib
+del shared\ShadowCopy\ShadowTest.ilk
+del shared\ShadowCopy\ShadowTest.pdb
+
+del shared\IFileOperation\FileOperation_Vista.ncb
+attrib shared\IFileOperation\FileOperation_Vista.suo -h
+del shared\IFileOperation\FileOperation_Vista.suo
+del shared\IFileOperation\FileOperation_Vista.vcproj.*.user
+del shared\IFileOperation\Test.vcproj.*.user
+del shared\IFileOperation\Test.ilk
+
+attrib shared\Taskbar_Seven\Taskbar_Seven.suo -h
+del shared\Taskbar_Seven\Taskbar_Seven.suo
+del shared\Taskbar_Seven\Taskbar_Seven.vcproj.*.user
diff --git a/FreeFileSync.cbp b/FreeFileSync.cbp
index 968ad8a1..0a3d7600 100644
--- a/FreeFileSync.cbp
+++ b/FreeFileSync.cbp
@@ -7,32 +7,6 @@
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
- <Target title="Debug">
- <Option output="BUILD\FreeFileSync" prefix_auto="1" extension_auto="1" />
- <Option working_dir="BUILD\" />
- <Option object_output="OBJ\Debug_FFS_GCC\" />
- <Option type="0" />
- <Option compiler="gcc" />
- <Option projectLinkerOptionsRelation="2" />
- <Compiler>
- <Add option="-g" />
- <Add option="-Winvalid-pch" />
- <Add option='-include &quot;library/pch.h&quot;' />
- <Add option="-D__WXDEBUG__" />
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswud" />
- </Compiler>
- <ResourceCompiler>
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswud" />
- </ResourceCompiler>
- <Linker>
- <Add library="libwxmsw28ud_adv.a" />
- <Add library="libwxmsw28ud_core.a" />
- <Add library="libwxbase28ud.a" />
- <Add library="libwxpngd.a" />
- <Add library="libwxzlibd.a" />
- <Add library="libwxbase28ud_net.a" />
- </Linker>
- </Target>
<Target title="Release">
<Option output="BUILD\FreeFileSync" prefix_auto="1" extension_auto="1" />
<Option working_dir="BUILD\" />
@@ -45,9 +19,6 @@
<Add option="-DNDEBUG" />
<Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswu" />
</Compiler>
- <ResourceCompiler>
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswu" />
- </ResourceCompiler>
<Linker>
<Add option="-s" />
<Add library="libwxmsw28u_adv.a" />
@@ -56,6 +27,7 @@
<Add library="libwxpng.a" />
<Add library="libwxzlib.a" />
<Add library="libwxbase28u_net.a" />
+ <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib" />
</Linker>
</Target>
<Target title="Unit Test">
@@ -70,9 +42,9 @@
<Add option="-Winvalid-pch" />
<Add option='-include &quot;library/pch.h&quot;' />
<Add option="-D__WXDEBUG__" />
+ <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll\mswud" />
<Add directory="library\gtest" />
<Add directory="library\gtest\include" />
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswud" />
</Compiler>
<Linker>
<Add library="libwxmsw28ud_adv.a" />
@@ -80,33 +52,29 @@
<Add library="libwxbase28ud.a" />
<Add library="libwxpngd.a" />
<Add library="libwxzlibd.a" />
+ <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll" />
</Linker>
</Target>
- <Target title="Performance Test">
+ <Target title="Debug-DLL">
<Option output="BUILD\FreeFileSync" prefix_auto="1" extension_auto="1" />
- <Option working_dir="BUILD\" />
- <Option object_output="OBJ\Release_FFS_GCC\" />
+ <Option working_dir="BUILD" />
+ <Option object_output="OBJ\Debug_FFS_GCC\" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
- <Add option="-O3" />
- <Add option="-pg" />
<Add option="-g" />
- <Add option="-DNDEBUG" />
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswu" />
+ <Add option="-Winvalid-pch" />
+ <Add option='-include &quot;library/pch.h&quot;' />
+ <Add option="-D__WXDEBUG__" />
+ <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll\mswud" />
</Compiler>
- <ResourceCompiler>
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswu" />
- </ResourceCompiler>
<Linker>
- <Add option="-pg -lgmon" />
- <Add library="libwxmsw28u_adv.a" />
- <Add library="libwxmsw28u_core.a" />
- <Add library="libwxbase28u.a" />
- <Add library="libwxpng.a" />
- <Add library="libwxzlib.a" />
- <Add library="libwxbase28u_net.a" />
+ <Add library="libwxmsw28ud_adv.a" />
+ <Add library="libwxmsw28ud_core.a" />
+ <Add library="libwxbase28ud.a" />
+ <Add library="libwxbase28ud_net.a" />
+ <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll" />
</Linker>
</Target>
</Build>
@@ -117,10 +85,10 @@
<Add option="-Wcast-align" />
<Add option="-Wmissing-include-dirs" />
<Add option="-Wswitch-enum" />
+ <Add option="-Wmain" />
<Add option="-Wall" />
<Add option="-pipe" />
<Add option="-mthreads" />
- <Add option='[[if (PLATFORM == PLATFORM_MSW &amp;&amp; (GetCompilerFactory().GetCompilerVersionString(_T(&quot;gcc&quot;)) &gt;= _T(&quot;4.0.0&quot;))) print(_T(&quot;-Wno-attributes&quot;));]]' />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add option="-DFFS_WIN" />
@@ -128,15 +96,14 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-DZSTRING_WIDE_CHAR" />
<Add directory="C:\Programme\C++\wxWidgets\include" />
- <Add directory="C:\Programme\C++\wxWidgets\contrib\include" />
<Add directory="shared\boost_1_x" />
- <Add directory="shared" />
</Compiler>
<ResourceCompiler>
<Add directory="C:\Programme\C++\wxWidgets\include" />
</ResourceCompiler>
<Linker>
<Add option="-mthreads" />
+ <Add option="-Wl,--enable-auto-import" />
<Add library="libkernel32.a" />
<Add library="libuser32.a" />
<Add library="libuuid.a" />
@@ -145,9 +112,9 @@
<Add library="liboleaut32.a" />
<Add library="libgdi32.a" />
<Add library="libcomdlg32.a" />
- <Add library="libws2_32.a" />
<Add library="libwinmm.a" />
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib" />
+ <Add library="libws2_32.a" />
+ <Add library="libwinspool" />
</Linker>
<Unit filename="WxWizFrame.fbp">
<Option target="&lt;{~None~}&gt;" />
@@ -157,9 +124,8 @@
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="application.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="application.h">
<Option target="&lt;{~None~}&gt;" />
@@ -173,29 +139,25 @@
<Unit filename="library\binary.cpp" />
<Unit filename="library\binary.h" />
<Unit filename="library\customGrid.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\customGrid.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="library\dbFile.cpp" />
<Unit filename="library\dbFile.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\detectRenaming.h" />
<Unit filename="library\errorLogging.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\errorLogging.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\filter.cpp" />
<Unit filename="library\filter.h">
@@ -223,14 +185,12 @@
<Option target="Unit Test" />
</Unit>
<Unit filename="library\iconBuffer.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\iconBuffer.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\multithreading.cpp">
<Option target="Unit Test" />
@@ -238,8 +198,8 @@
<Unit filename="library\pch.h">
<Option compile="1" />
<Option weight="0" />
- <Option target="Debug" />
<Option target="Unit Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\processXml.cpp" />
<Unit filename="library\processXml.h">
@@ -252,9 +212,8 @@
<Unit filename="library\softFilter.cpp" />
<Unit filename="library\softFilter.h" />
<Unit filename="library\statistics.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="library\statistics.h">
<Option target="&lt;{~None~}&gt;" />
@@ -265,55 +224,47 @@
</Unit>
<Unit filename="resource.rc">
<Option compilerVar="WINDRES" />
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\Recycler.h" />
<Unit filename="shared\appMain.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\appMain.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\buildInfo.h" />
<Unit filename="shared\customButton.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\customButton.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\customComboBox.cpp" />
<Unit filename="shared\customComboBox.h" />
<Unit filename="shared\customTooltip.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\customTooltip.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
+ <Unit filename="shared\debugNew.h" />
<Unit filename="shared\dllLoader.cpp" />
<Unit filename="shared\dllLoader.h" />
<Unit filename="shared\dragAndDrop.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\dragAndDrop.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\fileError.h" />
<Unit filename="shared\fileHandling.cpp" />
@@ -329,14 +280,12 @@
<Unit filename="shared\guid.cpp" />
<Unit filename="shared\guid.h" />
<Unit filename="shared\helpProvider.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\helpProvider.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\localization.cpp" />
<Unit filename="shared\localization.h" />
@@ -356,33 +305,30 @@
<Unit filename="shared\systemFunctions.cpp" />
<Unit filename="shared\systemFunctions.h" />
<Unit filename="shared\taskbar.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\taskbar.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\tinyxml\tinystr.cpp" />
<Unit filename="shared\tinyxml\tinyxml.cpp" />
<Unit filename="shared\tinyxml\tinyxmlerror.cpp" />
<Unit filename="shared\tinyxml\tinyxmlparser.cpp" />
<Unit filename="shared\toggleButton.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\toggleButton.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="shared\util.cpp" />
<Unit filename="shared\util.h" />
<Unit filename="shared\xmlBase.cpp" />
<Unit filename="shared\xmlBase.h" />
+ <Unit filename="shared\xmlError.h" />
<Unit filename="shared\zstring.cpp" />
<Unit filename="shared\zstring.h" />
<Unit filename="structures.cpp" />
@@ -393,89 +339,78 @@
<Unit filename="synchronization.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
+ <Unit filename="ui\batchConfig.cpp">
+ <Option target="Release" />
+ <Option target="Debug-DLL" />
+ </Unit>
+ <Unit filename="ui\batchConfig.h">
+ <Option target="Release" />
+ <Option target="Debug-DLL" />
+ </Unit>
<Unit filename="ui\batchStatusHandler.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\batchStatusHandler.h" />
<Unit filename="ui\checkVersion.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\checkVersion.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="ui\folderPair.h">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\gridView.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\gridView.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="ui\guiGenerated.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\guiGenerated.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="ui\guiStatusHandler.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\guiStatusHandler.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="ui\mainDialog.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\mainDialog.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="ui\messagePopup.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\messagePopup.h" />
<Unit filename="ui\mouseMoveWindow.cpp" />
<Unit filename="ui\mouseMoveWindow.h" />
<Unit filename="ui\progressIndicator.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\progressIndicator.h" />
<Unit filename="ui\search.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\search.h" />
- <Unit filename="ui\settingsDialog.cpp">
- <Option target="Debug" />
- <Option target="Release" />
- <Option target="Performance Test" />
- </Unit>
- <Unit filename="ui\settingsDialog.h">
- <Option target="&lt;{~None~}&gt;" />
- </Unit>
<Unit filename="ui\smallDialogs.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\smallDialogs.h">
<Option target="&lt;{~None~}&gt;" />
@@ -483,13 +418,27 @@
<Unit filename="ui\sorting.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
+ <Unit filename="ui\switchToGui.cpp">
+ <Option target="Release" />
+ <Option target="Debug-DLL" />
+ </Unit>
+ <Unit filename="ui\switchToGui.h">
+ <Option target="Release" />
+ <Option target="Debug-DLL" />
+ </Unit>
+ <Unit filename="ui\syncConfig.cpp">
+ <Option target="Release" />
+ <Option target="Debug-DLL" />
+ </Unit>
+ <Unit filename="ui\syncConfig.h">
+ <Option target="Release" />
+ <Option target="Debug-DLL" />
+ </Unit>
<Unit filename="ui\trayIcon.cpp">
- <Option target="Debug" />
<Option target="Release" />
- <Option target="Performance Test" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="ui\trayIcon.h" />
- <Unit filename="ui\util.h" />
<Extensions>
<code_completion />
<envvars />
diff --git a/FreeFileSync.vcproj b/FreeFileSync.vcproj
index 7846fec1..aeb6bd77 100644
--- a/FreeFileSync.vcproj
+++ b/FreeFileSync.vcproj
@@ -229,6 +229,7 @@
WarningLevel="4"
DebugInformationFormat="3"
DisableSpecificWarnings="4100"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -383,6 +384,10 @@
>
</File>
<File
+ RelativePath=".\ui\batchConfig.cpp"
+ >
+ </File>
+ <File
RelativePath=".\ui\batchStatusHandler.cpp"
>
</File>
@@ -527,10 +532,6 @@
>
</File>
<File
- RelativePath=".\ui\settingsDialog.cpp"
- >
- </File>
- <File
RelativePath=".\shared\shadow.cpp"
>
</File>
@@ -591,6 +592,14 @@
>
</File>
<File
+ RelativePath=".\ui\switchToGui.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ui\syncConfig.cpp"
+ >
+ </File>
+ <File
RelativePath=".\synchronization.cpp"
>
</File>
diff --git a/Makefile b/Makefile
index 4aa455b4..9c6781e3 100644
--- a/Makefile
+++ b/Makefile
@@ -19,12 +19,14 @@ FILE_LIST+=ui/guiGenerated.cpp
FILE_LIST+=shared/util.cpp
FILE_LIST+=ui/gridView.cpp
FILE_LIST+=ui/mainDialog.cpp
-FILE_LIST+=ui/settingsDialog.cpp
+FILE_LIST+=ui/batchConfig.cpp
+FILE_LIST+=ui/syncConfig.cpp
FILE_LIST+=ui/checkVersion.cpp
FILE_LIST+=ui/batchStatusHandler.cpp
FILE_LIST+=ui/guiStatusHandler.cpp
FILE_LIST+=ui/trayIcon.cpp
FILE_LIST+=ui/search.cpp
+FILE_LIST+=ui/switchToGui.cpp
FILE_LIST+=ui/messagePopup.cpp
FILE_LIST+=ui/progressIndicator.cpp
FILE_LIST+=library/customGrid.cpp
@@ -37,9 +39,9 @@ FILE_LIST+=library/statistics.cpp
FILE_LIST+=library/filter.cpp
FILE_LIST+=library/binary.cpp
FILE_LIST+=library/dbFile.cpp
+FILE_LIST+=shared/localization_no_BOM.cpp
FILE_LIST+=shared/fileIO.cpp
FILE_LIST+=shared/dragAndDrop.cpp
-FILE_LIST+=shared/localization.cpp
FILE_LIST+=shared/guid.cpp
FILE_LIST+=shared/tinyxml/tinyxml.cpp
FILE_LIST+=shared/tinyxml/tinystr.cpp
@@ -91,10 +93,12 @@ init:
#remove byte ordering mark: needed by Visual C++ but an error with GCC
removeBOM: tools/removeBOM.cpp
- g++ -o removeBOM tools/removeBOM.cpp
- ./removeBOM shared/localization.cpp
+ g++ -o OBJ/removeBOM tools/removeBOM.cpp
+ ./OBJ/removeBOM shared/localization.cpp shared/localization_no_BOM.cpp
-osspUUID:
+osspUUID:
+#some files within ossp_uuid may need to have readonly attribute removed
+ chmod -R 0755 shared/ossp_uuid && \
cd shared/ossp_uuid && \
chmod +x configure && \
chmod +x shtool && \
@@ -112,12 +116,20 @@ FreeFileSync: init removeBOM osspUUID $(DEP_LIST)
clean:
rm -rf OBJ
rm -f BUILD/$(APPNAME)
- rm -f removeBOM
if [ -e shared/ossp_uuid/Makefile ]; then cd shared/ossp_uuid && make clean; fi
+ rm -f shared/localization_no_BOM.cpp
install:
if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR); fi
if [ ! -d $(APPSHAREDIR) ] ; then mkdir -p $(APPSHAREDIR); fi
cp BUILD/$(APPNAME) $(BINDIR)
- cp -R BUILD/Languages/ BUILD/Help/ BUILD/Compare_Complete.wav BUILD/Sync_Complete.wav BUILD/Resources.dat BUILD/Changelog.txt BUILD/License.txt BUILD/styles.rc $(APPSHAREDIR)
+ cp -R BUILD/Languages/ \
+ BUILD/Help/ \
+ BUILD/Compare_Complete.wav \
+ BUILD/Sync_Complete.wav \
+ BUILD/Resources.dat \
+ BUILD/Changelog.txt \
+ BUILD/License.txt \
+ BUILD/styles.rc \
+ $(APPSHAREDIR)
diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp
index 9a5d9f93..24b6d859 100644
--- a/RealtimeSync/RealtimeSync.cbp
+++ b/RealtimeSync/RealtimeSync.cbp
@@ -7,32 +7,6 @@
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
- <Target title="Debug">
- <Option output="..\BUILD\RealtimeSync" prefix_auto="1" extension_auto="1" />
- <Option working_dir="..\BUILD" />
- <Option object_output="..\OBJ\Debug_RTS_GCC" />
- <Option type="0" />
- <Option compiler="gcc" />
- <Option projectLinkerOptionsRelation="2" />
- <Compiler>
- <Add option="-g" />
- <Add option="-Winvalid-pch" />
- <Add option='-include &quot;pch.h&quot;' />
- <Add option="-D__WXDEBUG__" />
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswud" />
- </Compiler>
- <ResourceCompiler>
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswud" />
- </ResourceCompiler>
- <Linker>
- <Add library="libwxmsw28ud_core.a" />
- <Add library="libwxmsw28ud_adv.a" />
- <Add library="libwxbase28ud.a" />
- <Add library="libwxpngd.a" />
- <Add library="libwxzlibd.a" />
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib" />
- </Linker>
- </Target>
<Target title="Release">
<Option output="..\BUILD\RealtimeSync" prefix_auto="1" extension_auto="1" />
<Option working_dir="..\BUILD" />
@@ -45,9 +19,6 @@
<Add option="-DNDEBUG" />
<Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswu" />
</Compiler>
- <ResourceCompiler>
- <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib\mswu" />
- </ResourceCompiler>
<Linker>
<Add option="-s" />
<Add library="libwxmsw28u_core.a" />
@@ -58,12 +29,38 @@
<Add directory="C:\Programme\C++\wxWidgets\lib\gcc_lib" />
</Linker>
</Target>
+ <Target title="Debug-DLL">
+ <Option output="..\BUILD\RealtimeSync" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="..\BUILD" />
+ <Option object_output="..\OBJ\Debug_RTS_GCC" />
+ <Option type="0" />
+ <Option compiler="gcc" />
+ <Option projectLinkerOptionsRelation="2" />
+ <Compiler>
+ <Add option="-g" />
+ <Add option="-Winvalid-pch" />
+ <Add option='-include &quot;pch.h&quot;' />
+ <Add option="-D__WXDEBUG__" />
+ <Add directory="C:\Program Files\C++\wxWidgets\lib\gcc_dll\mswud" />
+ </Compiler>
+ <Linker>
+ <Add library="libwxmsw28ud_core.a" />
+ <Add library="libwxmsw28ud_adv.a" />
+ <Add library="libwxbase28ud.a" />
+ <Add library="libwxpngd.a" />
+ <Add library="libwxzlibd.a" />
+ <Add directory="C:\Program Files\C++\wxWidgets\lib\gcc_dll" />
+ </Linker>
+ </Target>
</Build>
<Compiler>
+ <Add option="-Wshadow" />
+ <Add option="-Winit-self" />
+ <Add option="-Wswitch-enum" />
+ <Add option="-Wmain" />
<Add option="-Wall" />
<Add option="-pipe" />
<Add option="-mthreads" />
- <Add option='[[if (PLATFORM == PLATFORM_MSW &amp;&amp; (GetCompilerFactory().GetCompilerVersionString(_T(&quot;gcc&quot;)) &gt;= _T(&quot;4.0.0&quot;))) print(_T(&quot;-Wno-attributes&quot;));]]' />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add option="-DwxUSE_UNICODE" />
@@ -71,7 +68,6 @@
<Add option="-DZSTRING_WIDE_CHAR" />
<Add option="-DTIXML_USE_STL" />
<Add directory="C:\Programme\C++\wxWidgets\include" />
- <Add directory="C:\Programme\C++\wxWidgets\contrib\include" />
<Add directory="..\shared\boost_1_x" />
</Compiler>
<ResourceCompiler>
@@ -79,6 +75,7 @@
</ResourceCompiler>
<Linker>
<Add option="-mthreads" />
+ <Add option="-Wl,--enable-auto-import" />
<Add library="libkernel32.a" />
<Add library="libuser32.a" />
<Add library="libuuid.a" />
@@ -101,7 +98,7 @@
<Unit filename="pch.h">
<Option compile="1" />
<Option weight="0" />
- <Option target="Debug" />
+ <Option target="Debug-DLL" />
</Unit>
<Unit filename="resource.rc">
<Option compilerVar="WINDRES" />
@@ -138,7 +135,6 @@
<Unit filename="..\shared\localization.h" />
<Unit filename="..\shared\longPathPrefix.cpp" />
<Unit filename="..\shared\longPathPrefix.h" />
- <Unit filename="..\shared\recycler.cpp" />
<Unit filename="..\shared\shadow.cpp" />
<Unit filename="..\shared\standardPaths.cpp" />
<Unit filename="..\shared\standardPaths.h" />
diff --git a/RealtimeSync/RealtimeSync.vcproj b/RealtimeSync/RealtimeSync.vcproj
index 8d60d6ba..8e95f3a6 100644
--- a/RealtimeSync/RealtimeSync.vcproj
+++ b/RealtimeSync/RealtimeSync.vcproj
@@ -432,10 +432,6 @@
>
</File>
<File
- RelativePath="..\shared\recycler.cpp"
- >
- </File>
- <File
RelativePath=".\resources.cpp"
>
</File>
diff --git a/RealtimeSync/mainDialog.cpp b/RealtimeSync/mainDialog.cpp
index 72b19a35..5ba378ce 100644
--- a/RealtimeSync/mainDialog.cpp
+++ b/RealtimeSync/mainDialog.cpp
@@ -8,6 +8,7 @@
#include "resources.h"
#include "../shared/customButton.h"
#include "../shared/standardPaths.h"
+#include "functions.h"
#include <wx/msgdlg.h>
#include <wx/wupdlock.h>
#include "watcher.h"
@@ -288,7 +289,7 @@ void MainDialog::setConfiguration(const xmlAccess::XmlRealConfig& cfg)
m_textCtrlCommand->SetValue(cfg.commandline);
//set delay
- m_spinCtrlDelay->SetValue(cfg.delay);
+ m_spinCtrlDelay->SetValue(static_cast<int>(cfg.delay));
}
diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile
index 8f42e2e3..9692e22a 100644
--- a/RealtimeSync/makefile
+++ b/RealtimeSync/makefile
@@ -18,6 +18,7 @@ FILE_LIST+=xmlProcessing.cpp
FILE_LIST+=xmlFreeFileSync.cpp
FILE_LIST+=../library/processXml.cpp
FILE_LIST+=../structures.cpp
+FILE_LIST+=../shared/localization_no_BOM.cpp
FILE_LIST+=../shared/inotify/inotify-cxx.cpp
FILE_LIST+=../shared/tinyxml/tinyxml.cpp
FILE_LIST+=../shared/tinyxml/tinystr.cpp
@@ -31,7 +32,6 @@ FILE_LIST+=../shared/xmlBase.cpp
FILE_LIST+=../shared/customButton.cpp
FILE_LIST+=../shared/fileHandling.cpp
FILE_LIST+=../shared/fileTraverser.cpp
-FILE_LIST+=../shared/localization.cpp
FILE_LIST+=../shared/standardPaths.cpp
FILE_LIST+=../shared/helpProvider.cpp
FILE_LIST+=../shared/fileIO.cpp
@@ -50,8 +50,8 @@ init:
#remove byte ordering mark: needed by Visual C++ but an error with GCC
removeBOM: ../tools/removeBOM.cpp
- g++ -o removeBOM ../tools/removeBOM.cpp
- ./removeBOM ../shared/localization.cpp
+ g++ -o OBJ/removeBOM ../tools/removeBOM.cpp
+ ./OBJ/removeBOM ../shared/localization.cpp ../shared/localization_no_BOM.cpp
%.dep : %.cpp
#strip path information
@@ -63,7 +63,7 @@ RealtimeSync: init removeBOM $(DEP_LIST)
clean:
rm -rf OBJ
rm -f ../BUILD/$(APPNAME)
- rm -f removeBOM
+ rm -f ../shared/localization_no_BOM.cpp
install:
if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR); fi
diff --git a/RealtimeSync/trayMenu.cpp b/RealtimeSync/trayMenu.cpp
index 79076abd..436ee904 100644
--- a/RealtimeSync/trayMenu.cpp
+++ b/RealtimeSync/trayMenu.cpp
@@ -9,7 +9,9 @@
#include <wx/taskbar.h>
#include <wx/app.h>
#include "resources.h"
-//#include <memory>
+#include <algorithm>
+#include <iterator>
+#include "../shared/stringConv.h"
#include <wx/utils.h>
#include <wx/menu.h>
#include "watcher.h"
@@ -23,7 +25,7 @@
using namespace RealtimeSync;
-class WaitCallbackImpl : private wxEvtHandler, public RealtimeSync::WaitCallback //keep this order: else VC++ generated wrong code
+class WaitCallbackImpl : private wxEvtHandler, public RealtimeSync::WaitCallback //keep this order: else VC++ generates wrong code
{
public:
WaitCallbackImpl();
@@ -31,6 +33,9 @@ public:
virtual void requestUiRefresh();
+ void showIconActive();
+ void showIconWaiting();
+
void requestAbort()
{
m_abortRequested = true;
@@ -114,13 +119,7 @@ WaitCallbackImpl::WaitCallbackImpl() :
{
trayMenu = new RtsTrayIcon(this); //not in initialization list: give it a valid parent object!
-#ifdef FFS_WIN
- const wxIcon& realtimeIcon = *GlobalResources::getInstance().programIcon;
-#elif defined FFS_LINUX
- wxIcon realtimeIcon;
- realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_linux.png"))); //use a 22x22 bitmap for perfect fit
-#endif
- trayMenu->SetIcon(realtimeIcon, wxString(wxT("RealtimeSync")) + wxT(" - ") + _("Monitoring active..."));
+ showIconActive();
//register double-click
trayMenu->Connect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(WaitCallbackImpl::OnRequestResume), NULL, this);
@@ -139,6 +138,30 @@ WaitCallbackImpl::~WaitCallbackImpl()
}
+void WaitCallbackImpl::showIconActive()
+{
+ wxIcon realtimeIcon;
+#ifdef FFS_WIN
+ realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_win.png"))); //use a 16x16 bitmap
+#elif defined FFS_LINUX
+ realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_linux.png"))); //use a 22x22 bitmap for perfect fit
+#endif
+ trayMenu->SetIcon(realtimeIcon, wxString(wxT("RealtimeSync")) + wxT(" - ") + _("Monitoring active..."));
+}
+
+
+void WaitCallbackImpl::showIconWaiting()
+{
+ wxIcon realtimeIcon;
+#ifdef FFS_WIN
+ realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_waiting_win.png"))); //use a 16x16 bitmap
+#elif defined FFS_LINUX
+ realtimeIcon.CopyFromBitmap(GlobalResources::getInstance().getImageByName(wxT("RTS_tray_waiting_linux.png"))); //use a 22x22 bitmap for perfect fit
+#endif
+ trayMenu->SetIcon(realtimeIcon, wxString(wxT("RealtimeSync")) + wxT(" - ") + _("Waiting for all directories to become available..."));
+}
+
+
void WaitCallbackImpl::OnContextMenuSelection(wxCommandEvent& event)
{
const int eventId = event.GetId();
@@ -188,9 +211,22 @@ void WaitCallbackImpl::requestUiRefresh()
}
//##############################################################################################################
+namespace
+{
+std::vector<Zstring> convert(const std::vector<wxString>& dirList)
+{
+ std::vector<Zstring> output;
+ std::transform(dirList.begin(), dirList.end(),
+ std::back_inserter(output), static_cast<Zstring (*)(const wxString&)>(FreeFileSync::wxToZ));
+ return output;
+}
+}
+
RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAccess::XmlRealConfig& config)
{
+ const std::vector<Zstring> dirList = convert(config.directories);
+
try
{
WaitCallbackImpl callback;
@@ -198,18 +234,31 @@ RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAcces
if (config.commandline.empty())
throw FreeFileSync::FileError(_("Command line is empty!"));
- long lastExec = 0;
while (true)
{
+ //execute commandline
+ callback.showIconWaiting();
+ waitForMissingDirs(dirList, &callback);
+ callback.showIconActive();
+
wxExecute(config.commandline, wxEXEC_SYNC); //execute command
wxLog::FlushActive(); //show wxWidgets error messages (if any)
- //wait
- waitForChanges(config.directories, &callback);
- lastExec = wxGetLocalTime();
+ //wait for changes (and for all directories to become available)
+ switch (waitForChanges(dirList, &callback))
+ {
+ case CHANGE_DIR_MISSING: //don't execute the commandline before all directories are available!
+ callback.showIconWaiting();
+ waitForMissingDirs(dirList, &callback);
+ callback.showIconActive();
+ break;
+ case CHANGE_DETECTED:
+ break;
+ }
//some delay
- while (wxGetLocalTime() - lastExec < static_cast<long>(config.delay))
+ const long nextExec = wxGetLocalTime() + static_cast<long>(config.delay);
+ while (wxGetLocalTime() < nextExec)
{
callback.requestUiRefresh();
wxMilliSleep(RealtimeSync::UI_UPDATE_INTERVAL);
@@ -222,7 +271,7 @@ RealtimeSync::MonitorResponse RealtimeSync::startDirectoryMonitor(const xmlAcces
}
catch (const FreeFileSync::FileError& error)
{
- wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR);
+ wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
return RESUME;
}
diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp
index 3aa40520..ad9e6508 100644
--- a/RealtimeSync/watcher.cpp
+++ b/RealtimeSync/watcher.cpp
@@ -6,24 +6,22 @@
//
#include "watcher.h"
#include "../shared/systemFunctions.h"
-#include "functions.h"
+//#include "functions.h"
#include <wx/intl.h>
-#include <wx/filefn.h>
-#include "../shared/fileHandling.h"
+//#include <wx/filefn.h>
#include "../shared/stringConv.h"
+#include "../shared/fileHandling.h"
#include <stdexcept>
-#include <map>
+#include <set>
#include <wx/timer.h>
+#include <algorithm>
#ifdef FFS_WIN
-//#include "../shared/fileId.h"
-//#include "Dbt.h"
#include <wx/msw/wrapwin.h> //includes "windows.h"
#include "../shared/longPathPrefix.h"
#elif defined FFS_LINUX
-#include <wx/timer.h>
-#include <exception>
+//#include <exception>
#include "../shared/inotify/inotify-cxx.h"
#include "../shared/fileTraverser.h"
#endif
@@ -33,8 +31,8 @@ using namespace FreeFileSync;
bool RealtimeSync::updateUiIsAllowed()
{
- static wxLongLong lastExec = 0;
- const wxLongLong newExec = wxGetLocalTimeMillis();
+ static wxLongLong lastExec;
+ const wxLongLong newExec = wxGetLocalTimeMillis();
if (newExec - lastExec >= RealtimeSync::UI_UPDATE_INTERVAL) //perform ui updates not more often than necessary
{
@@ -241,7 +239,7 @@ public:
::FindCloseChangeNotification(*i);
}
- void addHandle(const HANDLE hndl)
+ void addHandle(HANDLE hndl)
{
arrayHandle.push_back(hndl);
}
@@ -266,14 +264,18 @@ class DirsOnlyTraverser : public FreeFileSync::TraverseCallback
public:
DirsOnlyTraverser(std::vector<std::string>& dirs) : m_dirs(dirs) {}
- virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details)
+ virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink, const FileInfo& details)
{
return TRAVERSING_CONTINUE;
}
- virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName)
+ virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink)
{
m_dirs.push_back(fullName.c_str());
- return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), this);
+
+ if (isSymlink) //don't traverse into symlinks (analog to windows build)
+ return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>());
+ else
+ return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), this);
}
virtual ReturnValue onError(const wxString& errorText)
{
@@ -286,107 +288,104 @@ private:
#endif
-class NotifyDirectoryArrival //detect changes to directory availability
+class WatchDirectories //detect changes to directory availability
{
public:
+ WatchDirectories() : allExistingBuffer(true) {}
+
//initialization
- void addForMonitoring(const Zstring& dirName, bool isExisting) //dir-existence already checked by calling method, avoid double-checking -> consistency!
+ void addForMonitoring(const Zstring& dirName)
{
- availablility[dirName] = isExisting;
+ dirList.insert(dirName);
}
- //detection
- bool changeDetected() //polling explicitly allowed!
+ bool allExisting() const //polling explicitly allowed!
{
const int UPDATE_INTERVAL = 1000; //1 second interval
- static wxLongLong lastExec = 0;
- const wxLongLong newExec = wxGetLocalTimeMillis();
-
+ const wxLongLong newExec = wxGetLocalTimeMillis();
if (newExec - lastExec >= UPDATE_INTERVAL)
{
lastExec = newExec;
-
- for (std::map<Zstring, bool>::iterator i = availablility.begin(); i != availablility.end(); ++i)
- if (FreeFileSync::dirExists(i->first) != i->second) //change in availability
- {
- if (i->second) //directory doesn't exist anymore: no reason to trigger the commandline! (sometimes triggered by ChangeNotifications anyway...)
- i->second = false; //update value, so that dir-arrival will be detected next time
- else //directory arrival: trigger commandline!
- return true;
- }
+ allExistingBuffer = std::find_if(dirList.begin(), dirList.end(), notExisting) == dirList.end();
}
- return false;
+ return allExistingBuffer;
}
private:
- std::map<Zstring, bool> availablility; //save avail. status for each directory, avoid double-entries
+ static bool notExisting(const Zstring& dirname)
+ {
+ return !FreeFileSync::dirExists(dirname);
+ }
+
+ mutable wxLongLong lastExec;
+ mutable bool allExistingBuffer;
+
+ std::set<Zstring> dirList; //save avail. directories, avoid double-entries
};
-void RealtimeSync::waitForChanges(const std::vector<wxString>& dirNames, WaitCallback* statusHandler)
+RealtimeSync::WaitResult RealtimeSync::waitForChanges(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler) //throw(FileError)
{
- if (dirNames.empty()) //pathological case, but check is needed later
- return;
+ if (dirNames.empty()) //pathological case, but check is needed nevertheless
+ throw FreeFileSync::FileError(_("At least one directory input field is empty."));
- //new: support for monitoring newly connected directories volumes (e.g.: USB-sticks)
- NotifyDirectoryArrival monitorAvailability;
+ //detect when volumes are removed/are not available anymore
+ WatchDirectories dirWatcher;
#ifdef FFS_WIN
ChangeNotifications notifications;
- for (std::vector<wxString>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i)
+ for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i)
{
- const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(i->c_str());
+ const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(*i);
if (formattedDir.empty())
throw FreeFileSync::FileError(_("At least one directory input field is empty."));
- const bool isExisting = FreeFileSync::dirExists(formattedDir);
- if (isExisting)
+ dirWatcher.addForMonitoring(formattedDir);
+
+ const HANDLE rv = ::FindFirstChangeNotification(
+ FreeFileSync::applyLongPathPrefix(formattedDir).c_str(), //__in LPCTSTR lpPathName,
+ true, //__in BOOL bWatchSubtree,
+ FILE_NOTIFY_CHANGE_FILE_NAME |
+ FILE_NOTIFY_CHANGE_DIR_NAME |
+ FILE_NOTIFY_CHANGE_SIZE |
+ FILE_NOTIFY_CHANGE_LAST_WRITE); //__in DWORD dwNotifyFilter
+
+ if (rv == INVALID_HANDLE_VALUE)
{
- const HANDLE rv = ::FindFirstChangeNotification(
- FreeFileSync::applyLongPathPrefix(formattedDir).c_str(), //__in LPCTSTR lpPathName,
- true, //__in BOOL bWatchSubtree,
- FILE_NOTIFY_CHANGE_FILE_NAME |
- FILE_NOTIFY_CHANGE_DIR_NAME |
- FILE_NOTIFY_CHANGE_SIZE |
- FILE_NOTIFY_CHANGE_LAST_WRITE); //__in DWORD dwNotifyFilter
-
- if (rv == INVALID_HANDLE_VALUE)
- {
- const wxString errorMessage = wxString(_("Could not initialize directory monitoring:")) + wxT("\n\"") + *i + wxT("\"");
- throw FreeFileSync::FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
- }
+ if (::GetLastError() == ERROR_FILE_NOT_FOUND) //no need to check this condition any earlier!
+ return CHANGE_DIR_MISSING;
- notifications.addHandle(rv);
+ const wxString errorMessage = wxString(_("Could not initialize directory monitoring:")) + wxT("\n\"") + zToWx(*i) + wxT("\"");
+ throw FreeFileSync::FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
}
- //else: we silently ignore this error: it may be that the directory becomes available later, e.g. if it is a USB-stick
- monitorAvailability.addForMonitoring(formattedDir, isExisting); //all directories (including not yet existing) are relevant
+ notifications.addHandle(rv);
}
+ if (notifications.getSize() == 0)
+ throw FreeFileSync::FileError(_("At least one directory input field is empty."));
+
while (true)
{
//check for changes within directories:
- if (notifications.getSize() > 0)
- {
- const DWORD rv = ::WaitForMultipleObjects( //NOTE: notifications.getArray() returns valid pointer, because it cannot be empty in this context
- static_cast<DWORD>(notifications.getSize()), //__in DWORD nCount,
- notifications.getArray(), //__in const HANDLE *lpHandles,
- false, //__in BOOL bWaitAll,
- UI_UPDATE_INTERVAL); //__in DWORD dwMilliseconds
- if (WAIT_OBJECT_0 <= rv && rv < WAIT_OBJECT_0 + notifications.getSize())
- return; //directory change detected
- else if (rv == WAIT_FAILED)
- throw FreeFileSync::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
- //else if (rv == WAIT_TIMEOUT)
- }
-
- if (monitorAvailability.changeDetected()) //check for newly arrived devices:
- return;
+ const DWORD rv = ::WaitForMultipleObjects( //NOTE: notifications.getArray() returns valid pointer, because it cannot be empty in this context
+ static_cast<DWORD>(notifications.getSize()), //__in DWORD nCount,
+ notifications.getArray(), //__in const HANDLE *lpHandles,
+ false, //__in BOOL bWaitAll,
+ UI_UPDATE_INTERVAL); //__in DWORD dwMilliseconds
+ if (WAIT_OBJECT_0 <= rv && rv < WAIT_OBJECT_0 + notifications.getSize())
+ return CHANGE_DETECTED; //directory change detected
+ else if (rv == WAIT_FAILED)
+ throw FreeFileSync::FileError(wxString(_("Error when monitoring directories.")) + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
+ //else if (rv == WAIT_TIMEOUT)
+
+ if (!dirWatcher.allExisting()) //check for removed devices:
+ return CHANGE_DIR_MISSING;
statusHandler->requestUiRefresh();
}
@@ -395,24 +394,30 @@ void RealtimeSync::waitForChanges(const std::vector<wxString>& dirNames, WaitCal
std::vector<std::string> fullDirList; //including subdirectories!
//add all subdirectories
- for (std::vector<wxString>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i)
+ for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i)
{
- const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(wxToZ(*i));
+ const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(*i);
if (formattedDir.empty())
throw FreeFileSync::FileError(_("At least one directory input field is empty."));
- const bool isExisting = FreeFileSync::dirExists(formattedDir);
- if (isExisting)
+ dirWatcher.addForMonitoring(formattedDir);
+
+
+ fullDirList.push_back(formattedDir.c_str());
+
+ try //get all subdirectories
{
- fullDirList.push_back(formattedDir.c_str());
- //get all subdirectories
DirsOnlyTraverser traverser(fullDirList);
- FreeFileSync::traverseFolder(formattedDir, false, &traverser); //don't traverse into symlinks (analog to windows build)
+ FreeFileSync::traverseFolder(formattedDir, &traverser); //don't traverse into symlinks (analog to windows build)
}
- //else: we silently ignore this error: it may be that the directory becomes available later, e.g. if it is a USB-stick
+ catch (const FreeFileSync::FileError&)
+ {
+ if (!FreeFileSync::dirExists(formattedDir)) //that's no good locking behavior, but better than nothing
+ return CHANGE_DIR_MISSING;
- monitorAvailability.addForMonitoring(formattedDir, isExisting); //all directories (including not yet existing) are relevant
+ throw;
+ }
}
try
@@ -439,21 +444,27 @@ void RealtimeSync::waitForChanges(const std::vector<wxString>& dirNames, WaitCal
}
catch (const InotifyException& e)
{
+ if (!FreeFileSync::dirExists(i->c_str())) //that's no good locking behavior, but better than nothing
+ return CHANGE_DIR_MISSING;
+
const wxString errorMessage = wxString(_("Could not initialize directory monitoring:")) + wxT("\n\"") + zToWx(i->c_str()) + wxT("\"");
throw FreeFileSync::FileError(errorMessage + wxT("\n\n") + zToWx(e.GetMessage().c_str()));
}
}
+ if (notifications.GetWatchCount() == 0)
+ throw FreeFileSync::FileError(_("At least one directory input field is empty."));
+
while (true)
{
notifications.WaitForEvents(); //called in non-blocking mode
if (notifications.GetEventCount() > 0)
- return; //directory change detected
+ return CHANGE_DETECTED; //directory change detected
- if (monitorAvailability.changeDetected()) //check for newly arrived devices:
- return;
+ if (!dirWatcher.allExisting()) //check for removed devices:
+ return CHANGE_DIR_MISSING;
wxMilliSleep(RealtimeSync::UI_UPDATE_INTERVAL);
statusHandler->requestUiRefresh();
@@ -470,3 +481,28 @@ void RealtimeSync::waitForChanges(const std::vector<wxString>& dirNames, WaitCal
#endif
}
+
+void RealtimeSync::waitForMissingDirs(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler) //throw(FileError)
+{
+ //new: support for monitoring newly connected directories volumes (e.g.: USB-sticks)
+ WatchDirectories dirWatcher;
+
+ for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i)
+ {
+ const Zstring formattedDir = FreeFileSync::getFormattedDirectoryName(*i);
+
+ if (formattedDir.empty())
+ throw FreeFileSync::FileError(_("At least one directory input field is empty."));
+
+ dirWatcher.addForMonitoring(formattedDir);
+ }
+
+ while (true)
+ {
+ if (dirWatcher.allExisting()) //check for newly arrived devices:
+ return;
+
+ wxMilliSleep(RealtimeSync::UI_UPDATE_INTERVAL);
+ statusHandler->requestUiRefresh();
+ }
+}
diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h
index 58b20d99..c0690c33 100644
--- a/RealtimeSync/watcher.h
+++ b/RealtimeSync/watcher.h
@@ -7,7 +7,7 @@
#ifndef WATCHER_H_INCLUDED
#define WATCHER_H_INCLUDED
-#include "functions.h"
+#include "../shared/zstring.h"
#include <vector>
#include "../shared/fileError.h"
@@ -26,7 +26,17 @@ public:
virtual void requestUiRefresh() = 0; //opportunity to abort must be implemented in a frequently executed method like requestUiRefresh()
};
-void waitForChanges(const std::vector<wxString>& dirNames, WaitCallback* statusHandler); //throw(FreeFileSync::FileError);
+
+//wait until changes are detected or if a directory is not available (anymore)
+enum WaitResult
+{
+ CHANGE_DETECTED,
+ CHANGE_DIR_MISSING
+ };
+WaitResult waitForChanges(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler); //throw(FileError)
+
+//wait until all directories become available (again)
+void waitForMissingDirs(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler); //throw(FileError)
}
#endif // WATCHER_H_INCLUDED
diff --git a/RealtimeSync/xmlProcessing.h b/RealtimeSync/xmlProcessing.h
index f50849b1..bcfcf8f2 100644
--- a/RealtimeSync/xmlProcessing.h
+++ b/RealtimeSync/xmlProcessing.h
@@ -19,7 +19,7 @@ struct XmlRealConfig
XmlRealConfig() : delay(5) {}
std::vector<wxString> directories;
wxString commandline;
- unsigned int delay;
+ size_t delay;
};
void readRealConfig(const wxString& filename, XmlRealConfig& config); //throw (xmlAccess::XmlError);
diff --git a/algorithm.cpp b/algorithm.cpp
index 159cef52..1f34ca6a 100644
--- a/algorithm.cpp
+++ b/algorithm.cpp
@@ -53,10 +53,16 @@ private:
switch (fileObj.getCategory())
{
case FILE_LEFT_SIDE_ONLY:
- fileObj.setSyncDir(config.exLeftSideOnly);
+ if (fileObj.getFullName<LEFT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING))
+ fileObj.setSyncDir(SYNC_DIR_LEFT); //schedule potentially existing temporary files for deletion
+ else
+ fileObj.setSyncDir(config.exLeftSideOnly);
break;
case FILE_RIGHT_SIDE_ONLY:
- fileObj.setSyncDir(config.exRightSideOnly);
+ if (fileObj.getFullName<RIGHT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING))
+ fileObj.setSyncDir(SYNC_DIR_RIGHT); //schedule potentially existing temporary files for deletion
+ else
+ fileObj.setSyncDir(config.exRightSideOnly);
break;
case FILE_RIGHT_NEWER:
fileObj.setSyncDir(config.rightNewer);
@@ -105,14 +111,11 @@ class FindNonEqual //test if non-equal items exist in scanned data
public:
bool findNonEqual(const HierarchyObject& hierObj) const
{
- //files
- if (std::find_if(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), *this) != hierObj.useSubFiles().end())
- return true;
-
- //directories
- return std::find_if(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), *this) != hierObj.useSubDirs().end();
+ return std::find_if(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), *this) != hierObj.useSubFiles().end() || //files
+ std::find_if(hierObj.useSubDirs(). begin(), hierObj.useSubDirs(). end(), *this) != hierObj.useSubDirs(). end(); //directories
}
+ //logical private! => __find_if (used by std::find_if) needs public access
bool operator()(const FileMapping& fileObj) const
{
return fileObj.getCategory() != FILE_EQUAL;
@@ -144,7 +147,7 @@ bool FreeFileSync::allElementsEqual(const FolderComparison& folderCmp)
//---------------------------------------------------------------------------------------------------------------
inline
-bool sameFileTime(const wxLongLong& a, const wxLongLong& b, const unsigned int tolerance)
+bool sameFileTime(const wxLongLong& a, const wxLongLong& b, size_t tolerance)
{
if (a < b)
return b <= a + tolerance;
@@ -331,6 +334,39 @@ private:
};
+//test whether planned deletion of a directory is in conflict with (direct!) sub-elements that are not categorized for deletion (e.g. shall be copied or are in conflict themselves)
+class FindDeleteDirConflictNonRec
+{
+public:
+ bool conflictFound(const HierarchyObject& hierObj) const
+ {
+ return std::find_if(hierObj.useSubFiles().begin(), hierObj.useSubFiles().end(), *this) != hierObj.useSubFiles().end() || //files
+ std::find_if(hierObj.useSubDirs(). begin(), hierObj.useSubDirs(). end(), *this) != hierObj.useSubDirs(). end(); //directories
+ }
+
+ //logical private! => __find_if (used by std::find_if) needs public access
+ bool operator()(const FileSystemObject& fsObj) const
+ {
+ switch (fsObj.getSyncOperation())
+ {
+ case SO_CREATE_NEW_LEFT:
+ case SO_CREATE_NEW_RIGHT:
+ case SO_UNRESOLVED_CONFLICT:
+ return true;
+
+ case SO_DELETE_LEFT:
+ case SO_DELETE_RIGHT:
+ case SO_OVERWRITE_LEFT:
+ case SO_OVERWRITE_RIGHT:
+ case SO_DO_NOTHING:
+ case SO_EQUAL:
+ ;
+ }
+ return false;
+ }
+};
+
+
//----------------------------------------------------------------------------------------------
class RedetermineAuto
{
@@ -340,7 +376,8 @@ public:
txtBothSidesChanged(_("Both sides have changed since last synchronization!")),
txtNoSideChanged(wxString(_("Cannot determine sync-direction:")) + wxT(" \n") + _("No change since last synchronization!")),
txtFilterChanged(wxString(_("Cannot determine sync-direction:")) + wxT(" \n") + _("Filter settings have changed!")),
- txtLastSyncFail(wxString(_("Cannot determine sync-direction:")) + wxT(" \n") + _("Last synchronization not completed!")),
+ txtLastSyncFail(wxString(_("Cannot determine sync-direction:")) + wxT(" \n") + _("The file was not processed by last synchronization!")),
+ txtDirDeleteConflict(_("Planned directory deletion is in conflict with its subdirectories and -files!")),
dbFilterLeft(NULL),
dbFilterRight(NULL),
handler_(handler)
@@ -395,7 +432,7 @@ private:
catch (FileError& error) //e.g. incompatible database version
{
if (handler_) handler_->reportWarning(error.show() + wxT(" \n\n") +
- _("Setting default synchronization directions: Old files will be overwritten by newer files."));
+ _("Setting default synchronization directions: Old files will be overwritten with newer files."));
}
return std::pair<DirInfoPtr, DirInfoPtr>(); //NULL
}
@@ -442,6 +479,21 @@ private:
if (cat == FILE_EQUAL)
return;
+
+ //##################### schedule potentially existing temporary files for deletion ####################
+ if (cat == FILE_LEFT_SIDE_ONLY && fileObj.getFullName<LEFT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING))
+ {
+ fileObj.setSyncDir(SYNC_DIR_LEFT);
+ return;
+ }
+ else if (cat == FILE_RIGHT_SIDE_ONLY && fileObj.getFullName<RIGHT_SIDE>().EndsWith(FreeFileSync::TEMP_FILE_ENDING))
+ {
+ fileObj.setSyncDir(SYNC_DIR_RIGHT);
+ return;
+ }
+ //#####################################################################################################
+
+
if (filterConflictFound(fileObj))
{
if (cat == FILE_LEFT_SIDE_ONLY)
@@ -478,14 +530,7 @@ private:
if (changeOnRight)
fileObj.setSyncDir(SYNC_DIR_LEFT);
else
- {
- if (cat == FILE_LEFT_SIDE_ONLY)
- fileObj.setSyncDir(SYNC_DIR_RIGHT);
- else if (cat == FILE_RIGHT_SIDE_ONLY)
- fileObj.setSyncDir(SYNC_DIR_LEFT);
- else
- fileObj.setSyncDirConflict(txtNoSideChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
- }
+ fileObj.setSyncDirConflict(txtNoSideChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
}
}
else //object did not complete last sync
@@ -494,12 +539,12 @@ private:
fileObj.setSyncDirConflict(txtBothSidesChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
else
{
- if (cat == FILE_LEFT_SIDE_ONLY)
- fileObj.setSyncDir(SYNC_DIR_RIGHT);
- else if (cat == FILE_RIGHT_SIDE_ONLY)
- fileObj.setSyncDir(SYNC_DIR_LEFT);
- else
- fileObj.setSyncDirConflict(txtLastSyncFail); //set syncDir = SYNC_DIR_INT_CONFLICT
+// if (cat == FILE_LEFT_SIDE_ONLY)
+// fileObj.setSyncDir(SYNC_DIR_RIGHT);
+// else if (cat == FILE_RIGHT_SIDE_ONLY)
+// fileObj.setSyncDir(SYNC_DIR_LEFT);
+// else
+ fileObj.setSyncDirConflict(txtLastSyncFail); //set syncDir = SYNC_DIR_INT_CONFLICT
}
}
}
@@ -557,17 +602,8 @@ private:
dirObj.setSyncDir(SYNC_DIR_LEFT);
else
{
- switch (cat)
- {
- case DIR_LEFT_SIDE_ONLY:
- dirObj.setSyncDir(SYNC_DIR_RIGHT);
- break;
- case DIR_RIGHT_SIDE_ONLY:
- dirObj.setSyncDir(SYNC_DIR_LEFT);
- break;
- case DIR_EQUAL:
- assert(false);
- }
+ assert(false);
+ dirObj.setSyncDirConflict(txtNoSideChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
}
}
}
@@ -577,28 +613,41 @@ private:
dirObj.setSyncDirConflict(txtBothSidesChanged); //set syncDir = SYNC_DIR_INT_CONFLICT
else
{
- switch (cat)
- {
- case DIR_LEFT_SIDE_ONLY:
- dirObj.setSyncDir(SYNC_DIR_RIGHT);
- break;
- case DIR_RIGHT_SIDE_ONLY:
- dirObj.setSyncDir(SYNC_DIR_LEFT);
- break;
- case DIR_EQUAL:
- assert(false);
- }
+// switch (cat)
+// {
+// case DIR_LEFT_SIDE_ONLY:
+// dirObj.setSyncDir(SYNC_DIR_RIGHT);
+// break;
+// case DIR_RIGHT_SIDE_ONLY:
+// dirObj.setSyncDir(SYNC_DIR_LEFT);
+// break;
+// case DIR_EQUAL:
+// assert(false);
+// }
+
+ dirObj.setSyncDirConflict(txtLastSyncFail); //set syncDir = SYNC_DIR_INT_CONFLICT
}
}
}
execute(dirObj, dataDbLeftStuff.second, dataDbRightStuff.second); //recursion
+ //###################################################################################################
+
+ //if a directory is to be deleted on one side, ensure that directions of sub-elements are "d’accord"
+ const SyncOperation syncOp = dirObj.getSyncOperation();
+ if ( syncOp == SO_DELETE_LEFT ||
+ syncOp == SO_DELETE_RIGHT)
+ {
+ if (FindDeleteDirConflictNonRec().conflictFound(dirObj))
+ dirObj.setSyncDirConflict(txtDirDeleteConflict);
+ }
}
const wxString txtBothSidesChanged;
const wxString txtNoSideChanged;
const wxString txtFilterChanged;
const wxString txtLastSyncFail;
+ const wxString txtDirDeleteConflict;
const BaseFilter* dbFilterLeft; //optional
const BaseFilter* dbFilterRight; //optional
@@ -771,9 +820,11 @@ private:
void operator()(FreeFileSync::DirMapping& dirObj) const
{
bool subObjMightMatch = true;
- dirObj.setActive(filterProc.passDirFilter(dirObj.getObjRelativeName(), &subObjMightMatch));
+ const bool filterPassed = filterProc.passDirFilter(dirObj.getObjRelativeName(), &subObjMightMatch);
+
+ dirObj.setActive(filterPassed);
- if (subObjMightMatch) //use same logic as within directory traversing here: evaluate filter in subdirs only if objects could match
+ if (subObjMightMatch) //use same logic like directory traversing here: evaluate filter in subdirs only if objects could match
execute(dirObj); //recursion
else
InOrExcludeAllRows<false>().execute(dirObj); //exclude all files dirs in subfolders
@@ -805,7 +856,7 @@ void FreeFileSync::applyFiltering(const MainConfiguration& currentMainCfg, Folde
currentMainCfg.additionalPairs.end());
- const BaseFilter::FilterRef globalFilter(new NameFilter(currentMainCfg.includeFilter, currentMainCfg.excludeFilter));
+ const BaseFilter::FilterRef globalFilter(new NameFilter(currentMainCfg.globalFilter.includeFilter, currentMainCfg.globalFilter.excludeFilter));
for (std::vector<FolderPairEnh>::const_iterator i = allPairs.begin(); i != allPairs.end(); ++i)
{
diff --git a/comparison.cpp b/comparison.cpp
index 9d4a3e66..e85334e0 100644
--- a/comparison.cpp
+++ b/comparison.cpp
@@ -36,7 +36,7 @@ std::vector<FreeFileSync::FolderPairCfg> FreeFileSync::extractCompareCfg(const M
mainCfg.additionalPairs.begin(), //add additional pairs
mainCfg.additionalPairs.end());
- const BaseFilter::FilterRef globalFilter(new NameFilter(mainCfg.includeFilter, mainCfg.excludeFilter));
+ const BaseFilter::FilterRef globalFilter(new NameFilter(mainCfg.globalFilter.includeFilter, mainCfg.globalFilter.excludeFilter));
std::vector<FolderPairCfg> output;
for (std::vector<FolderPairEnh>::const_iterator i = allPairs.begin(); i != allPairs.end(); ++i)
@@ -44,13 +44,11 @@ std::vector<FreeFileSync::FolderPairCfg> FreeFileSync::extractCompareCfg(const M
FolderPairCfg(i->leftDirectory,
i->rightDirectory,
- mainCfg.filterIsActive ?
combineFilters(globalFilter,
BaseFilter::FilterRef(
new NameFilter(
i->localFilter.includeFilter,
- i->localFilter.excludeFilter))) :
- BaseFilter::FilterRef(new NullFilter),
+ i->localFilter.excludeFilter))),
i->altSyncConfig.get() ? i->altSyncConfig->syncConfiguration : mainCfg.syncConfiguration));
@@ -75,9 +73,9 @@ public:
virtual ~DirCallback() {}
- virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details);
- virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName);
- virtual ReturnValue onError(const wxString& errorText);
+ virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink, const FileInfo& details);
+ virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink);
+ virtual ReturnValue onError(const wxString& errorText);
private:
BaseDirCallback* const baseCallback_;
@@ -93,17 +91,23 @@ class BaseDirCallback : public DirCallback
friend class DirCallback;
public:
BaseDirCallback(DirContainer& output,
+ bool processSymlinks,
+ bool traverseDirSymlinks,
const BaseFilter::FilterRef& filter,
StatusHandler* handler) :
DirCallback(this, Zstring(), output, handler),
+ processSymlinks_(processSymlinks),
+ traverseDirSymlinks_(traverseDirSymlinks),
textScanning(wxToZ(wxString(_("Scanning:")) + wxT(" \n"))),
filterInstance(filter) {}
- virtual TraverseCallback::ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const TraverseCallback::FileInfo& details);
+ virtual TraverseCallback::ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink, const TraverseCallback::FileInfo& details);
private:
typedef boost::shared_ptr<const DirCallback> CallbackPointer;
+ bool processSymlinks_;
+ bool traverseDirSymlinks_;
const Zstring textScanning;
std::vector<CallbackPointer> callBackBox; //collection of callback pointers to handle ownership
@@ -111,7 +115,7 @@ private:
};
-TraverseCallback::ReturnValue DirCallback::onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details)
+TraverseCallback::ReturnValue DirCallback::onFile(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink, const FileInfo& details)
{
//assemble status message (performance optimized) = textScanning + wxT("\"") + fullName + wxT("\"")
Zstring statusText = baseCallback_->textScanning;
@@ -124,6 +128,12 @@ TraverseCallback::ReturnValue DirCallback::onFile(const DefaultChar* shortName,
statusHandler->updateStatusText(statusText);
//------------------------------------------------------------------------------------
+ if (isSymlink && !baseCallback_->processSymlinks_) //handle symbolic links
+ {
+ statusHandler->requestUiRefresh();
+ return TRAVERSING_CONTINUE;
+ }
+
//apply filter before processing (use relative name!)
if (!baseCallback_->filterInstance->passFileFilter(relNameParentPf_ + shortName))
{
@@ -152,7 +162,7 @@ TraverseCallback::ReturnValue DirCallback::onFile(const DefaultChar* shortName,
}
-TraverseCallback::ReturnValDir DirCallback::onDir(const DefaultChar* shortName, const Zstring& fullName)
+TraverseCallback::ReturnValDir DirCallback::onDir(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink)
{
using globalFunctions::FILE_NAME_SEPARATOR;
@@ -167,6 +177,20 @@ TraverseCallback::ReturnValDir DirCallback::onDir(const DefaultChar* shortName,
statusHandler->updateStatusText(statusText);
//------------------------------------------------------------------------------------
+
+ bool traverseSubdirs = true;
+
+ if (isSymlink) //handle symbolic links
+ {
+ if (!baseCallback_->processSymlinks_)
+ {
+ statusHandler->requestUiRefresh();
+ return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>(); //do NOT traverse subdirs
+ }
+ else
+ traverseSubdirs = baseCallback_->traverseDirSymlinks_;
+ }
+
Zstring relName = relNameParentPf_;
relName += shortName;
@@ -180,11 +204,15 @@ TraverseCallback::ReturnValDir DirCallback::onDir(const DefaultChar* shortName,
{
DirContainer& subDir = output_.addSubDir(shortName);
- DirCallback* subDirCallback = new DirCallback(baseCallback_, relName += FILE_NAME_SEPARATOR, subDir, statusHandler);
- baseCallback_->callBackBox.push_back(BaseDirCallback::CallbackPointer(subDirCallback)); //handle ownership
-
- //attention: ensure directory filtering is applied later to exclude actually filtered directories
- return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), subDirCallback);
+ if (traverseSubdirs)
+ {
+ DirCallback* subDirCallback = new DirCallback(baseCallback_, relName += FILE_NAME_SEPARATOR, subDir, statusHandler);
+ baseCallback_->callBackBox.push_back(BaseDirCallback::CallbackPointer(subDirCallback)); //handle ownership
+ //attention: ensure directory filtering is applied later to exclude actually filtered directories
+ return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), subDirCallback);
+ }
+ else
+ return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>();
}
else
return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>(); //do NOT traverse subdirs
@@ -198,10 +226,15 @@ TraverseCallback::ReturnValDir DirCallback::onDir(const DefaultChar* shortName,
//trigger display refresh
statusHandler->requestUiRefresh();
- DirCallback* subDirCallback = new DirCallback(baseCallback_, relName += FILE_NAME_SEPARATOR, subDir, statusHandler);
- baseCallback_->callBackBox.push_back(BaseDirCallback::CallbackPointer(subDirCallback)); //handle ownership
+ if (traverseSubdirs)
+ {
+ DirCallback* subDirCallback = new DirCallback(baseCallback_, relName += FILE_NAME_SEPARATOR, subDir, statusHandler);
+ baseCallback_->callBackBox.push_back(BaseDirCallback::CallbackPointer(subDirCallback)); //handle ownership
- return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), subDirCallback);
+ return ReturnValDir(Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_CONTINUE>(), subDirCallback);
+ }
+ else
+ return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>();
}
@@ -225,13 +258,14 @@ TraverseCallback::ReturnValue DirCallback::onError(const wxString& errorText)
TraverseCallback::ReturnValue BaseDirCallback::onFile(
const DefaultChar* shortName,
const Zstring& fullName,
+ bool isSymlink,
const TraverseCallback::FileInfo& details)
{
//do not list the database file(s) sync.ffs_db, sync.x64.ffs_db, etc.
if (Zstring(shortName).AfterLast(DefaultChar('.')).cmpFileName(DefaultStr("ffs_db")) == 0)
return TraverseCallback::TRAVERSING_CONTINUE;
- return DirCallback::onFile(shortName, fullName, details);
+ return DirCallback::onFile(shortName, fullName, isSymlink, details);
}
@@ -263,10 +297,12 @@ struct DirBufferKey
class CompareProcess::DirectoryBuffer //buffer multiple scans of the same directories
{
public:
- DirectoryBuffer(const bool traverseDirectorySymlinks,
+ DirectoryBuffer(bool processSymLinks,
+ bool traverseDirectorySymlinks,
StatusHandler* statusUpdater) :
- m_traverseDirectorySymlinks(traverseDirectorySymlinks),
- m_statusUpdater(statusUpdater) {}
+ processSymLinks_(processSymLinks),
+ traverseDirectorySymlinks_(traverseDirectorySymlinks),
+ statusUpdater_(statusUpdater) {}
const DirContainer& getDirectoryDescription(const Zstring& directoryPostfixed, const BaseFilter::FilterRef& filter);
@@ -278,8 +314,9 @@ private:
BufferType buffer;
- const bool m_traverseDirectorySymlinks;
- StatusHandler* m_statusUpdater;
+ const bool processSymLinks_;
+ const bool traverseDirectorySymlinks_;
+ StatusHandler* statusUpdater_;
};
//------------------------------------------------------------------------------------------
@@ -288,16 +325,16 @@ DirContainer& CompareProcess::DirectoryBuffer::insertIntoBuffer(const DirBufferK
DirBufferValue baseContainer(new DirContainer);
buffer.insert(std::make_pair(newKey, baseContainer));
- if (FreeFileSync::dirExists(newKey.directoryName.c_str())) //folder existence already checked in startCompareProcess(): do not treat as error when arriving here!
+ if (FreeFileSync::dirExists(newKey.directoryName)) //folder existence already checked in startCompareProcess(): do not treat as error when arriving here!
{
std::auto_ptr<TraverseCallback> traverser(new BaseDirCallback(*baseContainer,
+ processSymLinks_,
+ traverseDirectorySymlinks_,
newKey.filter,
- m_statusUpdater));
+ statusUpdater_));
//get all files and folders from directoryPostfixed (and subdirectories)
- traverseFolder(newKey.directoryName,
- m_traverseDirectorySymlinks,
- traverser.get()); //exceptions may be thrown!
+ traverseFolder(newKey.directoryName, traverser.get()); //exceptions may be thrown!
}
return *baseContainer.get();
}
@@ -318,6 +355,8 @@ const DirContainer& CompareProcess::DirectoryBuffer::getDirectoryDescription(
//------------------------------------------------------------------------------------------
+namespace
+{
void foldersAreValidForComparison(const std::vector<FolderPairCfg>& folderPairsForm, StatusHandler* statusUpdater)
{
bool checkEmptyDirnameActive = true; //check for empty dirs just once
@@ -347,7 +386,7 @@ void foldersAreValidForComparison(const std::vector<FolderPairCfg>& folderPairsF
//check if folders exist
if (!i->leftDirectory.empty())
- while (!FreeFileSync::dirExists(i->leftDirectory.c_str()))
+ while (!FreeFileSync::dirExists(i->leftDirectory))
{
ErrorHandler::Response rv = statusUpdater->reportError(wxString(_("Directory does not exist:")) + wxT(" \n") +
wxT("\"") + zToWx(i->leftDirectory) + wxT("\"") + wxT("\n\n") +
@@ -361,7 +400,7 @@ void foldersAreValidForComparison(const std::vector<FolderPairCfg>& folderPairsF
}
if (!i->rightDirectory.empty())
- while (!FreeFileSync::dirExists(i->rightDirectory.c_str()))
+ while (!FreeFileSync::dirExists(i->rightDirectory))
{
ErrorHandler::Response rv = statusUpdater->reportError(wxString(_("Directory does not exist:")) + wxT("\n") +
wxT("\"") + zToWx(i->rightDirectory) + wxT("\"") + wxT("\n\n") +
@@ -420,21 +459,6 @@ bool foldersHaveDependencies(const std::vector<FolderPairCfg>& folderPairsFrom,
}
-CompareProcess::CompareProcess(const bool traverseSymLinks,
- const unsigned int fileTimeTol,
- const bool ignoreOneHourDiff,
- xmlAccess::OptionalDialogs& warnings,
- StatusHandler* handler) :
- fileTimeTolerance(fileTimeTol),
- ignoreOneHourDifference(ignoreOneHourDiff),
- m_warnings(warnings),
- statusUpdater(handler),
- txtComparingContentOfFiles(wxToZ(_("Comparing content of files %x")).Replace(DefaultStr("%x"), DefaultStr("\n\"%x\""), false))
-{
- directoryBuffer.reset(new DirectoryBuffer(traverseSymLinks, handler));
-}
-
-
//callback implementation
class CmpCallbackImpl : public CompareCallback
{
@@ -505,12 +529,15 @@ public:
void execute(HierarchyObject& hierObj)
{
+ HierarchyObject::SubDirMapping& subDirs = hierObj.useSubDirs();
+
//process subdirs recursively
- std::for_each(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), *this);
+ std::for_each(subDirs.begin(), subDirs.end(), *this);
//remove superfluous directories
- hierObj.useSubDirs().erase(std::remove_if(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(),
- ::ToBeRemoved()), hierObj.useSubDirs().end());
+ subDirs.erase(
+ std::remove_if(subDirs.begin(), subDirs.end(), ::ToBeRemoved()),
+ subDirs.end());
}
private:
@@ -527,18 +554,32 @@ private:
};
-inline
void formatPair(FolderPairCfg& input)
{
//ensure they end with globalFunctions::FILE_NAME_SEPARATOR and replace macros
input.leftDirectory = FreeFileSync::getFormattedDirectoryName(input.leftDirectory);
input.rightDirectory = FreeFileSync::getFormattedDirectoryName(input.rightDirectory);
}
+}
+//#############################################################################################################################
+CompareProcess::CompareProcess(bool processSymLinks,
+ bool traverseSymLinks,
+ size_t fileTimeTol,
+ bool ignoreOneHourDiff,
+ xmlAccess::OptionalDialogs& warnings,
+ StatusHandler* handler) :
+ fileTimeTolerance(fileTimeTol),
+ ignoreOneHourDifference(ignoreOneHourDiff),
+ m_warnings(warnings),
+ statusUpdater(handler),
+ txtComparingContentOfFiles(wxToZ(_("Comparing content of files %x")).Replace(DefaultStr("%x"), DefaultStr("\n\"%x\""), false))
+{
+ directoryBuffer.reset(new DirectoryBuffer(processSymLinks, traverseSymLinks, handler));
+}
-//#############################################################################################################################
void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& directoryPairs,
const CompareVariant cmpVar,
@@ -562,8 +603,8 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc
//check if folders are valid
foldersAreValidForComparison(directoryPairsFormatted, statusUpdater);
- //check if folders have dependencies
{
+ //check if folders have dependencies
wxString warningMessage;
if (foldersHaveDependencies(directoryPairsFormatted, warningMessage))
statusUpdater->reportWarning(warningMessage.c_str(), m_warnings.warningDependentFolders);
@@ -623,13 +664,13 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc
//note: output mustn't change during this process to be in sync with GUI grid view!!!
output_tmp.swap(output);
}
+ catch (const std::bad_alloc& e)
+ {
+ statusUpdater->reportFatalError(wxString(_("System out of memory!")) + wxT(" ") + wxString::FromAscii(e.what()));
+ }
catch (const std::exception& e)
{
- if (dynamic_cast<const std::bad_alloc*>(&e) != NULL)
- statusUpdater->reportFatalError(wxString(_("System out of memory!")) + wxT(" ") + wxString::FromAscii(e.what()));
- else
- statusUpdater->reportFatalError(wxString::FromAscii(e.what()));
- return; //should be obsolete!
+ statusUpdater->reportFatalError(wxString::FromAscii(e.what()));
}
}
@@ -640,7 +681,7 @@ wxString getConflictInvalidDate(const Zstring& fileNameFull, const wxLongLong& u
{
wxString msg = _("File %x has an invalid date!");
msg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(fileNameFull) + wxT("\""));
- msg += wxString(wxT("\n\n")) + _("Date") + wxT(": ") + utcTimeToLocalString(utcTime, fileNameFull);
+ msg += wxString(wxT("\n\n")) + _("Date") + wxT(": ") + utcTimeToLocalString(utcTime);
return wxString(_("Conflict detected:")) + wxT("\n") + msg;
}
@@ -668,10 +709,10 @@ wxString getConflictSameDateDiffSize(const FileMapping& fileObj)
wxString msg = _("Files %x have the same date but a different size!");
msg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(fileObj.getRelativeName<LEFT_SIDE>()) + wxT("\""));
msg += wxT("\n\n");
- msg += left + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<LEFT_SIDE>(),
- fileObj.getFullName<LEFT_SIDE>()) + wxT(" \t") + _("Size") + wxT(": ") + fileObj.getFileSize<LEFT_SIDE>().ToString() + wxT("\n");
- msg += right + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<RIGHT_SIDE>(),
- fileObj.getFullName<RIGHT_SIDE>()) + wxT(" \t") + _("Size") + wxT(": ") + fileObj.getFileSize<RIGHT_SIDE>().ToString();
+ msg += left + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<LEFT_SIDE>()) +
+ wxT(" \t") + _("Size") + wxT(": ") + fileObj.getFileSize<LEFT_SIDE>().ToString() + wxT("\n");
+ msg += right + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<RIGHT_SIDE>()) +
+ wxT(" \t") + _("Size") + wxT(": ") + fileObj.getFileSize<RIGHT_SIDE>().ToString();
return wxString(_("Conflict detected:")) + wxT("\n") + msg;
}
@@ -688,14 +729,14 @@ wxString getConflictChangeWithinHour(const FileMapping& fileObj)
msg += wxString(wxT("\n")) + _("(Note that only FAT/FAT32 drives are affected by this problem!\nIn all other cases you can disable the setting \"ignore 1-hour difference\".)");
msg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(fileObj.getRelativeName<LEFT_SIDE>()) + wxT("\""));
msg += wxT("\n\n");
- msg += left + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<LEFT_SIDE>(), fileObj.getFullName<LEFT_SIDE>()) + wxT("\n");
- msg += right + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<RIGHT_SIDE>(), fileObj.getFullName<RIGHT_SIDE>());
+ msg += left + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<LEFT_SIDE>()) + wxT("\n");
+ msg += right + wxT("\t") + _("Date") + wxT(": ") + utcTimeToLocalString(fileObj.getLastWriteTime<RIGHT_SIDE>());
return wxString(_("Conflict detected:")) + wxT("\n") + msg;
}
//-----------------------------------------------------------------------------
inline
-bool sameFileTime(const wxLongLong& a, const wxLongLong& b, const unsigned int tolerance)
+bool sameFileTime(const wxLongLong& a, const wxLongLong& b, size_t tolerance)
{
if (a < b)
return b <= a + tolerance;
@@ -952,6 +993,8 @@ void MergeSides::execute(const DirContainer& leftSide, const DirContainer& right
//3. entries may be deleted but NEVER new ones inserted!!!
//=> this allows for a quasi-binary search by id!
+ //HierarchyObject::addSubFile() must not invalidate references used in "appendUndefined"! Currently a std::list, so no problem.
+
//reserve() fulfills two task here: 1. massive performance improvement! 2. ensure references in appendUndefined remain valid!
output.useSubFiles().reserve(leftSide.fileCount() + rightSide.fileCount()); //assume worst case!
output.useSubDirs(). reserve(leftSide.dirCount() + rightSide.dirCount()); //
@@ -966,8 +1009,12 @@ void MergeSides::execute(const DirContainer& leftSide, const DirContainer& right
//find files that exist on left and right
else
{
- appendUndefined.push_back(
- &output.addSubFile(i->second.getData(), i->first, FILE_EQUAL, rightFile->getData())); //FILE_EQUAL is just a dummy-value here
+ FileMapping& newEntry = output.addSubFile(
+ i->second.getData(),
+ i->first,
+ FILE_EQUAL, //FILE_EQUAL is just a dummy-value here
+ rightFile->getData());
+ appendUndefined.push_back(&newEntry);
}
}
@@ -1033,4 +1080,3 @@ void CompareProcess::performBaseComparison(BaseDirMapping& output, std::vector<F
MergeSides(appendUndefined).execute(directoryLeft, directoryRight, output);
}
-
diff --git a/comparison.h b/comparison.h
index 7ebb66a4..caa237c0 100644
--- a/comparison.h
+++ b/comparison.h
@@ -40,8 +40,9 @@ std::vector<FolderPairCfg> extractCompareCfg(const MainConfiguration& mainCfg);
class CompareProcess
{
public:
- CompareProcess(bool traverseSymLinks,
- unsigned int fileTimeTol,
+ CompareProcess(bool processSymLinks,
+ bool traverseSymLinks,
+ size_t fileTimeTol,
bool ignoreOneHourDiff,
xmlAccess::OptionalDialogs& warnings,
StatusHandler* handler);
@@ -62,7 +63,7 @@ private:
class DirectoryBuffer;
boost::shared_ptr<DirectoryBuffer> directoryBuffer; //std::auto_ptr does not work with forward declarations (Or we need a non-inline ~CompareProcess())!
- const unsigned int fileTimeTolerance; //max allowed file time deviation
+ const size_t fileTimeTolerance; //max allowed file time deviation
const bool ignoreOneHourDifference;
xmlAccess::OptionalDialogs& m_warnings;
diff --git a/copySource b/copySource
deleted file mode 100644
index f59c1791..00000000
--- a/copySource
+++ /dev/null
@@ -1,7 +0,0 @@
-cp /cdrom/Backup/* . -r
-chmod -R 0755 .
-touch *
-touch ui/*
-touch shared/*
-touch library/*
-touch RealtimeSync/*
diff --git a/fileHierarchy.cpp b/fileHierarchy.cpp
index dc616db0..b8c4c3bc 100644
--- a/fileHierarchy.cpp
+++ b/fileHierarchy.cpp
@@ -88,7 +88,7 @@ void removeEmptyRec(HierarchyObject& hierObj)
{
FileSystemObject::removeEmptyNonRec(hierObj);
- //recurse into remaining directories
+ //recurse
std::for_each(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), removeEmptyRec);
}
diff --git a/fileHierarchy.h b/fileHierarchy.h
index 5d97393a..ef439c29 100644
--- a/fileHierarchy.h
+++ b/fileHierarchy.h
@@ -49,9 +49,9 @@ enum SelectedSide
class FileContainer;
class FileMapping;
class DirMapping;
-class CompareProcess;
class FileSystemObject;
class BaseDirMapping;
+class HierarchyObject;
//------------------------------------------------------------------
/*
DirContainer FileContainer
@@ -160,25 +160,22 @@ public:
const FileDescriptor& right);
const Zstring& getRelativeNamePf() const; //get name relative to base sync dir with FILE_NAME_SEPARATOR postfix: "blah\"
- template <SelectedSide side> const Zstring& getBaseDir() const //postfixed!
- {
- return side == LEFT_SIDE ? baseDirLeft : baseDirRight;
- }
+ template <SelectedSide side> const Zstring& getBaseDir() const; //postfixed!
- typedef std::vector<FileMapping> SubFileMapping;
- typedef std::vector<DirMapping> SubDirMapping;
+ typedef std::vector<FileMapping> SubFileMapping; //MergeSides::execute() requires a structure that doesn't invalidate pointers after push_back()
+ typedef std::vector<DirMapping> SubDirMapping; //Note: deque<> has circular reference in VCPP!
SubDirMapping& useSubDirs();
SubFileMapping& useSubFiles();
- const SubDirMapping& useSubDirs() const;
+ const SubDirMapping& useSubDirs() const;
const SubFileMapping& useSubFiles() const;
protected:
//constructor used by DirMapping
HierarchyObject(const HierarchyObject& parent, const Zstring& shortName) :
relNamePf(parent.getRelativeNamePf() + shortName + globalFunctions::FILE_NAME_SEPARATOR),
- baseDirLeft(parent.getBaseDir<LEFT_SIDE>()),
- baseDirRight(parent.getBaseDir<RIGHT_SIDE>()) {}
+ baseDirLeft(parent.baseDirLeft),
+ baseDirRight(parent.baseDirRight) {}
//constructor used by BaseDirMapping
HierarchyObject(const Zstring& dirPostfixedLeft,
@@ -198,6 +195,21 @@ private:
Zstring baseDirRight; //directory name ending with FILE_NAME_SEPARATOR
};
+template <>
+inline
+const Zstring& HierarchyObject::getBaseDir<LEFT_SIDE>() const //postfixed!
+{
+ return baseDirLeft;
+}
+
+
+template <>
+inline
+const Zstring& HierarchyObject::getBaseDir<RIGHT_SIDE>() const //postfixed!
+{
+ return baseDirRight;
+}
+
//------------------------------------------------------------------
struct RelNamesBuffered
@@ -248,7 +260,7 @@ public:
void synchronizeSides(); //copy one side to the other (NOT recursive!!!)
template <SelectedSide side> void removeObject(); //removes file or directory (recursively!): used by manual deletion
bool isEmpty() const; //true, if both sides are empty
- static void removeEmpty(BaseDirMapping& baseDir); //remove all invalid entries (where both sides are empty) recursively
+ static void removeEmpty(BaseDirMapping& baseDir); //remove all invalid entries (where both sides are empty) recursively
static void removeEmptyNonRec(HierarchyObject& hierObj); //remove all invalid entries (where both sides are empty) non-recursively
protected:
@@ -428,6 +440,17 @@ bool isDirectoryMapping(const FileSystemObject& fsObj);
+
+
+
+
+
+
+
+
+
+
+
//---------------Inline Implementation---------------------------------------------------
inline
FileSystemObject* HierarchyObject::retrieveById(ObjectID id) //returns NULL if object is not found
diff --git a/library/CustomGrid.cpp b/library/CustomGrid.cpp
index e9fe9eb6..5fc993ce 100644
--- a/library/CustomGrid.cpp
+++ b/library/CustomGrid.cpp
@@ -31,7 +31,7 @@
using namespace FreeFileSync;
-const unsigned int MIN_ROW_COUNT = 15;
+const size_t MIN_ROW_COUNT = 15;
//class containing pure grid data: basically the same as wxGridStringTable, but adds cell formatting
@@ -81,7 +81,7 @@ public:
virtual int GetNumberRows()
{
if (gridDataView)
- return std::max(static_cast<unsigned int>(gridDataView->rowsOnView()), MIN_ROW_COUNT);
+ return static_cast<int>(std::max(gridDataView->rowsOnView(), MIN_ROW_COUNT));
else
return 0; //grid is initialized with zero number of rows
}
@@ -188,7 +188,7 @@ public:
}
- const FileSystemObject* getRawData(const unsigned int row) const
+ const FileSystemObject* getRawData(size_t row) const
{
if (gridDataView)
return gridDataView->getObject(row); //returns NULL if request is not valid or not data found
@@ -239,16 +239,16 @@ public:
}
- xmlAccess::ColumnTypes getTypeAtPos(unsigned pos) const
+ xmlAccess::ColumnTypes getTypeAtPos(size_t pos) const
{
if (pos < columnPositions.size())
return columnPositions[pos];
else
- return xmlAccess::ColumnTypes(1000);
+ return xmlAccess::DIRECTORY;
}
//get filename in order to retrieve the icon from it
- virtual Zstring getIconFile(const unsigned int row) const = 0; //return "folder" if row points to a folder
+ virtual Zstring getIconFile(size_t row) const = 0; //return "folder" if row points to a folder
protected:
template <SelectedSide side>
@@ -298,7 +298,7 @@ protected:
case xmlAccess::SIZE: //file size
return FreeFileSync::numberToWxString(fileObj->getFileSize<side>(), true);
case xmlAccess::DATE: //date
- return FreeFileSync::utcTimeToLocalString(fileObj->getLastWriteTime<side>(), fileObj->getFullName<side>());
+ return FreeFileSync::utcTimeToLocalString(fileObj->getLastWriteTime<side>());
case xmlAccess::EXTENSION: //file extension
return zToWx(fileObj->getExtension<side>());
}
@@ -342,7 +342,7 @@ public:
return CustomGridTableRim::GetValueSub<LEFT_SIDE>(row, col);
}
- virtual Zstring getIconFile(const unsigned int row) const //return "folder" if row points to a folder
+ virtual Zstring getIconFile(size_t row) const //return "folder" if row points to a folder
{
const FileSystemObject* fsObj = getRawData(row);
if (fsObj && !fsObj->isEmpty<LEFT_SIDE>())
@@ -366,7 +366,7 @@ public:
return CustomGridTableRim::GetValueSub<RIGHT_SIDE>(row, col);
}
- virtual Zstring getIconFile(const unsigned int row) const //return "folder" if row points to a folder
+ virtual Zstring getIconFile(size_t row) const //return "folder" if row points to a folder
{
const FileSystemObject* fsObj = getRawData(row);
if (fsObj && !fsObj->isEmpty<RIGHT_SIDE>())
@@ -916,7 +916,7 @@ std::set<size_t> CustomGrid::getAllSelectedRows() const
const wxGridCellCoordsArray singlySelected = this->GetSelectedCells();
if (!singlySelected.IsEmpty())
{
- for (unsigned int k = 0; k < singlySelected.GetCount(); ++k)
+ for (size_t k = 0; k < singlySelected.GetCount(); ++k)
output.insert(singlySelected[k].GetRow());
}
@@ -1149,11 +1149,11 @@ xmlAccess::ColumnAttributes CustomGridRim::getColumnAttributes()
xmlAccess::ColumnAttributes output;
xmlAccess::ColumnAttrib newEntry;
- for (unsigned int i = 0; i < columnSettings.size(); ++i)
+ for (size_t i = 0; i < columnSettings.size(); ++i)
{
newEntry = columnSettings[i];
if (newEntry.visible)
- newEntry.width = GetColSize(i); //hidden columns are sorted to the end of vector!
+ newEntry.width = GetColSize(static_cast<int>(i)); //hidden columns are sorted to the end of vector!
output.push_back(newEntry);
}
@@ -1182,7 +1182,7 @@ void CustomGridRim::setColumnAttributes(const xmlAccess::ColumnAttributes& attr)
}
else
{
- for (unsigned int i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i)
+ for (size_t i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i)
{
xmlAccess::ColumnAttrib newEntry;
@@ -1199,17 +1199,17 @@ void CustomGridRim::setColumnAttributes(const xmlAccess::ColumnAttributes& attr)
}
std::sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByType);
- for (unsigned int i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i) //just be sure that each type exists only once
+ for (size_t i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i) //just be sure that each type exists only once
columnSettings[i].type = static_cast<xmlAccess::ColumnTypes>(i);
std::sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByPositionOnly);
- for (unsigned int i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i) //just be sure that positions are numbered correctly
+ for (size_t i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i) //just be sure that positions are numbered correctly
columnSettings[i].position = i;
}
std::sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByPositionAndVisibility);
std::vector<xmlAccess::ColumnTypes> newPositions;
- for (unsigned int i = 0; i < columnSettings.size() && columnSettings[i].visible; ++i) //hidden columns are sorted to the end of vector!
+ for (size_t i = 0; i < columnSettings.size() && columnSettings[i].visible; ++i) //hidden columns are sorted to the end of vector!
newPositions.push_back(columnSettings[i].type);
//set column positions
@@ -1217,8 +1217,8 @@ void CustomGridRim::setColumnAttributes(const xmlAccess::ColumnAttributes& attr)
getGridDataTable()->setupColumns(newPositions);
//set column width (set them after setupColumns!)
- for (unsigned int i = 0; i < newPositions.size(); ++i)
- SetColSize(i, columnSettings[i].width);
+ for (size_t i = 0; i < newPositions.size(); ++i)
+ SetColSize(static_cast<int>(i), columnSettings[i].width);
//--------------------------------------------------------------------------------------------------------
//set special alignment for column "size"
@@ -1236,7 +1236,7 @@ void CustomGridRim::setColumnAttributes(const xmlAccess::ColumnAttributes& attr)
}
-xmlAccess::ColumnTypes CustomGridRim::getTypeAtPos(unsigned pos) const
+xmlAccess::ColumnTypes CustomGridRim::getTypeAtPos(size_t pos) const
{
assert(getGridDataTable());
return getGridDataTable()->getTypeAtPos(pos);
@@ -1379,7 +1379,7 @@ void CustomGridRim::getIconsToBeLoaded(std::vector<Zstring>& newLoad) //loads al
const int totalRows = const_cast<CustomGridTableRim*>(gridDataTable)->GetNumberRows();
//loop over all visible rows
- const int firstRow = rowsOnScreen.first;
+ const int firstRow = static_cast<int>(rowsOnScreen.first);
const int lastRow = std::min(int(rowsOnScreen.second), totalRows - 1);
const int rowNo = lastRow - firstRow + 1;
diff --git a/library/CustomGrid.h b/library/CustomGrid.h
index 35915811..5f1823c0 100644
--- a/library/CustomGrid.h
+++ b/library/CustomGrid.h
@@ -153,7 +153,7 @@ public:
xmlAccess::ColumnAttributes getColumnAttributes();
void setColumnAttributes(const xmlAccess::ColumnAttributes& attr);
- xmlAccess::ColumnTypes getTypeAtPos(unsigned pos) const;
+ xmlAccess::ColumnTypes getTypeAtPos(size_t pos) const;
static wxString getTypeName(xmlAccess::ColumnTypes colType);
void autoSizeColumns(); //performance optimized column resizer
@@ -171,14 +171,14 @@ private:
//asynchronous icon loading
void getIconsToBeLoaded(std::vector<Zstring>& newLoad); //loads all (not yet) drawn icons
- typedef unsigned int FromRow;
- typedef unsigned int ToRow;
+ typedef size_t FromRow;
+ typedef size_t ToRow;
typedef std::pair<FromRow, ToRow> VisibleRowRange;
VisibleRowRange getVisibleRows();
- typedef unsigned int RowNumber;
- typedef bool IconLoaded;
+ typedef size_t RowNumber;
+ typedef bool IconLoaded;
typedef std::map<RowNumber, IconLoaded> LoadSuccess;
LoadSuccess loadIconSuccess; //save status of last icon load when drawing on GUI
diff --git a/library/Recycler_Vista/recycler.cpp b/library/Recycler_Vista/recycler.cpp
deleted file mode 100644
index 7858267b..00000000
--- a/library/Recycler_Vista/recycler.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
-// **************************************************************************
-//
-#include "recycler.h"
-
-#define WIN32_LEAN_AND_MEAN
-#include "windows.h"
-#include <Shellapi.h> // Included for shell constants such as FO_* values
-#include <shobjidl.h> // Required for necessary shell dependencies
-
-#include <algorithm>
-#include <string>
-#include <cstdio>
-#include <comdef.h>
-
-
-void writeString(const wchar_t* input, wchar_t* output, size_t outputBufferLen)
-{
- const size_t newSize = min(wcslen(input) + 1, outputBufferLen); //including null-termination
- memcpy(output, input, newSize * sizeof(wchar_t));
- output[newSize-1] = 0; //if output buffer is too small...
-}
-
-
-std::wstring numberToHexString(const long number)
-{
- wchar_t result[100];
- swprintf(result, 100, L"0x%08x", number);
- return std::wstring(result);
-}
-
-
-void writeErrorMsg(const wchar_t* input, HRESULT hr, wchar_t* output, size_t outputBufferLen)
-{
- std::wstring formattedMsg(input);
- formattedMsg += L" (";
- formattedMsg += numberToHexString(hr);
- formattedMsg += L": ";
- formattedMsg += _com_error(hr).ErrorMessage();
- formattedMsg += L")";
-
- writeString(formattedMsg.c_str(), output, outputBufferLen);
-}
-
-
-//IShellItem resource management
-template <class T>
-class ReleaseAtExit
-{
-public:
- ReleaseAtExit(T*& item) : item_(item) {}
- ~ReleaseAtExit()
- {
- if (item_ != NULL)
- item_->Release();
- }
-private:
- T*& item_;
-};
-
-
-bool Utility::moveToRecycleBin(const wchar_t* fileNames[],
- size_t fileNo, //size of fileNames array
- wchar_t* errorMessage,
- size_t errorBufferLen)
-{
- HRESULT hr;
-
- // Create the IFileOperation interface
- IFileOperation* pfo = NULL;
- ReleaseAtExit<IFileOperation> dummy(pfo);
- hr = CoCreateInstance(CLSID_FileOperation,
- NULL,
- CLSCTX_ALL,
- IID_PPV_ARGS(&pfo));
- if (FAILED(hr))
- {
- writeErrorMsg(L"Error calling \"CoCreateInstance\".", hr, errorMessage, errorBufferLen);
- return false;
- }
-
- // Set the operation flags. Turn off all UI
- // from being shown to the user during the
- // operation. This includes error, confirmation
- // and progress dialogs.
- hr = pfo->SetOperationFlags(FOF_ALLOWUNDO |
- FOF_NOCONFIRMATION |
- FOF_SILENT |
- FOF_NOERRORUI);
- if (FAILED(hr))
- {
- writeErrorMsg(L"Error calling \"SetOperationFlags\".", hr, errorMessage, errorBufferLen);
- return false;
- }
-
- for (size_t i = 0; i < fileNo; ++i)
- {
- //create file/folder item object
- IShellItem* psiFile = NULL;
- ReleaseAtExit<IShellItem> dummy2(psiFile);
- hr = SHCreateItemFromParsingName(fileNames[i],
- NULL,
- IID_PPV_ARGS(&psiFile));
- if (FAILED(hr))
- {
- std::wstring message(L"Error calling \"SHCreateItemFromParsingName\" for file ");
- message += std::wstring(L"\"") + fileNames[i] + L"\".";
- writeErrorMsg(message.c_str(), hr, errorMessage, errorBufferLen);
- return false;
- }
-
- hr = pfo->DeleteItem(psiFile, NULL);
- if (FAILED(hr))
- {
- writeErrorMsg(L"Error calling \"DeleteItem\".", hr, errorMessage, errorBufferLen);
- return false;
- }
- }
-
- //perform actual operations
- hr = pfo->PerformOperations();
- if (FAILED(hr))
- {
- writeErrorMsg(L"Error calling \"PerformOperations\".", hr, errorMessage, errorBufferLen);
- return false;
- }
-
- //check if errors occured: if FOFX_EARLYFAILURE is not used, PerformOperations() can return with success despite errors!
- BOOL pfAnyOperationsAborted = FALSE;
- hr = pfo->GetAnyOperationsAborted(&pfAnyOperationsAborted);
- if (FAILED(hr))
- {
- writeErrorMsg(L"Error calling \"GetAnyOperationsAborted\".", hr, errorMessage, errorBufferLen);
- return false;
- }
-
-
- if (pfAnyOperationsAborted == TRUE)
- {
- writeString(L"Operation did not complete successfully.", errorMessage, errorBufferLen);
- return false;
- }
-
- return true;
-}
diff --git a/library/Recycler_Vista/recycler.h b/library/Recycler_Vista/recycler.h
deleted file mode 100644
index 697221c3..00000000
--- a/library/Recycler_Vista/recycler.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
-// **************************************************************************
-//
-#ifndef RECYCLER_DLL_H
-#define RECYCLER_DLL_H
-
-#ifdef RECYCLER_DLL_EXPORTS
-#define RECYCLER_DLL_API extern "C" __declspec(dllexport)
-#else
-#define RECYCLER_DLL_API extern "C" __declspec(dllimport)
-#endif
-
-
-namespace Utility
-{
-//COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize
-
-RECYCLER_DLL_API
-bool moveToRecycleBin(const wchar_t* fileNames[],
- size_t fileNo, //size of fileNames array
- wchar_t* errorMessage,
- size_t errorBufferLen);
-}
-
-
-
-#endif //RECYCLER_DLL_H
diff --git a/library/ShadowCopy/shadow.h b/library/ShadowCopy/shadow.h
deleted file mode 100644
index cc82e8e0..00000000
--- a/library/ShadowCopy/shadow.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
-// **************************************************************************
-//
-#ifndef SHADOWCOPY_H
-#define SHADOWCOPY_H
-
-#ifdef SHADOWDLL_EXPORTS
-#define SHADOWDLL_API extern "C" __declspec(dllexport)
-#else
-#define SHADOWDLL_API extern "C" __declspec(dllimport)
-#endif
-
-
-namespace shadow
-{
- //COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize
-
-
- //volumeName must end with "\", while shadowVolName does not end with "\"
- SHADOWDLL_API
- bool createShadowCopy(const wchar_t* volumeName,
- wchar_t* shadowVolName,
- unsigned int shadowBufferLen,
- void** backupHandle,
- wchar_t* errorMessage,
- unsigned int errorBufferLen);
-
-
- //don't forget to release the backupHandle after shadow copy is not needed anymore!
- SHADOWDLL_API
- void releaseShadowCopy(void* backupHandle);
-}
-
-
-
-#endif //SHADOWCOPY_H
diff --git a/library/binary.cpp b/library/binary.cpp
index 409b024a..8b8fd2ec 100644
--- a/library/binary.cpp
+++ b/library/binary.cpp
@@ -5,32 +5,122 @@
// **************************************************************************
//
#include "binary.h"
-#include <boost/scoped_array.hpp>
#include "../shared/fileIO.h"
+#include <vector>
+#include <wx/stopwatch.h>
-bool FreeFileSync::filesHaveSameContent(const Zstring& filename1, const Zstring& filename2, CompareCallback& callback)
+inline
+void setMinSize(std::vector<char>& buffer, size_t minSize)
+{
+ if (buffer.size() < minSize) //this is similar to reserve(), but be need a "properly initialized" array here
+ buffer.resize(minSize);
+}
+
+
+namespace
{
- const size_t BUFFER_SIZE = 512 * 1024; //512 kb seems to be the perfect buffer size
- static boost::scoped_array<unsigned char> memory1(new unsigned char[BUFFER_SIZE]);
- static boost::scoped_array<unsigned char> memory2(new unsigned char[BUFFER_SIZE]);
+class BufferSize
+{
+public:
+ BufferSize() : bufSize(BUFFER_SIZE_START) {}
+
+ void inc()
+ {
+ if (bufSize < BUFFER_SIZE_MAX)
+ bufSize *= 2;
+ }
+
+ void dec()
+ {
+ if (bufSize > BUFFER_SIZE_MIN)
+ bufSize /= 2;
+ }
+
+ operator size_t() const
+ {
+ return bufSize;
+ }
+
+private:
+ static const size_t BUFFER_SIZE_MIN = 128 * 1024;
+ static const size_t BUFFER_SIZE_START = 512 * 1024; //512 kb seems to be a reasonable initial buffer size
+ static const size_t BUFFER_SIZE_MAX = 16 * 1024 * 1024;
+
+ /*Tests on Win7 x64 show that buffer size does NOT matter if files are located on different physical disks!
+ Impact of buffer size when files are on same disk:
+
+ buffer MB/s
+ ------------
+ 64 10
+ 128 19
+ 512 40
+ 1024 48
+ 2048 56
+ 4096 56
+ 8192 56
+ */
+ size_t bufSize;
+};
+}
+
+
+bool FreeFileSync::filesHaveSameContent(const Zstring& filename1, const Zstring& filename2, CompareCallback& callback)
+{
FileInput file1(filename1); //throw FileError()
FileInput file2(filename2); //throw FileError()
+ BufferSize bufferSize;
+
+ static std::vector<char> memory1;
+ static std::vector<char> memory2;
+
wxLongLong bytesCompared;
+
+ wxLongLong lastDelayViolation = wxGetLocalTimeMillis();
+
do
{
- const size_t length1 = file1.read(memory1.get(), BUFFER_SIZE); //returns actual number of bytes read; throw FileError()
- const size_t length2 = file2.read(memory2.get(), BUFFER_SIZE); //
+ setMinSize(memory1, bufferSize);
+ setMinSize(memory2, bufferSize);
- if (length1 != length2 || ::memcmp(memory1.get(), memory2.get(), length1) != 0)
+ const wxLongLong startTime = wxGetLocalTimeMillis();
+
+ const size_t length1 = file1.read(&memory1[0], bufferSize); //returns actual number of bytes read; throw FileError()
+ const size_t length2 = file2.read(&memory2[0], bufferSize); //
+
+ const wxLongLong stopTime = wxGetLocalTimeMillis();
+
+ //-------- dynamically set buffer size to keep callback interval between 200 - 500ms ---------------------
+ const wxLongLong loopTime = stopTime - startTime;
+ if (loopTime < 200 && stopTime - lastDelayViolation > 2000) //avoid "flipping back": e.g. DVD-Roms read 32MB at once, so first read may be > 300 ms, but second one will be 0ms!
+ {
+ lastDelayViolation = stopTime;
+ bufferSize.inc(); //practically no costs!
+ }
+ else if (loopTime > 500)
+ {
+ lastDelayViolation = stopTime;
+ bufferSize.dec(); //
+ }
+ //------------------------------------------------------------------------------------------------
+
+//#warning
+// static wxLongLong blorg = wxGetLocalTimeMillis();
+// if (wxGetLocalTimeMillis() - blorg > 5000)
+// {
+// blorg = wxGetLocalTimeMillis();
+// wxMessageBox(numberToZstring<size_t>(bufferSize).c_str());
+// }
+
+
+
+ if (length1 != length2 || ::memcmp(&memory1[0], &memory2[0], length1) != 0)
return false;
bytesCompared += length1 * 2;
-
- //send progress updates
- callback.updateCompareStatus(bytesCompared);
+ callback.updateCompareStatus(bytesCompared); //send progress updates
}
while (!file1.eof());
diff --git a/library/dbFile.cpp b/library/dbFile.cpp
index c08c8ae8..7a000197 100644
--- a/library/dbFile.cpp
+++ b/library/dbFile.cpp
@@ -15,6 +15,7 @@
#include <wx/mstream.h>
#include "../shared/serialize.h"
#include "../shared/fileIO.h"
+#include "../shared/loki/ScopeGuard.h"
#ifdef FFS_WIN
#include <wx/msw/wrapwin.h> //includes "windows.h"
@@ -173,7 +174,6 @@ DbStreamData loadFile(const Zstring& filename) //throw (FileError)
_("One of the FreeFileSync database files is not yet existing:") + wxT(" \n") +
wxT("\"") + zToWx(filename) + wxT("\""));
-
//read format description (uncompressed)
FileInputStreamDB uncompressed(filename); //throw (FileError)
@@ -190,33 +190,40 @@ std::pair<DirInfoPtr, DirInfoPtr> FreeFileSync::loadFromDisk(const BaseDirMappin
const Zstring fileNameLeft = baseMapping.getDBFilename<LEFT_SIDE>();
const Zstring fileNameRight = baseMapping.getDBFilename<RIGHT_SIDE>();
- //read file data: db ID + mapping of partner-ID/DirInfo-stream
- const DbStreamData dbEntriesLeft = ::loadFile(fileNameLeft);
- const DbStreamData dbEntriesRight = ::loadFile(fileNameRight);
-
- //find associated DirInfo-streams
- DirectoryTOC::const_iterator dbLeft = dbEntriesLeft.second.find(dbEntriesRight.first); //find left db-entry that corresponds to right database
- if (dbLeft == dbEntriesLeft.second.end())
- throw FileError(wxString(_("Initial synchronization:")) + wxT(" \n\n") +
- _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
- wxT("\"") + zToWx(fileNameLeft) + wxT("\""));
-
- DirectoryTOC::const_iterator dbRight = dbEntriesRight.second.find(dbEntriesLeft.first); //find left db-entry that corresponds to right database
- if (dbRight == dbEntriesRight.second.end())
- throw FileError(wxString(_("Initial synchronization:")) + wxT(" \n\n") +
- _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
- wxT("\"") + zToWx(fileNameRight) + wxT("\""));
-
- //read streams into DirInfo
- boost::shared_ptr<DirInformation> dirInfoLeft(new DirInformation);
- wxMemoryInputStream buffer(&(*dbLeft->second)[0], dbLeft->second->size()); //convert char-array to inputstream: no copying, ownership not transferred
- ReadDirInfo(buffer, zToWx(fileNameLeft), *dirInfoLeft); //read file/dir information
-
- boost::shared_ptr<DirInformation> dirInfoRight(new DirInformation);
- wxMemoryInputStream buffer2(&(*dbRight->second)[0], dbRight->second->size()); //convert char-array to inputstream: no copying, ownership not transferred
- ReadDirInfo(buffer2, zToWx(fileNameRight), *dirInfoRight); //read file/dir information
-
- return std::make_pair(dirInfoLeft, dirInfoRight);
+ try
+ {
+ //read file data: db ID + mapping of partner-ID/DirInfo-stream
+ const DbStreamData dbEntriesLeft = ::loadFile(fileNameLeft);
+ const DbStreamData dbEntriesRight = ::loadFile(fileNameRight);
+
+ //find associated DirInfo-streams
+ DirectoryTOC::const_iterator dbLeft = dbEntriesLeft.second.find(dbEntriesRight.first); //find left db-entry that corresponds to right database
+ if (dbLeft == dbEntriesLeft.second.end())
+ throw FileError(wxString(_("Initial synchronization:")) + wxT(" \n\n") +
+ _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
+ wxT("\"") + zToWx(fileNameLeft) + wxT("\""));
+
+ DirectoryTOC::const_iterator dbRight = dbEntriesRight.second.find(dbEntriesLeft.first); //find left db-entry that corresponds to right database
+ if (dbRight == dbEntriesRight.second.end())
+ throw FileError(wxString(_("Initial synchronization:")) + wxT(" \n\n") +
+ _("One of the FreeFileSync database entries within the following file is not yet existing:") + wxT(" \n") +
+ wxT("\"") + zToWx(fileNameRight) + wxT("\""));
+
+ //read streams into DirInfo
+ boost::shared_ptr<DirInformation> dirInfoLeft(new DirInformation);
+ wxMemoryInputStream buffer(&(*dbLeft->second)[0], dbLeft->second->size()); //convert char-array to inputstream: no copying, ownership not transferred
+ ReadDirInfo(buffer, zToWx(fileNameLeft), *dirInfoLeft); //read file/dir information
+
+ boost::shared_ptr<DirInformation> dirInfoRight(new DirInformation);
+ wxMemoryInputStream buffer2(&(*dbRight->second)[0], dbRight->second->size()); //convert char-array to inputstream: no copying, ownership not transferred
+ ReadDirInfo(buffer2, zToWx(fileNameRight), *dirInfoRight); //read file/dir information
+
+ return std::make_pair(dirInfoLeft, dirInfoRight);
+ }
+ catch (const std::bad_alloc&) //this is most likely caused by a corrupted database file
+ {
+ throw FileError(wxString(_("Error reading from synchronization database:")) + wxT(" (bad_alloc)"));
+ }
}
@@ -346,74 +353,75 @@ void FreeFileSync::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileEr
removeFile(fileNameLeftTmp);
removeFile(fileNameRightTmp);
- try
- {
- //load old database files...
-
- //read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw!
- DbStreamData dbEntriesLeft;
- if (FreeFileSync::fileExists(baseMapping.getDBFilename<LEFT_SIDE>()))
- try
- {
- dbEntriesLeft = ::loadFile(baseMapping.getDBFilename<LEFT_SIDE>());
- }
- catch(FileError&) {} //if error occurs: just overwrite old file! User is informed about issues right after comparing!
- //else -> dbEntriesLeft has empty mapping, but already a DB-ID!
-
- //read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw!
- DbStreamData dbEntriesRight;
- if (FreeFileSync::fileExists(baseMapping.getDBFilename<RIGHT_SIDE>()))
- try
- {
- dbEntriesRight = ::loadFile(baseMapping.getDBFilename<RIGHT_SIDE>());
- }
- catch(FileError&) {} //if error occurs: just overwrite old file! User is informed about issues right after comparing!
+ //load old database files...
- //create new database entries
- MemoryStreamPtr dbEntryLeft(new std::vector<char>);
+ //read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw!
+ DbStreamData dbEntriesLeft;
+ if (FreeFileSync::fileExists(baseMapping.getDBFilename<LEFT_SIDE>()))
+ try
{
- wxMemoryOutputStream buffer;
- SaveDirInfo<LEFT_SIDE>(baseMapping, zToWx(baseMapping.getDBFilename<LEFT_SIDE>()), buffer);
- dbEntryLeft->resize(buffer.GetSize()); //convert output stream to char-array
- buffer.CopyTo(&(*dbEntryLeft)[0], buffer.GetSize()); //
+ dbEntriesLeft = ::loadFile(baseMapping.getDBFilename<LEFT_SIDE>());
}
+ catch(FileError&) {} //if error occurs: just overwrite old file! User is already informed about issues right after comparing!
+ //else -> dbEntriesLeft has empty mapping, but already a DB-ID!
- MemoryStreamPtr dbEntryRight(new std::vector<char>);
+ //read file data: db ID + mapping of partner-ID/DirInfo-stream: may throw!
+ DbStreamData dbEntriesRight;
+ if (FreeFileSync::fileExists(baseMapping.getDBFilename<RIGHT_SIDE>()))
+ try
{
- wxMemoryOutputStream buffer;
- SaveDirInfo<RIGHT_SIDE>(baseMapping, zToWx(baseMapping.getDBFilename<RIGHT_SIDE>()), buffer);
- dbEntryRight->resize(buffer.GetSize()); //convert output stream to char-array
- buffer.CopyTo(&(*dbEntryRight)[0], buffer.GetSize()); //
+ dbEntriesRight = ::loadFile(baseMapping.getDBFilename<RIGHT_SIDE>());
}
+ catch(FileError&) {} //if error occurs: just overwrite old file! User is already informed about issues right after comparing!
- //create/update DirInfo-streams
- dbEntriesLeft.second[dbEntriesRight.first] = dbEntryLeft;
- dbEntriesRight.second[dbEntriesLeft.first] = dbEntryRight;
-
- //write (temp-) files...
- saveFile(dbEntriesLeft, fileNameLeftTmp); //throw (FileError)
- saveFile(dbEntriesRight, fileNameRightTmp); //throw (FileError)
+ //create new database entries
+ MemoryStreamPtr dbEntryLeft(new std::vector<char>);
+ {
+ wxMemoryOutputStream buffer;
+ SaveDirInfo<LEFT_SIDE>(baseMapping, zToWx(baseMapping.getDBFilename<LEFT_SIDE>()), buffer);
+ dbEntryLeft->resize(buffer.GetSize()); //convert output stream to char-array
+ buffer.CopyTo(&(*dbEntryLeft)[0], buffer.GetSize()); //
+ }
- //operation finished: rename temp files -> this should work transactionally:
- //if there were no write access, creation of temp files would have failed
- removeFile(baseMapping.getDBFilename<LEFT_SIDE>());
- removeFile(baseMapping.getDBFilename<RIGHT_SIDE>());
- renameFile(fileNameLeftTmp, baseMapping.getDBFilename<LEFT_SIDE>()); //throw (FileError);
- renameFile(fileNameRightTmp, baseMapping.getDBFilename<RIGHT_SIDE>()); //throw (FileError);
+ MemoryStreamPtr dbEntryRight(new std::vector<char>);
+ {
+ wxMemoryOutputStream buffer;
+ SaveDirInfo<RIGHT_SIDE>(baseMapping, zToWx(baseMapping.getDBFilename<RIGHT_SIDE>()), buffer);
+ dbEntryRight->resize(buffer.GetSize()); //convert output stream to char-array
+ buffer.CopyTo(&(*dbEntryRight)[0], buffer.GetSize()); //
}
- catch (...)
+
+ //create/update DirInfo-streams
+ dbEntriesLeft.second[dbEntriesRight.first] = dbEntryLeft;
+ dbEntriesRight.second[dbEntriesLeft.first] = dbEntryRight;
+
+
+ struct TryCleanUp //ensure cleanup if working with temporary failed!
{
- try //clean up: (try to) delete old tmp files
+ static void tryDeleteFile(const Zstring& filename) //throw ()
{
- removeFile(fileNameLeftTmp);
- }
- catch (...) {}
- try
- {
- removeFile(fileNameRightTmp);
+ try
+ {
+ removeFile(filename);
+ }
+ catch (...) {}
}
- catch (...) {}
+ };
- throw;
- }
+ //write (temp-) files...
+ Loki::ScopeGuard guardTempFileLeft = Loki::MakeGuard(&TryCleanUp::tryDeleteFile, fileNameLeftTmp);
+ saveFile(dbEntriesLeft, fileNameLeftTmp); //throw (FileError)
+
+ Loki::ScopeGuard guardTempFileRight = Loki::MakeGuard(&TryCleanUp::tryDeleteFile, fileNameRightTmp);
+ saveFile(dbEntriesRight, fileNameRightTmp); //throw (FileError)
+
+ //operation finished: rename temp files -> this should work transactionally:
+ //if there were no write access, creation of temp files would have failed
+ removeFile(baseMapping.getDBFilename<LEFT_SIDE>());
+ removeFile(baseMapping.getDBFilename<RIGHT_SIDE>());
+ renameFile(fileNameLeftTmp, baseMapping.getDBFilename<LEFT_SIDE>()); //throw (FileError);
+ renameFile(fileNameRightTmp, baseMapping.getDBFilename<RIGHT_SIDE>()); //throw (FileError);
+
+ guardTempFileLeft.Dismiss(); //no need to delete temp file anymore
+ guardTempFileRight.Dismiss(); //
}
diff --git a/library/filter.cpp b/library/filter.cpp
index d7f12bec..931532c3 100644
--- a/library/filter.cpp
+++ b/library/filter.cpp
@@ -127,28 +127,28 @@ void addFilterEntry(const Zstring& filtername, std::set<Zstring>& fileFilter, st
}
-class MatchFound : public std::unary_function<const DefaultChar*, bool>
+class MatchFound : public std::unary_function<Zstring, bool>
{
public:
- MatchFound(const DefaultChar* name) : name_(name) {}
+ MatchFound(const Zstring& name) : name_(name) {}
- bool operator()(const DefaultChar* mask) const
+ bool operator()(const Zstring& mask) const
{
- return Zstring::Matches(name_, mask);
+ return Zstring::Matches(name_.c_str(), mask.c_str());
}
private:
- const DefaultChar* name_;
+ const Zstring& name_;
};
inline
-bool matchesFilter(const DefaultChar* name, const std::set<Zstring>& filter)
+bool matchesFilter(const Zstring& name, const std::set<Zstring>& filter)
{
#ifdef FFS_WIN //Windows does NOT distinguish between upper/lower-case
Zstring nameFormatted = name;
nameFormatted.MakeUpper();
#elif defined FFS_LINUX //Linux DOES distinguish between upper/lower-case
- const DefaultChar* const nameFormatted = name; //nothing to do here
+ const Zstring& nameFormatted = name; //nothing to do here
#endif
return std::find_if(filter.begin(), filter.end(), MatchFound(nameFormatted)) != filter.end();
@@ -182,17 +182,17 @@ bool matchesMaskBegin(const DefaultChar* string, const DefaultChar* mask)
inline
-bool matchesFilterBegin(const DefaultChar* name, const std::set<Zstring>& filter)
+bool matchesFilterBegin(const Zstring& name, const std::set<Zstring>& filter)
{
#ifdef FFS_WIN //Windows does NOT distinguish between upper/lower-case
Zstring nameFormatted = name;
nameFormatted.MakeUpper();
#elif defined FFS_LINUX //Linux DOES distinguish between upper/lower-case
- const DefaultChar* const nameFormatted = name; //nothing to do here
+ const Zstring& nameFormatted = name; //nothing to do here
#endif
return std::find_if(filter.begin(), filter.end(),
- boost::bind(matchesMaskBegin, nameFormatted, _1)) != filter.end();
+ boost::bind(matchesMaskBegin, nameFormatted.c_str(), _1)) != filter.end();
}
@@ -229,14 +229,14 @@ NameFilter::NameFilter(const Zstring& includeFilter, const Zstring& excludeFilte
}
-bool NameFilter::passFileFilter(const DefaultChar* relFilename) const
+bool NameFilter::passFileFilter(const Zstring& relFilename) const
{
return matchesFilter(relFilename, filterFileIn) && //process include filters
!matchesFilter(relFilename, filterFileEx); //process exclude filters
}
-bool NameFilter::passDirFilter(const DefaultChar* relDirname, bool* subObjMightMatch) const
+bool NameFilter::passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const
{
assert(subObjMightMatch == NULL || *subObjMightMatch == true); //check correct usage
@@ -251,7 +251,7 @@ bool NameFilter::passDirFilter(const DefaultChar* relDirname, bool* subObjMightM
{
if (subObjMightMatch)
{
- Zstring subNameBegin(relDirname);
+ Zstring subNameBegin = relDirname;
subNameBegin += globalFunctions::FILE_NAME_SEPARATOR;
*subObjMightMatch = matchesFilterBegin(subNameBegin, filterFileIn) || //might match a file in subdirectory
diff --git a/library/filter.h b/library/filter.h
index 5df74997..f27e06e6 100644
--- a/library/filter.h
+++ b/library/filter.h
@@ -36,8 +36,8 @@ public:
virtual ~BaseFilter() {}
//filtering
- virtual bool passFileFilter(const DefaultChar* relFilename) const = 0;
- virtual bool passDirFilter(const DefaultChar* relDirname, bool* subObjMightMatch) const = 0;
+ virtual bool passFileFilter(const Zstring& relFilename) const = 0;
+ virtual bool passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const = 0;
//subObjMightMatch: file/dir in subdirectories could(!) match
//note: variable is only set if passDirFilter returns false!
@@ -65,8 +65,8 @@ class NullFilter : public BaseFilter //no filtering at all
{
public:
static FilterRef load(wxInputStream& stream); //"serial constructor"
- virtual bool passFileFilter(const DefaultChar* relFilename) const;
- virtual bool passDirFilter(const DefaultChar* relDirname, bool* subObjMightMatch) const;
+ virtual bool passFileFilter(const Zstring& relFilename) const;
+ virtual bool passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const;
virtual bool isNull() const;
private:
@@ -82,8 +82,8 @@ public:
NameFilter(const Zstring& includeFilter, const Zstring& excludeFilter);
static FilterRef load(wxInputStream& stream); //"serial constructor"
- virtual bool passFileFilter(const DefaultChar* relFilename) const;
- virtual bool passDirFilter(const DefaultChar* relDirname, bool* subObjMightMatch) const;
+ virtual bool passFileFilter(const Zstring& relFilename) const;
+ virtual bool passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const;
virtual bool isNull() const;
private:
@@ -107,8 +107,8 @@ public:
CombinedFilter(const FilterRef& first, const FilterRef& second) : first_(first), second_(second) {}
static FilterRef load(wxInputStream& stream); //"serial constructor"
- virtual bool passFileFilter(const DefaultChar* relFilename) const;
- virtual bool passDirFilter(const DefaultChar* relDirname, bool* subObjMightMatch) const;
+ virtual bool passFileFilter(const Zstring& relFilename) const;
+ virtual bool passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const;
virtual bool isNull() const;
private:
@@ -151,14 +151,14 @@ BaseFilter::FilterRef NullFilter::load(wxInputStream& stream) //"serial construc
inline
-bool NullFilter::passFileFilter(const DefaultChar* relFilename) const
+bool NullFilter::passFileFilter(const Zstring& relFilename) const
{
return true;
}
inline
-bool NullFilter::passDirFilter(const DefaultChar* relDirname, bool* subObjMightMatch) const
+bool NullFilter::passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const
{
assert(subObjMightMatch == NULL || *subObjMightMatch == true); //check correct usage
return true;
@@ -188,7 +188,7 @@ Zstring NullFilter::uniqueClassIdentifier() const
inline
-bool CombinedFilter::passFileFilter(const DefaultChar* relFilename) const
+bool CombinedFilter::passFileFilter(const Zstring& relFilename) const
{
return first_->passFileFilter(relFilename) && //short-circuit behavior
second_->passFileFilter(relFilename);
@@ -196,7 +196,7 @@ bool CombinedFilter::passFileFilter(const DefaultChar* relFilename) const
inline
-bool CombinedFilter::passDirFilter(const DefaultChar* relDirname, bool* subObjMightMatch) const
+bool CombinedFilter::passDirFilter(const Zstring& relDirname, bool* subObjMightMatch) const
{
return first_->passDirFilter(relDirname, subObjMightMatch) && //short-circuit behavior: subObjMightMatch handled correctly!
second_->passDirFilter(relDirname, subObjMightMatch);
diff --git a/library/pch.h b/library/pch.h
index 44a3b574..1fb71f00 100644
--- a/library/pch.h
+++ b/library/pch.h
@@ -33,10 +33,8 @@ do NOT use in release build!
#include <map>
#include <memory>
#include <fstream>
-
-#ifdef FFS_LINUX
-#include <utime.h>
-#endif //FFS_LINUX
+#include <sstream>
+#include <new>
//other wxWidgets headers
#include <wx/log.h>
diff --git a/library/processXml.cpp b/library/processXml.cpp
index 1cc279b0..4ecc0350 100644
--- a/library/processXml.cpp
+++ b/library/processXml.cpp
@@ -302,8 +302,11 @@ void FfsXmlParser::readXmlMainConfig(MainConfiguration& mainCfg)
//max. allowed file time deviation
readXmlElementLogging("FileTimeTolerance", cmpSettings, mainCfg.hidden.fileTimeTolerance);
+ //include symbolic links at all?
+ readXmlElementLogging("IncludeSymlinks", cmpSettings, mainCfg.processSymlinks);
+
//traverse into symbolic links (to folders)
- readXmlElementLogging("TraverseDirectorySymlinks", cmpSettings, mainCfg.hidden.traverseDirectorySymlinks);
+ readXmlElementLogging("TraverseDirectorySymlinks", cmpSettings, mainCfg.traverseDirectorySymlinks);
//###########################################################
const TiXmlElement* syncCfg = hRoot.FirstChild("MainConfig").FirstChild("Synchronization").ToElement();
@@ -322,7 +325,7 @@ void FfsXmlParser::readXmlMainConfig(MainConfiguration& mainCfg)
const TiXmlElement* syncConfig = hRoot.FirstChild("MainConfig").FirstChild("Synchronization").ToElement();
//copy symbolic links to files
- readXmlElementLogging("CopyFileSymlinks", syncConfig, mainCfg.hidden.copyFileSymlinks);
+ readXmlElementLogging("CopyFileSymlinks", syncConfig, mainCfg.copyFileSymlinks);
//verify file copying
readXmlElementLogging("VerifyCopiedFiles", syncConfig, mainCfg.hidden.verifyFileCopy);
@@ -337,9 +340,12 @@ void FfsXmlParser::readXmlMainConfig(MainConfiguration& mainCfg)
const TiXmlElement* filter = TiXmlHandleConst(miscSettings).FirstChild("Filter").ToElement();
//read filter settings
- readXmlElementLogging("Active", filter, mainCfg.filterIsActive);
- readXmlElementLogging("Include", filter, mainCfg.includeFilter);
- readXmlElementLogging("Exclude", filter, mainCfg.excludeFilter);
+ Zstring includeFilter;
+ Zstring excludeFilter;
+ readXmlElementLogging("Include", filter, includeFilter);
+ readXmlElementLogging("Exclude", filter, excludeFilter);
+
+ mainCfg.globalFilter = FilterConfig(includeFilter, excludeFilter);
//###########################################################
const TiXmlElement* pairs = hRoot.FirstChild("MainConfig").FirstChild("FolderPairs").FirstChild("Pair").ToElement();
@@ -375,7 +381,7 @@ void FfsXmlParser::readXmlGuiConfig(xmlAccess::XmlGuiConfig& outputCfg)
readXmlElementLogging("HideFiltered", guiConfig, outputCfg.hideFilteredElements);
- xmlAccess::OnError errorHand;
+ xmlAccess::OnError errorHand = ON_ERROR_POPUP;
readXmlElementLogging("HandleError", guiConfig, errorHand);
outputCfg.ignoreErrors = errorHand == xmlAccess::ON_ERROR_IGNORE;
@@ -423,7 +429,7 @@ void FfsXmlParser::readXmlGlobalSettings(xmlAccess::XmlGlobalSettings& outputCfg
//check for unresolved conflicts
readXmlElementLogging("CheckForUnresolvedConflicts", optionalDialogs, outputCfg.optDialogs.warningUnresolvedConflicts);
- readXmlElementLogging("CheckSyncDatabase", optionalDialogs, outputCfg.optDialogs.warningSyncDatabase);
+ readXmlElementLogging("NotifyDatabaseError", optionalDialogs, outputCfg.optDialogs.warningSyncDatabase);
readXmlElementLogging("PopupOnConfigChange", optionalDialogs, outputCfg.optDialogs.popupOnConfigChange);
@@ -452,7 +458,7 @@ void FfsXmlParser::readXmlGlobalSettings(xmlAccess::XmlGlobalSettings& outputCfg
readXmlAttributeLogging("ShowFileIcons", TiXmlHandleConst(mainWindow).FirstChild("LeftColumns").ToElement(), outputCfg.gui.showFileIconsLeft);
const TiXmlElement* leftColumn = TiXmlHandleConst(mainWindow).FirstChild("LeftColumns").FirstChild("Column").ToElement();
- unsigned int colPos = 0;
+ size_t colPos = 0;
while (leftColumn)
{
ColumnAttrib newAttrib;
@@ -689,8 +695,11 @@ bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc)
//max. allowed file time deviation
addXmlElement("FileTimeTolerance", mainCfgLocal.hidden.fileTimeTolerance, cmpSettings);
+ //include symbolic links at all?
+ addXmlElement("IncludeSymlinks", mainCfgLocal.processSymlinks, cmpSettings);
+
//traverse into symbolic links (to folders)
- addXmlElement("TraverseDirectorySymlinks", mainCfgLocal.hidden.traverseDirectorySymlinks, cmpSettings);
+ addXmlElement("TraverseDirectorySymlinks", mainCfgLocal.traverseDirectorySymlinks, cmpSettings);
//###########################################################
TiXmlElement* syncSettings = new TiXmlElement("Synchronization");
@@ -711,7 +720,7 @@ bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc)
//###########################################################
//copy symbolic links to files
- addXmlElement("CopyFileSymlinks", mainCfgLocal.hidden.copyFileSymlinks, syncSettings);
+ addXmlElement("CopyFileSymlinks", mainCfgLocal.copyFileSymlinks, syncSettings);
//verify file copying
addXmlElement("VerifyCopiedFiles", mainCfgLocal.hidden.verifyFileCopy, syncSettings);
@@ -724,9 +733,8 @@ bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc)
TiXmlElement* filter = new TiXmlElement("Filter");
miscSettings->LinkEndChild(filter);
- addXmlElement("Active", mainCfgLocal.filterIsActive, filter);
- addXmlElement("Include", mainCfgLocal.includeFilter, filter);
- addXmlElement("Exclude", mainCfgLocal.excludeFilter, filter);
+ addXmlElement("Include", mainCfgLocal.globalFilter.includeFilter, filter);
+ addXmlElement("Exclude", mainCfgLocal.globalFilter.excludeFilter, filter);
//other
addXmlElement("DeletionPolicy", mainCfgLocal.handleDeletion, miscSettings);
@@ -827,7 +835,7 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD
//check for unresolved conflicts
addXmlElement("CheckForUnresolvedConflicts", inputCfg.optDialogs.warningUnresolvedConflicts, optionalDialogs);
- addXmlElement("CheckSyncDatabase", inputCfg.optDialogs.warningSyncDatabase, optionalDialogs);
+ addXmlElement("NotifyDatabaseError", inputCfg.optDialogs.warningSyncDatabase, optionalDialogs);
addXmlElement("PopupOnConfigChange", inputCfg.optDialogs.popupOnConfigChange, optionalDialogs);
@@ -868,7 +876,7 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD
ColumnAttributes columnAtrribLeftCopy = inputCfg.gui.columnAttribLeft; //can't change const vector
sort(columnAtrribLeftCopy.begin(), columnAtrribLeftCopy.end(), xmlAccess::sortByPositionOnly);
- for (unsigned int i = 0; i < columnAtrribLeftCopy.size(); ++i)
+ for (size_t i = 0; i < columnAtrribLeftCopy.size(); ++i)
{
TiXmlElement* subElement = new TiXmlElement("Column");
leftColumn->LinkEndChild(subElement);
@@ -887,7 +895,7 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD
ColumnAttributes columnAtrribRightCopy = inputCfg.gui.columnAttribRight;
sort(columnAtrribRightCopy.begin(), columnAtrribRightCopy.end(), xmlAccess::sortByPositionOnly);
- for (unsigned int i = 0; i < columnAtrribRightCopy.size(); ++i)
+ for (size_t i = 0; i < columnAtrribRightCopy.size(); ++i)
{
TiXmlElement* subElement = new TiXmlElement("Column");
rightColumn->LinkEndChild(subElement);
@@ -964,7 +972,7 @@ void xmlAccess::OptionalDialogs::resetDialogs()
}
-xmlAccess::XmlGuiConfig convertBatchToGui(const xmlAccess::XmlBatchConfig& batchCfg)
+xmlAccess::XmlGuiConfig xmlAccess::convertBatchToGui(const xmlAccess::XmlBatchConfig& batchCfg)
{
xmlAccess::XmlGuiConfig output;
output.mainCfg = batchCfg.mainCfg;
diff --git a/library/processXml.h b/library/processXml.h
index 13282de9..b46f0163 100644
--- a/library/processXml.h
+++ b/library/processXml.h
@@ -8,6 +8,8 @@
#define PROCESSXML_H_INCLUDED
#include "../structures.h"
+#include "../shared/xmlError.h"
+
namespace xmlAccess
{
@@ -20,7 +22,7 @@ enum OnError
enum ColumnTypes
{
- DIRECTORY,
+ DIRECTORY, //this needs to begin with 0 and be continuous (some code relies on it)
FULL_PATH,
REL_PATH,
FILENAME,
@@ -28,13 +30,13 @@ enum ColumnTypes
DATE,
EXTENSION
};
-const unsigned int COLUMN_TYPE_COUNT = 7;
+const size_t COLUMN_TYPE_COUNT = 7;
struct ColumnAttrib
{
ColumnTypes type;
bool visible;
- unsigned int position;
+ size_t position;
int width;
};
typedef std::vector<ColumnAttrib> ColumnAttributes;
@@ -80,8 +82,8 @@ struct XmlBatchConfig
FreeFileSync::MainConfiguration mainCfg;
bool silent;
+ wxString logFileDirectory;
OnError handleError; //reaction on error situation during synchronization
- wxString logFileDirectory; //
};
int retrieveSystemLanguage();
@@ -154,11 +156,13 @@ struct XmlGlobalSettings
#ifdef FFS_WIN
externelApplications.push_back(std::make_pair(wxT("Open with Explorer"), //mark for extraction: _("Open with Explorer")
wxT("explorer /select, \"%name\"")));
- externelApplications.push_back(std::make_pair(wxT("Open directly"), //mark for extraction: _("Open directly")
+ externelApplications.push_back(std::make_pair(wxT("Open with default application"), //mark for extraction: _("Open with default application")
wxT("cmd /c start \"\" \"%name\"")));
#elif defined FFS_LINUX
- externelApplications.push_back(std::make_pair(wxT("Open with Konqueror"), //mark for extraction: _("Open with Konqueror")
- wxT("konqueror \"%dir\"")));
+ externelApplications.push_back(std::make_pair(wxT("Browse directory"), //mark for extraction: _("Browse directory")
+ wxT("xdg-open \"%dir\"")));
+ externelApplications.push_back(std::make_pair(wxT("Open with default application"), //mark for extraction: _("Open with default application")
+ wxT("xdg-open \"%name\"")));
#endif
}
@@ -230,6 +234,7 @@ void readBatchConfig(const wxString& filename, XmlBatchConfig& config); //thr
void readGlobalSettings( XmlGlobalSettings& config); //throw (xmlAccess::XmlError);
void readGuiOrBatchConfig(const wxString& filename, XmlGuiConfig& config); //throw (xmlAccess::XmlError);
+XmlGuiConfig convertBatchToGui(const XmlBatchConfig& batchCfg);
void writeGuiConfig( const XmlGuiConfig& outputCfg, const wxString& filename); //throw (xmlAccess::XmlError);
void writeBatchConfig( const XmlBatchConfig& outputCfg, const wxString& filename); //throw (xmlAccess::XmlError);
diff --git a/library/resources.cpp b/library/resources.cpp
index ae39d9e7..2104efc3 100644
--- a/library/resources.cpp
+++ b/library/resources.cpp
@@ -52,7 +52,7 @@ void loadAnimFromZip(wxZipInputStream& zipInput, wxAnimation* animation)
//Workaround for wxWidgets:
//construct seekable input stream (zip-input stream is non-seekable) for wxAnimation::Load()
//luckily this method call is very fast: below measurement precision!
- std::vector<unsigned char> data;
+ std::vector<char> data;
data.reserve(10000);
int newValue = 0;
diff --git a/library/softFilter.h b/library/softFilter.h
index e4735e38..275aa9bd 100644
--- a/library/softFilter.h
+++ b/library/softFilter.h
@@ -11,7 +11,7 @@
#include <wx/timer.h>
/*
Semantics of SoftFilter:
-1. It potentially can match only one side => it MUST NOT be applied while traversing a single folder to avoid mismatches
+1. It potentially may match only one side => it MUST NOT be applied while traversing a single folder to avoid mismatches
2. => it is applied after traversing and just marks rows, (NO deletions after comparison are allowed)
3. => not relevant for <Automatic>-mode! ;)
@@ -28,19 +28,23 @@ public:
timeWindow_(timeWindow),
currentTime(wxGetUTCTime()) {}
+// typedef boost::shared_ptr<const SoftFilter> FilterRef; //always bound by design!
+
bool passFilter(const FileMapping& fileMap) const;
bool passFilter(const DirMapping& dirMap) const;
private:
- const size_t timeWindow_; //point in time from "now" (in seconds) for oldest modification date to be allowed
- const long currentTime; //number of seconds since GMT 00:00:00 Jan 1st 1970.
+ const size_t timeWindow_; //point in time from "now" (in seconds) for oldest modification date to be allowed
+ const long currentTime; //number of seconds since GMT 00:00:00 Jan 1st 1970.
};
-
-
-
-
+//SoftFilter::FilterRef combineFilters(const SoftFilter& first,
+// const SoftFilter& second);
+//
+//
+//
+//
diff --git a/library/statistics.cpp b/library/statistics.cpp
index 6e64be1c..fc140add 100644
--- a/library/statistics.cpp
+++ b/library/statistics.cpp
@@ -54,14 +54,14 @@ void RetrieveStatistics::writeEntry(const double value, const int objects)
//########################################################################################
inline
-bool isNull(const double number)
+bool isNull(double number)
{
- return globalFunctions::abs(number) <= std::numeric_limits<double>::epsilon();
+ return globalFunctions::abs(number) < std::numeric_limits<double>::epsilon();
}
inline
-wxString Statistics::formatRemainingTime(const double timeInMs) const
+wxString Statistics::formatRemainingTime(double timeInMs) const
{
bool unitSec = true;
double remainingTime = timeInMs / 1000;
@@ -118,7 +118,7 @@ Statistics::Statistics(const int totalObjectCount,
windowSizeRemTime(windowSizeRemainingTime),
windowSizeBPS(windowSizeBytesPerSecond),
windowMax(std::max(windowSizeRemainingTime, windowSizeBytesPerSecond)),
- remainingTimeLast(256*256*256*100), //something "big"
+ remainingTimeLast(std::numeric_limits<int>::max()), //something "big"
timer(new wxStopWatch) {}
Statistics::~Statistics()
diff --git a/library/statistics.h b/library/statistics.h
index f7bec519..ba9d8afb 100644
--- a/library/statistics.h
+++ b/library/statistics.h
@@ -11,9 +11,9 @@
#include <list>
#include <memory>
#include <wx/defs.h>
+#include <wx/string.h>
class wxStopWatch;
-class wxString;
class RetrieveStatistics
diff --git a/library/Recycler_Vista/Recycler_Vista.vcproj b/shared/IFileOperation/FileOperation_Vista.vcproj
index 65ab6609..1d224649 100644
--- a/library/Recycler_Vista/Recycler_Vista.vcproj
+++ b/shared/IFileOperation/FileOperation_Vista.vcproj
@@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
- Name="Vista Recycler"
+ Name="Vista IFileOperation"
ProjectGUID="{70394AEF-5897-4911-AFA1-82EAF0581EFA}"
RootNamespace="ShadowDll"
Keyword="Win32Proj"
@@ -45,7 +45,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;RECYCLER_DLL_EXPORTS"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;FILE_OP_DLL_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -65,7 +65,7 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="Recycler_$(PlatformName).dll"
+ OutputFile="FileOperation_$(PlatformName).dll"
LinkIncremental="1"
SuppressStartupBanner="false"
GenerateDebugInformation="true"
@@ -124,7 +124,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;RECYCLER_DLL_EXPORTS"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;FILE_OP_DLL_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -144,7 +144,7 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="Recycler_$(PlatformName).dll"
+ OutputFile="FileOperation_$(PlatformName).dll"
LinkIncremental="1"
SuppressStartupBanner="false"
GenerateDebugInformation="true"
@@ -204,7 +204,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;RECYCLER_DLL_EXPORTS"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;FILE_OP_DLL_EXPORTS"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
@@ -223,7 +223,7 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="Recycler_$(PlatformName).dll"
+ OutputFile="FileOperation_$(PlatformName).dll"
LinkIncremental="1"
SuppressStartupBanner="false"
GenerateDebugInformation="false"
@@ -286,7 +286,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;RECYCLER_DLL_EXPORTS"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;FILE_OP_DLL_EXPORTS"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
@@ -305,7 +305,7 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="Recycler_$(PlatformName).dll"
+ OutputFile="FileOperation_$(PlatformName).dll"
LinkIncremental="1"
SuppressStartupBanner="false"
GenerateDebugInformation="false"
@@ -388,6 +388,10 @@
/>
</FileConfiguration>
</File>
+ <File
+ RelativePath=".\fileOp.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Headerdateien"
@@ -395,11 +399,7 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
- RelativePath=".\recycler.cpp"
- >
- </File>
- <File
- RelativePath=".\recycler.h"
+ RelativePath=".\fileOp.h"
>
</File>
</Filter>
diff --git a/library/Recycler_Vista/dllmain.cpp b/shared/IFileOperation/dllmain.cpp
index 7db39bff..7db39bff 100644
--- a/library/Recycler_Vista/dllmain.cpp
+++ b/shared/IFileOperation/dllmain.cpp
diff --git a/shared/IFileOperation/fileOp.cpp b/shared/IFileOperation/fileOp.cpp
new file mode 100644
index 00000000..732fb9b5
--- /dev/null
+++ b/shared/IFileOperation/fileOp.cpp
@@ -0,0 +1,264 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#include "fileOp.h"
+
+#define WIN32_LEAN_AND_MEAN
+#include "windows.h"
+#include <Shellapi.h> // Included for shell constants such as FO_* values
+#include <shobjidl.h> // Required for necessary shell dependencies
+
+#include <algorithm>
+#include <string>
+#include <cstdio>
+#include <comdef.h>
+
+
+void writeString(const std::wstring& input, wchar_t* output, size_t outputBufferLen)
+{
+ const size_t newSize = min(input.length() + 1, outputBufferLen); //including null-termination
+ memcpy(output, input.c_str(), newSize * sizeof(wchar_t));
+ output[newSize-1] = 0; //if output buffer is too small...
+}
+
+
+std::wstring numberToHexString(long number)
+{
+ wchar_t result[100];
+ swprintf(result, 100, L"0x%08x", number);
+ return std::wstring(result);
+}
+
+
+std::wstring generateErrorMsg(const std::wstring& input, HRESULT hr)
+{
+ std::wstring output(input);
+ output += L" (";
+ output += numberToHexString(hr);
+ output += L": ";
+ output += _com_error(hr).ErrorMessage();
+ output += L")";
+ return output;
+}
+
+
+//IShellItem resource management
+template <class T>
+class ReleaseAtExit
+{
+public:
+ ReleaseAtExit(T*& item) : item_(item) {}
+ ~ReleaseAtExit()
+ {
+ if (item_ != NULL)
+ item_->Release();
+ }
+private:
+ T*& item_;
+};
+
+
+namespace FileOp
+{
+std::wstring lastErrorMessage;
+}
+
+
+bool FileOp::moveToRecycleBin(const wchar_t* fileNames[],
+ size_t fileNo) //size of fileNames array
+{
+ HRESULT hr;
+
+ // Create the IFileOperation interface
+ IFileOperation* pfo = NULL;
+ ReleaseAtExit<IFileOperation> dummy(pfo);
+ hr = CoCreateInstance(CLSID_FileOperation,
+ NULL,
+ CLSCTX_ALL,
+ IID_PPV_ARGS(&pfo));
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"CoCreateInstance\".", hr);
+ return false;
+ }
+
+ // Set the operation flags. Turn off all UI
+ // from being shown to the user during the
+ // operation. This includes error, confirmation
+ // and progress dialogs.
+ hr = pfo->SetOperationFlags(FOF_ALLOWUNDO |
+ FOF_NOCONFIRMATION |
+ FOF_SILENT |
+ FOF_NOERRORUI);
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"SetOperationFlags\".", hr);
+ return false;
+ }
+
+ for (size_t i = 0; i < fileNo; ++i)
+ {
+ //create file/folder item object
+ IShellItem* psiFile = NULL;
+ ReleaseAtExit<IShellItem> dummy2(psiFile);
+ hr = SHCreateItemFromParsingName(fileNames[i],
+ NULL,
+ IID_PPV_ARGS(&psiFile));
+ if (FAILED(hr))
+ {
+ std::wstring message(L"Error calling \"SHCreateItemFromParsingName\" for file:\n");
+ message += std::wstring(L"\"") + fileNames[i] + L"\".";
+
+ lastErrorMessage = generateErrorMsg(message, hr);
+ return false;
+ }
+
+ hr = pfo->DeleteItem(psiFile, NULL);
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"DeleteItem\".", hr);
+ return false;
+ }
+ }
+
+ //perform actual operations
+ hr = pfo->PerformOperations();
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"PerformOperations\".", hr);
+ return false;
+ }
+
+ //check if errors occured: if FOFX_EARLYFAILURE is not used, PerformOperations() can return with success despite errors!
+ BOOL pfAnyOperationsAborted = FALSE;
+ hr = pfo->GetAnyOperationsAborted(&pfAnyOperationsAborted);
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"GetAnyOperationsAborted\".", hr);
+ return false;
+ }
+
+ if (pfAnyOperationsAborted == TRUE)
+ {
+ lastErrorMessage = L"Operation did not complete successfully.";
+ return false;
+ }
+
+ return true;
+}
+
+
+bool FileOp::copyFile(const wchar_t* sourceFile,
+ const wchar_t* targetFile)
+{
+ HRESULT hr;
+
+ // Create the IFileOperation interface
+ IFileOperation* pfo = NULL;
+ ReleaseAtExit<IFileOperation> dummy(pfo);
+ hr = CoCreateInstance(CLSID_FileOperation,
+ NULL,
+ CLSCTX_ALL,
+ IID_PPV_ARGS(&pfo));
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"CoCreateInstance\".", hr);
+ return false;
+ }
+
+ // Set the operation flags. Turn off all UI
+ // from being shown to the user during the
+ // operation. This includes error, confirmation
+ // and progress dialogs.
+ hr = pfo->SetOperationFlags(FOF_NOCONFIRMATION |
+ FOF_SILENT |
+ FOFX_EARLYFAILURE |
+ FOF_NOERRORUI);
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"SetOperationFlags\".", hr);
+ return false;
+ }
+
+ //create source object
+ IShellItem* psiSourceFile = NULL;
+ ReleaseAtExit<IShellItem> dummy2(psiSourceFile);
+ hr = SHCreateItemFromParsingName(sourceFile,
+ NULL,
+ IID_PPV_ARGS(&psiSourceFile));
+ if (FAILED(hr))
+ {
+ std::wstring message(L"Error calling \"SHCreateItemFromParsingName\" for file:\n");
+ message += std::wstring(L"\"") + sourceFile + L"\".";
+ lastErrorMessage = generateErrorMsg(message, hr);
+ return false;
+ }
+
+ const size_t pos = std::wstring(targetFile).find_last_of(L'\\');
+ if (pos == std::wstring::npos)
+ {
+ lastErrorMessage = L"Target filename does not contain a path separator.";
+ return false;
+ }
+
+ const std::wstring targetFolder(targetFile, pos);
+ const std::wstring targetFileNameShort = targetFile + pos + 1;
+
+ //create target folder object
+ IShellItem* psiTargetFolder = NULL;
+ ReleaseAtExit<IShellItem> dummy3(psiTargetFolder);
+ hr = SHCreateItemFromParsingName(targetFolder.c_str(),
+ NULL,
+ IID_PPV_ARGS(&psiTargetFolder));
+ if (FAILED(hr))
+ {
+ std::wstring message(L"Error calling \"SHCreateItemFromParsingName\" for folder:\n");
+ message += std::wstring(L"\"") + targetFolder + L"\".";
+ lastErrorMessage = generateErrorMsg(message, hr);
+ return false;
+ }
+
+ //schedule file copy operation
+ hr = pfo->CopyItem(psiSourceFile, psiTargetFolder, targetFileNameShort.c_str(), NULL);
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"CopyItem\".", hr);
+ return false;
+ }
+
+ //perform actual operations
+ hr = pfo->PerformOperations();
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"PerformOperations\".", hr);
+ return false;
+ }
+
+ //check if errors occured: if FOFX_EARLYFAILURE is not used, PerformOperations() can return with success despite errors!
+ BOOL pfAnyOperationsAborted = FALSE;
+ hr = pfo->GetAnyOperationsAborted(&pfAnyOperationsAborted);
+ if (FAILED(hr))
+ {
+ lastErrorMessage = generateErrorMsg(L"Error calling \"GetAnyOperationsAborted\".", hr);
+ return false;
+ }
+
+
+ if (pfAnyOperationsAborted == TRUE)
+ {
+ lastErrorMessage = L"Operation did not complete successfully.";
+ return false;
+ }
+
+ return true;
+}
+
+
+//if any of the functions above returns 'false', this message returns last error
+void FileOp::getLastError(wchar_t* errorMessage, size_t errorBufferLen)
+{
+ writeString(lastErrorMessage, errorMessage, errorBufferLen);
+}
diff --git a/shared/IFileOperation/fileOp.h b/shared/IFileOperation/fileOp.h
new file mode 100644
index 00000000..8fa6a75b
--- /dev/null
+++ b/shared/IFileOperation/fileOp.h
@@ -0,0 +1,47 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef RECYCLER_DLL_H
+#define RECYCLER_DLL_H
+
+#ifdef FILE_OP_DLL_EXPORTS
+#define FILE_OP_DLL_API extern "C" __declspec(dllexport)
+#else
+#define FILE_OP_DLL_API extern "C" __declspec(dllimport)
+#endif
+
+
+namespace FileOp
+{
+//COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize
+
+FILE_OP_DLL_API
+bool moveToRecycleBin(const wchar_t* fileNames[],
+ size_t fileNo); //size of fileNames array
+
+FILE_OP_DLL_API
+bool copyFile(const wchar_t* sourceFile,
+ const wchar_t* targetFile);
+
+//if any of the functions above returns 'false', this message returns last error
+FILE_OP_DLL_API
+void getLastError(wchar_t* errorMessage, size_t errorBufferLen);
+
+
+//function typedefs
+typedef bool (*MoveToRecycleBinFct)(const wchar_t* fileNames[], size_t fileNo);
+typedef bool (*CopyFileFct)(const wchar_t* sourceFile, const wchar_t* targetFile);
+typedef void (*GetLastErrorFct)(wchar_t* errorMessage, size_t errorBufferLen);
+
+//function names (use const pointers to ensure internal linkage)
+const char* const moveToRecycleBinFctName = "moveToRecycleBin";
+const char* const copyFileFctName = "copyFile";
+const char* const getLastErrorFctName = "getLastError";
+}
+
+
+
+#endif //RECYCLER_DLL_H
diff --git a/library/ShadowCopy/Shadow_2003.vcproj b/shared/ShadowCopy/Shadow_2003.vcproj
index 49730440..49730440 100644
--- a/library/ShadowCopy/Shadow_2003.vcproj
+++ b/shared/ShadowCopy/Shadow_2003.vcproj
diff --git a/library/ShadowCopy/Shadow_XP.vcproj b/shared/ShadowCopy/Shadow_XP.vcproj
index 74b231de..74b231de 100644
--- a/library/ShadowCopy/Shadow_XP.vcproj
+++ b/shared/ShadowCopy/Shadow_XP.vcproj
diff --git a/library/ShadowCopy/dllmain.cpp b/shared/ShadowCopy/dllmain.cpp
index 7db39bff..7db39bff 100644
--- a/library/ShadowCopy/dllmain.cpp
+++ b/shared/ShadowCopy/dllmain.cpp
diff --git a/library/ShadowCopy/shadow.cpp b/shared/ShadowCopy/shadow.cpp
index b15bd4f9..b15bd4f9 100644
--- a/library/ShadowCopy/shadow.cpp
+++ b/shared/ShadowCopy/shadow.cpp
diff --git a/shared/ShadowCopy/shadow.h b/shared/ShadowCopy/shadow.h
new file mode 100644
index 00000000..61d6ae7e
--- /dev/null
+++ b/shared/ShadowCopy/shadow.h
@@ -0,0 +1,55 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef SHADOWCOPY_H
+#define SHADOWCOPY_H
+
+#ifdef SHADOWDLL_EXPORTS
+#define SHADOWDLL_API extern "C" __declspec(dllexport)
+#else
+#define SHADOWDLL_API extern "C" __declspec(dllimport)
+#endif
+
+
+namespace Shadow
+{
+//COM needs to be initialized before calling any of these functions! CoInitializeEx/CoUninitialize
+
+
+//volumeName must end with "\", while shadowVolName does not end with "\"
+SHADOWDLL_API
+bool createShadowCopy(const wchar_t* volumeName,
+ wchar_t* shadowVolName,
+ unsigned int shadowBufferLen,
+ void** backupHandle,
+ wchar_t* errorMessage,
+ unsigned int errorBufferLen);
+
+
+//don't forget to release the backupHandle after shadow copy is not needed anymore!
+SHADOWDLL_API
+void releaseShadowCopy(void* backupHandle);
+
+
+
+//function typedefs
+typedef bool (*CreateShadowCopyFct)(const wchar_t* volumeName,
+ wchar_t* shadowVolName,
+ unsigned int shadowBufferLen,
+ void** backupHandle,
+ wchar_t* errorMessage,
+ unsigned int errorBufferLen);
+
+typedef void (*ReleaseShadowCopyFct)(void* backupHandle);
+
+//function names
+const char* const createShadowCopyFctName = "createShadowCopy";
+const char* const releaseShadowCopyFctName = "releaseShadowCopy";
+}
+
+
+
+#endif //SHADOWCOPY_H
diff --git a/library/Taskbar_Seven/Taskbar_Seven.vcproj b/shared/Taskbar_Seven/Taskbar_Seven.vcproj
index bf8e0993..bf8e0993 100644
--- a/library/Taskbar_Seven/Taskbar_Seven.vcproj
+++ b/shared/Taskbar_Seven/Taskbar_Seven.vcproj
diff --git a/library/Taskbar_Seven/dllmain.cpp b/shared/Taskbar_Seven/dllmain.cpp
index 7db39bff..7db39bff 100644
--- a/library/Taskbar_Seven/dllmain.cpp
+++ b/shared/Taskbar_Seven/dllmain.cpp
diff --git a/library/Taskbar_Seven/taskbar.cpp b/shared/Taskbar_Seven/taskbar.cpp
index 4baf2392..4baf2392 100644
--- a/library/Taskbar_Seven/taskbar.cpp
+++ b/shared/Taskbar_Seven/taskbar.cpp
diff --git a/library/Taskbar_Seven/taskbar.h b/shared/Taskbar_Seven/taskbar.h
index 835f02ec..3b7abc51 100644
--- a/library/Taskbar_Seven/taskbar.h
+++ b/shared/Taskbar_Seven/taskbar.h
@@ -48,6 +48,7 @@ bool setProgress(TBHandle handle,
size_t total);
//if any of the functions above returns 'false', this message returns last error
+DLL_FUNCTION_DECLARATION
void getLastError(wchar_t* errorMessage, size_t errorBufferLen);
@@ -57,6 +58,13 @@ typedef void (*releaseFct)(TBHandle handle);
typedef bool (*setStatusFct)(TBHandle handle, void* hwnd, TaskBarStatus status);
typedef bool (*setProgressFct)(TBHandle handle, void* hwnd, size_t current, size_t total);
typedef void (*getLastErrorFct)(wchar_t* errorMessage, size_t errorBufferLen);
+
+//function names (use const pointers to ensure internal linkage)
+const char* const initFctName = "init";
+const char* const releaseFctName = "release";
+const char* const setStatusFctName = "setStatus";
+const char* const setProgressFctName = "setProgress";
+const char* const getLastErrorFctName = "getLastError";
}
#endif //TASKBAR_SEVEN_DLL_H \ No newline at end of file
diff --git a/shared/appMain.cpp b/shared/appMain.cpp
index a8eb969f..bf65e6c8 100644
--- a/shared/appMain.cpp
+++ b/shared/appMain.cpp
@@ -19,7 +19,6 @@ void FreeFileSync::AppMainWindow::setMainWindow(wxWindow* window)
wxTheApp->SetTopWindow(window);
wxTheApp->SetExitOnFrameDelete(true);
- assert (!mainWndAct);
mainWndAct = true;
}
diff --git a/shared/customComboBox.cpp b/shared/customComboBox.cpp
index 722683a5..c27ce505 100644
--- a/shared/customComboBox.cpp
+++ b/shared/customComboBox.cpp
@@ -32,9 +32,8 @@ void CustomComboBox::OnKeyEvent(wxKeyEvent& event)
//try to delete the currently selected config history item
const int selectedItem = this->GetCurrentSelection();
if (0 <= selectedItem && selectedItem < static_cast<int>(this->GetCount()) &&
- (GetValue() != GetString(selectedItem) || //avoid problems when letter shall be deleted instead of list item
- GetValue() == wxEmptyString) //exception: always allow removing empty entry
- )
+ (GetValue() != GetString(selectedItem) || //avoid problems when a character shall be deleted instead of list item
+ GetValue() == wxEmptyString)) //exception: always allow removing empty entry
{
//save old (selected) value: deletion seems to have influence on this
const wxString currentVal = this->GetValue();
diff --git a/shared/debugNew.cpp b/shared/debugNew.cpp
new file mode 100644
index 00000000..dad0cdd0
--- /dev/null
+++ b/shared/debugNew.cpp
@@ -0,0 +1,59 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#include "debugNew.h"
+#include <wx/msw/wrapwin.h> //includes "windows.h"
+#include "DbgHelp.h"
+
+#pragma message("Warning! Include this header for error analysis builds only!")
+#ifndef _MSC_VER
+use in Visual C++ only!
+#endif
+
+
+namespace
+{
+LONG WINAPI writeDumpOnException(EXCEPTION_POINTERS* pExceptionInfo)
+{
+ HANDLE hFile = ::CreateFile(L"FFS_exception.dmp", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
+ MINIDUMP_EXCEPTION_INFORMATION exInfo;
+ exInfo.ThreadId = ::GetCurrentThreadId();
+ exInfo.ExceptionPointers = pExceptionInfo;
+ exInfo.ClientPointers = NULL;
+
+ MINIDUMP_EXCEPTION_INFORMATION* exceptParam = pExceptionInfo ? &exInfo : NULL;
+
+ ::MiniDumpWriteDump(
+ GetCurrentProcess(), //__in HANDLE hProcess,
+ GetCurrentProcessId(), //__in DWORD ProcessId,
+ hFile, //__in HANDLE hFile,
+ MiniDumpWithDataSegs, //__in MINIDUMP_TYPE DumpType, ->Standard: MiniDumpNormal, Medium: MiniDumpWithDataSegs, Full: MiniDumpWithFullMemory
+ exceptParam, //__in PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
+ NULL, //__in PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
+ NULL //__in PMINIDUMP_CALLBACK_INFORMATION CallbackParam
+ );
+
+ ::CloseHandle(hFile);
+
+ return EXCEPTION_EXECUTE_HANDLER;
+}
+
+
+struct WriteDumpOnUnhandledException
+{
+ WriteDumpOnUnhandledException()
+ {
+ ::SetUnhandledExceptionFilter(writeDumpOnException);
+ }
+} dummy; //ensure that a Dump is written for uncaught exceptions
+}
+
+
+void MemoryDump::writeMinidump()
+{
+ writeDumpOnException(NULL);
+}
diff --git a/shared/debugNew.h b/shared/debugNew.h
new file mode 100644
index 00000000..702cf774
--- /dev/null
+++ b/shared/debugNew.h
@@ -0,0 +1,95 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef DEBUGNEW_H_INCLUDED
+#define DEBUGNEW_H_INCLUDED
+
+#include <string>
+#include <sstream>
+#include <cstdlib> //malloc(), free()
+
+
+/*all this header does is to globally overwrite "operator new" to give some more detailed error messages and write memory dumps
+Usage:
+ - Include everywhere before any other file: $(ProjectDir)\shared\debugNew.h
+ For Minidumps:
+ - Compile "debugNew.cpp"
+ - Include library "Dbghelp.lib"
+ - Compile in Debug build (need Symbols and less restrictive Optimization)
+*/
+
+class BadAllocDetailed : public std::bad_alloc
+{
+public:
+ explicit BadAllocDetailed(size_t allocSize)
+ {
+ errorMsg = "Memory allocation failed: ";
+ errorMsg += numberToString(allocSize);
+ }
+
+ ~BadAllocDetailed() throw() {}
+
+ virtual const char* what() const throw()
+ {
+ return errorMsg.c_str();
+ }
+
+private:
+ template <class T>
+ static std::string numberToString(const T& number) //convert number to string the C++ way
+ {
+ std::stringstream ss;
+ ss << number;
+ return ss.str();
+ }
+
+ std::string errorMsg;
+};
+
+#ifdef _MSC_VER
+namespace MemoryDump
+{
+void writeMinidump();
+}
+#endif
+
+inline
+void* operator new(size_t allocSize)
+{
+ void* newMem = ::malloc(allocSize);
+ if (!newMem)
+ {
+#ifdef _MSC_VER
+ MemoryDump::writeMinidump();
+#endif
+ throw BadAllocDetailed(allocSize);
+ }
+ return newMem;
+}
+
+
+inline
+void* operator new[](size_t allocSize)
+{
+ return operator new(allocSize);
+}
+
+
+inline
+void operator delete(void* memory)
+{
+ ::free(memory);
+}
+
+
+inline
+void operator delete[](void* memory)
+{
+ operator delete(memory);
+}
+
+#endif // DEBUGNEW_H_INCLUDED
+
diff --git a/shared/fileError.h b/shared/fileError.h
index ac47dfed..210d1029 100644
--- a/shared/fileError.h
+++ b/shared/fileError.h
@@ -12,19 +12,21 @@
namespace FreeFileSync
{
-class FileError //Exception class used to notify file/directory copy/delete errors
+class FileError //Exception base class used to notify file/directory copy/delete errors
{
public:
FileError(const wxString& message) :
errorMessage(message) {}
+ virtual ~FileError() {}
+
const wxString& show() const
{
return errorMessage;
}
private:
- wxString errorMessage;
+ const wxString errorMessage;
};
}
diff --git a/shared/fileHandling.cpp b/shared/fileHandling.cpp
index c81b1f2c..1abe640e 100644
--- a/shared/fileHandling.cpp
+++ b/shared/fileHandling.cpp
@@ -10,15 +10,16 @@
#include "globalFunctions.h"
#include "systemConstants.h"
#include "fileTraverser.h"
-#include <wx/file.h>
#include <boost/bind.hpp>
#include <algorithm>
-#include <wx/log.h>
#include <wx/datetime.h>
#include "stringConv.h"
#include <wx/utils.h>
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
+#include <stdexcept>
+#include "loki/TypeManip.h"
+#include "loki/ScopeGuard.h"
#ifdef FFS_WIN
#include "dllLoader.h"
@@ -175,25 +176,24 @@ Zstring FreeFileSync::getFormattedDirectoryName(const Zstring& dirname)
}
-bool FreeFileSync::fileExists(const DefaultChar* filename)
+bool FreeFileSync::fileExists(const Zstring& filename)
{
//symbolic links (broken or not) are also treated as existing files!
#ifdef FFS_WIN
// we must use GetFileAttributes() instead of the ANSI C functions because
// it can cope with network (UNC) paths unlike them
const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(filename).c_str());
-
return (ret != INVALID_FILE_ATTRIBUTES) && !(ret & FILE_ATTRIBUTE_DIRECTORY); //returns true for (file-)symlinks also
#elif defined FFS_LINUX
struct stat fileInfo;
- return (::lstat(filename, &fileInfo) == 0 &&
+ return (::lstat(filename.c_str(), &fileInfo) == 0 &&
(S_ISLNK(fileInfo.st_mode) || S_ISREG(fileInfo.st_mode))); //in Linux a symbolic link is neither file nor directory
#endif
}
-bool FreeFileSync::dirExists(const DefaultChar* dirname)
+bool FreeFileSync::dirExists(const Zstring& dirname)
{
//symbolic links (broken or not) are also treated as existing directories!
#ifdef FFS_WIN
@@ -205,13 +205,13 @@ bool FreeFileSync::dirExists(const DefaultChar* dirname)
#elif defined FFS_LINUX
struct stat dirInfo;
- return (::lstat(dirname, &dirInfo) == 0 &&
+ return (::lstat(dirname.c_str(), &dirInfo) == 0 &&
(S_ISLNK(dirInfo.st_mode) || S_ISDIR(dirInfo.st_mode))); //in Linux a symbolic link is neither file nor directory
#endif
}
-bool FreeFileSync::symlinkExists(const DefaultChar* objname)
+bool FreeFileSync::symlinkExists(const Zstring& objname)
{
#ifdef FFS_WIN
const DWORD ret = ::GetFileAttributes(applyLongPathPrefix(objname).c_str());
@@ -219,75 +219,166 @@ bool FreeFileSync::symlinkExists(const DefaultChar* objname)
#elif defined FFS_LINUX
struct stat fileInfo;
- return (::lstat(objname, &fileInfo) == 0 &&
+ return (::lstat(objname.c_str(), &fileInfo) == 0 &&
S_ISLNK(fileInfo.st_mode)); //symbolic link
#endif
}
-bool FreeFileSync::isMovable(const Zstring& pathFrom, const Zstring& pathTo)
+bool FreeFileSync::somethingExists(const Zstring& objname) //throw() check whether any object with this name exists
{
- wxLogNull noWxLogs; //prevent wxWidgets logging if dummy file creation failed
+#ifdef FFS_WIN
+ return ::GetFileAttributes(applyLongPathPrefix(objname).c_str()) != INVALID_FILE_ATTRIBUTES;
+
+#elif defined FFS_LINUX
+ struct stat fileInfo;
+ return ::lstat(objname.c_str(), &fileInfo) == 0;
+#endif
+}
- const Zstring dummyFileSource = pathFrom.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ?
- pathFrom + DefaultStr("DeleteMe.tmp") :
- pathFrom + globalFunctions::FILE_NAME_SEPARATOR + DefaultStr("DeleteMe.tmp");
- const Zstring dummyFileTarget = pathTo.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ?
- pathTo + DefaultStr("DeleteMe.tmp") :
- pathTo + globalFunctions::FILE_NAME_SEPARATOR + DefaultStr("DeleteMe.tmp");
- try
+#ifdef FFS_WIN
+namespace
+{
+wxULongLong getFileSizeSymlink(const Zstring& linkName) //throw (FileError)
+{
+ //open handle to target of symbolic link
+ const HANDLE hFile = ::CreateFile(FreeFileSync::applyLongPathPrefix(linkName).c_str(),
+ 0,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS,
+ NULL);
+ if (hFile != INVALID_HANDLE_VALUE)
{
- removeFile(dummyFileSource);
- removeFile(dummyFileTarget);
+ boost::shared_ptr<void> dummy(hFile, ::CloseHandle);
+
+ BY_HANDLE_FILE_INFORMATION fileInfoByHandle;
+ if (::GetFileInformationByHandle(hFile, &fileInfoByHandle))
+ {
+ return wxULongLong(fileInfoByHandle.nFileSizeHigh, fileInfoByHandle.nFileSizeLow);
+ }
}
- catch (...) {}
- //create dummy file
+ const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + FreeFileSync::zToWx(linkName) + wxT("\"");
+ throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
+}
+}
+#endif
+
+
+wxULongLong FreeFileSync::getFilesize(const Zstring& filename) //throw (FileError)
+{
+#ifdef FFS_WIN
+ WIN32_FIND_DATA fileMetaData;
+ const HANDLE searchHandle = ::FindFirstFile(applyLongPathPrefix(filename).c_str(), &fileMetaData);
+ if (searchHandle == INVALID_HANDLE_VALUE)
{
- wxFile dummy(zToWx(dummyFileSource), wxFile::write);
- if (!dummy.IsOpened())
- return false; //if there's no write access, files can't be moved neither
- dummy.Write(wxT("FreeFileSync dummy file. May be deleted safely.\n"));
+ const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(filename) + wxT("\"");
+ throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
}
+ ::FindClose(searchHandle);
+
+ const bool isSymbolicLink = (fileMetaData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
+ if (isSymbolicLink)
+ return getFileSizeSymlink(filename); //throw (FileError)
+
+ return wxULongLong(fileMetaData.nFileSizeHigh, fileMetaData.nFileSizeLow);
- const bool result =
- //try to move the file
-#ifdef FFS_WIN
- ::MoveFileEx(applyLongPathPrefix(dummyFileSource).c_str(), //__in LPCTSTR lpExistingFileName,
- applyLongPathPrefix(dummyFileTarget).c_str(), //__in_opt LPCTSTR lpNewFileName,
- 0) != 0; //__in DWORD dwFlags
#elif defined FFS_LINUX
- ::rename(dummyFileSource.c_str(), dummyFileTarget.c_str()) == 0;
+ struct stat fileInfo;
+ if (::stat(filename.c_str(), &fileInfo) != 0) //follow symbolic links
+ {
+ const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(filename) + wxT("\"");
+ throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
+ }
+
+ return fileInfo.st_size;
#endif
+}
- try
+
+namespace
+{
+#ifdef FFS_WIN
+DWORD retrieveVolumeSerial(const Zstring& pathName) //return 0 on error!
+{
+ const size_t bufferSize = std::max(pathName.size(), static_cast<size_t>(10000));
+ boost::scoped_array<wchar_t> buffer(new wchar_t[bufferSize]);
+
+ //pathName need not exist!
+ if (!::GetVolumePathName(pathName.c_str(), //__in LPCTSTR lpszFileName,
+ buffer.get(), //__out LPTSTR lpszVolumePathName,
+ static_cast<DWORD>(bufferSize))) //__in DWORD cchBufferLength
+ return 0;
+
+ Zstring volumePath = buffer.get();
+ if (!volumePath.EndsWith(globalFunctions::FILE_NAME_SEPARATOR))
+ volumePath += globalFunctions::FILE_NAME_SEPARATOR;
+
+ DWORD volumeSerial = 0;
+ if (!::GetVolumeInformation(volumePath.c_str(), //__in_opt LPCTSTR lpRootPathName,
+ NULL, //__out LPTSTR lpVolumeNameBuffer,
+ 0, //__in DWORD nVolumeNameSize,
+ &volumeSerial, //__out_opt LPDWORD lpVolumeSerialNumber,
+ NULL, //__out_opt LPDWORD lpMaximumComponentLength,
+ NULL, //__out_opt LPDWORD lpFileSystemFlags,
+ NULL, //__out LPTSTR lpFileSystemNameBuffer,
+ 0)) //__in DWORD nFileSystemNameSize
+ return 0;
+
+ return volumeSerial;
+}
+#elif defined FFS_LINUX
+
+dev_t retrieveVolumeSerial(const Zstring& pathName) //return 0 on error!
+{
+ Zstring volumePathName = pathName;
+
+ //remove trailing slash
+ if (volumePathName.size() > 1 && volumePathName.EndsWith(globalFunctions::FILE_NAME_SEPARATOR)) //exception: allow '/'
+ volumePathName = volumePathName.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR);
+
+ struct stat fileInfo;
+ while (::lstat(volumePathName.c_str(), &fileInfo) != 0)
{
- removeFile(dummyFileSource);
- removeFile(dummyFileTarget);
+ volumePathName = volumePathName.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR); //returns empty string if ch not found
+ if (volumePathName.empty())
+ return 0; //this includes path "/" also!
}
- catch (...) {}
- return result;
+ return fileInfo.st_dev;
+}
+#endif
}
-void FreeFileSync::removeFile(const Zstring& filename) //throw (FileError, std::logic_error);
+FreeFileSync::ResponseSameVol FreeFileSync::onSameVolume(const Zstring& folderLeft, const Zstring& folderRight) //throw()
{
- //no error situation if file is not existing! manual deletion relies on it!
#ifdef FFS_WIN
+ typedef DWORD VolSerial;
+#elif defined FFS_LINUX
+ typedef dev_t VolSerial;
+#endif
+ const VolSerial serialLeft = retrieveVolumeSerial(folderLeft); //returns 0 on error!
+ const VolSerial serialRight = retrieveVolumeSerial(folderRight); //returns 0 on error!
+ if (serialLeft == 0 || serialRight == 0)
+ return VOLUME_CANT_SAY;
- const Zstring filenameFmt = applyLongPathPrefix(filename);
- if (::GetFileAttributes(filenameFmt.c_str()) == INVALID_FILE_ATTRIBUTES)
- return; //neither file nor any other object with that name existing
+ return serialLeft == serialRight ? VOLUME_SAME : VOLUME_DIFFERENT;
+}
-#elif defined FFS_LINUX
- struct stat fileInfo;
- if (::lstat(filename.c_str(), &fileInfo) != 0)
+
+void FreeFileSync::removeFile(const Zstring& filename) //throw (FileError);
+{
+ //no error situation if file is not existing! manual deletion relies on it!
+ if (!somethingExists(filename))
return; //neither file nor any other object (e.g. broken symlink) with that name existing
-#endif
#ifdef FFS_WIN
+ const Zstring filenameFmt = applyLongPathPrefix(filename);
+
//remove file, support for \\?\-prefix
if (!::DeleteFile(filenameFmt.c_str()))
{
@@ -319,13 +410,25 @@ void FreeFileSync::removeFile(const Zstring& filename) //throw (FileError, std::
namespace
{
-//(low-level) wrapper for file system rename function: last error code may be retrieved directly after this call!
-//Windows: ::GetLastError() Linux: errno
-bool renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw ();
+struct ErrorDifferentVolume : public FreeFileSync::FileError
{
-#ifdef FFS_WIN
- using namespace FreeFileSync;
+ ErrorDifferentVolume(const wxString& message) : FileError(message) {}
+};
+
+/* Usage overview:
+ renameFile() --> renameFileInternal()
+ | /|\
+ \|/ |
+ fix8Dot3NameClash()
+*/
+//wrapper for file system rename function:
+//throw (FileError); ErrorDifferentVolume if it is due to moving file to another volume
+void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw (FileError, ErrorDifferentVolume)
+{
+ using namespace FreeFileSync; //for zToWx()
+
+#ifdef FFS_WIN
const Zstring oldNameFmt = applyLongPathPrefix(oldName);
const Zstring newNameFmt = applyLongPathPrefix(newName);
@@ -347,10 +450,9 @@ bool renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw
0)) //__in DWORD dwFlags
{
//(try to) restore file attributes
- ::SetFileAttributes(newNameFmt.c_str(),
+ ::SetFileAttributes(newNameFmt.c_str(), //don't handle error
oldNameAttrib);
- //don't handle error
- return true;
+ return;
}
else
{
@@ -365,33 +467,149 @@ bool renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw
}
}
- return false;
+ const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(oldName) + wxT("\" ->\n\"") + zToWx(newName) + wxT("\"") +
+ wxT("\n\n") + FreeFileSync::getLastErrorFormatted();
+ if (::GetLastError() == ERROR_NOT_SAME_DEVICE)
+ throw ErrorDifferentVolume(errorMessage);
+ else
+ throw FileError(errorMessage);
}
- return true;
#elif defined FFS_LINUX
//rename temporary file
if (::rename(oldName.c_str(), newName.c_str()) != 0)
+ {
+ const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(oldName) + wxT("\" ->\n\"") + zToWx(newName) + wxT("\"") +
+ wxT("\n\n") + FreeFileSync::getLastErrorFormatted();
+ if (errno == EXDEV)
+ throw ErrorDifferentVolume(errorMessage);
+ else
+ throw FileError(errorMessage);
+ }
+#endif
+}
+
+
+void renameFileInternalNoThrow(const Zstring& oldName, const Zstring& newName) //throw ()
+{
+ try
+ {
+ ::renameFileInternal(oldName, newName);
+ }
+ catch (...) {}
+}
+
+
+#ifdef FFS_WIN
+/*small wrapper around
+::GetShortPathName()
+::GetLongPathName() */
+template <typename Function>
+Zstring getFilenameFmt(const Zstring& filename, Function fun) //throw(); returns empty string on error
+{
+ const Zstring filenameFmt = FreeFileSync::applyLongPathPrefix(filename);
+
+ const DWORD bufferSize = fun(filenameFmt.c_str(), NULL, 0);
+ if (bufferSize == 0)
+ return Zstring();
+
+ boost::scoped_array<wchar_t> buffer(new wchar_t[bufferSize]);
+
+ const DWORD rv = fun(filenameFmt.c_str(), //__in LPCTSTR lpszShortPath,
+ buffer.get(), //__out LPTSTR lpszLongPath,
+ bufferSize); //__in DWORD cchBuffer
+ if (rv == 0 || rv >= bufferSize)
+ return Zstring();
+
+ return buffer.get();
+}
+
+
+Zstring createTemp8Dot3Name(const Zstring& fileName) //find a unique 8.3 short name
+{
+ const Zstring pathPrefix = fileName.Find(globalFunctions::FILE_NAME_SEPARATOR) != Zstring::npos ?
+ (fileName.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) + globalFunctions::FILE_NAME_SEPARATOR) : Zstring();
+
+ Zstring extension = fileName.AfterLast(globalFunctions::FILE_NAME_SEPARATOR).AfterLast(DefaultChar('.')); //extension needn't contain reasonable data
+ if (extension.empty())
+ extension = DefaultStr("FFS");
+ extension.Truncate(3);
+
+ for (int index = 0; index < 100000000; ++index) //filename must be representable by <= 8 characters
+ {
+ const Zstring output = pathPrefix + numberToZstring(index) + DefaultChar('.') + extension;
+ if (!FreeFileSync::somethingExists(output)) //ensure uniqueness
+ return output;
+ }
+
+ throw std::runtime_error(std::string("100000000 files, one for each number, exist in this directory? You're kidding...\n") + std::string(wxString(pathPrefix.c_str()).ToUTF8()));
+}
+
+
+//try to handle issues with already existing short 8.3 file names on Windows 7
+bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw (FileError); return "true" if rename operation succeeded
+{
+ using namespace FreeFileSync;
+
+ if (newName.Find(globalFunctions::FILE_NAME_SEPARATOR) == Zstring::npos)
return false;
- return true;
-#endif
+ if (FreeFileSync::somethingExists(newName)) //name OR directory!
+ {
+ const Zstring fileNameOrig = newName.AfterLast(globalFunctions::FILE_NAME_SEPARATOR); //returns the whole string if ch not found
+ const Zstring fileNameShort = getFilenameFmt(newName, ::GetShortPathName).AfterLast(globalFunctions::FILE_NAME_SEPARATOR); //throw() returns empty string on error
+ const Zstring fileNameLong = getFilenameFmt(newName, ::GetLongPathName).AfterLast(globalFunctions::FILE_NAME_SEPARATOR); //throw() returns empty string on error
+
+ if ( !fileNameShort.empty() &&
+ !fileNameLong.empty() &&
+ fileNameOrig.cmpFileName(fileNameShort) == 0 &&
+ fileNameShort.cmpFileName(fileNameLong) != 0)
+ {
+ //we detected an event where newName is in shortname format (although it is intended to be a long name) and
+ //writing target file failed because another unrelated file happens to have the same short name
+
+ const Zstring newNameFullPathLong = newName.BeforeLast(globalFunctions::FILE_NAME_SEPARATOR) + globalFunctions::FILE_NAME_SEPARATOR +
+ fileNameLong;
+
+ //find another name in short format: this ensures the actual short name WILL be renamed as well!
+ const Zstring parkedTarget = createTemp8Dot3Name(newName);
+
+ //move already existing short name out of the way for now
+ renameFileInternal(newNameFullPathLong, parkedTarget); //throw (FileError, ErrorDifferentVolume);
+ //DON'T call FreeFileSync::renameFile() to avoid reentrance!
+
+ //schedule cleanup; the file system should assign this unrelated file a new (unique) short name
+ Loki::ScopeGuard guard = Loki::MakeGuard(renameFileInternalNoThrow, parkedTarget, newNameFullPathLong);//equivalent to Boost.ScopeExit in this case
+ (void)guard; //silence warning "unused variable"
+
+ renameFileInternal(oldName, newName); //the short filename name clash is solved, this should work now
+ return true;
+ }
+ }
+ return false; //issue not fixed
}
+#endif
}
//rename file: no copying!!!
-void FreeFileSync::renameFile(const Zstring& oldName, const Zstring& newName) //throw (FileError);
+void FreeFileSync::renameFile(const Zstring& oldName, const Zstring& newName) //throw (FileError, ErrorDifferentVolume);
{
- if (!renameFileInternal(oldName, newName))
+ try
{
- const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(oldName) + wxT("\" ->\n\"") + zToWx(newName) + wxT("\"");
- throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
+ renameFileInternal(oldName, newName); //throw (FileError, ErrorDifferentVolume)
+ }
+ catch (const FileError&)
+ {
+#ifdef FFS_WIN
+ if (fix8Dot3NameClash(oldName, newName)) //throw (FileError); try to handle issues with already existing short 8.3 file names on Windows 7
+ return;
+#endif
+ throw;
}
}
-
using FreeFileSync::MoveFileCallback;
class CopyCallbackImpl : public FreeFileSync::CopyFileCallback //callback functionality
@@ -419,30 +637,23 @@ private:
void FreeFileSync::moveFile(const Zstring& sourceFile, const Zstring& targetFile, MoveFileCallback* callback) //throw (FileError);
{
- if (fileExists(targetFile.c_str())) //test file existence: e.g. Linux might silently overwrite existing symlinks
+ if (somethingExists(targetFile)) //test file existence: e.g. Linux might silently overwrite existing symlinks
{
- const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") +
- zToWx(targetFile) + wxT("\"");
+ const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + _("Target file already existing!"));
}
//moving of symbolic links should work correctly:
//first try to move the file directly without copying
- if (::renameFileInternal(sourceFile,
- targetFile)) //throw ();
- return;
- //if moving failed treat as error (except when it tried to move to a different volume: in this case we will copy the file)
-#ifdef FFS_WIN
- if (::GetLastError() != ERROR_NOT_SAME_DEVICE)
-#elif defined FFS_LINUX
- if (errno != EXDEV)
-#endif
+ try
{
- const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") +
- zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"");
- throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
+ renameFile(sourceFile, targetFile); //throw (FileError, ErrorDifferentVolume);
+ return;
}
+ //if moving failed treat as error (except when it tried to move to a different volume: in this case we will copy the file)
+ catch (const ErrorDifferentVolume&) {}
+
//file is on a different volume: let's copy it
std::auto_ptr<CopyCallbackImpl> copyCallback(callback != NULL ? new CopyCallbackImpl(callback) : NULL);
@@ -470,12 +681,12 @@ public:
m_files(filesShort),
m_dirs(dirsShort) {}
- virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details)
+ virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink, const FileInfo& details)
{
m_files.push_back(std::make_pair(Zstring(shortName), fullName));
return TRAVERSING_CONTINUE;
}
- virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName)
+ virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink)
{
m_dirs.push_back(std::make_pair(Zstring(shortName), fullName));
return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>(); //DON'T traverse into subdirs; moveDirectory works recursively!
@@ -507,29 +718,20 @@ void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool
{
if (!ignoreExistingDirs) //directory or symlink exists
{
- const wxString errorMessage = wxString(_("Error moving directory:")) + wxT("\n\"") +
- zToWx(sourceDir) + wxT("\" ->\n\"") + zToWx(targetDir) + wxT("\"");
+ const wxString errorMessage = wxString(_("Error moving directory:")) + wxT("\n\"") + zToWx(sourceDir) + wxT("\" ->\n\"") + zToWx(targetDir) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + _("Target directory already existing!"));
}
}
else
{
//first try to move the directory directly without copying
- if (::renameFileInternal(sourceDir,
- targetDir)) //throw ();
- return;
-
- //if moving failed treat as error (except when it tried to move to a different volume: in this case we will copy the directory)
-#ifdef FFS_WIN
- if (::GetLastError() != ERROR_NOT_SAME_DEVICE)
-#elif defined FFS_LINUX
- if (errno != EXDEV)
-#endif
+ try
{
- const wxString errorMessage = wxString(_("Error moving directory:")) + wxT("\n\"") +
- zToWx(sourceDir) + wxT("\" ->\n\"") + zToWx(targetDir) + wxT("\"");
- throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
+ renameFile(sourceDir, targetDir); //throw (FileError, ErrorDifferentVolume);
+ return;
}
+ //if moving failed treat as error (except when it tried to move to a different volume: in this case we will copy the directory)
+ catch (const ErrorDifferentVolume&) {}
//create target
createDirectory(targetDir, sourceDir, false); //throw (FileError);
@@ -553,7 +755,7 @@ void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool
//traverse source directory one level
TraverseOneLevel traverseCallback(fileList, dirList);
- traverseFolder(sourceDir, false, &traverseCallback); //traverse one level
+ traverseFolder(sourceDir, &traverseCallback); //traverse one level
const Zstring targetDirFormatted = targetDir.EndsWith(globalFunctions::FILE_NAME_SEPARATOR) ? //ends with path separator
targetDir :
@@ -602,12 +804,12 @@ public:
m_files(files),
m_dirs(dirs) {}
- virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details)
+ virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink, const FileInfo& details)
{
m_files.push_back(fullName);
return TRAVERSING_CONTINUE;
}
- virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName)
+ virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink)
{
m_dirs.push_back(fullName);
return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>(); //DON'T traverse into subdirs; removeDirectory works recursively!
@@ -626,21 +828,12 @@ private:
void FreeFileSync::removeDirectory(const Zstring& directory)
{
//no error situation if directory is not existing! manual deletion relies on it!
-#ifdef FFS_WIN
- const Zstring directoryFmt = applyLongPathPrefix(directory); //support for \\?\-prefix
-
- const DWORD dirAttr = ::GetFileAttributes(directoryFmt.c_str()); //name of a file or directory
- if (dirAttr == INVALID_FILE_ATTRIBUTES)
- return; //neither directory nor any other object with that name existing
-
-#elif defined FFS_LINUX
- struct stat dirInfo;
- if (::lstat(directory.c_str(), &dirInfo) != 0)
+ if (!somethingExists(directory))
return; //neither directory nor any other object (e.g. broken symlink) with that name existing
-#endif
-
#ifdef FFS_WIN
+ const Zstring directoryFmt = applyLongPathPrefix(directory); //support for \\?\-prefix
+
//initialize file attributes
if (!::SetFileAttributes( // initialize file attributes: actually NEEDED for symbolic links also!
directoryFmt.c_str(), // address of directory name
@@ -649,37 +842,30 @@ void FreeFileSync::removeDirectory(const Zstring& directory)
wxString errorMessage = wxString(_("Error deleting directory:")) + wxT("\n\"") + directory.c_str() + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
}
+#endif
-//attention: check if directory is a symlink! Do NOT traverse into it deleting contained files!!!
- if (dirAttr & FILE_ATTRIBUTE_REPARSE_POINT) //remove symlink directly
+ //attention: check if directory is a symlink! Do NOT traverse into it deleting contained files!!!
+ if (symlinkExists(directory)) //remove symlink directly
{
+#ifdef FFS_WIN
if (!::RemoveDirectory(directoryFmt.c_str()))
- {
- wxString errorMessage = wxString(_("Error deleting directory:")) + wxT("\n\"") + directory.c_str() + wxT("\"");
- throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
- }
- return;
- }
-
#elif defined FFS_LINUX
- if (S_ISLNK(dirInfo.st_mode))
- {
if (::unlink(directory.c_str()) != 0)
+#endif
{
wxString errorMessage = wxString(_("Error deleting directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
}
return;
}
-#endif
std::vector<Zstring> fileList;
std::vector<Zstring> dirList;
//get all files and directories from current directory (WITHOUT subdirectories!)
FilesDirsOnlyTraverser traverser(fileList, dirList);
- FreeFileSync::traverseFolder(directory, false, &traverser);
+ FreeFileSync::traverseFolder(directory, &traverser);
//delete files
std::for_each(fileList.begin(), fileList.end(), removeFile);
@@ -689,8 +875,7 @@ void FreeFileSync::removeDirectory(const Zstring& directory)
//parent directory is deleted last
#ifdef FFS_WIN
- //remove directory, support for \\?\-prefix
- if (!::RemoveDirectory(directoryFmt.c_str()))
+ if (!::RemoveDirectory(directoryFmt.c_str())) //remove directory, support for \\?\-prefix
#else
if (::rmdir(directory.c_str()) != 0)
#endif
@@ -708,44 +893,29 @@ void FreeFileSync::copyFileTimes(const Zstring& sourceDir, const Zstring& target
return;
#ifdef FFS_WIN
- HANDLE hDirRead = ::CreateFile(applyLongPathPrefix(sourceDir).c_str(),
- 0,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS, //needed to open a directory
- NULL);
- if (hDirRead == INVALID_HANDLE_VALUE)
+ WIN32_FILE_ATTRIBUTE_DATA sourceAttr;
+ if (!::GetFileAttributesEx(applyLongPathPrefix(sourceDir).c_str(), //__in LPCTSTR lpFileName,
+ GetFileExInfoStandard, //__in GET_FILEEX_INFO_LEVELS fInfoLevelId,
+ &sourceAttr)) //__out LPVOID lpFileInformation
return;
- boost::shared_ptr<void> dummy(hDirRead, ::CloseHandle);
-
- FILETIME creationTime;
- FILETIME accessTime;
- FILETIME lastWriteTime;
- if (::GetFileTime(hDirRead,
- &creationTime,
- &accessTime,
- &lastWriteTime))
- {
- HANDLE hDirWrite = ::CreateFile(applyLongPathPrefix(targetDir).c_str(),
- FILE_WRITE_ATTRIBUTES,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS, //needed to open a directory
- NULL);
- if (hDirWrite == INVALID_HANDLE_VALUE)
- return;
+ HANDLE hDirWrite = ::CreateFile(applyLongPathPrefix(targetDir).c_str(),
+ FILE_WRITE_ATTRIBUTES,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS, //needed to open a directory
+ NULL);
+ if (hDirWrite == INVALID_HANDLE_VALUE)
+ return;
- boost::shared_ptr<void> dummy2(hDirWrite, ::CloseHandle);
+ boost::shared_ptr<void> dummy(hDirWrite, ::CloseHandle);
- //(try to) set new "last write time"
- ::SetFileTime(hDirWrite,
- &creationTime,
- &accessTime,
- &lastWriteTime); //return value not evalutated!
- }
+ //(try to) set new "last write time"
+ ::SetFileTime(hDirWrite,
+ &sourceAttr.ftCreationTime,
+ &sourceAttr.ftLastAccessTime,
+ &sourceAttr.ftLastWriteTime); //return value not evalutated!
#elif defined FFS_LINUX
struct stat dirInfo;
@@ -780,7 +950,7 @@ Zstring resolveDirectorySymlink(const Zstring& dirLinkName) //get full target pa
boost::shared_ptr<void> dummy(hDir, ::CloseHandle);
- const unsigned int BUFFER_SIZE = 10000;
+ const size_t BUFFER_SIZE = 10000;
TCHAR targetPath[BUFFER_SIZE];
@@ -797,11 +967,10 @@ Zstring resolveDirectorySymlink(const Zstring& dirLinkName) //get full target pa
throw FileError(wxString(_("Error loading library function:")) + wxT("\n\"") + wxT("GetFinalPathNameByHandleW") + wxT("\""));
const DWORD rv = (*getFinalPathNameByHandle)(
- hDir,
- targetPath,
- BUFFER_SIZE,
- 0);
-
+ hDir, //__in HANDLE hFile,
+ targetPath, //__out LPTSTR lpszFilePath,
+ BUFFER_SIZE,//__in DWORD cchFilePath,
+ 0); //__in DWORD dwFlags
if (rv >= BUFFER_SIZE || rv == 0)
return Zstring();
@@ -876,7 +1045,9 @@ void createDirectoryRecursively(const Zstring& directory, const Zstring& templat
//now creation should be possible
#ifdef FFS_WIN
- const DWORD templateAttr = ::GetFileAttributes(applyLongPathPrefix(templateDir).c_str()); //replaces wxDirExists(): also returns successful for broken symlinks
+ const DWORD templateAttr = templateDir.empty() ?
+ INVALID_FILE_ATTRIBUTES :
+ ::GetFileAttributes(applyLongPathPrefix(templateDir).c_str()); //returns successful for broken symlinks
if (templateAttr == INVALID_FILE_ATTRIBUTES) //fallback
{
if (!::CreateDirectory(applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string
@@ -936,15 +1107,14 @@ void createDirectoryRecursively(const Zstring& directory, const Zstring& templat
//symbolic link handling
if (copyDirectorySymLinks)
{
- //test if templateDir is a symbolic link
- struct stat linkInfo;
- if (lstat(templateDir.c_str(), &linkInfo) == 0 && S_ISLNK(linkInfo.st_mode))
+ if ( !templateDir.empty() && //test if templateDir is a symbolic link
+ symlinkExists(templateDir))
{
//copy symbolic link
const int BUFFER_SIZE = 10000;
char buffer[BUFFER_SIZE];
const int bytesWritten = readlink(templateDir.c_str(), buffer, BUFFER_SIZE);
- if (bytesWritten < 0 || bytesWritten == BUFFER_SIZE)
+ if (bytesWritten < 0 || bytesWritten >= BUFFER_SIZE)
{
wxString errorMessage = wxString(_("Error resolving symbolic link:")) + wxT("\n\"") + zToWx(templateDir) + wxT("\"");
if (bytesWritten < 0) errorMessage += wxString(wxT("\n\n")) + FreeFileSync::getLastErrorFormatted();
@@ -953,7 +1123,7 @@ void createDirectoryRecursively(const Zstring& directory, const Zstring& templat
//set null-terminating char
buffer[bytesWritten] = 0;
- if (symlink(buffer, directory.c_str()) != 0)
+ if (::symlink(buffer, directory.c_str()) != 0)
{
const wxString errorMessage = wxString(_("Error copying symbolic link:")) + wxT("\n\"") + zToWx(templateDir) + wxT("\" ->\n\"") + zToWx(directory) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
@@ -1008,27 +1178,23 @@ void FreeFileSync::createDirectory(const Zstring& directory, const Zstring& temp
}
+namespace
+{
Zstring createTempName(const Zstring& filename)
{
- Zstring output = filename + DefaultStr(".ffs_tmp");
+ Zstring output = filename + FreeFileSync::TEMP_FILE_ENDING;
//ensure uniqueness
- if (FreeFileSync::fileExists(output))
- {
- //if it's not unique, add a postfix number
- int postfix = 1;
- while (FreeFileSync::fileExists(output + DefaultStr("_") + numberToZstring(postfix)))
- ++postfix;
-
- output += Zstring(DefaultStr("_")) + numberToZstring(postfix);
- }
+ for (int i = 1; FreeFileSync::somethingExists(output); ++i)
+ output = filename + DefaultChar('_') + numberToZstring(i) + FreeFileSync::TEMP_FILE_ENDING;
return output;
}
-
+}
#ifdef FFS_WIN
-
+namespace
+{
#ifndef COPY_FILE_COPY_SYMLINK
#define COPY_FILE_COPY_SYMLINK 0x00000800
#endif
@@ -1047,8 +1213,8 @@ DWORD CALLBACK copyCallbackInternal(
using FreeFileSync::CopyFileCallback;
//small performance optimization: it seems this callback function is called for every 64 kB (depending on cluster size).
- static unsigned int callNr = 0;
- if (++callNr % 50 == 0) //reduce by factor of 50 =^ 10-20 calls/sec
+ static size_t callNr = 0;
+ if (++callNr % 4 == 0) //executing callback for each 256 kB should suffice
{
if (lpData != NULL)
{
@@ -1109,15 +1275,16 @@ bool supportForNonEncryptedDestination()
//overview: http://msdn.microsoft.com/en-us/library/ms724834(VS.85).aspx
return false;
}
+}
void FreeFileSync::copyFile(const Zstring& sourceFile,
const Zstring& targetFile,
- const bool copyFileSymLinks,
+ bool copyFileSymLinks,
FreeFileSync::ShadowCopy* shadowCopyHandler,
FreeFileSync::CopyFileCallback* callback)
{
- //FreeFileSync::fileExists(targetFile.c_str()) -> avoid this call, performance;
+ //FreeFileSync::fileExists(targetFile) -> avoid this call, performance;
//if target exists (very unlikely, because sync-algorithm deletes it) renaming below will fail!
@@ -1135,6 +1302,20 @@ void FreeFileSync::copyFile(const Zstring& sourceFile,
const Zstring temporary = createTempName(targetFile); //use temporary file until a correct date has been set
+ struct TryCleanUp //ensure cleanup if working with temporary failed!
+ {
+ static void tryDeleteFile(const Zstring& filename) //throw ()
+ {
+ try
+ {
+ removeFile(filename);
+ }
+ catch (...) {}
+ }
+ };
+ Loki::ScopeGuard guardTempFile = Loki::MakeGuard(&TryCleanUp::tryDeleteFile, temporary);
+
+
if (!::CopyFileEx( //same performance as CopyFile()
applyLongPathPrefix(sourceFile).c_str(),
applyLongPathPrefix(temporary).c_str(),
@@ -1145,7 +1326,7 @@ void FreeFileSync::copyFile(const Zstring& sourceFile,
{
const DWORD lastError = ::GetLastError();
- //don't suppress "lastError == ERROR_REQUEST_ABORTED": an user aborted operation IS an error condition!
+ //don't suppress "lastError == ERROR_REQUEST_ABORTED": a user aborted operation IS an error condition!
//if file is locked (try to) use Windows Volume Shadow Copy Service
if (shadowCopyHandler != NULL &&
@@ -1154,41 +1335,21 @@ void FreeFileSync::copyFile(const Zstring& sourceFile,
{
//shadowFilename already contains prefix: E.g. "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Program Files\FFS\sample.dat"
const Zstring shadowFilename(shadowCopyHandler->makeShadowCopy(sourceFile));
- copyFile(shadowFilename, //transferred bytes is automatically reset when new file is copied
- targetFile,
- copyFileSymLinks,
- NULL,
- callback);
- return;
+ return copyFile(shadowFilename, //transferred bytes is automatically reset when new file is copied
+ targetFile,
+ copyFileSymLinks,
+ NULL,
+ callback);
}
-
//assemble error message...
- const wxString errorMessage = wxString(_("Error copying file:")) + wxT("\n\"") + sourceFile.c_str() + wxT("\" ->\n\"") + targetFile.c_str() + wxT("\"") +
- wxT("\n\n") + FreeFileSync::getLastErrorFormatted(lastError);
-
- throw FileError(errorMessage);
+ const wxString errorMessage = wxString(_("Error copying file:")) + wxT("\n\"") + sourceFile.c_str() + wxT("\" ->\n\"") + targetFile.c_str() + wxT("\"") + wxT("\n\n");
+ throw FileError(errorMessage + FreeFileSync::getLastErrorFormatted(lastError));
}
- try
- {
- //rename temporary file
- FreeFileSync::renameFile(temporary, targetFile);
- }
- catch (...) //if renaming temporary failed: cleanup
- {
- try
- {
- removeFile(temporary); //throw (FileError, std::logic_error);
- }
- catch(...) {}
+ //rename temporary file: do not add anything else here (note specific error handing)
+ FreeFileSync::renameFile(temporary, targetFile);
- //this can only happen in very obscure situations: while scanning, target didn't exist, but while sync'ing it suddenly does (e.g. network drop?)
- if (FreeFileSync::fileExists(targetFile.c_str()))
- throw FileError(wxString(_("Error copying file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"\n\n")
- + _("Target file already existing!"));
-
- throw;
- }
+ guardTempFile.Dismiss(); //no need to delete temp file anymore
//copy creation date (last modification date is redundantly written, too)
copyFileTimes(sourceFile, targetFile); //throw()
@@ -1198,27 +1359,15 @@ void FreeFileSync::copyFile(const Zstring& sourceFile,
#elif defined FFS_LINUX
void FreeFileSync::copyFile(const Zstring& sourceFile,
const Zstring& targetFile,
- const bool copyFileSymLinks,
+ bool copyFileSymLinks,
CopyFileCallback* callback)
{
using FreeFileSync::CopyFileCallback;
- if (FreeFileSync::fileExists(targetFile.c_str()))
- throw FileError(wxString(_("Error copying file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"\n\n")
- + _("Target file already existing!"));
-
//symbolic link handling
if (copyFileSymLinks)
{
- //test if sourceFile is a symbolic link
- struct stat linkInfo;
- if (lstat(sourceFile.c_str(), &linkInfo) != 0)
- {
- const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"");
- throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
- }
-
- if (S_ISLNK(linkInfo.st_mode))
+ if (symlinkExists(sourceFile))
{
//copy symbolic link
const int BUFFER_SIZE = 10000;
@@ -1245,7 +1394,7 @@ void FreeFileSync::copyFile(const Zstring& sourceFile,
//begin of regular file copy
struct stat fileInfo;
- if (stat(sourceFile.c_str(), &fileInfo) != 0) //read file attributes from source file (resolving symlinks; but cannot be one in this context)
+ if (::stat(sourceFile.c_str(), &fileInfo) != 0) //read file attributes from source file (resolving symlinks)
{
const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"");
throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
@@ -1257,77 +1406,68 @@ void FreeFileSync::copyFile(const Zstring& sourceFile,
//create targetFile and open it for writing
const Zstring temporary = createTempName(targetFile); //use temporary file until a correct date has been set
- try
- {
- FileOutput fileOut(temporary); //throw FileError()
+ //ensure cleanup (e.g. network drop): call BEFORE creating fileOut object!
+ Loki::ScopeGuard guardTempFile = Loki::MakeGuard(::unlink, temporary);
- const size_t BUFFER_SIZE = 512 * 1024; //512 kb seems to be the perfect buffer size
- static boost::scoped_array<unsigned char> memory(new unsigned char[BUFFER_SIZE]);
+ FileOutput fileOut(temporary); //throw FileError()
- //copy contents of sourceFile to targetFile
- wxULongLong totalBytesTransferred;
- do
- {
- const size_t bytesRead = fileIn.read(memory.get(), BUFFER_SIZE); //throw FileError()
+ const size_t BUFFER_SIZE = 512 * 1024; //512 kb seems to be a reasonable buffer size
+ static const boost::scoped_array<char> memory(new char[BUFFER_SIZE]);
+
+ //copy contents of sourceFile to targetFile
+ wxULongLong totalBytesTransferred;
+ do
+ {
+ const size_t bytesRead = fileIn.read(memory.get(), BUFFER_SIZE); //throw FileError()
- fileOut.write(memory.get(), bytesRead); //throw FileError()
+ fileOut.write(memory.get(), bytesRead); //throw FileError()
- totalBytesTransferred += bytesRead;
+ totalBytesTransferred += bytesRead;
- //invoke callback method to update progress indicators
- if (callback != NULL)
+ //invoke callback method to update progress indicators
+ if (callback != NULL)
+ {
+ switch (callback->updateCopyStatus(totalBytesTransferred))
{
- switch (callback->updateCopyStatus(totalBytesTransferred))
- {
- case CopyFileCallback::CONTINUE:
- break;
+ case CopyFileCallback::CONTINUE:
+ break;
- case CopyFileCallback::CANCEL:
- //an user aborted operation IS an error condition!
- throw FileError(wxString(_("Error copying file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") +
- zToWx(targetFile) + wxT("\"\n\n") + _("Operation aborted!"));
- }
+ case CopyFileCallback::CANCEL: //a user aborted operation IS an error condition!
+ throw FileError(wxString(_("Error copying file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") +
+ zToWx(targetFile) + wxT("\"\n\n") + _("Operation aborted!"));
}
-
- }
- while (!fileIn.eof());
-
- //close output stream before changing attributes
- fileOut.close();
-
- //adapt file modification time:
- struct utimbuf newTimes;
- ::time(&newTimes.actime); //set file access time to current time
- newTimes.modtime = fileInfo.st_mtime;
- if (::utime(temporary.c_str(), &newTimes) != 0)
- {
- wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"");
- throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
}
+ }
+ while (!fileIn.eof());
- //rename temporary file
- FreeFileSync::renameFile(temporary, targetFile);
+ //close output stream before changing attributes
+ fileOut.close();
- //set file access rights
- if (::chmod(targetFile.c_str(), fileInfo.st_mode) != 0)
- {
- const wxString errorMessage = wxString(_("Error writing file attributes:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"");
- throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
- }
- }
- catch (...)
+ //adapt file modification time:
+ struct utimbuf newTimes;
+ ::time(&newTimes.actime); //set file access time to current time
+ newTimes.modtime = fileInfo.st_mtime;
+ if (::utime(temporary.c_str(), &newTimes) != 0)
{
- //try to delete target file if error occured, or exception was thrown in callback function
- //no data-loss, because of "fileExists(targetFile))" check at the beginning!
- if (FreeFileSync::fileExists(targetFile))
- ::unlink(targetFile); //don't handle error situations!
+ wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"");
+ throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
+ }
+
+ //rename temporary file
+ FreeFileSync::renameFile(temporary, targetFile);
+ guardTempFile.Dismiss();
- //clean-up temporary
- if (FreeFileSync::fileExists(temporary))
- ::unlink(temporary); //don't handle error situations!
+ //ensure cleanup:
+ Loki::ScopeGuard guardTargetFile = Loki::MakeGuard(::unlink, targetFile.c_str()); //don't use Utility::CleanUp here
- throw;
+ //set file access rights
+ if (::chmod(targetFile.c_str(), fileInfo.st_mode) != 0)
+ {
+ const wxString errorMessage = wxString(_("Error writing file attributes:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"");
+ throw FileError(errorMessage + wxT("\n\n") + FreeFileSync::getLastErrorFormatted());
}
+
+ guardTargetFile.Dismiss(); //target has been created successfully!
}
#endif
diff --git a/shared/fileHandling.h b/shared/fileHandling.h
index 13770839..7e1b3de0 100644
--- a/shared/fileHandling.h
+++ b/shared/fileHandling.h
@@ -4,8 +4,8 @@
// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
-#ifndef RECYCLER2_H_INCLUDED
-#define RECYCLER2_H_INCLUDED
+#ifndef FILE_HANDLING_H_INCLUDED
+#define FILE_HANDLING_H_INCLUDED
#include "zstring.h"
#include "fileError.h"
@@ -20,18 +20,30 @@ namespace FreeFileSync
{
Zstring getFormattedDirectoryName(const Zstring& dirname);
-bool fileExists(const DefaultChar* filename); //throw() replaces wxFileExists()!
-bool dirExists(const DefaultChar* dirname); //throw() replaces wxDirExists(): optional 'cause wxDirExists treats symlinks correctly
-bool symlinkExists(const DefaultChar* objname); //throw() check if a symbolic link exists
+bool fileExists( const Zstring& filename); //throw() replaces wxFileExists()!
+bool dirExists( const Zstring& dirname); //throw() replaces wxDirExists(): optional 'cause wxDirExists treats symlinks correctly
+bool symlinkExists( const Zstring& objname); //throw() check whether a symbolic link exists
+bool somethingExists(const Zstring& objname); //throw() check whether any object with this name exists
-//check if files can be moved between two EXISTING paths (without copying)
-bool isMovable(const Zstring& pathFrom, const Zstring& pathTo); //throw()
+//check whether two folders are located on the same (logical) volume
+//left and right directories NEED NOT yet exist! volume prefix is sufficient! path may end with PATH_SEPARATOR
+enum ResponseSameVol
+{
+ VOLUME_SAME,
+ VOLUME_DIFFERENT,
+ VOLUME_CANT_SAY
+};
+ResponseSameVol onSameVolume(const Zstring& folderLeft, const Zstring& folderRight); //throw()
//optionally: copy creation/last change date, DOES NOTHING if something fails
void copyFileTimes(const Zstring& sourceDir, const Zstring& targetDir); //throw()
+//symlink handling: always evaluate target
+wxULongLong getFilesize(const Zstring& filename); //throw (FileError)
+
+
//file handling
-void removeFile(const Zstring& filename); //throw (FileError, std::logic_error)
+void removeFile(const Zstring& filename); //throw (FileError)
void removeDirectory(const Zstring& directory); //throw (FileError)
@@ -74,13 +86,15 @@ struct CopyFileCallback //callback functionality
void copyFile(const Zstring& sourceFile,
const Zstring& targetFile,
- const bool copyFileSymLinks,
+ bool copyFileSymLinks,
#ifdef FFS_WIN
ShadowCopy* shadowCopyHandler = NULL, //supply handler for making shadow copies
#endif
CopyFileCallback* callback = NULL); //throw (FileError);
-
+//Note: it MAY happen that copyFile() leaves temp files behind, e.g. temporary network drop.
+// => clean them up at an appropriate time (automatically set sync directions to delete them). They have the following ending:
+const Zstring TEMP_FILE_ENDING = DefaultStr(".ffs_tmp");
}
-#endif // RECYCLER2_H_INCLUDED
+#endif //FILE_HANDLING_H_INCLUDED
diff --git a/shared/fileIO.cpp b/shared/fileIO.cpp
index c4825e04..92fb7193 100644
--- a/shared/fileIO.cpp
+++ b/shared/fileIO.cpp
@@ -29,6 +29,30 @@ FileInput::FileInput(const Zstring& filename) : //throw FileError()
NULL,
OPEN_EXISTING,
FILE_FLAG_SEQUENTIAL_SCAN,
+ /* possible values: (Reference http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx#caching_behavior)
+ FILE_FLAG_NO_BUFFERING
+ FILE_FLAG_RANDOM_ACCESS
+ FILE_FLAG_SEQUENTIAL_SCAN
+
+ tests on Win7 x64 show that FILE_FLAG_SEQUENTIAL_SCAN provides best performance for binary comparison in all cases:
+ - comparing different physical disks (DVD <-> HDD and HDD <-> HDD)
+ - even on same physical disk! (HDD <-> HDD)
+ - independent from client buffer size!
+
+ tests on XP show that FILE_FLAG_SEQUENTIAL_SCAN provides best performance for binary comparison when
+ - comparing different physical disks (DVD <-> HDD)
+
+ while FILE_FLAG_RANDOM_ACCESS offers best performance for
+ - same physical disk (HDD <-> HDD)
+
+ Problem: bad XP implementation of prefetch makes flag FILE_FLAG_SEQUENTIAL_SCAN effectively load two files at once from one drive
+ swapping every 64 kB (or similar). File access times explode!
+ => For XP it is critical to use FILE_FLAG_RANDOM_ACCESS (to disable prefetch) if reading two files on same disk and
+ FILE_FLAG_SEQUENTIAL_SCAN when reading from different disk (e.g. massive performance improvement compared to random access for DVD <-> HDD!)
+ => there is no compromise that satisfies all cases! (on XP)
+
+ for FFS most comparisons are probably between different disks => let's use FILE_FLAG_SEQUENTIAL_SCAN
+ */
NULL);
if (fileHandle == INVALID_HANDLE_VALUE)
throw FileError(wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") +
diff --git a/shared/fileTraverser.cpp b/shared/fileTraverser.cpp
index ee98c572..eec4dcaf 100644
--- a/shared/fileTraverser.cpp
+++ b/shared/fileTraverser.cpp
@@ -72,7 +72,7 @@ void setWin32FileInformation(const FILETIME& lastWriteTime,
inline
-bool setWin32FileInformationFromSymlink(const Zstring linkName, FreeFileSync::TraverseCallback::FileInfo& output)
+bool setWin32FileInformationFromSymlink(const Zstring& linkName, FreeFileSync::TraverseCallback::FileInfo& output)
{
//open handle to target of symbolic link
HANDLE hFile = ::CreateFile(FreeFileSync::applyLongPathPrefix(linkName).c_str(),
@@ -88,10 +88,7 @@ bool setWin32FileInformationFromSymlink(const Zstring linkName, FreeFileSync::Tr
boost::shared_ptr<void> dummy(hFile, ::CloseHandle);
BY_HANDLE_FILE_INFORMATION fileInfoByHandle;
-
- if (!::GetFileInformationByHandle(
- hFile,
- &fileInfoByHandle))
+ if (!::GetFileInformationByHandle(hFile, &fileInfoByHandle))
return false;
//write output
@@ -101,7 +98,6 @@ bool setWin32FileInformationFromSymlink(const Zstring linkName, FreeFileSync::Tr
#endif
-template <bool traverseDirectorySymlinks>
bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback* sink, const int level)
{
using namespace FreeFileSync;
@@ -159,10 +155,11 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
continue;
const Zstring fullName = directoryFormatted + shortName;
+ const bool isSymbolicLink = (fileMetaData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
if (fileMetaData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) //a directory... (for directory symlinks this flag is set too!)
{
- const TraverseCallback::ReturnValDir rv = sink->onDir(shortName, fullName);
+ const TraverseCallback::ReturnValDir rv = sink->onDir(shortName, fullName, isSymbolicLink);
switch (rv.returnCode)
{
case TraverseCallback::ReturnValDir::TRAVERSING_DIR_STOP:
@@ -172,10 +169,8 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
break;
case TraverseCallback::ReturnValDir::TRAVERSING_DIR_CONTINUE:
- //traverse into symbolic links, junctions, etc. if requested only:
- if (traverseDirectorySymlinks || (~fileMetaData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT))
- if (!traverseDirectory<traverseDirectorySymlinks>(fullName, rv.subDirCb, level + 1))
- return false;
+ if (!traverseDirectory(fullName, rv.subDirCb, level + 1))
+ return false;
break;
}
}
@@ -183,7 +178,7 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
{
TraverseCallback::FileInfo details;
- if (fileMetaData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) //dereference symlinks!
+ if (isSymbolicLink) //dereference symlinks!
{
if (!setWin32FileInformationFromSymlink(fullName, details))
{
@@ -195,7 +190,7 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
else
setWin32FileInformation(fileMetaData.ftLastWriteTime, fileMetaData.nFileSizeHigh, fileMetaData.nFileSizeLow, details);
- switch (sink->onFile(shortName, fullName, details))
+ switch (sink->onFile(shortName, fullName, isSymbolicLink, details))
{
case TraverseCallback::TRAVERSING_STOP:
return false;
@@ -292,7 +287,7 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
details.lastWriteTimeRaw = 0; //we are not interested in the modifiation time of the link
details.fileSize = 0;
- switch (sink->onFile(shortName, fullName, details))
+ switch (sink->onFile(shortName, fullName, isSymbolicLink, details))
{
case TraverseCallback::TRAVERSING_STOP:
return false;
@@ -304,9 +299,9 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
}
- if (S_ISDIR(fileInfo.st_mode)) //a directory... (note: symbolic links need to be dereferenced to test if they point to a directory!)
+ if (S_ISDIR(fileInfo.st_mode)) //a directory... (note: symbolic links need to be dereferenced to test whether they point to a directory!)
{
- const TraverseCallback::ReturnValDir rv = sink->onDir(shortName, fullName);
+ const TraverseCallback::ReturnValDir rv = sink->onDir(shortName, fullName, isSymbolicLink);
switch (rv.returnCode)
{
case TraverseCallback::ReturnValDir::TRAVERSING_DIR_STOP:
@@ -316,10 +311,8 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
break;
case TraverseCallback::ReturnValDir::TRAVERSING_DIR_CONTINUE:
- //traverse into symbolic links, junctions, etc. if requested only:
- if (traverseDirectorySymlinks || !isSymbolicLink) //traverse into symbolic links if requested only
- if (!traverseDirectory<traverseDirectorySymlinks>(fullName, rv.subDirCb, level + 1))
- return false;
+ if (!traverseDirectory(fullName, rv.subDirCb, level + 1))
+ return false;
break;
}
}
@@ -329,7 +322,7 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
details.lastWriteTimeRaw = fileInfo.st_mtime; //UTC time(ANSI C format); unit: 1 second
details.fileSize = fileInfo.st_size;
- switch (sink->onFile(shortName, fullName, details))
+ switch (sink->onFile(shortName, fullName, isSymbolicLink, details))
{
case TraverseCallback::TRAVERSING_STOP:
return false;
@@ -345,7 +338,6 @@ bool traverseDirectory(const Zstring& directory, FreeFileSync::TraverseCallback*
void FreeFileSync::traverseFolder(const Zstring& directory,
- const bool traverseDirectorySymlinks,
TraverseCallback* sink)
{
#ifdef FFS_WIN
@@ -357,8 +349,5 @@ void FreeFileSync::traverseFolder(const Zstring& directory,
directory;
#endif
- if (traverseDirectorySymlinks)
- traverseDirectory<true>(directoryFormatted, sink, 0);
- else
- traverseDirectory<false>(directoryFormatted, sink, 0);
+ traverseDirectory(directoryFormatted, sink, 0);
}
diff --git a/shared/fileTraverser.h b/shared/fileTraverser.h
index dc5d75e0..f765bb5b 100644
--- a/shared/fileTraverser.h
+++ b/shared/fileTraverser.h
@@ -55,12 +55,13 @@ public:
//overwrite these virtual methods
virtual ReturnValue onError(const wxString& errorText) = 0;
- virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, const FileInfo& details) = 0;
- virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName) = 0;
+ virtual ReturnValue onFile(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink, const FileInfo& details) = 0;
+ virtual ReturnValDir onDir(const DefaultChar* shortName, const Zstring& fullName, bool isSymlink) = 0;
};
//custom traverser with detail information about files
-void traverseFolder(const Zstring& directory, const bool traverseDirectorySymlinks, TraverseCallback* sink); //throw()
+//directory may end with PATH_SEPARATOR
+void traverseFolder(const Zstring& directory, TraverseCallback* sink); //throw()
}
#endif // FILETRAVERSER_H_INCLUDED
diff --git a/shared/globalFunctions.cpp b/shared/globalFunctions.cpp
index 9cfa6fff..c02a1d77 100644
--- a/shared/globalFunctions.cpp
+++ b/shared/globalFunctions.cpp
@@ -32,9 +32,9 @@ double globalFunctions::wxStringToDouble(const wxString& number)
}
-unsigned int globalFunctions::getDigitCount(const unsigned int number) //count number of digits
+size_t globalFunctions::getDigitCount(size_t number) //count number of digits
{
- return number == 0 ? 1 : static_cast<unsigned int>(::log10(static_cast<double>(number))) + 1;
+ return number == 0 ? 1 : static_cast<size_t>(::log10(static_cast<double>(number))) + 1;
}
diff --git a/shared/globalFunctions.h b/shared/globalFunctions.h
index f4f2caa4..daf495b5 100644
--- a/shared/globalFunctions.h
+++ b/shared/globalFunctions.h
@@ -15,7 +15,6 @@
#include <wx/longlong.h>
#include <memory>
#include <sstream>
-#include <fstream>
class wxStopWatch;
@@ -39,27 +38,20 @@ T abs(const T& d) //absolute value
}
template <class T>
-inline
-std::string numberToString(const T& number) //convert number to string the C++ way
-{
- std::stringstream ss;
- ss << number;
- return ss.str();
-}
+std::string numberToString(const T& number); //convert number to string the C++ way
+template <class T>
+void stringToNumber(const std::string& input, T& number); //convert string to number the C++ way
-int stringToInt( const std::string& number); //convert String to number
-long stringToLong( const std::string& number); //convert String to number
-double stringToDouble(const std::string& number); //convert String to number
int wxStringToInt( const wxString& number); //convert wxString to number
double wxStringToDouble(const wxString& number); //convert wxString to number
-unsigned int getDigitCount(const unsigned int number); //count number of digits
+size_t getDigitCount(size_t number); //count number of digits
//read/write numbers: int, long, unsigned int ... ect
-template <class T> T readNumber(std::ifstream& stream);
-template <class T> void writeNumber(std::ofstream& stream, T number);
+template <class T> T readNumber(std::istream& stream);
+template <class T> void writeNumber(std::ostream& stream, T number);
inline
wxLongLong convertToSigned(const wxULongLong number)
@@ -70,78 +62,15 @@ wxLongLong convertToSigned(const wxULongLong number)
//Note: the following lines are a performance optimization for deleting elements from a vector: linear runtime at most!
template <class T>
-void removeRowsFromVector(const std::set<unsigned int>& rowsToRemove, std::vector<T>& grid)
-{
- if (rowsToRemove.empty())
- return;
-
- std::set<unsigned int>::const_iterator rowToSkipIndex = rowsToRemove.begin();
- unsigned int rowToSkip = *rowToSkipIndex;
-
- if (rowToSkip >= grid.size())
- return;
-
- typename std::vector<T>::iterator insertPos = grid.begin() + rowToSkip;
-
- for (unsigned int i = rowToSkip; i < grid.size(); ++i)
- {
- if (i != rowToSkip)
- {
- *insertPos = grid[i];
- ++insertPos;
- }
- else
- {
- ++rowToSkipIndex;
- if (rowToSkipIndex != rowsToRemove.end())
- rowToSkip = *rowToSkipIndex;
- }
- }
- grid.erase(insertPos, grid.end());
-}
+void removeRowsFromVector(const std::set<size_t>& rowsToRemove, std::vector<T>& grid);
//bubble sort using swap() instead of assignment: useful if assignment is very expensive
template <class VectorData, typename CompareFct>
-void bubbleSwapSort(VectorData& folderCmp, CompareFct compare)
-{
- for (int i = folderCmp.size() - 2; i >= 0; --i)
- {
- bool swapped = false;
- for (int j = 0; j <= i; ++j)
- if (compare(folderCmp[j + 1], folderCmp[j]))
- {
- folderCmp[j + 1].swap(folderCmp[j]);
- swapped = true;
- }
-
- if (!swapped)
- return;
- }
-}
-
-//enhanced binary search template: returns an iterator
-template <class ForwardIterator, class T>
-inline
-ForwardIterator custom_binary_search(ForwardIterator first, ForwardIterator last, const T& value)
-{
- first = lower_bound(first, last, value);
- if (first != last && !(value < *first))
- return first;
- else
- return last;
-}
+void bubbleSwapSort(VectorData& folderCmp, CompareFct compare);
//enhanced binary search template: returns an iterator
template <class ForwardIterator, class T, typename Compare>
-inline
-ForwardIterator custom_binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp)
-{
- first = lower_bound(first, last, value, comp);
- if (first != last && !comp(value, *first))
- return first;
- else
- return last;
-}
+ForwardIterator custom_binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp = std::less<T>());
}
@@ -199,43 +128,113 @@ wxString getCodeLocation(const wxString file, const int line);
+
+
+
+
+
+
//---------------Inline Implementation---------------------------------------------------
template <class T>
inline
-T globalFunctions::readNumber(std::ifstream& stream)
+std::string globalFunctions::numberToString(const T& number) //convert number to string the C++ way
{
- T result = 0;
- stream.read(reinterpret_cast<char*>(&result), sizeof(T));
- return result;
+ std::ostringstream ss;
+ ss << number;
+ return ss.str();
}
template <class T>
inline
-void globalFunctions::writeNumber(std::ofstream& stream, T number)
+void globalFunctions::stringToNumber(const std::string& input, T& number) //convert number to string the C++ way
{
- stream.write(reinterpret_cast<const char*>(&number), sizeof(T));
+ std::istringstream ss(input);
+ ss >> number;
}
+//Note: the following lines are a performance optimization for deleting elements from a vector: linear runtime at most!
+template <class T>
+void globalFunctions::removeRowsFromVector(const std::set<size_t>& rowsToRemove, std::vector<T>& grid)
+{
+ if (rowsToRemove.empty())
+ return;
+
+ std::set<size_t>::const_iterator rowToSkipIndex = rowsToRemove.begin();
+ size_t rowToSkip = *rowToSkipIndex;
+
+ if (rowToSkip >= grid.size())
+ return;
+
+ typename std::vector<T>::iterator insertPos = grid.begin() + rowToSkip;
+
+ for (size_t i = rowToSkip; i < grid.size(); ++i)
+ {
+ if (i != rowToSkip)
+ {
+ *insertPos = grid[i];
+ ++insertPos;
+ }
+ else
+ {
+ ++rowToSkipIndex;
+ if (rowToSkipIndex != rowsToRemove.end())
+ rowToSkip = *rowToSkipIndex;
+ }
+ }
+ grid.erase(insertPos, grid.end());
+}
+
+
+//bubble sort using swap() instead of assignment: useful if assignment is very expensive
+template <class VectorData, typename CompareFct>
+void globalFunctions::bubbleSwapSort(VectorData& folderCmp, CompareFct compare)
+{
+ for (int i = folderCmp.size() - 2; i >= 0; --i)
+ {
+ bool swapped = false;
+ for (int j = 0; j <= i; ++j)
+ if (compare(folderCmp[j + 1], folderCmp[j]))
+ {
+ folderCmp[j + 1].swap(folderCmp[j]);
+ swapped = true;
+ }
+
+ if (!swapped)
+ return;
+ }
+}
+
+
+//enhanced binary search template: returns an iterator
+template <class ForwardIterator, class T, typename Compare>
inline
-int globalFunctions::stringToInt(const std::string& number)
+ForwardIterator globalFunctions::custom_binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp)
{
- return atoi(number.c_str());
+ first = lower_bound(first, last, value, comp);
+ if (first != last && !comp(value, *first))
+ return first;
+ else
+ return last;
}
+template <class T>
inline
-long globalFunctions::stringToLong(const std::string& number)
+T globalFunctions::readNumber(std::istream& stream)
{
- return atol(number.c_str());
+ T result = 0;
+ stream.read(reinterpret_cast<char*>(&result), sizeof(T));
+ return result;
}
+template <class T>
inline
-double globalFunctions::stringToDouble(const std::string& number)
+void globalFunctions::writeNumber(std::ostream& stream, T number)
{
- return atof(number.c_str());
+ stream.write(reinterpret_cast<const char*>(&number), sizeof(T));
}
diff --git a/shared/localization.cpp b/shared/localization.cpp
index 504c6523..843e0484 100644
--- a/shared/localization.cpp
+++ b/shared/localization.cpp
@@ -109,7 +109,7 @@ LocalizationInfo::LocalizationInfo()
newEntry.languageID = wxLANGUAGE_DUTCH;
newEntry.languageName = wxT("Nederlands");
newEntry.languageFile = wxT("dutch.lng");
- newEntry.translatorName = wxT("M.D. Vrakking");
+ newEntry.translatorName = wxT("Mikhail Frolov");
newEntry.languageFlag = wxT("holland.png");
locMapping.push_back(newEntry);
diff --git a/shared/loki/ScopeGuard.h b/shared/loki/ScopeGuard.h
index a7e61ddd..b530068d 100644
--- a/shared/loki/ScopeGuard.h
+++ b/shared/loki/ScopeGuard.h
@@ -18,7 +18,7 @@
// $Id: ScopeGuard.h 799 2006-12-20 00:37:13Z rich_sposato $
-#include <loki/RefToValue.h>
+#include "RefToValue.h"
/// \defgroup ExceptionGroup Exception-safe code
diff --git a/shared/ossp_uuid/.libs/libuuid++.a b/shared/ossp_uuid/.libs/libuuid++.a
new file mode 100644
index 00000000..754820e7
--- /dev/null
+++ b/shared/ossp_uuid/.libs/libuuid++.a
Binary files differ
diff --git a/shared/ossp_uuid/.libs/libuuid++.la b/shared/ossp_uuid/.libs/libuuid++.la
new file mode 100644
index 00000000..d48c6189
--- /dev/null
+++ b/shared/ossp_uuid/.libs/libuuid++.la
@@ -0,0 +1,41 @@
+# libuuid++.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libuuid++.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libuuid++.
+current=16
+age=0
+revision=22
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/shared/ossp_uuid/.libs/libuuid++.lai b/shared/ossp_uuid/.libs/libuuid++.lai
new file mode 100644
index 00000000..aeac1af1
--- /dev/null
+++ b/shared/ossp_uuid/.libs/libuuid++.lai
@@ -0,0 +1,41 @@
+# libuuid++.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libuuid++.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libuuid++.
+current=16
+age=0
+revision=22
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/shared/ossp_uuid/.libs/libuuid.a b/shared/ossp_uuid/.libs/libuuid.a
new file mode 100644
index 00000000..b1357ab1
--- /dev/null
+++ b/shared/ossp_uuid/.libs/libuuid.a
Binary files differ
diff --git a/shared/ossp_uuid/.libs/libuuid.la b/shared/ossp_uuid/.libs/libuuid.la
new file mode 100644
index 00000000..8cd05ef9
--- /dev/null
+++ b/shared/ossp_uuid/.libs/libuuid.la
@@ -0,0 +1,41 @@
+# libuuid.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libuuid.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libuuid.
+current=16
+age=0
+revision=22
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/shared/ossp_uuid/.libs/libuuid.lai b/shared/ossp_uuid/.libs/libuuid.lai
new file mode 100644
index 00000000..86bc99bd
--- /dev/null
+++ b/shared/ossp_uuid/.libs/libuuid.lai
@@ -0,0 +1,41 @@
+# libuuid.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libuuid.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libuuid.
+current=16
+age=0
+revision=22
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/shared/ossp_uuid/Makefile b/shared/ossp_uuid/Makefile
new file mode 100644
index 00000000..c5fdd41d
--- /dev/null
+++ b/shared/ossp_uuid/Makefile
@@ -0,0 +1,357 @@
+##
+## OSSP uuid - Universally Unique Identifier
+## Copyright (c) 2004-2008 Ralf S. Engelschall <rse@engelschall.com>
+## Copyright (c) 2004-2008 The OSSP Project <http://www.ossp.org/>
+##
+## This file is part of OSSP uuid, a library for the generation
+## of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+## Makefile.in: make(1) build procedure
+##
+
+
+
+
+srcdir = .
+top_srcdir = .
+S = $(srcdir)
+C = .
+
+DESTDIR =
+prefix = /usr/local
+exec_prefix = ${prefix}
+datarootdir = ${prefix}/share
+bindir = ${exec_prefix}/bin
+libdir = ${exec_prefix}/lib
+includedir = ${prefix}/include
+mandir = ${datarootdir}/man
+
+CC = gcc
+CXX = g++
+CPPFLAGS = -I. -I$(S) -DHAVE_CONFIG_H
+CFLAGS = -O2 -pipe
+CXXFLAGS = -g -O2
+LDFLAGS =
+LIBS = -lnsl
+RM = rm -f
+CP = cp
+RMDIR = rmdir
+SHTOOL = $(S)/shtool
+LIBTOOL = $(C)/libtool
+TRUE = true
+POD2MAN = pod2man
+PERL = /usr/bin/perl
+PHP = NA
+PG_CONFIG = NA
+
+LIB_NAME = libuuid.la
+LIB_OBJS = uuid.lo uuid_md5.lo uuid_sha1.lo uuid_prng.lo uuid_mac.lo uuid_time.lo uuid_ui64.lo uuid_ui128.lo uuid_str.lo
+
+DCE_NAME = libuuid_dce.la
+DCE_OBJS = uuid_dce.lo $(LIB_OBJS)
+
+CXX_NAME = libuuid++.la
+CXX_OBJS = uuid++.lo $(LIB_OBJS)
+
+PRG_NAME = uuid
+PRG_OBJS = uuid_cli.o
+
+MAN_NAME = uuid.3 uuid++.3 uuid.1
+
+PERL_NAME = $(S)/perl/blib/lib/OSSP/uuid.pm
+PERL_OBJS = $(S)/perl/uuid.pm
+
+PHP_NAME = $(S)/php/modules/uuid.so
+PHP_OBJS = $(S)/php/uuid.c
+
+PGSQL_NAME = $(S)/pgsql/libuuid.so
+PGSQL_OBJS = $(S)/pgsql/uuid.c
+
+TARGETS = $(LIB_NAME) $(CXX_NAME) $(PRG_NAME)
+
+WITH_DCE = no
+WITH_CXX = yes
+WITH_PERL = no
+WITH_PERL_COMPAT = 0
+WITH_PHP = no
+WITH_PGSQL = no
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .o .lo
+
+all: $(TARGETS)
+
+.c.o:
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+
+.cc.o:
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+.c.lo:
+ @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+
+.cc.lo:
+ @$(LIBTOOL) --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+$(LIB_NAME): $(LIB_OBJS)
+ @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
+ -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
+
+$(DCE_NAME): $(DCE_OBJS)
+ @$(LIBTOOL) --mode=link $(CC) -o $(DCE_NAME) $(DCE_OBJS) -rpath $(libdir) \
+ -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
+
+$(CXX_NAME): $(CXX_OBJS)
+ @$(LIBTOOL) --mode=link $(CXX) -o $(CXX_NAME) $(CXX_OBJS) -rpath $(libdir) \
+ -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
+
+$(PRG_NAME): $(PRG_OBJS) $(LIB_NAME)
+ @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(PRG_NAME) $(PRG_OBJS) $(LIB_NAME) $(LIBS)
+
+$(PERL_NAME): $(PERL_OBJS) $(LIB_NAME)
+ @cd $(S)/perl && $(PERL) Makefile.PL PREFIX=$(prefix) COMPAT=$(WITH_PERL_COMPAT) && $(MAKE) $(MFLAGS) all
+ @touch $(PERL_NAME)
+
+$(PHP_NAME): $(PHP_OBJS) $(LIB_NAME)
+ @cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local PHP=$(PHP)
+ @touch $(PHP_NAME)
+
+$(PGSQL_NAME): $(PGSQL_OBJS) $(LIB_NAME)
+ @cd $(S)/pgsql && $(MAKE) $(MFLAGS) PG_CONFIG=$(PG_CONFIG)
+ @touch $(PGSQL_NAME)
+
+uuid.lo: $(S)/uuid.c uuid.h $(S)/uuid_md5.h $(S)/uuid_sha1.h $(S)/uuid_prng.h $(S)/uuid_mac.h $(S)/uuid_ui64.h $(S)/uuid_ui128.h $(S)/uuid_str.h $(S)/uuid_bm.h $(S)/uuid_ac.h
+uuid_mac.lo: $(S)/uuid_mac.c $(S)/uuid_mac.h
+uuid_md5.lo: $(S)/uuid_md5.c $(S)/uuid_md5.h
+uuid_sha1.lo: $(S)/uuid_sha1.c $(S)/uuid_sha1.h
+uuid_prng.lo: $(S)/uuid_prng.c $(S)/uuid_prng.h
+uuid_str.lo: $(S)/uuid_str.c $(S)/uuid_str.h
+uuid_ui64.lo: $(S)/uuid_ui64.c $(S)/uuid_ui64.h
+uuid_ui128.lo: $(S)/uuid_ui64.c $(S)/uuid_ui128.h
+uuid_dce.lo: $(S)/uuid_dce.c uuid.h $(S)/uuid_dce.h
+uuid_cli.o: $(S)/uuid_cli.c uuid.h
+uuid++.lo: $(S)/uuid++.cc $(S)/uuid++.hh
+
+man: uuid.3 uuid++.3 uuid-config.1 uuid.1
+uuid.3: uuid.pod
+ V1=`$(SHTOOL) version -l c -d short $(S)/uuid_vers.h`; \
+ V2=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h`; \
+ D=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h | sed -e 's;.*(;;' -e 's;).*;;'`; \
+ $(POD2MAN) --quotes=none \
+ --section=3 --center="Universally Unique Identifier" \
+ --release="$$D" --date="OSSP uuid $$V1" $(S)/uuid.pod | \
+ sed -e "s;UUID_VERSION_STR;$$V2;" >uuid.3
+uuid++.3: uuid++.pod
+ V1=`$(SHTOOL) version -l c -d short $(S)/uuid_vers.h`; \
+ V2=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h`; \
+ D=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h | sed -e 's;.*(;;' -e 's;).*;;'`; \
+ $(POD2MAN) --quotes=none \
+ --section=3 --center="Universally Unique Identifier" \
+ --release="$$D" --date="OSSP uuid $$V1" $(S)/uuid++.pod | \
+ sed -e "s;UUID_VERSION_STR;$$V2;" >uuid++.3
+uuid-config.1: uuid-config.pod
+ V1=`$(SHTOOL) version -l c -d short $(S)/uuid_vers.h`; \
+ V2=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h`; \
+ D=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h | sed -e 's;.*(;;' -e 's;).*;;'`; \
+ $(POD2MAN) --quotes=none \
+ --section=1 --center="Universally Unique Identifier" \
+ --release="$$D" --date="OSSP uuid $$V1" $(S)/uuid-config.pod | \
+ sed -e "s;UUID_VERSION_STR;$$V2;" >uuid-config.1
+uuid.1: uuid_cli.pod
+ V1=`$(SHTOOL) version -l c -d short $(S)/uuid_vers.h`; \
+ V2=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h`; \
+ D=`$(SHTOOL) version -l c -d long $(S)/uuid_vers.h | sed -e 's;.*(;;' -e 's;).*;;'`; \
+ $(CP) $(S)/uuid_cli.pod /tmp/uuid.pod; \
+ $(POD2MAN) --quotes=none \
+ --section=1 --center="Universally Unique Identifier" \
+ --release="$$D" --date="OSSP uuid $$V1" /tmp/uuid.pod | \
+ sed -e "s;UUID_VERSION_STR;$$V2;" >uuid.1; \
+ $(RM) /tmp/uuid.pod
+
+check: all
+ @echo "==== UUID version 1 (time and node based): 4 single iterations"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -v1 -n 4 -1
+ @echo "==== UUID version 1 (time and node based): 4 subsequent iterations"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -v1 -n 4
+ @echo "==== UUID version 3 (name based, MD5): 2 times repeated"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -v3 -n 2 ns:URL http://www.ossp.org/
+ @echo "==== UUID version 5 (name based, SHA-1): 2 times repeated"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -v5 -n 2 ns:URL http://www.ossp.org/
+ @echo "==== UUID version 4 (random data based): 4 single iterations"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -v4 -n 4 -1
+ @echo "==== UUID version 4 (random data based): 4 subsequent iterations"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -v4 -n 4
+ @echo "==== UUID version 1 generation and decoding"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -d `$(LIBTOOL) --mode=execute ./$(PRG_NAME) -v1`; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -d `$(LIBTOOL) --mode=execute ./$(PRG_NAME) -v1 -m`
+ @echo "==== UUID version 3 generation and decoding"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -d `$(LIBTOOL) --mode=execute ./$(PRG_NAME) -v3 ns:URL http://www.ossp.org/`
+ @echo "==== UUID version 5 generation and decoding"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -d `$(LIBTOOL) --mode=execute ./$(PRG_NAME) -v5 ns:URL http://www.ossp.org/`
+ @echo "==== UUID version 3 generation and decoding"; \
+ $(LIBTOOL) --mode=execute ./$(PRG_NAME) -d `$(LIBTOOL) --mode=execute ./$(PRG_NAME) -v4`
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ echo "==== Perl bindings to C API"; \
+ (cd $(S)/perl && $(MAKE) $(MFLAGS) test); \
+ fi
+ -@if [ ".$(WITH_PHP)" = .yes ]; then \
+ echo "==== PHP bindings to C API"; \
+ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local test PHP=$(PHP)); \
+ fi
+ -@if [ ".$(WITH_PGSQL)" = .yes ]; then \
+ echo "==== PGSQL bindings to C API"; \
+ (cd $(S)/pgsql && $(MAKE) $(MFLAGS) test PG_CONFIG=$(PG_CONFIG)); \
+ fi
+
+.PHONY: install
+install:
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix)
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(includedir)
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir)/pkgconfig
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
+ $(SHTOOL) install -c -m 755 uuid-config $(DESTDIR)$(bindir)/
+ $(SHTOOL) install -c -m 644 $(S)/uuid-config.1 $(DESTDIR)$(mandir)/man1/
+ $(SHTOOL) install -c -m 644 $(S)/uuid.pc $(DESTDIR)$(libdir)/pkgconfig/
+ $(SHTOOL) install -c -m 644 uuid.h $(DESTDIR)$(includedir)/
+ -@if [ ".$(WITH_DCE)" = .yes ]; then \
+ echo "$(SHTOOL) install -c -m 644 $(S)/uuid_dce.h $(DESTDIR)$(includedir)/"; \
+ $(SHTOOL) install -c -m 644 $(S)/uuid_dce.h $(DESTDIR)$(includedir)/; \
+ fi
+ -@if [ ".$(WITH_CXX)" = .yes ]; then \
+ echo "$(SHTOOL) install -c -m 644 $(S)/uuid++.hh $(DESTDIR)$(includedir)/"; \
+ $(SHTOOL) install -c -m 644 $(S)/uuid++.hh $(DESTDIR)$(includedir)/; \
+ fi
+ $(SHTOOL) install -c -m 644 $(S)/uuid.3 $(DESTDIR)$(mandir)/man3/
+ -@if [ ".$(WITH_CXX)" = .yes ]; then \
+ echo "$(SHTOOL) install -c -m 644 $(S)/uuid++.3 $(DESTDIR)$(mandir)/man3/"; \
+ $(SHTOOL) install -c -m 644 $(S)/uuid++.3 $(DESTDIR)$(mandir)/man3/; \
+ fi
+ @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(LIB_NAME) $(DESTDIR)$(libdir)/
+ -@if [ ".$(WITH_DCE)" = .yes ]; then \
+ $(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(DCE_NAME) $(DESTDIR)$(libdir)/; \
+ fi
+ -@if [ ".$(WITH_CXX)" = .yes ]; then \
+ $(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(CXX_NAME) $(DESTDIR)$(libdir)/; \
+ fi
+ @$(LIBTOOL) --mode=install $(SHTOOL) install -c -s -m 755 uuid $(DESTDIR)$(bindir)/
+ $(SHTOOL) install -c -m 644 $(S)/uuid.1 $(DESTDIR)$(mandir)/man1/
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd $(S)/perl && $(MAKE) $(MFLAGS) install DESTDIR=$(DESTDIR)); \
+ fi
+ -@if [ ".$(WITH_PHP)" = .yes ]; then \
+ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local install EXTDIR=$(prefix)/lib/php PHP=$(PHP) DESTDIR=$(DESTDIR)); \
+ fi
+ -@if [ ".$(WITH_PGSQL)" = .yes ]; then \
+ (cd $(S)/pgsql && $(MAKE) $(MFLAGS) install DESTDIR=$(DESTDIR) PG_CONFIG=$(PG_CONFIG)); \
+ fi
+
+.PHONY: uninstall
+uninstall:
+ -$(RM) $(DESTDIR)$(mandir)/man1/uuid.1
+ -@$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(bindir)/uuid
+ -@$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(LIB_NAME)
+ -@if [ ".$(WITH_DCE)" = .yes ]; then \
+ $(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(DCE_NAME); \
+ fi
+ -@if [ ".$(WITH_CXX)" = .yes ]; then \
+ $(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(CXX_NAME); \
+ fi
+ -$(RM) $(DESTDIR)$(mandir)/man3/uuid.3
+ -@if [ ".$(WITH_CXX)" = .yes ]; then \
+ echo "$(RM) $(DESTDIR)$(mandir)/man3/uuid++.3"; \
+ $(RM) $(DESTDIR)$(mandir)/man3/uuid++.3; \
+ fi
+ -$(RM) $(DESTDIR)$(includedir)/uuid.h
+ -@if [ ".$(WITH_DCE)" = .yes ]; then \
+ echo "$(RM) $(DESTDIR)$(includedir)/uuid_dce.h"; \
+ $(RM) $(DESTDIR)$(includedir)/uuid_dce.h; \
+ fi
+ -@if [ ".$(WITH_CXX)" = .yes ]; then \
+ echo "$(RM) $(DESTDIR)$(includedir)/uuid++.hh"; \
+ $(RM) $(DESTDIR)$(includedir)/uuid++.hh; \
+ fi
+ -$(RM) $(DESTDIR)$(libdir)/pkgconfig/uuid.pc
+ -$(RM) $(DESTDIR)$(mandir)/man1/uuid-config.1
+ -$(RM) $(DESTDIR)$(bindir)/uuid-config
+ -$(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(mandir)/man3 >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(libdir)/pkgconfig >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(libdir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
+
+.PHONY: clean
+clean:
+ -$(RM) $(LIB_NAME) $(LIB_OBJS)
+ -@if [ ".$(WITH_DCE)" = .yes ]; then \
+ echo "$(RM) $(DCE_NAME) $(DCE_OBJS)"; \
+ $(RM) $(DCE_NAME) $(DCE_OBJS); \
+ fi
+ -@if [ ".$(WITH_CXX)" = .yes ]; then \
+ echo "$(RM) $(CXX_NAME) $(CXX_OBJS)"; \
+ $(RM) $(CXX_NAME) $(CXX_OBJS); \
+ fi
+ -$(RM) $(PRG_NAME) $(PRG_OBJS)
+ -$(RM) -r .libs >/dev/null 2>&1 || $(TRUE)
+ -$(RM) *.o *.lo
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd $(S)/perl && $(MAKE) $(MFLAGS) clean || true); \
+ fi
+ -@if [ ".$(WITH_PHP)" = .yes ]; then \
+ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local clean || true); \
+ fi
+ -@if [ ".$(WITH_PGSQL)" = .yes ]; then \
+ (cd $(S)/pgsql && $(MAKE) $(MFLAGS) clean PG_CONFIG=$(PG_CONFIG) || true); \
+ fi
+
+distclean: clean
+ -$(RM) config.log config.status config.cache
+ -$(RM) Makefile config.h uuid-config uuid.h uuid.pc
+ -$(RM) libtool
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd $(S)/perl && $(MAKE) $(MFLAGS) distclean || true; rm -f Makefile.old); \
+ fi
+ -@if [ ".$(WITH_PHP)" = .yes ]; then \
+ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local distclean || true); \
+ fi
+ -@if [ ".$(WITH_PGSQL)" = .yes ]; then \
+ (cd $(S)/pgsql && $(MAKE) $(MFLAGS) distclean PG_CONFIG=$(PG_CONFIG) || true); \
+ fi
+
+realclean: distclean
+ -$(RM) uuid.3 uuid.1
+ -$(RM) configure config.h.in
+ -$(RM) shtool
+ -$(RM) ltmain.sh libtool.m4 config.guess config.sub
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd $(S)/perl && $(MAKE) $(MFLAGS) realclean || true; rm -f Makefile.old); \
+ fi
+ -@if [ ".$(WITH_PHP)" = .yes ]; then \
+ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local realclean || true); \
+ fi
+ -@if [ ".$(WITH_PGSQL)" = .yes ]; then \
+ (cd $(S)/pgsql && $(MAKE) $(MFLAGS) realclean PG_CONFIG=$(PG_CONFIG) || true); \
+ fi
+
diff --git a/shared/ossp_uuid/confdefs.h b/shared/ossp_uuid/confdefs.h
new file mode 100644
index 00000000..348e8580
--- /dev/null
+++ b/shared/ossp_uuid/confdefs.h
@@ -0,0 +1,49 @@
+#define PACKAGE_NAME ""
+#define PACKAGE_TARNAME ""
+#define PACKAGE_VERSION ""
+#define PACKAGE_STRING ""
+#define PACKAGE_BUGREPORT ""
+#define STDC_HEADERS 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_DLFCN_H 1
+#define LT_OBJDIR ".libs/"
+#define HAVE_LIBNSL 1
+#define HAVE_VA_COPY 1
+#define __VA_COPY_USE __VA_COPY_USE_C99
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_NETDB_H 1
+#define HAVE_IFADDRS_H 1
+#define HAVE_NET_IF_H 1
+#define HAVE_NET_IF_ARP_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_STRUCT_TIMEVAL 1
+#define HAVE_GETIFADDRS 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_LONG_LONG 1
+#define HAVE_LONG_DOUBLE 1
+#define SIZEOF_CHAR 1
+#define SIZEOF_UNSIGNED_CHAR 1
+#define SIZEOF_SHORT 2
+#define SIZEOF_UNSIGNED_SHORT 2
+#define SIZEOF_INT 4
+#define SIZEOF_UNSIGNED_INT 4
+#define SIZEOF_LONG 4
+#define SIZEOF_UNSIGNED_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF_UNSIGNED_LONG_LONG 8
+#define WITH_CXX 1
diff --git a/shared/ossp_uuid/config.h b/shared/ossp_uuid/config.h
new file mode 100644
index 00000000..a827b6ea
--- /dev/null
+++ b/shared/ossp_uuid/config.h
@@ -0,0 +1,217 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Predefined possible va_copy() implementation (id: ASP) */
+#define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
+
+/* Predefined possible va_copy() implementation (id: ASS) */
+#define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
+
+/* Predefined possible va_copy() implementation (id: C99) */
+#define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
+
+/* Predefined possible va_copy() implementation (id: CPP) */
+#define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s), sizeof(*(s)))
+
+/* Predefined possible va_copy() implementation (id: CPS) */
+#define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s), sizeof((s)))
+
+/* Predefined possible va_copy() implementation (id: GCB) */
+#define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
+
+/* Predefined possible va_copy() implementation (id: GCH) */
+#define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))
+
+/* Predefined possible va_copy() implementation (id: GCM) */
+#define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the `clock_gettime' function. */
+/* #undef HAVE_CLOCK_GETTIME */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <dmalloc.h> header file. */
+/* #undef HAVE_DMALLOC_H */
+
+/* Define to 1 if you have the `getifaddrs' function. */
+#define HAVE_GETIFADDRS 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <ifaddrs.h> header file. */
+#define HAVE_IFADDRS_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
+/* #undef HAVE_LIBDMALLOC */
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#define HAVE_LIBNSL 1
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if the system has the type `long double'. */
+#define HAVE_LONG_DOUBLE 1
+
+/* Define to 1 if the system has the type `long long'. */
+#define HAVE_LONG_LONG 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `nanosleep' function. */
+#define HAVE_NANOSLEEP 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <net/if_arp.h> header file. */
+#define HAVE_NET_IF_ARP_H 1
+
+/* Define to 1 if you have the <net/if_dl.h> header file. */
+/* #undef HAVE_NET_IF_DL_H */
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define to 1 if you have the `Sleep' function. */
+/* #undef HAVE_SLEEP */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* define if exists "struct timeval" */
+#define HAVE_STRUCT_TIMEVAL 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if va_copy() macro exists (and no fallback implementation is
+ required) */
+#define HAVE_VA_COPY 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* The size of `char', as computed by sizeof. */
+#define SIZEOF_CHAR 1
+
+/* The size of `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
+/* The size of `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of `unsigned char', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_CHAR 1
+
+/* The size of `unsigned int', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_INT 4
+
+/* The size of `unsigned long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG 4
+
+/* The size of `unsigned long long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG_LONG 8
+
+/* The size of `unsigned short', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_SHORT 2
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* whether to build C++ bindings to C API */
+#define WITH_CXX 1
+
+/* whether to build DCE 1.1 backward compatibility API */
+/* #undef WITH_DCE */
+
+/* define if building with Dmalloc */
+/* #undef WITH_DMALLOC */
+
+/* whether to build Perl bindings to C API */
+/* #undef WITH_PERL */
+
+/* whether to build Perl compatibility API */
+/* #undef WITH_PERL_COMPAT */
+
+/* whether to build PostgreSQL bindings to C API */
+/* #undef WITH_PGSQL */
+
+/* whether to build PHP bindings to C API */
+/* #undef WITH_PHP */
+
+/* Optional va_copy() implementation activation */
+#ifndef HAVE_VA_COPY
+#define va_copy(d, s) __VA_COPY_USE(d, s)
+#endif
+
+
+/* Define to id of used va_copy() implementation */
+#define __VA_COPY_USE __VA_COPY_USE_C99
diff --git a/shared/ossp_uuid/config.log b/shared/ossp_uuid/config.log
new file mode 100644
index 00000000..71895eee
--- /dev/null
+++ b/shared/ossp_uuid/config.log
@@ -0,0 +1,1434 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by configure, which was
+generated by GNU Autoconf 2.62 (OpenPKG-CURRENT). Invocation command line was
+
+ $ ./configure --with-cxx --disable-shared
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = zenju-desktop
+uname -m = i686
+uname -r = 2.6.32-22-generic
+uname -s = Linux
+uname -v = #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010
+
+/usr/bin/uname -p = unknown
+/bin/uname -X = unknown
+
+/bin/arch = unknown
+/usr/bin/arch -k = unknown
+/usr/convex/getsysinfo = unknown
+/usr/bin/hostinfo = unknown
+/bin/machine = unknown
+/usr/bin/oslevel = unknown
+/bin/universe = unknown
+
+PATH: /usr/local/sbin
+PATH: /usr/local/bin
+PATH: /usr/sbin
+PATH: /usr/bin
+PATH: /sbin
+PATH: /bin
+PATH: /usr/games
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:2016: checking whether make sets $(MAKE)
+configure:2038: result: yes
+configure:2095: checking for gcc
+configure:2111: found /usr/bin/gcc
+configure:2122: result: gcc
+configure:2360: checking for C compiler version
+configure:2368: gcc --version >&5
+gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
+Copyright (C) 2009 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+configure:2372: $? = 0
+configure:2379: gcc -v >&5
+Using built-in specs.
+Target: i486-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
+Thread model: posix
+gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
+configure:2383: $? = 0
+configure:2390: gcc -V >&5
+gcc: '-V' option must have argument
+configure:2394: $? = 1
+configure:2417: checking for C compiler default output file name
+configure:2439: gcc conftest.c >&5
+configure:2443: $? = 0
+configure:2481: result: a.out
+configure:2498: checking whether the C compiler works
+configure:2508: ./a.out
+configure:2512: $? = 0
+configure:2529: result: yes
+configure:2536: checking whether we are cross compiling
+configure:2538: result: no
+configure:2541: checking for suffix of executables
+configure:2548: gcc -o conftest conftest.c >&5
+configure:2552: $? = 0
+configure:2576: result:
+configure:2582: checking for suffix of object files
+configure:2608: gcc -c conftest.c >&5
+configure:2612: $? = 0
+configure:2635: result: o
+configure:2639: checking whether we are using the GNU C compiler
+configure:2668: gcc -c conftest.c >&5
+configure:2675: $? = 0
+configure:2692: result: yes
+configure:2701: checking whether gcc accepts -g
+configure:2731: gcc -c -g conftest.c >&5
+configure:2738: $? = 0
+configure:2839: result: yes
+configure:2856: checking for gcc option to accept ISO C89
+configure:2930: gcc -c -g -O2 conftest.c >&5
+configure:2937: $? = 0
+configure:2960: result: none needed
+configure:3254: checking whether compiler option(s) -pipe work
+configure:3283: gcc -c -g -O2 -pipe conftest.c >&5
+configure:3290: $? = 0
+configure:3312: result: yes
+configure:3328: checking for compilation debug mode
+configure:3330: result: disabled
+configure:3341: checking how to run the C preprocessor
+configure:3381: gcc -E conftest.c
+configure:3388: $? = 0
+configure:3419: gcc -E conftest.c
+conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
+configure:3426: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| /* end confdefs.h. */
+| #include <ac_nonexistent.h>
+configure:3459: result: gcc -E
+configure:3488: gcc -E conftest.c
+configure:3495: $? = 0
+configure:3526: gcc -E conftest.c
+conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
+configure:3533: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| /* end confdefs.h. */
+| #include <ac_nonexistent.h>
+configure:3571: checking for grep that handles long lines and -e
+configure:3631: result: /bin/grep
+configure:3636: checking for egrep
+configure:3700: result: /bin/grep -E
+configure:3705: checking for ANSI C header files
+configure:3735: gcc -c -O2 -pipe conftest.c >&5
+configure:3742: $? = 0
+configure:3841: gcc -o conftest -O2 -pipe conftest.c >&5
+configure:3845: $? = 0
+configure:3851: ./conftest
+configure:3855: $? = 0
+configure:3873: result: yes
+configure:3897: checking for sys/types.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for sys/stat.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for stdlib.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for string.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for memory.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for strings.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for inttypes.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for stdint.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:3897: checking for unistd.h
+configure:3918: gcc -c -O2 -pipe conftest.c >&5
+configure:3925: $? = 0
+configure:3942: result: yes
+configure:4261: checking whether to build against external Dmalloc library
+configure:4272: result: no
+configure:5842: checking build system type
+configure:5860: result: i686-pc-linux-gnu
+configure:5882: checking host system type
+configure:5897: result: i686-pc-linux-gnu
+configure:5919: checking for a sed that does not truncate output
+configure:5985: result: /bin/sed
+configure:6003: checking for fgrep
+configure:6067: result: /bin/grep -F
+configure:6102: checking for ld used by gcc
+configure:6169: result: /usr/bin/ld
+configure:6178: checking if the linker (/usr/bin/ld) is GNU ld
+configure:6193: result: yes
+configure:6205: checking for BSD- or MS-compatible name lister (nm)
+configure:6254: result: /usr/bin/nm -B
+configure:6376: checking the name lister (/usr/bin/nm -B) interface
+configure:6383: gcc -c -O2 -pipe conftest.c >&5
+configure:6386: /usr/bin/nm -B "conftest.o"
+configure:6389: output
+00000000 B some_variable
+configure:6396: result: BSD nm
+configure:6399: checking whether ln -s works
+configure:6406: result: no, using cp -p
+configure:6411: checking the maximum length of command line arguments
+configure:6531: result: 805306365
+configure:6548: checking whether the shell understands some XSI constructs
+configure:6558: result: yes
+configure:6562: checking whether the shell understands "+="
+configure:6568: result: yes
+configure:6603: checking for /usr/bin/ld option to reload object files
+configure:6610: result: -r
+configure:6637: checking how to recognize dependent libraries
+configure:6827: result: pass_all
+configure:6887: checking for ar
+configure:6903: found /usr/bin/ar
+configure:6914: result: ar
+configure:6996: checking for strip
+configure:7012: found /usr/bin/strip
+configure:7023: result: strip
+configure:7099: checking for ranlib
+configure:7115: found /usr/bin/ranlib
+configure:7126: result: ranlib
+configure:7220: checking command to parse /usr/bin/nm -B output from gcc object
+configure:7338: gcc -c -O2 -pipe conftest.c >&5
+configure:7341: $? = 0
+configure:7345: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm
+configure:7348: $? = 0
+configure:7402: gcc -o conftest -O2 -pipe conftest.c conftstm.o >&5
+configure:7405: $? = 0
+configure:7443: result: ok
+configure:8328: checking for dlfcn.h
+configure:8349: gcc -c -O2 -pipe conftest.c >&5
+configure:8356: $? = 0
+configure:8373: result: yes
+configure:8558: checking for objdir
+configure:8573: result: .libs
+configure:8869: checking if gcc supports -fno-rtti -fno-exceptions
+configure:8887: gcc -c -O2 -pipe -fno-rtti -fno-exceptions conftest.c >&5
+cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
+configure:8891: $? = 0
+configure:8904: result: no
+configure:8924: checking for gcc option to produce PIC
+configure:9181: result: -fPIC -DPIC
+configure:9193: checking if gcc PIC flag -fPIC -DPIC works
+configure:9211: gcc -c -O2 -pipe -fPIC -DPIC -DPIC conftest.c >&5
+configure:9215: $? = 0
+configure:9228: result: yes
+configure:9252: checking if gcc static flag -static works
+configure:9280: result: yes
+configure:9295: checking if gcc supports -c -o file.o
+configure:9316: gcc -c -O2 -pipe -o out/conftest2.o conftest.c >&5
+configure:9320: $? = 0
+configure:9342: result: yes
+configure:9350: checking if gcc supports -c -o file.o
+configure:9397: result: yes
+configure:9430: checking whether the gcc linker (/usr/bin/ld) supports shared libraries
+configure:10496: result: yes
+configure:10735: checking dynamic linker characteristics
+configure:11178: gcc -o conftest -O2 -pipe -Wl,-rpath -Wl,/foo conftest.c >&5
+configure:11185: $? = 0
+configure:11418: result: GNU/Linux ld.so
+configure:11520: checking how to hardcode library paths into programs
+configure:11545: result: immediate
+configure:12386: checking whether stripping libraries is possible
+configure:12391: result: yes
+configure:12426: checking if libtool supports shared libraries
+configure:12428: result: yes
+configure:12431: checking whether to build shared libraries
+configure:12452: result: no
+configure:12455: checking whether to build static libraries
+configure:12459: result: yes
+configure:12560: checking for g++
+configure:12576: found /usr/bin/g++
+configure:12587: result: g++
+configure:12618: checking for C++ compiler version
+configure:12626: g++ --version >&5
+g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
+Copyright (C) 2009 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+configure:12630: $? = 0
+configure:12637: g++ -v >&5
+Using built-in specs.
+Target: i486-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
+Thread model: posix
+gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
+configure:12641: $? = 0
+configure:12648: g++ -V >&5
+g++: '-V' option must have argument
+configure:12652: $? = 1
+configure:12655: checking whether we are using the GNU C++ compiler
+configure:12684: g++ -c conftest.cpp >&5
+configure:12691: $? = 0
+configure:12708: result: yes
+configure:12717: checking whether g++ accepts -g
+configure:12747: g++ -c -g conftest.cpp >&5
+configure:12754: $? = 0
+configure:12855: result: yes
+configure:12886: checking how to run the C++ preprocessor
+configure:12922: g++ -E conftest.cpp
+configure:12929: $? = 0
+configure:12960: g++ -E conftest.cpp
+conftest.cpp:20:28: error: ac_nonexistent.h: No such file or directory
+configure:12967: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| /* end confdefs.h. */
+| #include <ac_nonexistent.h>
+configure:13000: result: g++ -E
+configure:13029: g++ -E conftest.cpp
+configure:13036: $? = 0
+configure:13067: g++ -E conftest.cpp
+conftest.cpp:20:28: error: ac_nonexistent.h: No such file or directory
+configure:13074: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| /* end confdefs.h. */
+| #include <ac_nonexistent.h>
+configure:13115: checking for gethostname in -lnsl
+configure:13150: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:13157: $? = 0
+configure:13178: result: yes
+configure:13267: checking for accept in -lsocket
+configure:13302: gcc -o conftest -O2 -pipe conftest.c -lsocket -lnsl >&5
+/usr/bin/ld: cannot find -lsocket
+collect2: ld returned 1 exit status
+configure:13309: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| /* end confdefs.h. */
+|
+| /* Override any GCC internal prototype to avoid an error.
+| Use char because int might match the return type of a GCC
+| builtin and then its argument prototype would still apply. */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| char accept ();
+| int
+| main ()
+| {
+| return accept ();
+| ;
+| return 0;
+| }
+configure:13330: result: no
+configure:13343: checking for va_copy() function
+configure:13404: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:13408: $? = 0
+configure:13414: ./conftest
+configure:13418: $? = 0
+configure:14045: result: yes
+configure:14064: checking for sys/types.h
+configure:14071: result: yes
+configure:14075: checking sys/param.h usability
+configure:14092: gcc -c -O2 -pipe conftest.c >&5
+configure:14099: $? = 0
+configure:14113: result: yes
+configure:14117: checking sys/param.h presence
+configure:14132: gcc -E conftest.c
+configure:14139: $? = 0
+configure:14153: result: yes
+configure:14181: checking for sys/param.h
+configure:14190: result: yes
+configure:14075: checking sys/time.h usability
+configure:14092: gcc -c -O2 -pipe conftest.c >&5
+configure:14099: $? = 0
+configure:14113: result: yes
+configure:14117: checking sys/time.h presence
+configure:14132: gcc -E conftest.c
+configure:14139: $? = 0
+configure:14153: result: yes
+configure:14181: checking for sys/time.h
+configure:14190: result: yes
+configure:14075: checking sys/socket.h usability
+configure:14092: gcc -c -O2 -pipe conftest.c >&5
+configure:14099: $? = 0
+configure:14113: result: yes
+configure:14117: checking sys/socket.h presence
+configure:14132: gcc -E conftest.c
+configure:14139: $? = 0
+configure:14153: result: yes
+configure:14181: checking for sys/socket.h
+configure:14190: result: yes
+configure:14075: checking sys/sockio.h usability
+configure:14092: gcc -c -O2 -pipe conftest.c >&5
+conftest.c:60:24: error: sys/sockio.h: No such file or directory
+configure:14099: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| #define HAVE_VA_COPY 1
+| #define __VA_COPY_USE __VA_COPY_USE_C99
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| /* end confdefs.h. */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| # include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| # include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <sys/sockio.h>
+configure:14113: result: no
+configure:14117: checking sys/sockio.h presence
+configure:14132: gcc -E conftest.c
+conftest.c:27:24: error: sys/sockio.h: No such file or directory
+configure:14139: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| #define HAVE_VA_COPY 1
+| #define __VA_COPY_USE __VA_COPY_USE_C99
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| /* end confdefs.h. */
+| #include <sys/sockio.h>
+configure:14153: result: no
+configure:14181: checking for sys/sockio.h
+configure:14190: result: no
+configure:14075: checking sys/ioctl.h usability
+configure:14092: gcc -c -O2 -pipe conftest.c >&5
+configure:14099: $? = 0
+configure:14113: result: yes
+configure:14117: checking sys/ioctl.h presence
+configure:14132: gcc -E conftest.c
+configure:14139: $? = 0
+configure:14153: result: yes
+configure:14181: checking for sys/ioctl.h
+configure:14190: result: yes
+configure:14075: checking sys/select.h usability
+configure:14092: gcc -c -O2 -pipe conftest.c >&5
+configure:14099: $? = 0
+configure:14113: result: yes
+configure:14117: checking sys/select.h presence
+configure:14132: gcc -E conftest.c
+configure:14139: $? = 0
+configure:14153: result: yes
+configure:14181: checking for sys/select.h
+configure:14190: result: yes
+configure:14214: checking for netdb.h
+configure:14245: gcc -c -O2 -pipe conftest.c >&5
+configure:14252: $? = 0
+configure:14269: result: yes
+configure:14214: checking for ifaddrs.h
+configure:14245: gcc -c -O2 -pipe conftest.c >&5
+configure:14252: $? = 0
+configure:14269: result: yes
+configure:14214: checking for net/if.h
+configure:14245: gcc -c -O2 -pipe conftest.c >&5
+configure:14252: $? = 0
+configure:14269: result: yes
+configure:14214: checking for net/if_dl.h
+configure:14245: gcc -c -O2 -pipe conftest.c >&5
+conftest.c:44:23: error: net/if_dl.h: No such file or directory
+configure:14252: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| #define HAVE_VA_COPY 1
+| #define __VA_COPY_USE __VA_COPY_USE_C99
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_IFADDRS_H 1
+| #define HAVE_NET_IF_H 1
+| /* end confdefs.h. */
+|
+| #if HAVE_SYS_TYPES_H
+| #include <sys/types.h>
+| #endif
+| #if HAVE_SYS_SOCKET_H
+| #include <sys/socket.h>
+| #endif
+| #if HAVE_SYS_IOCTL_H
+| #include <sys/ioctl.h>
+| #endif
+|
+|
+| #include <net/if_dl.h>
+configure:14269: result: no
+configure:14214: checking for net/if_arp.h
+configure:14245: gcc -c -O2 -pipe conftest.c >&5
+configure:14252: $? = 0
+configure:14269: result: yes
+configure:14214: checking for netinet/in.h
+configure:14245: gcc -c -O2 -pipe conftest.c >&5
+configure:14252: $? = 0
+configure:14269: result: yes
+configure:14214: checking for arpa/inet.h
+configure:14245: gcc -c -O2 -pipe conftest.c >&5
+configure:14252: $? = 0
+configure:14269: result: yes
+configure:14282: checking for struct timeval
+configure:14316: gcc -c -O2 -pipe conftest.c >&5
+configure:14323: $? = 0
+configure:14344: result: yes
+configure:14355: checking for getifaddrs
+configure:14411: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:14418: $? = 0
+configure:14440: result: yes
+configure:14355: checking for nanosleep
+configure:14411: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:14418: $? = 0
+configure:14440: result: yes
+configure:14355: checking for Sleep
+configure:14411: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+/tmp/cco7T28F.o: In function `main':
+conftest.c:(.text+0x7): undefined reference to `Sleep'
+collect2: ld returned 1 exit status
+configure:14418: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| #define HAVE_VA_COPY 1
+| #define __VA_COPY_USE __VA_COPY_USE_C99
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_IFADDRS_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_NET_IF_ARP_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_STRUCT_TIMEVAL 1
+| #define HAVE_GETIFADDRS 1
+| #define HAVE_NANOSLEEP 1
+| /* end confdefs.h. */
+| /* Define Sleep to an innocuous variant, in case <limits.h> declares Sleep.
+| For example, HP-UX 11i <limits.h> declares gettimeofday. */
+| #define Sleep innocuous_Sleep
+|
+| /* System header to define __stub macros and hopefully few prototypes,
+| which can conflict with char Sleep (); below.
+| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+| <limits.h> exists even on freestanding compilers. */
+|
+| #ifdef __STDC__
+| # include <limits.h>
+| #else
+| # include <assert.h>
+| #endif
+|
+| #undef Sleep
+|
+| /* Override any GCC internal prototype to avoid an error.
+| Use char because int might match the return type of a GCC
+| builtin and then its argument prototype would still apply. */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| char Sleep ();
+| /* The GNU C library defines this for functions which it implements
+| to always fail with ENOSYS. Some functions are actually named
+| something starting with __ and the normal name is an alias. */
+| #if defined __stub_Sleep || defined __stub___Sleep
+| choke me
+| #endif
+|
+| int
+| main ()
+| {
+| return Sleep ();
+| ;
+| return 0;
+| }
+configure:14440: result: no
+configure:14355: checking for gettimeofday
+configure:14411: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:14418: $? = 0
+configure:14440: result: yes
+configure:14355: checking for clock_gettime
+configure:14411: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+/tmp/cc2zs0sT.o: In function `main':
+conftest.c:(.text+0x7): undefined reference to `clock_gettime'
+collect2: ld returned 1 exit status
+configure:14418: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| #define HAVE_VA_COPY 1
+| #define __VA_COPY_USE __VA_COPY_USE_C99
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_IFADDRS_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_NET_IF_ARP_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_STRUCT_TIMEVAL 1
+| #define HAVE_GETIFADDRS 1
+| #define HAVE_NANOSLEEP 1
+| #define HAVE_GETTIMEOFDAY 1
+| /* end confdefs.h. */
+| /* Define clock_gettime to an innocuous variant, in case <limits.h> declares clock_gettime.
+| For example, HP-UX 11i <limits.h> declares gettimeofday. */
+| #define clock_gettime innocuous_clock_gettime
+|
+| /* System header to define __stub macros and hopefully few prototypes,
+| which can conflict with char clock_gettime (); below.
+| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+| <limits.h> exists even on freestanding compilers. */
+|
+| #ifdef __STDC__
+| # include <limits.h>
+| #else
+| # include <assert.h>
+| #endif
+|
+| #undef clock_gettime
+|
+| /* Override any GCC internal prototype to avoid an error.
+| Use char because int might match the return type of a GCC
+| builtin and then its argument prototype would still apply. */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| char clock_gettime ();
+| /* The GNU C library defines this for functions which it implements
+| to always fail with ENOSYS. Some functions are actually named
+| something starting with __ and the normal name is an alias. */
+| #if defined __stub_clock_gettime || defined __stub___clock_gettime
+| choke me
+| #endif
+|
+| int
+| main ()
+| {
+| return clock_gettime ();
+| ;
+| return 0;
+| }
+configure:14440: result: no
+configure:14452: checking for long long
+configure:14480: gcc -c -O2 -pipe conftest.c >&5
+configure:14487: $? = 0
+configure:14514: gcc -c -O2 -pipe conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:75: error: expected expression before ')' token
+configure:14521: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| #define HAVE_VA_COPY 1
+| #define __VA_COPY_USE __VA_COPY_USE_C99
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_IFADDRS_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_NET_IF_ARP_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_STRUCT_TIMEVAL 1
+| #define HAVE_GETIFADDRS 1
+| #define HAVE_NANOSLEEP 1
+| #define HAVE_GETTIMEOFDAY 1
+| /* end confdefs.h. */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| # include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| # include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| int
+| main ()
+| {
+| if (sizeof ((long long)))
+| return 0;
+| ;
+| return 0;
+| }
+configure:14544: result: yes
+configure:14554: checking for long double
+configure:14582: gcc -c -O2 -pipe conftest.c >&5
+configure:14589: $? = 0
+configure:14616: gcc -c -O2 -pipe conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:76: error: expected expression before ')' token
+configure:14623: $? = 1
+configure: failed program was:
+| /* confdefs.h. */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define HAVE_LIBNSL 1
+| #define HAVE_VA_COPY 1
+| #define __VA_COPY_USE __VA_COPY_USE_C99
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_IFADDRS_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_NET_IF_ARP_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_STRUCT_TIMEVAL 1
+| #define HAVE_GETIFADDRS 1
+| #define HAVE_NANOSLEEP 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define HAVE_LONG_LONG 1
+| /* end confdefs.h. */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| # include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| # include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| int
+| main ()
+| {
+| if (sizeof ((long double)))
+| return 0;
+| ;
+| return 0;
+| }
+configure:14646: result: yes
+configure:14661: checking size of char
+configure:14964: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:14968: $? = 0
+configure:14974: ./conftest
+configure:14978: $? = 0
+configure:15002: result: 1
+configure:15016: checking size of unsigned char
+configure:15319: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:15323: $? = 0
+configure:15329: ./conftest
+configure:15333: $? = 0
+configure:15357: result: 1
+configure:15371: checking size of short
+configure:15674: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:15678: $? = 0
+configure:15684: ./conftest
+configure:15688: $? = 0
+configure:15712: result: 2
+configure:15726: checking size of unsigned short
+configure:16029: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:16033: $? = 0
+configure:16039: ./conftest
+configure:16043: $? = 0
+configure:16067: result: 2
+configure:16081: checking size of int
+configure:16384: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:16388: $? = 0
+configure:16394: ./conftest
+configure:16398: $? = 0
+configure:16422: result: 4
+configure:16436: checking size of unsigned int
+configure:16739: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:16743: $? = 0
+configure:16749: ./conftest
+configure:16753: $? = 0
+configure:16777: result: 4
+configure:16791: checking size of long
+configure:17094: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:17098: $? = 0
+configure:17104: ./conftest
+configure:17108: $? = 0
+configure:17132: result: 4
+configure:17146: checking size of unsigned long
+configure:17449: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:17453: $? = 0
+configure:17459: ./conftest
+configure:17463: $? = 0
+configure:17487: result: 4
+configure:17501: checking size of long long
+configure:17804: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:17808: $? = 0
+configure:17814: ./conftest
+configure:17818: $? = 0
+configure:17842: result: 8
+configure:17856: checking size of unsigned long long
+configure:18159: gcc -o conftest -O2 -pipe conftest.c -lnsl >&5
+configure:18163: $? = 0
+configure:18169: ./conftest
+configure:18173: $? = 0
+configure:18197: result: 8
+configure:18216: checking whether to build DCE 1.1 backward compatibility API
+configure:18223: result: no
+configure:18248: checking whether to build C++ bindings to C API
+configure:18255: result: yes
+configure:18381: checking for C++ compiler version
+configure:18389: g++ --version >&5
+g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
+Copyright (C) 2009 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+configure:18393: $? = 0
+configure:18400: g++ -v >&5
+Using built-in specs.
+Target: i486-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
+Thread model: posix
+gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
+configure:18404: $? = 0
+configure:18411: g++ -V >&5
+g++: '-V' option must have argument
+configure:18415: $? = 1
+configure:18418: checking whether we are using the GNU C++ compiler
+configure:18471: result: yes
+configure:18480: checking whether g++ accepts -g
+configure:18618: result: yes
+configure:18775: checking for ld used by g++
+configure:18842: result: /usr/bin/ld
+configure:18851: checking if the linker (/usr/bin/ld) is GNU ld
+configure:18866: result: yes
+configure:18921: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
+configure:19891: result: yes
+configure:19919: g++ -c -g -O2 conftest.cpp >&5
+configure:19922: $? = 0
+configure:20104: checking for g++ option to produce PIC
+configure:20413: result: -fPIC -DPIC
+configure:20422: checking if g++ PIC flag -fPIC -DPIC works
+configure:20440: g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5
+configure:20444: $? = 0
+configure:20457: result: yes
+configure:20478: checking if g++ static flag -static works
+configure:20506: result: yes
+configure:20518: checking if g++ supports -c -o file.o
+configure:20539: g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5
+configure:20543: $? = 0
+configure:20565: result: yes
+configure:20570: checking if g++ supports -c -o file.o
+configure:20617: result: yes
+configure:20647: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
+configure:20673: result: yes
+configure:20810: checking dynamic linker characteristics
+configure:21201: g++ -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.cpp -lnsl >&5
+configure:21208: $? = 0
+configure:21441: result: GNU/Linux ld.so
+configure:21492: checking how to hardcode library paths into programs
+configure:21517: result: immediate
+configure:21571: checking whether to build Perl bindings to C API
+configure:21578: result: no
+configure:21588: checking whether to build Perl compatibility API
+configure:21595: result: no
+configure:21624: checking for perl
+configure:21642: found /usr/bin/perl
+configure:21655: result: /usr/bin/perl
+configure:21677: checking whether to build PHP bindings to C API
+configure:21684: result: no
+configure:21704: checking for php5
+configure:21737: result: no
+configure:21704: checking for php
+configure:21737: result: no
+configure:21763: checking whether to build PostgreSQL bindings to C API
+configure:21770: result: no
+configure:21790: checking for pg_config
+configure:21823: result: no
+configure:21952: creating ./config.status
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by config.status, which was
+generated by GNU Autoconf 2.62 (OpenPKG-CURRENT). Invocation command line was
+
+ CONFIG_FILES =
+ CONFIG_HEADERS =
+ CONFIG_LINKS =
+ CONFIG_COMMANDS =
+ $ ./config.status
+
+on zenju-desktop
+
+config.status:1053: creating Makefile
+config.status:1053: creating uuid-config
+config.status:1053: creating uuid.pc
+config.status:1053: creating uuid.h
+config.status:1053: creating config.h
+config.status:1264: config.h is unchanged
+config.status:1282: executing libtool commands
+config.status:1282: executing adjustment commands
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_build=i686-pc-linux-gnu
+ac_cv_c_compiler_gnu=yes
+ac_cv_compiler_option_pipe=yes
+ac_cv_cxx_compiler_gnu=yes
+ac_cv_env_CCC_set=
+ac_cv_env_CCC_value=
+ac_cv_env_CC_set=
+ac_cv_env_CC_value=
+ac_cv_env_CFLAGS_set=
+ac_cv_env_CFLAGS_value=
+ac_cv_env_CPPFLAGS_set=
+ac_cv_env_CPPFLAGS_value=
+ac_cv_env_CPP_set=
+ac_cv_env_CPP_value=
+ac_cv_env_CXXCPP_set=
+ac_cv_env_CXXCPP_value=
+ac_cv_env_CXXFLAGS_set=
+ac_cv_env_CXXFLAGS_value=
+ac_cv_env_CXX_set=
+ac_cv_env_CXX_value=
+ac_cv_env_LDFLAGS_set=
+ac_cv_env_LDFLAGS_value=
+ac_cv_env_LIBS_set=
+ac_cv_env_LIBS_value=
+ac_cv_env_build_alias_set=
+ac_cv_env_build_alias_value=
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_func_Sleep=no
+ac_cv_func_clock_gettime=no
+ac_cv_func_getifaddrs=yes
+ac_cv_func_gettimeofday=yes
+ac_cv_func_nanosleep=yes
+ac_cv_header_arpa_inet_h=yes
+ac_cv_header_dlfcn_h=yes
+ac_cv_header_ifaddrs_h=yes
+ac_cv_header_inttypes_h=yes
+ac_cv_header_memory_h=yes
+ac_cv_header_net_if_arp_h=yes
+ac_cv_header_net_if_dl_h=no
+ac_cv_header_net_if_h=yes
+ac_cv_header_netdb_h=yes
+ac_cv_header_netinet_in_h=yes
+ac_cv_header_stdc=yes
+ac_cv_header_stdint_h=yes
+ac_cv_header_stdlib_h=yes
+ac_cv_header_string_h=yes
+ac_cv_header_strings_h=yes
+ac_cv_header_sys_ioctl_h=yes
+ac_cv_header_sys_param_h=yes
+ac_cv_header_sys_select_h=yes
+ac_cv_header_sys_socket_h=yes
+ac_cv_header_sys_sockio_h=no
+ac_cv_header_sys_stat_h=yes
+ac_cv_header_sys_time_h=yes
+ac_cv_header_sys_types_h=yes
+ac_cv_header_unistd_h=yes
+ac_cv_host=i686-pc-linux-gnu
+ac_cv_lib_nsl_gethostname=yes
+ac_cv_lib_socket_accept=no
+ac_cv_objext=o
+ac_cv_path_EGREP='/bin/grep -E'
+ac_cv_path_FGREP='/bin/grep -F'
+ac_cv_path_GREP=/bin/grep
+ac_cv_path_PERL=/usr/bin/perl
+ac_cv_path_SED=/bin/sed
+ac_cv_prog_CPP='gcc -E'
+ac_cv_prog_CXXCPP='g++ -E'
+ac_cv_prog_ac_ct_AR=ar
+ac_cv_prog_ac_ct_CC=gcc
+ac_cv_prog_ac_ct_CXX=g++
+ac_cv_prog_ac_ct_RANLIB=ranlib
+ac_cv_prog_ac_ct_STRIP=strip
+ac_cv_prog_cc_c89=
+ac_cv_prog_cc_g=yes
+ac_cv_prog_cxx_g=yes
+ac_cv_prog_make_make_set=yes
+ac_cv_sizeof_char=1
+ac_cv_sizeof_int=4
+ac_cv_sizeof_long=4
+ac_cv_sizeof_long_long=8
+ac_cv_sizeof_short=2
+ac_cv_sizeof_unsigned_char=1
+ac_cv_sizeof_unsigned_int=4
+ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
+ac_cv_sizeof_unsigned_short=2
+ac_cv_type_long_double=yes
+ac_cv_type_long_long=yes
+ac_cv_va_copy=C99
+ac_cv_with_cxx=yes
+ac_cv_with_dce=no
+ac_cv_with_perl=no
+ac_cv_with_perl_compat=no
+ac_cv_with_pgsql=no
+ac_cv_with_php=no
+lt_cv_deplibs_check_method=pass_all
+lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_ld_reload_flag=-r
+lt_cv_nm_interface='BSD nm'
+lt_cv_objdir=.libs
+lt_cv_path_LD=/usr/bin/ld
+lt_cv_path_LDCXX=/usr/bin/ld
+lt_cv_path_NM='/usr/bin/nm -B'
+lt_cv_prog_compiler_c_o=yes
+lt_cv_prog_compiler_c_o_CXX=yes
+lt_cv_prog_compiler_pic_works=yes
+lt_cv_prog_compiler_pic_works_CXX=yes
+lt_cv_prog_compiler_rtti_exceptions=no
+lt_cv_prog_compiler_static_works=yes
+lt_cv_prog_compiler_static_works_CXX=yes
+lt_cv_prog_gnu_ld=yes
+lt_cv_prog_gnu_ldcxx=yes
+lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'''
+lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\'''
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\'''
+lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
+lt_cv_sys_max_cmd_len=805306365
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+AR='ar'
+CC='gcc'
+CFLAGS='-O2 -pipe'
+CPP='gcc -E'
+CPPFLAGS=''
+CXX='g++'
+CXXCPP='g++ -E'
+CXXFLAGS='-g -O2'
+CXX_NAME='$(CXX_NAME)'
+DCE_NAME=''
+DEFS='-DHAVE_CONFIG_H'
+DSYMUTIL=''
+DUMPBIN=''
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+EGREP='/bin/grep -E'
+EXEEXT=''
+FGREP='/bin/grep -F'
+GREP='/bin/grep'
+LD='/usr/bin/ld'
+LDFLAGS=''
+LIBOBJS=''
+LIBS='-lnsl '
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LIPO=''
+LN_S='cp -p'
+LTLIBOBJS=''
+NM='/usr/bin/nm -B'
+NMEDIT=''
+OBJEXT='o'
+OTOOL64=''
+OTOOL=''
+PACKAGE_BUGREPORT=''
+PACKAGE_NAME=''
+PACKAGE_STRING=''
+PACKAGE_TARNAME=''
+PACKAGE_VERSION=''
+PATH_SEPARATOR=':'
+PERL='/usr/bin/perl'
+PERL_NAME=''
+PGSQL_NAME=''
+PG_CONFIG='NA'
+PHP='NA'
+PHP_NAME=''
+RANLIB='ranlib'
+SED='/bin/sed'
+SET_MAKE=''
+SHELL='/bin/bash'
+STRIP='strip'
+UUID_VERSION_HEX='0x106202'
+UUID_VERSION_RAW='1.6.2'
+UUID_VERSION_STR='1.6.2 (04-Jul-2008)'
+WITH_CXX='yes'
+WITH_DCE='no'
+WITH_PERL='no'
+WITH_PERL_COMPAT='0'
+WITH_PGSQL='no'
+WITH_PHP='no'
+ac_ct_CC='gcc'
+ac_ct_CXX='g++'
+ac_ct_DUMPBIN=''
+bindir='${exec_prefix}/bin'
+build='i686-pc-linux-gnu'
+build_alias=''
+build_cpu='i686'
+build_os='linux-gnu'
+build_vendor='pc'
+datadir='${datarootdir}'
+datarootdir='${prefix}/share'
+docdir='${datarootdir}/doc/${PACKAGE}'
+dvidir='${docdir}'
+exec_prefix='${prefix}'
+host='i686-pc-linux-gnu'
+host_alias=''
+host_cpu='i686'
+host_os='linux-gnu'
+host_vendor='pc'
+htmldir='${docdir}'
+includedir='${prefix}/include'
+infodir='${datarootdir}/info'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localedir='${datarootdir}/locale'
+localstatedir='${prefix}/var'
+lt_ECHO='echo'
+mandir='${datarootdir}/man'
+oldincludedir='/usr/include'
+pdfdir='${docdir}'
+prefix='/usr/local'
+program_transform_name='s,x,x,'
+psdir='${docdir}'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='${prefix}/etc'
+target_alias=''
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+#define PACKAGE_NAME ""
+#define PACKAGE_TARNAME ""
+#define PACKAGE_VERSION ""
+#define PACKAGE_STRING ""
+#define PACKAGE_BUGREPORT ""
+#define STDC_HEADERS 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_DLFCN_H 1
+#define LT_OBJDIR ".libs/"
+#define HAVE_LIBNSL 1
+#define HAVE_VA_COPY 1
+#define __VA_COPY_USE __VA_COPY_USE_C99
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_NETDB_H 1
+#define HAVE_IFADDRS_H 1
+#define HAVE_NET_IF_H 1
+#define HAVE_NET_IF_ARP_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_STRUCT_TIMEVAL 1
+#define HAVE_GETIFADDRS 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_LONG_LONG 1
+#define HAVE_LONG_DOUBLE 1
+#define SIZEOF_CHAR 1
+#define SIZEOF_UNSIGNED_CHAR 1
+#define SIZEOF_SHORT 2
+#define SIZEOF_UNSIGNED_SHORT 2
+#define SIZEOF_INT 4
+#define SIZEOF_UNSIGNED_INT 4
+#define SIZEOF_LONG 4
+#define SIZEOF_UNSIGNED_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF_UNSIGNED_LONG_LONG 8
+#define WITH_CXX 1
+
+configure: exit 0
diff --git a/shared/ossp_uuid/config.status b/shared/ossp_uuid/config.status
new file mode 100644
index 00000000..6d201b5b
--- /dev/null
+++ b/shared/ossp_uuid/config.status
@@ -0,0 +1,2094 @@
+#! /bin/bash
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=${CONFIG_SHELL-/bin/bash}
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.62 (OpenPKG-CURRENT). Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+# Files that config.status was made for.
+config_files=" Makefile uuid-config uuid.pc uuid.h"
+config_headers=" config.h"
+config_commands=" libtool adjustment"
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+ac_cs_version="\
+config.status
+configured by ./configure, generated by GNU Autoconf 2.62 (OpenPKG-CURRENT),
+ with options \"'--with-cxx' '--disable-shared'\"
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='/home/zenju/Desktop/FreeFileSync/shared/ossp_uuid'
+srcdir='.'
+test -n "$AWK" || AWK=awk
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+if $ac_cs_recheck; then
+ set X '/bin/bash' './configure' '--with-cxx' '--disable-shared' $ac_configure_extra_args --no-create --no-recursion
+ shift
+ $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
+ CONFIG_SHELL='/bin/bash'
+ export CONFIG_SHELL
+ exec "$@"
+fi
+
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+#
+# INIT-COMMANDS
+#
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+macro_version='2.2.4'
+macro_revision='1.2976'
+enable_shared='no'
+enable_static='yes'
+pic_mode='default'
+enable_fast_install='needless'
+host_alias=''
+host='i686-pc-linux-gnu'
+host_os='linux-gnu'
+build_alias=''
+build='i686-pc-linux-gnu'
+build_os='linux-gnu'
+SED='/bin/sed'
+Xsed='/bin/sed -e 1s/^X//'
+GREP='/bin/grep'
+EGREP='/bin/grep -E'
+FGREP='/bin/grep -F'
+LD='/usr/bin/ld'
+NM='/usr/bin/nm -B'
+LN_S='cp -p'
+max_cmd_len='805306365'
+ac_objext='o'
+exeext=''
+lt_unset='unset'
+lt_SP2NL='tr \040 \012'
+lt_NL2SP='tr \015\012 \040\040'
+reload_flag=' -r'
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+deplibs_check_method='pass_all'
+file_magic_cmd='$MAGIC_CMD'
+AR='ar'
+AR_FLAGS='cru'
+STRIP='strip'
+RANLIB='ranlib'
+old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $oldlib'
+old_postuninstall_cmds=''
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $oldlib'
+CC='gcc'
+CFLAGS='-O2 -pipe'
+compiler='g++'
+GCC='yes'
+lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'''
+lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
+lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\'''
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\'''
+objdir='.libs'
+SHELL='/bin/bash'
+ECHO='echo'
+MAGIC_CMD='file'
+lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+lt_prog_compiler_wl='-Wl,'
+lt_prog_compiler_pic=' -fPIC -DPIC'
+lt_prog_compiler_static='-static'
+lt_cv_prog_compiler_c_o='yes'
+need_locks='no'
+DSYMUTIL=''
+NMEDIT=''
+LIPO=''
+OTOOL=''
+OTOOL64=''
+libext='a'
+shrext_cmds='.so'
+extract_expsyms_cmds=''
+archive_cmds_need_lc='yes'
+enable_shared_with_static_runtimes='no'
+export_dynamic_flag_spec='${wl}--export-dynamic'
+whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+compiler_needs_object='no'
+old_archive_from_new_cmds=''
+old_archive_from_expsyms_cmds=''
+archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+module_cmds=''
+module_expsym_cmds=''
+with_gnu_ld='yes'
+allow_undefined_flag=''
+no_undefined_flag=''
+hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+hardcode_libdir_flag_spec_ld=''
+hardcode_libdir_separator=''
+hardcode_direct='no'
+hardcode_direct_absolute='no'
+hardcode_minus_L='no'
+hardcode_shlibpath_var='unsupported'
+hardcode_automatic='no'
+inherit_rpath='no'
+link_all_deplibs='unknown'
+fix_srcfile_path=''
+always_export_symbols='no'
+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+include_expsyms=''
+prelink_cmds=''
+file_list_spec=''
+variables_saved_for_relink='PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH'
+need_lib_prefix='no'
+need_version='no'
+version_type='linux'
+runpath_var='LD_RUN_PATH'
+shlibpath_var='LD_LIBRARY_PATH'
+shlibpath_overrides_runpath='no'
+libname_spec='lib$name'
+library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+soname_spec='${libname}${release}${shared_ext}$major'
+postinstall_cmds=''
+postuninstall_cmds=''
+finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+finish_eval=''
+hardcode_into_libs='yes'
+sys_lib_search_path_spec='/usr/lib/gcc/i486-linux-gnu/4.4.3 /usr/lib /lib /usr/lib/i486-linux-gnu'
+sys_lib_dlsearch_path_spec='/lib /usr/lib /usr/lib/mesa /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/lib/alsa-lib /usr/local/lib '
+hardcode_action='immediate'
+enable_dlopen='unknown'
+enable_dlopen_self='unknown'
+enable_dlopen_self_static='unknown'
+old_striplib='strip --strip-debug'
+striplib='strip --strip-unneeded'
+compiler_lib_search_dirs=''
+predep_objects=''
+postdep_objects=''
+predeps=''
+postdeps=''
+compiler_lib_search_path=''
+LD_CXX='/usr/bin/ld'
+old_archive_cmds_CXX='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $oldlib'
+compiler_CXX='g++'
+GCC_CXX='yes'
+lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+lt_prog_compiler_wl_CXX='-Wl,'
+lt_prog_compiler_pic_CXX=' -fPIC -DPIC'
+lt_prog_compiler_static_CXX='-static'
+lt_cv_prog_compiler_c_o_CXX='yes'
+archive_cmds_need_lc_CXX='no'
+enable_shared_with_static_runtimes_CXX='no'
+export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+compiler_needs_object_CXX='no'
+old_archive_from_new_cmds_CXX=''
+old_archive_from_expsyms_cmds_CXX=''
+archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+module_cmds_CXX=''
+module_expsym_cmds_CXX=''
+with_gnu_ld_CXX='yes'
+allow_undefined_flag_CXX=''
+no_undefined_flag_CXX=''
+hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+hardcode_libdir_flag_spec_ld_CXX=''
+hardcode_libdir_separator_CXX=''
+hardcode_direct_CXX='no'
+hardcode_direct_absolute_CXX='no'
+hardcode_minus_L_CXX='no'
+hardcode_shlibpath_var_CXX='unsupported'
+hardcode_automatic_CXX='no'
+inherit_rpath_CXX='no'
+link_all_deplibs_CXX='unknown'
+fix_srcfile_path_CXX=''
+always_export_symbols_CXX='no'
+export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+include_expsyms_CXX=''
+prelink_cmds_CXX=''
+file_list_spec_CXX=''
+hardcode_action_CXX='immediate'
+compiler_lib_search_dirs_CXX='/usr/lib/gcc/i486-linux-gnu/4.4.3 /usr/lib/gcc/i486-linux-gnu/4.4.3 /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib /lib/../lib /usr/lib/../lib /usr/lib/gcc/i486-linux-gnu/4.4.3/../../.. /usr/lib/i486-linux-gnu'
+predep_objects_CXX='/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.4.3/crtbeginS.o'
+postdep_objects_CXX='/usr/lib/gcc/i486-linux-gnu/4.4.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crtn.o'
+predeps_CXX=''
+postdeps_CXX='-lstdc++ -lm -lgcc_s -lc -lgcc_s'
+compiler_lib_search_path_CXX='-L/usr/lib/gcc/i486-linux-gnu/4.4.3 -L/usr/lib/gcc/i486-linux-gnu/4.4.3 -L/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.4.3/../../.. -L/usr/lib/i486-linux-gnu'
+
+LTCC='gcc'
+LTCFLAGS='-O2 -pipe'
+compiler='gcc'
+
+# Quote evaled strings.
+for var in SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag deplibs_check_method file_magic_cmd AR AR_FLAGS STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix SHELL ECHO lt_prog_compiler_no_builtin_flag lt_prog_compiler_wl lt_prog_compiler_pic lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_flag_spec_ld hardcode_libdir_separator fix_srcfile_path exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec finish_eval old_striplib striplib compiler_lib_search_dirs predep_objects postdep_objects predeps postdeps compiler_lib_search_path LD_CXX compiler_CXX lt_prog_compiler_no_builtin_flag_CXX lt_prog_compiler_wl_CXX lt_prog_compiler_pic_CXX lt_prog_compiler_static_CXX lt_cv_prog_compiler_c_o_CXX export_dynamic_flag_spec_CXX whole_archive_flag_spec_CXX compiler_needs_object_CXX with_gnu_ld_CXX allow_undefined_flag_CXX no_undefined_flag_CXX hardcode_libdir_flag_spec_CXX hardcode_libdir_flag_spec_ld_CXX hardcode_libdir_separator_CXX fix_srcfile_path_CXX exclude_expsyms_CXX include_expsyms_CXX file_list_spec_CXX compiler_lib_search_dirs_CXX predep_objects_CXX postdep_objects_CXX predeps_CXX postdeps_CXX compiler_lib_search_path_CXX; do
+ case `eval \\$ECHO "X\\$$var"` in
+ *[\\\`\"\$]*)
+ eval "lt_$var=\\\"\`\$ECHO \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=\\\"\$$var\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec sys_lib_dlsearch_path_spec old_archive_cmds_CXX old_archive_from_new_cmds_CXX old_archive_from_expsyms_cmds_CXX archive_cmds_CXX archive_expsym_cmds_CXX module_cmds_CXX module_expsym_cmds_CXX export_symbols_cmds_CXX prelink_cmds_CXX; do
+ case `eval \\$ECHO "X\\$$var"` in
+ *[\\\`\"\$]*)
+ eval "lt_$var=\\\"\`\$ECHO \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=\\\"\$$var\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case $lt_ECHO in
+*'\$0 --fallback-echo"') lt_ECHO=`$ECHO "X$lt_ECHO" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+ ;;
+esac
+
+ac_aux_dir='.'
+xsi_shell='yes'
+lt_shell_append='yes'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE=''
+ VERSION=''
+ TIMESTAMP=''
+ RM='rm -f'
+ ofile='libtool'
+
+
+
+
+
+
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "uuid-config") CONFIG_FILES="$CONFIG_FILES uuid-config" ;;
+ "uuid.pc") CONFIG_FILES="$CONFIG_FILES uuid.pc" ;;
+ "uuid.h") CONFIG_FILES="$CONFIG_FILES uuid.h" ;;
+ "adjustment") CONFIG_COMMANDS="$CONFIG_COMMANDS adjustment" ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+cat >>"$tmp/subs1.awk" <<\_ACAWK &&
+S["SHELL"]="/bin/bash"
+S["PATH_SEPARATOR"]=":"
+S["PACKAGE_NAME"]=""
+S["PACKAGE_TARNAME"]=""
+S["PACKAGE_VERSION"]=""
+S["PACKAGE_STRING"]=""
+S["PACKAGE_BUGREPORT"]=""
+S["exec_prefix"]="${prefix}"
+S["prefix"]="/usr/local"
+S["program_transform_name"]="s,x,x,"
+S["bindir"]="${exec_prefix}/bin"
+S["sbindir"]="${exec_prefix}/sbin"
+S["libexecdir"]="${exec_prefix}/libexec"
+S["datarootdir"]="${prefix}/share"
+S["datadir"]="${datarootdir}"
+S["sysconfdir"]="${prefix}/etc"
+S["sharedstatedir"]="${prefix}/com"
+S["localstatedir"]="${prefix}/var"
+S["includedir"]="${prefix}/include"
+S["oldincludedir"]="/usr/include"
+S["docdir"]="${datarootdir}/doc/${PACKAGE}"
+S["infodir"]="${datarootdir}/info"
+S["htmldir"]="${docdir}"
+S["dvidir"]="${docdir}"
+S["pdfdir"]="${docdir}"
+S["psdir"]="${docdir}"
+S["libdir"]="${exec_prefix}/lib"
+S["localedir"]="${datarootdir}/locale"
+S["mandir"]="${datarootdir}/man"
+S["DEFS"]="-DHAVE_CONFIG_H"
+S["ECHO_C"]=""
+S["ECHO_N"]="-n"
+S["ECHO_T"]=""
+S["LIBS"]="-lnsl "
+S["build_alias"]=""
+S["host_alias"]=""
+S["target_alias"]=""
+S["UUID_VERSION_RAW"]="1.6.2"
+S["UUID_VERSION_STR"]="1.6.2 (04-Jul-2008)"
+S["UUID_VERSION_HEX"]="0x106202"
+S["SET_MAKE"]=""
+S["CC"]="gcc"
+S["CFLAGS"]="-O2 -pipe"
+S["LDFLAGS"]=""
+S["CPPFLAGS"]=""
+S["ac_ct_CC"]="gcc"
+S["EXEEXT"]=""
+S["OBJEXT"]="o"
+S["CPP"]="gcc -E"
+S["GREP"]="/bin/grep"
+S["EGREP"]="/bin/grep -E"
+S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool"
+S["build"]="i686-pc-linux-gnu"
+S["build_cpu"]="i686"
+S["build_vendor"]="pc"
+S["build_os"]="linux-gnu"
+S["host"]="i686-pc-linux-gnu"
+S["host_cpu"]="i686"
+S["host_vendor"]="pc"
+S["host_os"]="linux-gnu"
+S["SED"]="/bin/sed"
+S["FGREP"]="/bin/grep -F"
+S["LD"]="/usr/bin/ld"
+S["DUMPBIN"]=""
+S["ac_ct_DUMPBIN"]=""
+S["NM"]="/usr/bin/nm -B"
+S["LN_S"]="cp -p"
+S["AR"]="ar"
+S["STRIP"]="strip"
+S["RANLIB"]="ranlib"
+S["lt_ECHO"]="echo"
+S["DSYMUTIL"]=""
+S["NMEDIT"]=""
+S["LIPO"]=""
+S["OTOOL"]=""
+S["OTOOL64"]=""
+S["WITH_DCE"]="no"
+S["DCE_NAME"]=""
+S["CXX"]="g++"
+S["CXXFLAGS"]="-g -O2"
+S["ac_ct_CXX"]="g++"
+S["CXXCPP"]="g++ -E"
+S["CXX_NAME"]="$(CXX_NAME)"
+S["WITH_CXX"]="yes"
+S["PERL_NAME"]=""
+S["WITH_PERL"]="no"
+S["WITH_PERL_COMPAT"]="0"
+S["PERL"]="/usr/bin/perl"
+S["PHP_NAME"]=""
+S["WITH_PHP"]="no"
+S["PHP"]="NA"
+S["PGSQL_NAME"]=""
+S["WITH_PGSQL"]="no"
+S["PG_CONFIG"]="NA"
+S["LIBOBJS"]=""
+S["LTLIBOBJS"]=""
+_ACAWK
+cat >>"$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+D["PACKAGE_NAME"]=" \"\""
+D["PACKAGE_TARNAME"]=" \"\""
+D["PACKAGE_VERSION"]=" \"\""
+D["PACKAGE_STRING"]=" \"\""
+D["PACKAGE_BUGREPORT"]=" \"\""
+D["STDC_HEADERS"]=" 1"
+D["HAVE_SYS_TYPES_H"]=" 1"
+D["HAVE_SYS_STAT_H"]=" 1"
+D["HAVE_STDLIB_H"]=" 1"
+D["HAVE_STRING_H"]=" 1"
+D["HAVE_MEMORY_H"]=" 1"
+D["HAVE_STRINGS_H"]=" 1"
+D["HAVE_INTTYPES_H"]=" 1"
+D["HAVE_STDINT_H"]=" 1"
+D["HAVE_UNISTD_H"]=" 1"
+D["HAVE_DLFCN_H"]=" 1"
+D["LT_OBJDIR"]=" \".libs/\""
+D["HAVE_LIBNSL"]=" 1"
+D["HAVE_VA_COPY"]=" 1"
+D["__VA_COPY_USE"]=" __VA_COPY_USE_C99"
+D["HAVE_SYS_TYPES_H"]=" 1"
+D["HAVE_SYS_PARAM_H"]=" 1"
+D["HAVE_SYS_TIME_H"]=" 1"
+D["HAVE_SYS_SOCKET_H"]=" 1"
+D["HAVE_SYS_IOCTL_H"]=" 1"
+D["HAVE_SYS_SELECT_H"]=" 1"
+D["HAVE_NETDB_H"]=" 1"
+D["HAVE_IFADDRS_H"]=" 1"
+D["HAVE_NET_IF_H"]=" 1"
+D["HAVE_NET_IF_ARP_H"]=" 1"
+D["HAVE_NETINET_IN_H"]=" 1"
+D["HAVE_ARPA_INET_H"]=" 1"
+D["HAVE_STRUCT_TIMEVAL"]=" 1"
+D["HAVE_GETIFADDRS"]=" 1"
+D["HAVE_NANOSLEEP"]=" 1"
+D["HAVE_GETTIMEOFDAY"]=" 1"
+D["HAVE_LONG_LONG"]=" 1"
+D["HAVE_LONG_DOUBLE"]=" 1"
+D["SIZEOF_CHAR"]=" 1"
+D["SIZEOF_UNSIGNED_CHAR"]=" 1"
+D["SIZEOF_SHORT"]=" 2"
+D["SIZEOF_UNSIGNED_SHORT"]=" 2"
+D["SIZEOF_INT"]=" 4"
+D["SIZEOF_UNSIGNED_INT"]=" 4"
+D["SIZEOF_LONG"]=" 4"
+D["SIZEOF_UNSIGNED_LONG"]=" 4"
+D["SIZEOF_LONG_LONG"]=" 8"
+D["SIZEOF_UNSIGNED_LONG_LONG"]=" 8"
+D["WITH_CXX"]=" 1"
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ {
+ line = $ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", line, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+ { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ ac_datarootdir_hack='
+ s&@datadir@&${datarootdir}&g
+ s&@docdir@&${datarootdir}/doc/${PACKAGE}&g
+ s&@infodir@&${datarootdir}/info&g
+ s&@localedir@&${datarootdir}/locale&g
+ s&@mandir@&${datarootdir}/man&g
+ s&\${datarootdir}&${prefix}/share&g' ;;
+esac
+ac_sed_extra="/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}
+
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ ;;
+
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+ "adjustment":C) chmod a-w uuid.h; chmod a+x uuid-config ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
diff --git a/shared/ossp_uuid/libtool b/shared/ossp_uuid/libtool
new file mode 100644
index 00000000..8ae4b19b
--- /dev/null
+++ b/shared/ossp_uuid/libtool
@@ -0,0 +1,8521 @@
+#! /bin/bash
+
+# libtool - Provide generalized library-building support services.
+# Generated automatically by config.status ()
+# Libtool was configured on host zenju-desktop:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=2.2.4
+macro_revision=1.2976
+
+# Whether or not to build shared libraries.
+build_libtool_libs=no
+
+# Whether or not to build static libraries.
+build_old_libs=yes
+
+# What type of objects to build.
+pic_mode=default
+
+# Whether or not to optimize for fast installation.
+fast_install=needless
+
+# The host system.
+host_alias=
+host=i686-pc-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=i686-pc-linux-gnu
+build_os=linux-gnu
+
+# A sed program that does not truncate output.
+SED="/bin/sed"
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP="/bin/grep"
+
+# An ERE matcher.
+EGREP="/bin/grep -E"
+
+# A literal string matcher.
+FGREP="/bin/grep -F"
+
+# A BSD- or MS-compatible name lister.
+NM="/usr/bin/nm -B"
+
+# Whether we need soft or hard links.
+LN_S="cp -p"
+
+# What is the maximum length of a command?
+max_cmd_len=805306365
+
+# Object file suffix (normally "o").
+objext=o
+
+# Executable file suffix (normally "").
+exeext=
+
+# whether the shell understands "unset".
+lt_unset=unset
+
+# turn spaces into newlines.
+SP2NL="tr \\040 \\012"
+
+# turn newlines into spaces.
+NL2SP="tr \\015\\012 \\040\\040"
+
+# How to create reloadable object files.
+reload_flag=" -r"
+reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method="pass_all"
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd="\$MAGIC_CMD"
+
+# The archiver.
+AR="ar"
+AR_FLAGS="cru"
+
+# A symbol stripping program.
+STRIP="strip"
+
+# Commands used to install an old-style archive.
+RANLIB="ranlib"
+old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
+old_postuninstall_cmds=""
+
+# A C compiler.
+LTCC="gcc"
+
+# LTCC compiler flags.
+LTCFLAGS="-O2 -pipe"
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p'"
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"lib\\2\", (void *) \\&\\2},/p'"
+
+# The name of the directory that contains temporary libtool files.
+objdir=.libs
+
+# Shell to use when invoking shell scripts.
+SHELL="/bin/bash"
+
+# An echo program that does not interpret backslashes.
+ECHO="echo"
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=file
+
+# Must we lock files when doing compilation?
+need_locks="no"
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=""
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=""
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=""
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=""
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=""
+
+# Old archive suffix (normally "a").
+libext=a
+
+# Shared library suffix (normally ".so").
+shrext_cmds=".so"
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=""
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=no
+
+# Do we need a version for libraries?
+need_version=no
+
+# Library versioning type.
+version_type=linux
+
+# Shared library runtime path variable.
+runpath_var=LD_RUN_PATH
+
+# Shared library path variable.
+shlibpath_var=LD_LIBRARY_PATH
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=no
+
+# Format of library name prefix.
+libname_spec="lib\$name"
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
+
+# The coded name of the library, if different from the real name.
+soname_spec="\${libname}\${release}\${shared_ext}\$major"
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=""
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=""
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=""
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=yes
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.4.3 /usr/lib /lib /usr/lib/i486-linux-gnu"
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mesa /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/lib/alsa-lib /usr/local/lib "
+
+# Whether dlopen is supported.
+dlopen_support=unknown
+
+# Whether dlopen of programs is supported.
+dlopen_self=unknown
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=unknown
+
+# Commands to strip libraries.
+old_striplib="strip --strip-debug"
+striplib="strip --strip-unneeded"
+
+
+# The linker used to build libraries.
+LD="/usr/bin/ld"
+
+# Commands used to build an old-style archive.
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
+
+# A language specific compiler.
+CC="gcc"
+
+# Is the compiler the GNU compiler?
+with_gcc=yes
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC -DPIC"
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag="-static"
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=yes
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=no
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object="no"
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build a shared archive.
+archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
+ cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
+ echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
+ \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=""
+module_expsym_cmds=""
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld="yes"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=""
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist
+hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
+
+# If ld is used when linking, flag to hardcode $libdir into a binary
+# during linking. This must work even if $libdir does not exist.
+hardcode_libdir_flag_spec_ld=""
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=no
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting ${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=no
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=no
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=unsupported
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=no
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=no
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Fix the shell variable $srcfile for the compiler.
+fix_srcfile_path=""
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=""
+
+# Specify filename containing input files.
+file_list_spec=""
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=""
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=""
+postdep_objects=""
+predeps=""
+postdeps=""
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=""
+
+# ### END LIBTOOL CONFIG
+
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.4
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.2.4
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2.4
+TIMESTAMP=""
+package_revision=1.2976
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/usr/bin/grep -E"}
+: ${FGREP="/usr/bin/grep -F"}
+: ${GREP="/usr/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/opt/local/bin/gsed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ $ECHO "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ $ECHO "enable shared libraries"
+ else
+ $ECHO "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ $ECHO "enable static libraries"
+ else
+ $ECHO "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ case $host in
+ *cygwin* | *mingw* | *pw32*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $ECHO
+ $ECHO "If you ever happen to want to link against installed libraries"
+ $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+ $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $ECHO "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
+
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin*|*mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper arg
+#
+# emit a libtool wrapper script on stdout
+# don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variable
+# set therein.
+#
+# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the '.lib' directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+# end: func_emit_wrapper
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "$SHELL $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+static const char *script_text =
+EOF
+
+ func_emit_wrapper yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+
+ cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *shwrapper_name;
+ intptr_t rval = 127;
+ FILE *shwrapper;
+
+ const char *dumpscript_opt = "--lt-dump-script";
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+ /* very simple arg parsing; don't want to rely on getopt */
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<EOF
+ printf ("%s", script_text);
+ return 0;
+ }
+ }
+
+ newargz = XMALLOC (char *, argc + 2);
+EOF
+
+ if test -n "$TARGETSHELL" ; then
+ # no path translation at all
+ lt_newargv0=$TARGETSHELL
+ else
+ case "$host" in
+ *mingw* )
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ lt_newargv0=`( cmd //c echo $SHELL | $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo $SHELL`
+ case $lt_newargv0 in
+ *.exe | *.EXE) ;;
+ *) lt_newargv0=$lt_newargv0.exe ;;
+ esac
+ ;;
+ * ) lt_newargv0=$SHELL ;;
+ esac
+ fi
+
+ cat <<EOF
+ newargz[0] = (char *) xstrdup ("$lt_newargv0");
+EOF
+
+ cat <<"EOF"
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal ("Couldn't find %s", argv[0]);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+ tmp_pathspec));
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+ actual_cwrapper_path));
+ XFREE (tmp_pathspec);
+
+ shwrapper_name = (char *) xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, shwrapper_name);
+
+ /* shwrapper_name transforms */
+ strendzap (shwrapper_name, ".exe");
+ tmp_pathspec = XMALLOC (char, (strlen (shwrapper_name) +
+ strlen ("_ltshwrapperTMP") + 1));
+ strcpy (tmp_pathspec, shwrapper_name);
+ strcat (tmp_pathspec, "_ltshwrapperTMP");
+ XFREE (shwrapper_name);
+ shwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+ LTWRAPPER_DEBUGPRINTF (("(main) libtool shell wrapper name: %s\n",
+ shwrapper_name));
+EOF
+
+ cat <<EOF
+ newargz[1] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (shwrapper_name) + 1));
+ strcpy (newargz[1], actual_cwrapper_path);
+ strcat (newargz[1], "$objdir");
+ strcat (newargz[1], "/");
+ strcat (newargz[1], shwrapper_name);
+EOF
+
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[1], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (shwrapper_name);
+ XFREE (actual_cwrapper_path);
+
+ /* always write in binary mode */
+ if ((shwrapper = fopen (newargz[1], FOPEN_WB)) == 0)
+ {
+ lt_fatal ("Could not open %s for writing", newargz[1]);
+ }
+ fprintf (shwrapper, "%s", script_text);
+ fclose (shwrapper);
+
+ make_executable (newargz[1]);
+
+ for (i = 1; i < argc; i++)
+ newargz[i + 1] = xstrdup (argv[i]);
+ newargz[argc + 1] = NULL;
+
+ for (i = 0; i < argc + 1; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<EOF
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, "$lt_newargv0", (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"$lt_newargv0\": errno = %d\n", errno));
+ return 127;
+ }
+ return rval;
+}
+EOF
+ ;;
+ *)
+ cat <<EOF
+ execv ("$lt_newargv0", newargz);
+ return rval; /* =127, but avoids unused variable warning */
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+ tmp_pathspec));
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("Could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which I believe you do not have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ $ECHO "*** make it link in! You will probably need to install it or some"
+ $ECHO "*** library that it depends on before this library will be fully"
+ $ECHO "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $ECHO "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $ECHO "*** The inter-library dependencies that have been dropped here will be"
+ $ECHO "*** automatically added whenever a program is linked with this library"
+ $ECHO "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $ECHO
+ $ECHO "*** Since this library must not contain undefined symbols,"
+ $ECHO "*** because either the platform does not support them or"
+ $ECHO "*** it was explicitly requested with -no-undefined,"
+ $ECHO "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=$obj
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD="/usr/bin/ld"
+
+# Commands used to build an old-style archive.
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
+
+# A language specific compiler.
+CC="g++"
+
+# Is the compiler the GNU compiler?
+with_gcc=yes
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC -DPIC"
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag="-static"
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=no
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=no
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object="no"
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build a shared archive.
+archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=""
+module_expsym_cmds=""
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld="yes"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=""
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist
+hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
+
+# If ld is used when linking, flag to hardcode $libdir into a binary
+# during linking. This must work even if $libdir does not exist.
+hardcode_libdir_flag_spec_ld=""
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=no
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting ${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=no
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=no
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=unsupported
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=no
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=no
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Fix the shell variable $srcfile for the compiler.
+fix_srcfile_path=""
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=""
+
+# Specify filename containing input files.
+file_list_spec=""
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs="/usr/lib/gcc/i486-linux-gnu/4.4.3 /usr/lib/gcc/i486-linux-gnu/4.4.3 /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib /lib/../lib /usr/lib/../lib /usr/lib/gcc/i486-linux-gnu/4.4.3/../../.. /usr/lib/i486-linux-gnu"
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects="/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.4.3/crtbeginS.o"
+postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.4.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crtn.o"
+predeps=""
+postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path="-L/usr/lib/gcc/i486-linux-gnu/4.4.3 -L/usr/lib/gcc/i486-linux-gnu/4.4.3 -L/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.4.3/../../.. -L/usr/lib/i486-linux-gnu"
+
+# ### END LIBTOOL TAG CONFIG: CXX
diff --git a/shared/ossp_uuid/libuuid++.la b/shared/ossp_uuid/libuuid++.la
new file mode 100644
index 00000000..d48c6189
--- /dev/null
+++ b/shared/ossp_uuid/libuuid++.la
@@ -0,0 +1,41 @@
+# libuuid++.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libuuid++.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libuuid++.
+current=16
+age=0
+revision=22
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/shared/ossp_uuid/libuuid.la b/shared/ossp_uuid/libuuid.la
new file mode 100644
index 00000000..8cd05ef9
--- /dev/null
+++ b/shared/ossp_uuid/libuuid.la
@@ -0,0 +1,41 @@
+# libuuid.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libuuid.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libuuid.
+current=16
+age=0
+revision=22
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/shared/ossp_uuid/uuid b/shared/ossp_uuid/uuid
new file mode 100644
index 00000000..1261351c
--- /dev/null
+++ b/shared/ossp_uuid/uuid
Binary files differ
diff --git a/shared/ossp_uuid/uuid++.lo b/shared/ossp_uuid/uuid++.lo
new file mode 100644
index 00000000..941355dc
--- /dev/null
+++ b/shared/ossp_uuid/uuid++.lo
@@ -0,0 +1,12 @@
+# uuid++.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid++.o'
+
diff --git a/shared/ossp_uuid/uuid++.o b/shared/ossp_uuid/uuid++.o
new file mode 100644
index 00000000..7ab5f66c
--- /dev/null
+++ b/shared/ossp_uuid/uuid++.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid-config b/shared/ossp_uuid/uuid-config
new file mode 100644
index 00000000..f01cf3d9
--- /dev/null
+++ b/shared/ossp_uuid/uuid-config
@@ -0,0 +1,145 @@
+#!/bin/sh
+##
+## OSSP uuid - Universally Unique Identifier
+## Copyright (c) 2004-2008 Ralf S. Engelschall <rse@engelschall.com>
+## Copyright (c) 2004-2008 The OSSP Project <http://www.ossp.org/>
+##
+## This file is part of OSSP uuid, a library for the generation
+## of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+## uuid-config.in: library build utility
+##
+
+DIFS='
+'
+
+prefix="/usr/local"
+exec_prefix="${prefix}"
+datarootdir="${prefix}/share"
+
+uuid_prefix="$prefix"
+uuid_exec_prefix="$exec_prefix"
+uuid_bindir="${exec_prefix}/bin"
+uuid_libdir="${exec_prefix}/lib"
+uuid_includedir="${prefix}/include"
+uuid_mandir="${datarootdir}/man"
+uuid_datadir="${datarootdir}"
+uuid_acdir="${datarootdir}/aclocal"
+uuid_cflags="-O2 -pipe"
+uuid_ldflags=""
+uuid_libs="-lnsl "
+uuid_version="1.6.2 (04-Jul-2008)"
+
+help=no
+version=no
+
+usage="uuid-config"
+usage="$usage [--help] [--version] [--all]"
+usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]"
+usage="$usage [--cflags] [--ldflags] [--libs]"
+if [ $# -eq 0 ]; then
+ echo "uuid-config:Error: Invalid option" 1>&2
+ echo "uuid-config:Usage: $usage" 1>&2
+ exit 1
+fi
+output=''
+output_extra=''
+all=no
+prev=''
+OIFS="$IFS" IFS="$DIFS"
+for option
+do
+ if [ ".$prev" != . ]; then
+ eval "$prev=\$option"
+ prev=''
+ continue
+ fi
+ case "$option" in
+ -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg='' ;;
+ esac
+ case "$option" in
+ --help|-h)
+ echo "Usage: $usage"
+ exit 0
+ ;;
+ --version|-v)
+ echo "OSSP uuid $uuid_version"
+ exit 0
+ ;;
+ --all)
+ all=yes
+ ;;
+ --prefix)
+ output="$output $uuid_prefix"
+ ;;
+ --exec-prefix)
+ output="$output $uuid_exec_prefix"
+ ;;
+ --bindir)
+ output="$output $uuid_bindir"
+ ;;
+ --libdir)
+ output="$output $uuid_libdir"
+ ;;
+ --includedir)
+ output="$output $uuid_includedir"
+ ;;
+ --mandir)
+ output="$output $uuid_mandir"
+ ;;
+ --datadir)
+ output="$output $uuid_datadir"
+ ;;
+ --acdir)
+ output="$output $uuid_acdir"
+ ;;
+ --cflags)
+ output="$output -I$uuid_includedir"
+ output_extra="$output_extra $uuid_cflags"
+ ;;
+ --ldflags)
+ output="$output -L$uuid_libdir"
+ output_extra="$output_extra $uuid_ldflags"
+ ;;
+ --libs)
+ output="$output -luuid"
+ output_extra="$output_extra $uuid_libs"
+ ;;
+ * )
+ echo "uuid-config:Error: Invalid option" 1>&2
+ echo "uuid-config:Usage: $usage" 1>&2
+ exit 1;
+ ;;
+ esac
+done
+IFS="$OIFS"
+if [ ".$prev" != . ]; then
+ echo "uuid-config:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2
+ exit 1
+fi
+if [ ".$output" != . ]; then
+ if [ ".$all" = .yes ]; then
+ output="$output $output_extra"
+ fi
+ echo $output
+fi
+
diff --git a/shared/ossp_uuid/uuid.h b/shared/ossp_uuid/uuid.h
new file mode 100644
index 00000000..b52f3550
--- /dev/null
+++ b/shared/ossp_uuid/uuid.h
@@ -0,0 +1,120 @@
+/*
+** OSSP uuid - Universally Unique Identifier
+** Copyright (c) 2004-2008 Ralf S. Engelschall <rse@engelschall.com>
+** Copyright (c) 2004-2008 The OSSP Project <http://www.ossp.org/>
+**
+** This file is part of OSSP uuid, a library for the generation
+** of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+**
+** Permission to use, copy, modify, and distribute this software for
+** any purpose with or without fee is hereby granted, provided that
+** the above copyright notice and this permission notice appear in all
+** copies.
+**
+** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+** SUCH DAMAGE.
+**
+** uuid.h: library API definition
+*/
+
+#ifndef __UUID_H__
+#define __UUID_H__
+
+/* workaround conflicts with system headers */
+#define uuid_t __vendor_uuid_t
+#define uuid_create __vendor_uuid_create
+#define uuid_compare __vendor_uuid_compare
+#include <sys/types.h>
+#include <unistd.h>
+#undef uuid_t
+#undef uuid_create
+#undef uuid_compare
+
+/* required system headers */
+#include <string.h>
+
+/* minimum C++ support */
+#ifdef __cplusplus
+#define DECLARATION_BEGIN extern "C" {
+#define DECLARATION_END }
+#else
+#define DECLARATION_BEGIN
+#define DECLARATION_END
+#endif
+
+DECLARATION_BEGIN
+
+/* OSSP uuid version (compile-time information) */
+#define UUID_VERSION 0x106202
+
+/* encoding octet stream lengths */
+#define UUID_LEN_BIN (128 /*bit*/ / 8 /*bytes*/)
+#define UUID_LEN_STR (128 /*bit*/ / 4 /*nibbles*/ + 4 /*hyphens*/)
+#define UUID_LEN_SIV (39 /*int(log(10,exp(2,128)-1)+1) digits*/)
+
+/* API return codes */
+typedef enum {
+ UUID_RC_OK = 0, /* everything ok */
+ UUID_RC_ARG = 1, /* invalid argument */
+ UUID_RC_MEM = 2, /* out of memory */
+ UUID_RC_SYS = 3, /* system error */
+ UUID_RC_INT = 4, /* internal error */
+ UUID_RC_IMP = 5 /* not implemented */
+} uuid_rc_t;
+
+/* UUID make modes */
+enum {
+ UUID_MAKE_V1 = (1 << 0), /* DCE 1.1 v1 UUID */
+ UUID_MAKE_V3 = (1 << 1), /* DCE 1.1 v3 UUID */
+ UUID_MAKE_V4 = (1 << 2), /* DCE 1.1 v4 UUID */
+ UUID_MAKE_V5 = (1 << 3), /* DCE 1.1 v5 UUID */
+ UUID_MAKE_MC = (1 << 4) /* enforce multi-cast MAC address */
+};
+
+/* UUID import/export formats */
+typedef enum {
+ UUID_FMT_BIN = 0, /* binary representation (import/export) */
+ UUID_FMT_STR = 1, /* string representation (import/export) */
+ UUID_FMT_SIV = 2, /* single integer value (import/export) */
+ UUID_FMT_TXT = 3 /* textual description (export only) */
+} uuid_fmt_t;
+
+/* UUID abstract data type */
+struct uuid_st;
+typedef struct uuid_st uuid_t;
+
+/* UUID object handling */
+extern uuid_rc_t uuid_create ( uuid_t **_uuid);
+extern uuid_rc_t uuid_destroy ( uuid_t *_uuid);
+extern uuid_rc_t uuid_clone (const uuid_t *_uuid, uuid_t **_clone);
+
+/* UUID generation */
+extern uuid_rc_t uuid_load ( uuid_t *_uuid, const char *_name);
+extern uuid_rc_t uuid_make ( uuid_t *_uuid, unsigned int _mode, ...);
+
+/* UUID comparison */
+extern uuid_rc_t uuid_isnil (const uuid_t *_uuid, int *_result);
+extern uuid_rc_t uuid_compare (const uuid_t *_uuid, const uuid_t *_uuid2, int *_result);
+
+/* UUID import/export */
+extern uuid_rc_t uuid_import ( uuid_t *_uuid, uuid_fmt_t _fmt, const void *_data_ptr, size_t _data_len);
+extern uuid_rc_t uuid_export (const uuid_t *_uuid, uuid_fmt_t _fmt, void *_data_ptr, size_t *_data_len);
+
+/* library utilities */
+extern char *uuid_error (uuid_rc_t _rc);
+extern unsigned long uuid_version (void);
+
+DECLARATION_END
+
+#endif /* __UUID_H__ */
+
diff --git a/shared/ossp_uuid/uuid.lo b/shared/ossp_uuid/uuid.lo
new file mode 100644
index 00000000..b7627e42
--- /dev/null
+++ b/shared/ossp_uuid/uuid.lo
@@ -0,0 +1,12 @@
+# uuid.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid.o'
+
diff --git a/shared/ossp_uuid/uuid.o b/shared/ossp_uuid/uuid.o
new file mode 100644
index 00000000..65409ca0
--- /dev/null
+++ b/shared/ossp_uuid/uuid.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid.pc b/shared/ossp_uuid/uuid.pc
new file mode 100644
index 00000000..61a8e249
--- /dev/null
+++ b/shared/ossp_uuid/uuid.pc
@@ -0,0 +1,42 @@
+##
+## OSSP uuid - Universally Unique Identifier
+## Copyright (c) 2004-2008 Ralf S. Engelschall <rse@engelschall.com>
+## Copyright (c) 2004-2008 The OSSP Project <http://www.ossp.org/>
+##
+## This file is part of OSSP uuid, a library for the generation
+## of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+## uuid.pc.in: pkg-config(1) specification
+##
+
+prefix=/usr/local
+exec_prefix=${prefix}
+includedir=${prefix}/include
+libdir=${exec_prefix}/lib
+
+Name: OSSP uuid
+Description: Universally Unique Identifier (UUID) Library
+Version: 1.6.2
+URL: http://www.ossp.org/pkg/lib/uuid/
+Cflags: -I${includedir}
+Libs: -L${libdir} -luuid
+Libs.private: -lnsl
+
diff --git a/shared/ossp_uuid/uuid_cli.o b/shared/ossp_uuid/uuid_cli.o
new file mode 100644
index 00000000..381401ce
--- /dev/null
+++ b/shared/ossp_uuid/uuid_cli.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_mac.lo b/shared/ossp_uuid/uuid_mac.lo
new file mode 100644
index 00000000..7212781b
--- /dev/null
+++ b/shared/ossp_uuid/uuid_mac.lo
@@ -0,0 +1,12 @@
+# uuid_mac.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_mac.o'
+
diff --git a/shared/ossp_uuid/uuid_mac.o b/shared/ossp_uuid/uuid_mac.o
new file mode 100644
index 00000000..a59ac9d2
--- /dev/null
+++ b/shared/ossp_uuid/uuid_mac.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_md5.lo b/shared/ossp_uuid/uuid_md5.lo
new file mode 100644
index 00000000..94614775
--- /dev/null
+++ b/shared/ossp_uuid/uuid_md5.lo
@@ -0,0 +1,12 @@
+# uuid_md5.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_md5.o'
+
diff --git a/shared/ossp_uuid/uuid_md5.o b/shared/ossp_uuid/uuid_md5.o
new file mode 100644
index 00000000..822187f5
--- /dev/null
+++ b/shared/ossp_uuid/uuid_md5.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_prng.lo b/shared/ossp_uuid/uuid_prng.lo
new file mode 100644
index 00000000..1250bcf7
--- /dev/null
+++ b/shared/ossp_uuid/uuid_prng.lo
@@ -0,0 +1,12 @@
+# uuid_prng.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_prng.o'
+
diff --git a/shared/ossp_uuid/uuid_prng.o b/shared/ossp_uuid/uuid_prng.o
new file mode 100644
index 00000000..f68ad791
--- /dev/null
+++ b/shared/ossp_uuid/uuid_prng.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_sha1.lo b/shared/ossp_uuid/uuid_sha1.lo
new file mode 100644
index 00000000..0ab7f378
--- /dev/null
+++ b/shared/ossp_uuid/uuid_sha1.lo
@@ -0,0 +1,12 @@
+# uuid_sha1.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_sha1.o'
+
diff --git a/shared/ossp_uuid/uuid_sha1.o b/shared/ossp_uuid/uuid_sha1.o
new file mode 100644
index 00000000..e7a2e354
--- /dev/null
+++ b/shared/ossp_uuid/uuid_sha1.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_str.lo b/shared/ossp_uuid/uuid_str.lo
new file mode 100644
index 00000000..85439384
--- /dev/null
+++ b/shared/ossp_uuid/uuid_str.lo
@@ -0,0 +1,12 @@
+# uuid_str.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_str.o'
+
diff --git a/shared/ossp_uuid/uuid_str.o b/shared/ossp_uuid/uuid_str.o
new file mode 100644
index 00000000..b04973e2
--- /dev/null
+++ b/shared/ossp_uuid/uuid_str.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_time.lo b/shared/ossp_uuid/uuid_time.lo
new file mode 100644
index 00000000..fcf39653
--- /dev/null
+++ b/shared/ossp_uuid/uuid_time.lo
@@ -0,0 +1,12 @@
+# uuid_time.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_time.o'
+
diff --git a/shared/ossp_uuid/uuid_time.o b/shared/ossp_uuid/uuid_time.o
new file mode 100644
index 00000000..0ee1ee0a
--- /dev/null
+++ b/shared/ossp_uuid/uuid_time.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_ui128.lo b/shared/ossp_uuid/uuid_ui128.lo
new file mode 100644
index 00000000..b63aea39
--- /dev/null
+++ b/shared/ossp_uuid/uuid_ui128.lo
@@ -0,0 +1,12 @@
+# uuid_ui128.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_ui128.o'
+
diff --git a/shared/ossp_uuid/uuid_ui128.o b/shared/ossp_uuid/uuid_ui128.o
new file mode 100644
index 00000000..fb425809
--- /dev/null
+++ b/shared/ossp_uuid/uuid_ui128.o
Binary files differ
diff --git a/shared/ossp_uuid/uuid_ui64.lo b/shared/ossp_uuid/uuid_ui64.lo
new file mode 100644
index 00000000..6a758946
--- /dev/null
+++ b/shared/ossp_uuid/uuid_ui64.lo
@@ -0,0 +1,12 @@
+# uuid_ui64.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=none
+
+# Name of the non-PIC object
+non_pic_object='uuid_ui64.o'
+
diff --git a/shared/ossp_uuid/uuid_ui64.o b/shared/ossp_uuid/uuid_ui64.o
new file mode 100644
index 00000000..6c4c0a87
--- /dev/null
+++ b/shared/ossp_uuid/uuid_ui64.o
Binary files differ
diff --git a/shared/recycler.cpp b/shared/recycler.cpp
index 438db680..3a2c769b 100644
--- a/shared/recycler.cpp
+++ b/shared/recycler.cpp
@@ -18,6 +18,7 @@
#include <functional>
#include <vector>
#include "longPathPrefix.h"
+#include "IFileOperation/fileOp.h"
#elif defined FFS_LINUX
#include <sys/stat.h>
@@ -37,8 +38,8 @@ const std::wstring& getRecyclerDllName()
{
static const std::wstring filename(
Utility::is64BitBuild ?
- L"Recycler_x64.dll":
- L"Recycler_Win32.dll");
+ L"FileOperation_x64.dll":
+ L"FileOperation_Win32.dll");
assert_static(Utility::is32BitBuild || Utility::is64BitBuild);
@@ -85,16 +86,15 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw (
if (useIFileOperation) //new recycle bin usage: available since Vista
{
- typedef bool (*MoveToRecycleBinFunc)(
- const wchar_t* fileNames[],
- size_t fileNo, //size of fileNames array
- wchar_t* errorMessage,
- size_t errorBufferLen);
+ using namespace FileOp;
- static const MoveToRecycleBinFunc moveToRecycler =
- Utility::loadDllFunction<MoveToRecycleBinFunc>(getRecyclerDllName().c_str(), "moveToRecycleBin");
+ static const MoveToRecycleBinFct moveToRecycler =
+ Utility::loadDllFunction<MoveToRecycleBinFct>(getRecyclerDllName().c_str(), moveToRecycleBinFctName);
- if (moveToRecycler == NULL)
+ static const GetLastErrorFct getLastError =
+ Utility::loadDllFunction<GetLastErrorFct>(getRecyclerDllName().c_str(), getLastErrorFctName);
+
+ if (moveToRecycler == NULL || getLastError == NULL)
throw FileError(wxString(_("Could not load a required DLL:")) + wxT(" \"") + getRecyclerDllName().c_str() + wxT("\""));
//#warning moving long file paths to recycler does not work! clarify!
@@ -106,12 +106,11 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw (
std::transform(filesToDelete.begin(), filesToDelete.end(),
std::back_inserter(fileNames), std::mem_fun_ref(&Zstring::c_str));
- wchar_t errorMessage[2000];
if (!(*moveToRecycler)(&fileNames[0], //array must not be empty
- fileNames.size(),
- errorMessage,
- 2000))
+ fileNames.size()))
{
+ wchar_t errorMessage[2000];
+ (*getLastError)(errorMessage, 2000);
throw FileError(wxString(_("Error moving to Recycle Bin:")) + wxT("\n\"") + fileNames[0] + wxT("\"\n\n") + //report first file only... better than nothing
wxT("(") + errorMessage + wxT(")"));
}
diff --git a/shared/serialize.h b/shared/serialize.h
index f1c4dc49..201d184e 100644
--- a/shared/serialize.h
+++ b/shared/serialize.h
@@ -32,12 +32,12 @@ protected:
ReadInputStream(wxInputStream& stream, const wxString& errorObjName) : stream_(stream), errorObjName_(errorObjName) {}
template <class T>
- T readNumberC(); //checked read operation
+ T readNumberC(); //throw FileError(), checked read operation
- Zstring readStringC(); //checked read operation
+ Zstring readStringC(); //throw FileError(), checked read operation
typedef boost::shared_ptr<std::vector<char> > CharArray;
- CharArray readArrayC();
+ CharArray readArrayC(); //throw FileError()
void check();
@@ -60,11 +60,11 @@ protected:
WriteOutputStream(const wxString& errorObjName, wxOutputStream& stream) : stream_(stream), errorObjName_(errorObjName) {}
template <class T>
- void writeNumberC(T number); //checked write operation
+ void writeNumberC(T number); //throw FileError(), checked write operation
- void writeStringC(const Zstring& str); //checked write operation
+ void writeStringC(const Zstring& str); //throw FileError(), checked write operation
- void writeArrayC(const std::vector<char>& buffer);
+ void writeArrayC(const std::vector<char>& buffer); //throw FileError()
void check();
diff --git a/shared/shadow.cpp b/shared/shadow.cpp
index be0f7c85..81f19d20 100644
--- a/shared/shadow.cpp
+++ b/shared/shadow.cpp
@@ -12,6 +12,7 @@
#include <stdexcept>
#include "staticAssert.h"
#include "buildInfo.h"
+#include "ShadowCopy\shadow.h"
using FreeFileSync::ShadowCopy;
@@ -86,9 +87,10 @@ ShadowCopy::~ShadowCopy()
{
if (backupHandle != NULL)
{
- typedef void (*ReleaseShadowCopyFct)(void* backupHandle);
+ using namespace Shadow;
+
static const ReleaseShadowCopyFct releaseShadowCopy =
- Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), "releaseShadowCopy");
+ Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), releaseShadowCopyFctName);
if (releaseShadowCopy == NULL)
throw std::logic_error("Could not load \"releaseShadowCopy\"!"); //shouldn't arrive here!
@@ -100,22 +102,13 @@ ShadowCopy::~ShadowCopy()
Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile)
{
- typedef bool (*CreateShadowCopyFct)( //volumeName must end with "\", while shadowVolName does not end with "\"
- const wchar_t* volumeName,
- wchar_t* shadowVolName,
- unsigned int shadowBufferLen,
- void** backupHandle,
- wchar_t* errorMessage,
- unsigned int errorBufferLen);
- static const CreateShadowCopyFct createShadowCopy =
- Utility::loadDllFunction<CreateShadowCopyFct>(getShadowDllName().c_str(), "createShadowCopy");
+ using namespace Shadow;
+ static const CreateShadowCopyFct createShadowCopy =
+ Utility::loadDllFunction<CreateShadowCopyFct>(getShadowDllName().c_str(), createShadowCopyFctName);
- typedef void (*ReleaseShadowCopyFct)(void* backupHandle);
static const ReleaseShadowCopyFct releaseShadowCopy =
- Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), "releaseShadowCopy");
-
-
+ Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), releaseShadowCopyFctName);
//check if shadow copy dll was loaded correctly
if ( createShadowCopy == NULL ||
diff --git a/shared/standardPaths.cpp b/shared/standardPaths.cpp
index 018e31d0..e442c865 100644
--- a/shared/standardPaths.cpp
+++ b/shared/standardPaths.cpp
@@ -43,7 +43,7 @@ const wxString& FreeFileSync::getResourceDir()
isInitalized = true;
if (isPortableVersion())
- return getBinaryDir();
+ resourceDir = getBinaryDir();
else //use OS' standard paths
{
resourceDir = wxStandardPathsBase::Get().GetResourcesDir();
diff --git a/shared/staticAssert.h b/shared/staticAssert.h
index f14ed68e..14f52221 100644
--- a/shared/staticAssert.h
+++ b/shared/staticAssert.h
@@ -17,7 +17,7 @@
#define assert_static(e) \
do { \
-enum { assert_static__ = 1/(e) }; \
+enum { assert_static__ = 1/(static_cast<int>(e)) }; \
} while (0)
#endif
diff --git a/shared/taskbar.cpp b/shared/taskbar.cpp
index 9f3e8378..47681958 100644
--- a/shared/taskbar.cpp
+++ b/shared/taskbar.cpp
@@ -5,7 +5,7 @@
// **************************************************************************
//
#include "taskbar.h"
-#include "../library/Taskbar_Seven/taskbar.h"
+#include "Taskbar_Seven/taskbar.h"
#include "dllLoader.h"
#include "buildInfo.h"
#include "staticAssert.h"
@@ -71,10 +71,10 @@ TaskbarProgress::TaskbarProgress(const wxTopLevelWindow& window) : pimpl_(new Pi
if (!windows7TaskbarAvailable())
throw TaskbarNotAvailable();
- pimpl_->init_ = Utility::loadDllFunction<TaskbarSeven::initFct>( getTaskBarDllName().c_str(), "init");
- pimpl_->release_ = Utility::loadDllFunction<TaskbarSeven::releaseFct>( getTaskBarDllName().c_str(), "release");
- pimpl_->setProgress_ = Utility::loadDllFunction<TaskbarSeven::setProgressFct>(getTaskBarDllName().c_str(), "setProgress");
- pimpl_->setStatus_ = Utility::loadDllFunction<TaskbarSeven::setStatusFct>( getTaskBarDllName().c_str(), "setStatus");
+ pimpl_->init_ = Utility::loadDllFunction<TaskbarSeven::initFct>( getTaskBarDllName().c_str(), TaskbarSeven::initFctName);
+ pimpl_->release_ = Utility::loadDllFunction<TaskbarSeven::releaseFct>( getTaskBarDllName().c_str(), TaskbarSeven::releaseFctName);
+ pimpl_->setProgress_ = Utility::loadDllFunction<TaskbarSeven::setProgressFct>(getTaskBarDllName().c_str(), TaskbarSeven::setProgressFctName);
+ pimpl_->setStatus_ = Utility::loadDllFunction<TaskbarSeven::setStatusFct>( getTaskBarDllName().c_str(), TaskbarSeven::setStatusFctName);
if ( !pimpl_->init_ ||
!pimpl_->release_ ||
diff --git a/shared/taskbar.h b/shared/taskbar.h
index ca836609..278aca0e 100644
--- a/shared/taskbar.h
+++ b/shared/taskbar.h
@@ -19,7 +19,7 @@ namespace Utility
{
class TaskbarNotAvailable {};
-//show progress in windows superbar via ITaskbarList3 Interfce (http://msdn.microsoft.com/en-us/library/dd391692(VS.85).aspx)
+//show progress in windows superbar via ITaskbarList3 Interface (http://msdn.microsoft.com/en-us/library/dd391692(VS.85).aspx)
class TaskbarProgress
{
public:
diff --git a/shared/tinyxml/tinystr.cpp b/shared/tinyxml/tinystr.cpp
index 68125071..2b9b5467 100644
--- a/shared/tinyxml/tinystr.cpp
+++ b/shared/tinyxml/tinystr.cpp
@@ -41,75 +41,75 @@ TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } };
void TiXmlString::reserve (size_type cap)
{
- if (cap > capacity())
- {
- TiXmlString tmp;
- tmp.init(length(), cap);
- memcpy(tmp.start(), data(), length());
- swap(tmp);
- }
+ if (cap > capacity())
+ {
+ TiXmlString tmp;
+ tmp.init(length(), cap);
+ memcpy(tmp.start(), data(), length());
+ swap(tmp);
+ }
}
TiXmlString& TiXmlString::assign(const char* str, size_type len)
{
- size_type cap = capacity();
- if (len > cap || cap > 3*(len + 8))
- {
- TiXmlString tmp;
- tmp.init(len);
- memcpy(tmp.start(), str, len);
- swap(tmp);
- }
- else
- {
- memmove(start(), str, len);
- set_size(len);
- }
- return *this;
+ size_type cap = capacity();
+ if (len > cap || cap > 3*(len + 8))
+ {
+ TiXmlString tmp;
+ tmp.init(len);
+ memcpy(tmp.start(), str, len);
+ swap(tmp);
+ }
+ else
+ {
+ memmove(start(), str, len);
+ set_size(len);
+ }
+ return *this;
}
TiXmlString& TiXmlString::append(const char* str, size_type len)
{
- size_type newsize = length() + len;
- if (newsize > capacity())
- {
- reserve (newsize + capacity());
- }
- memmove(finish(), str, len);
- set_size(newsize);
- return *this;
+ size_type newsize = length() + len;
+ if (newsize > capacity())
+ {
+ reserve (newsize + capacity());
+ }
+ memmove(finish(), str, len);
+ set_size(newsize);
+ return *this;
}
TiXmlString operator + (const TiXmlString & a, const TiXmlString & b)
{
- TiXmlString tmp;
- tmp.reserve(a.length() + b.length());
- tmp += a;
- tmp += b;
- return tmp;
+ TiXmlString tmp;
+ tmp.reserve(a.length() + b.length());
+ tmp += a;
+ tmp += b;
+ return tmp;
}
TiXmlString operator + (const TiXmlString & a, const char* b)
{
- TiXmlString tmp;
- TiXmlString::size_type b_len = static_cast<TiXmlString::size_type>( strlen(b) );
- tmp.reserve(a.length() + b_len);
- tmp += a;
- tmp.append(b, b_len);
- return tmp;
+ TiXmlString tmp;
+ TiXmlString::size_type b_len = static_cast<TiXmlString::size_type>( strlen(b) );
+ tmp.reserve(a.length() + b_len);
+ tmp += a;
+ tmp.append(b, b_len);
+ return tmp;
}
TiXmlString operator + (const char* a, const TiXmlString & b)
{
- TiXmlString tmp;
- TiXmlString::size_type a_len = static_cast<TiXmlString::size_type>( strlen(a) );
- tmp.reserve(a_len + b.length());
- tmp.append(a, a_len);
- tmp += b;
- return tmp;
+ TiXmlString tmp;
+ TiXmlString::size_type a_len = static_cast<TiXmlString::size_type>( strlen(a) );
+ tmp.reserve(a_len + b.length());
+ tmp.append(a, a_len);
+ tmp += b;
+ return tmp;
}
diff --git a/shared/tinyxml/tinyxml.cpp b/shared/tinyxml/tinyxml.cpp
index 9be6c6a6..9a13c32b 100644
--- a/shared/tinyxml/tinyxml.cpp
+++ b/shared/tinyxml/tinyxml.cpp
@@ -38,1097 +38,1124 @@ bool TiXmlBase::condenseWhiteSpace = true;
// Microsoft compiler security
FILE* TiXmlFOpen( const char* filename, const char* mode )
{
- #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
- FILE* fp = 0;
- errno_t err = fopen_s( &fp, filename, mode );
- if ( !err && fp )
- return fp;
- return 0;
- #else
- return fopen( filename, mode );
- #endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
+ FILE* fp = 0;
+ errno_t err = fopen_s( &fp, filename, mode );
+ if ( !err && fp )
+ return fp;
+ return 0;
+#else
+ return fopen( filename, mode );
+#endif
}
void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )
{
- int i=0;
-
- while( i<(int)str.length() )
- {
- unsigned char c = (unsigned char) str[i];
-
- if ( c == '&'
- && i < ( (int)str.length() - 2 )
- && str[i+1] == '#'
- && str[i+2] == 'x' )
- {
- // Hexadecimal character reference.
- // Pass through unchanged.
- // &#xA9; -- copyright symbol, for example.
- //
- // The -1 is a bug fix from Rob Laveaux. It keeps
- // an overflow from happening if there is no ';'.
- // There are actually 2 ways to exit this loop -
- // while fails (error case) and break (semicolon found).
- // However, there is no mechanism (currently) for
- // this function to return an error.
- while ( i<(int)str.length()-1 )
- {
- outString->append( str.c_str() + i, 1 );
- ++i;
- if ( str[i] == ';' )
- break;
- }
- }
- else if ( c == '&' )
- {
- outString->append( entity[0].str, entity[0].strLength );
- ++i;
- }
- else if ( c == '<' )
- {
- outString->append( entity[1].str, entity[1].strLength );
- ++i;
- }
- else if ( c == '>' )
- {
- outString->append( entity[2].str, entity[2].strLength );
- ++i;
- }
- else if ( c == '\"' )
- {
- outString->append( entity[3].str, entity[3].strLength );
- ++i;
- }
- else if ( c == '\'' )
- {
- outString->append( entity[4].str, entity[4].strLength );
- ++i;
- }
- else if ( c < 32 )
- {
- // Easy pass at non-alpha/numeric/symbol
- // Below 32 is symbolic.
- char buf[ 32 ];
-
- #if defined(TIXML_SNPRINTF)
- TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) );
- #else
- sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) );
- #endif
-
- //*ME: warning C4267: convert 'size_t' to 'int'
- //*ME: Int-Cast to make compiler happy ...
- outString->append( buf, (int)strlen( buf ) );
- ++i;
- }
- else
- {
- //char realc = (char) c;
- //outString->append( &realc, 1 );
- *outString += (char) c; // somewhat more efficient function call.
- ++i;
- }
- }
+ int i=0;
+
+ while( i<(int)str.length() )
+ {
+ unsigned char c = (unsigned char) str[i];
+
+ if ( c == '&'
+ && i < ( (int)str.length() - 2 )
+ && str[i+1] == '#'
+ && str[i+2] == 'x' )
+ {
+ // Hexadecimal character reference.
+ // Pass through unchanged.
+ // &#xA9; -- copyright symbol, for example.
+ //
+ // The -1 is a bug fix from Rob Laveaux. It keeps
+ // an overflow from happening if there is no ';'.
+ // There are actually 2 ways to exit this loop -
+ // while fails (error case) and break (semicolon found).
+ // However, there is no mechanism (currently) for
+ // this function to return an error.
+ while ( i<(int)str.length()-1 )
+ {
+ outString->append( str.c_str() + i, 1 );
+ ++i;
+ if ( str[i] == ';' )
+ break;
+ }
+ }
+ else if ( c == '&' )
+ {
+ outString->append( entity[0].str, entity[0].strLength );
+ ++i;
+ }
+ else if ( c == '<' )
+ {
+ outString->append( entity[1].str, entity[1].strLength );
+ ++i;
+ }
+ else if ( c == '>' )
+ {
+ outString->append( entity[2].str, entity[2].strLength );
+ ++i;
+ }
+ else if ( c == '\"' )
+ {
+ outString->append( entity[3].str, entity[3].strLength );
+ ++i;
+ }
+ else if ( c == '\'' )
+ {
+ outString->append( entity[4].str, entity[4].strLength );
+ ++i;
+ }
+ else if ( c < 32 )
+ {
+ // Easy pass at non-alpha/numeric/symbol
+ // Below 32 is symbolic.
+ char buf[ 32 ];
+
+#if defined(TIXML_SNPRINTF)
+ TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) );
+#else
+ sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) );
+#endif
+
+ //*ME: warning C4267: convert 'size_t' to 'int'
+ //*ME: Int-Cast to make compiler happy ...
+ outString->append( buf, (int)strlen( buf ) );
+ ++i;
+ }
+ else
+ {
+ //char realc = (char) c;
+ //outString->append( &realc, 1 );
+ *outString += (char) c; // somewhat more efficient function call.
+ ++i;
+ }
+ }
}
TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase()
{
- parent = 0;
- type = _type;
- firstChild = 0;
- lastChild = 0;
- prev = 0;
- next = 0;
+ parent = 0;
+ type = _type;
+ firstChild = 0;
+ lastChild = 0;
+ prev = 0;
+ next = 0;
}
TiXmlNode::~TiXmlNode()
{
- TiXmlNode* node = firstChild;
- TiXmlNode* temp = 0;
+ TiXmlNode* node = firstChild;
+ TiXmlNode* temp = 0;
- while ( node )
- {
- temp = node;
- node = node->next;
- delete temp;
- }
+ while ( node )
+ {
+ temp = node;
+ node = node->next;
+ delete temp;
+ }
}
void TiXmlNode::CopyTo( TiXmlNode* target ) const
{
- target->SetValue (value.c_str() );
- target->userData = userData;
- target->location = location;
+ target->SetValue (value.c_str() );
+ target->userData = userData;
+ target->location = location;
}
void TiXmlNode::Clear()
{
- TiXmlNode* node = firstChild;
- TiXmlNode* temp = 0;
+ TiXmlNode* node = firstChild;
+ TiXmlNode* temp = 0;
- while ( node )
- {
- temp = node;
- node = node->next;
- delete temp;
- }
+ while ( node )
+ {
+ temp = node;
+ node = node->next;
+ delete temp;
+ }
- firstChild = 0;
- lastChild = 0;
+ firstChild = 0;
+ lastChild = 0;
}
TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node )
{
- assert( node->parent == 0 || node->parent == this );
- assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() );
+ assert( node->parent == 0 || node->parent == this );
+ assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() );
- if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT )
- {
- delete node;
- if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return 0;
- }
+ if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT )
+ {
+ delete node;
+ if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return 0;
+ }
- node->parent = this;
+ node->parent = this;
- node->prev = lastChild;
- node->next = 0;
+ node->prev = lastChild;
+ node->next = 0;
- if ( lastChild )
- lastChild->next = node;
- else
- firstChild = node; // it was an empty list.
+ if ( lastChild )
+ lastChild->next = node;
+ else
+ firstChild = node; // it was an empty list.
- lastChild = node;
- return node;
+ lastChild = node;
+ return node;
}
TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )
{
- if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
- {
- if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return 0;
- }
- TiXmlNode* node = addThis.Clone();
- if ( !node )
- return 0;
+ if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
+ {
+ if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return 0;
+ }
+ TiXmlNode* node = addThis.Clone();
+ if ( !node )
+ return 0;
- return LinkEndChild( node );
+ return LinkEndChild( node );
}
TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis )
-{
- if ( !beforeThis || beforeThis->parent != this ) {
- return 0;
- }
- if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
- {
- if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return 0;
- }
-
- TiXmlNode* node = addThis.Clone();
- if ( !node )
- return 0;
- node->parent = this;
-
- node->next = beforeThis;
- node->prev = beforeThis->prev;
- if ( beforeThis->prev )
- {
- beforeThis->prev->next = node;
- }
- else
- {
- assert( firstChild == beforeThis );
- firstChild = node;
- }
- beforeThis->prev = node;
- return node;
+{
+ if ( !beforeThis || beforeThis->parent != this )
+ {
+ return 0;
+ }
+ if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
+ {
+ if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return 0;
+ }
+
+ TiXmlNode* node = addThis.Clone();
+ if ( !node )
+ return 0;
+ node->parent = this;
+
+ node->next = beforeThis;
+ node->prev = beforeThis->prev;
+ if ( beforeThis->prev )
+ {
+ beforeThis->prev->next = node;
+ }
+ else
+ {
+ assert( firstChild == beforeThis );
+ firstChild = node;
+ }
+ beforeThis->prev = node;
+ return node;
}
TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis )
{
- if ( !afterThis || afterThis->parent != this ) {
- return 0;
- }
- if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
- {
- if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return 0;
- }
-
- TiXmlNode* node = addThis.Clone();
- if ( !node )
- return 0;
- node->parent = this;
-
- node->prev = afterThis;
- node->next = afterThis->next;
- if ( afterThis->next )
- {
- afterThis->next->prev = node;
- }
- else
- {
- assert( lastChild == afterThis );
- lastChild = node;
- }
- afterThis->next = node;
- return node;
+ if ( !afterThis || afterThis->parent != this )
+ {
+ return 0;
+ }
+ if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
+ {
+ if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return 0;
+ }
+
+ TiXmlNode* node = addThis.Clone();
+ if ( !node )
+ return 0;
+ node->parent = this;
+
+ node->prev = afterThis;
+ node->next = afterThis->next;
+ if ( afterThis->next )
+ {
+ afterThis->next->prev = node;
+ }
+ else
+ {
+ assert( lastChild == afterThis );
+ lastChild = node;
+ }
+ afterThis->next = node;
+ return node;
}
TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis )
{
- if ( !replaceThis )
- return 0;
+ if ( !replaceThis )
+ return 0;
- if ( replaceThis->parent != this )
- return 0;
+ if ( replaceThis->parent != this )
+ return 0;
- if ( withThis.ToDocument() ) {
- // A document can never be a child. Thanks to Noam.
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return 0;
- }
+ if ( withThis.ToDocument() )
+ {
+ // A document can never be a child. Thanks to Noam.
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return 0;
+ }
- TiXmlNode* node = withThis.Clone();
- if ( !node )
- return 0;
+ TiXmlNode* node = withThis.Clone();
+ if ( !node )
+ return 0;
- node->next = replaceThis->next;
- node->prev = replaceThis->prev;
+ node->next = replaceThis->next;
+ node->prev = replaceThis->prev;
- if ( replaceThis->next )
- replaceThis->next->prev = node;
- else
- lastChild = node;
+ if ( replaceThis->next )
+ replaceThis->next->prev = node;
+ else
+ lastChild = node;
- if ( replaceThis->prev )
- replaceThis->prev->next = node;
- else
- firstChild = node;
+ if ( replaceThis->prev )
+ replaceThis->prev->next = node;
+ else
+ firstChild = node;
- delete replaceThis;
- node->parent = this;
- return node;
+ delete replaceThis;
+ node->parent = this;
+ return node;
}
bool TiXmlNode::RemoveChild( TiXmlNode* removeThis )
{
- if ( !removeThis ) {
- return false;
- }
+ if ( !removeThis )
+ {
+ return false;
+ }
- if ( removeThis->parent != this )
- {
- assert( 0 );
- return false;
- }
+ if ( removeThis->parent != this )
+ {
+ assert( 0 );
+ return false;
+ }
- if ( removeThis->next )
- removeThis->next->prev = removeThis->prev;
- else
- lastChild = removeThis->prev;
+ if ( removeThis->next )
+ removeThis->next->prev = removeThis->prev;
+ else
+ lastChild = removeThis->prev;
- if ( removeThis->prev )
- removeThis->prev->next = removeThis->next;
- else
- firstChild = removeThis->next;
+ if ( removeThis->prev )
+ removeThis->prev->next = removeThis->next;
+ else
+ firstChild = removeThis->next;
- delete removeThis;
- return true;
+ delete removeThis;
+ return true;
}
const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const
{
- const TiXmlNode* node;
- for ( node = firstChild; node; node = node->next )
- {
- if ( strcmp( node->Value(), _value ) == 0 )
- return node;
- }
- return 0;
+ const TiXmlNode* node;
+ for ( node = firstChild; node; node = node->next )
+ {
+ if ( strcmp( node->Value(), _value ) == 0 )
+ return node;
+ }
+ return 0;
}
const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const
{
- const TiXmlNode* node;
- for ( node = lastChild; node; node = node->prev )
- {
- if ( strcmp( node->Value(), _value ) == 0 )
- return node;
- }
- return 0;
+ const TiXmlNode* node;
+ for ( node = lastChild; node; node = node->prev )
+ {
+ if ( strcmp( node->Value(), _value ) == 0 )
+ return node;
+ }
+ return 0;
}
const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const
{
- if ( !previous )
- {
- return FirstChild();
- }
- else
- {
- assert( previous->parent == this );
- return previous->NextSibling();
- }
+ if ( !previous )
+ {
+ return FirstChild();
+ }
+ else
+ {
+ assert( previous->parent == this );
+ return previous->NextSibling();
+ }
}
const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const
{
- if ( !previous )
- {
- return FirstChild( val );
- }
- else
- {
- assert( previous->parent == this );
- return previous->NextSibling( val );
- }
+ if ( !previous )
+ {
+ return FirstChild( val );
+ }
+ else
+ {
+ assert( previous->parent == this );
+ return previous->NextSibling( val );
+ }
}
-const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
+const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
{
- const TiXmlNode* node;
- for ( node = next; node; node = node->next )
- {
- if ( strcmp( node->Value(), _value ) == 0 )
- return node;
- }
- return 0;
+ const TiXmlNode* node;
+ for ( node = next; node; node = node->next )
+ {
+ if ( strcmp( node->Value(), _value ) == 0 )
+ return node;
+ }
+ return 0;
}
const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const
{
- const TiXmlNode* node;
- for ( node = prev; node; node = node->prev )
- {
- if ( strcmp( node->Value(), _value ) == 0 )
- return node;
- }
- return 0;
+ const TiXmlNode* node;
+ for ( node = prev; node; node = node->prev )
+ {
+ if ( strcmp( node->Value(), _value ) == 0 )
+ return node;
+ }
+ return 0;
}
void TiXmlElement::RemoveAttribute( const char * name )
{
- #ifdef TIXML_USE_STL
- TIXML_STRING str( name );
- TiXmlAttribute* node = attributeSet.Find( str );
- #else
- TiXmlAttribute* node = attributeSet.Find( name );
- #endif
- if ( node )
- {
- attributeSet.Remove( node );
- delete node;
- }
+#ifdef TIXML_USE_STL
+ TIXML_STRING str( name );
+ TiXmlAttribute* node = attributeSet.Find( str );
+#else
+ TiXmlAttribute* node = attributeSet.Find( name );
+#endif
+ if ( node )
+ {
+ attributeSet.Remove( node );
+ delete node;
+ }
}
const TiXmlElement* TiXmlNode::FirstChildElement() const
{
- const TiXmlNode* node;
+ const TiXmlNode* node;
- for ( node = FirstChild();
- node;
- node = node->NextSibling() )
- {
- if ( node->ToElement() )
- return node->ToElement();
- }
- return 0;
+ for ( node = FirstChild();
+ node;
+ node = node->NextSibling() )
+ {
+ if ( node->ToElement() )
+ return node->ToElement();
+ }
+ return 0;
}
const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const
{
- const TiXmlNode* node;
+ const TiXmlNode* node;
- for ( node = FirstChild( _value );
- node;
- node = node->NextSibling( _value ) )
- {
- if ( node->ToElement() )
- return node->ToElement();
- }
- return 0;
+ for ( node = FirstChild( _value );
+ node;
+ node = node->NextSibling( _value ) )
+ {
+ if ( node->ToElement() )
+ return node->ToElement();
+ }
+ return 0;
}
const TiXmlElement* TiXmlNode::NextSiblingElement() const
{
- const TiXmlNode* node;
+ const TiXmlNode* node;
- for ( node = NextSibling();
- node;
- node = node->NextSibling() )
- {
- if ( node->ToElement() )
- return node->ToElement();
- }
- return 0;
+ for ( node = NextSibling();
+ node;
+ node = node->NextSibling() )
+ {
+ if ( node->ToElement() )
+ return node->ToElement();
+ }
+ return 0;
}
const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const
{
- const TiXmlNode* node;
+ const TiXmlNode* node;
- for ( node = NextSibling( _value );
- node;
- node = node->NextSibling( _value ) )
- {
- if ( node->ToElement() )
- return node->ToElement();
- }
- return 0;
+ for ( node = NextSibling( _value );
+ node;
+ node = node->NextSibling( _value ) )
+ {
+ if ( node->ToElement() )
+ return node->ToElement();
+ }
+ return 0;
}
const TiXmlDocument* TiXmlNode::GetDocument() const
{
- const TiXmlNode* node;
+ const TiXmlNode* node;
- for( node = this; node; node = node->parent )
- {
- if ( node->ToDocument() )
- return node->ToDocument();
- }
- return 0;
+ for( node = this; node; node = node->parent )
+ {
+ if ( node->ToDocument() )
+ return node->ToDocument();
+ }
+ return 0;
}
TiXmlElement::TiXmlElement (const char * _value)
- : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
+ : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
{
- firstChild = lastChild = 0;
- value = _value;
+ firstChild = lastChild = 0;
+ value = _value;
}
#ifdef TIXML_USE_STL
-TiXmlElement::TiXmlElement( const std::string& _value )
- : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
+TiXmlElement::TiXmlElement( const std::string& _value )
+ : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
{
- firstChild = lastChild = 0;
- value = _value;
+ firstChild = lastChild = 0;
+ value = _value;
}
#endif
TiXmlElement::TiXmlElement( const TiXmlElement& copy)
- : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
+ : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
{
- firstChild = lastChild = 0;
- copy.CopyTo( this );
+ firstChild = lastChild = 0;
+ copy.CopyTo( this );
}
void TiXmlElement::operator=( const TiXmlElement& base )
{
- ClearThis();
- base.CopyTo( this );
+ ClearThis();
+ base.CopyTo( this );
}
TiXmlElement::~TiXmlElement()
{
- ClearThis();
+ ClearThis();
}
void TiXmlElement::ClearThis()
{
- Clear();
- while( attributeSet.First() )
- {
- TiXmlAttribute* node = attributeSet.First();
- attributeSet.Remove( node );
- delete node;
- }
+ Clear();
+ while( attributeSet.First() )
+ {
+ TiXmlAttribute* node = attributeSet.First();
+ attributeSet.Remove( node );
+ delete node;
+ }
}
const char* TiXmlElement::Attribute( const char* name ) const
{
- const TiXmlAttribute* node = attributeSet.Find( name );
- if ( node )
- return node->Value();
- return 0;
+ const TiXmlAttribute* node = attributeSet.Find( name );
+ if ( node )
+ return node->Value();
+ return 0;
}
#ifdef TIXML_USE_STL
const std::string* TiXmlElement::Attribute( const std::string& name ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- if ( attrib )
- return &attrib->ValueStr();
- return 0;
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ if ( attrib )
+ return &attrib->ValueStr();
+ return 0;
}
#endif
const char* TiXmlElement::Attribute( const char* name, int* i ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- const char* result = 0;
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ const char* result = 0;
- if ( attrib ) {
- result = attrib->Value();
- if ( i ) {
- attrib->QueryIntValue( i );
- }
- }
- return result;
+ if ( attrib )
+ {
+ result = attrib->Value();
+ if ( i )
+ {
+ attrib->QueryIntValue( i );
+ }
+ }
+ return result;
}
#ifdef TIXML_USE_STL
const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- const std::string* result = 0;
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ const std::string* result = 0;
- if ( attrib ) {
- result = &attrib->ValueStr();
- if ( i ) {
- attrib->QueryIntValue( i );
- }
- }
- return result;
+ if ( attrib )
+ {
+ result = &attrib->ValueStr();
+ if ( i )
+ {
+ attrib->QueryIntValue( i );
+ }
+ }
+ return result;
}
#endif
const char* TiXmlElement::Attribute( const char* name, double* d ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- const char* result = 0;
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ const char* result = 0;
- if ( attrib ) {
- result = attrib->Value();
- if ( d ) {
- attrib->QueryDoubleValue( d );
- }
- }
- return result;
+ if ( attrib )
+ {
+ result = attrib->Value();
+ if ( d )
+ {
+ attrib->QueryDoubleValue( d );
+ }
+ }
+ return result;
}
#ifdef TIXML_USE_STL
const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- const std::string* result = 0;
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ const std::string* result = 0;
- if ( attrib ) {
- result = &attrib->ValueStr();
- if ( d ) {
- attrib->QueryDoubleValue( d );
- }
- }
- return result;
+ if ( attrib )
+ {
+ result = &attrib->ValueStr();
+ if ( d )
+ {
+ attrib->QueryDoubleValue( d );
+ }
+ }
+ return result;
}
#endif
int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- if ( !attrib )
- return TIXML_NO_ATTRIBUTE;
- return attrib->QueryIntValue( ival );
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ if ( !attrib )
+ return TIXML_NO_ATTRIBUTE;
+ return attrib->QueryIntValue( ival );
}
#ifdef TIXML_USE_STL
int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- if ( !attrib )
- return TIXML_NO_ATTRIBUTE;
- return attrib->QueryIntValue( ival );
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ if ( !attrib )
+ return TIXML_NO_ATTRIBUTE;
+ return attrib->QueryIntValue( ival );
}
#endif
int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- if ( !attrib )
- return TIXML_NO_ATTRIBUTE;
- return attrib->QueryDoubleValue( dval );
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ if ( !attrib )
+ return TIXML_NO_ATTRIBUTE;
+ return attrib->QueryDoubleValue( dval );
}
#ifdef TIXML_USE_STL
int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const
{
- const TiXmlAttribute* attrib = attributeSet.Find( name );
- if ( !attrib )
- return TIXML_NO_ATTRIBUTE;
- return attrib->QueryDoubleValue( dval );
+ const TiXmlAttribute* attrib = attributeSet.Find( name );
+ if ( !attrib )
+ return TIXML_NO_ATTRIBUTE;
+ return attrib->QueryDoubleValue( dval );
}
#endif
void TiXmlElement::SetAttribute( const char * name, int val )
-{
- TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
- if ( attrib ) {
- attrib->SetIntValue( val );
- }
+{
+ TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
+ if ( attrib )
+ {
+ attrib->SetIntValue( val );
+ }
}
#ifdef TIXML_USE_STL
void TiXmlElement::SetAttribute( const std::string& name, int val )
-{
- TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
- if ( attrib ) {
- attrib->SetIntValue( val );
- }
+{
+ TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
+ if ( attrib )
+ {
+ attrib->SetIntValue( val );
+ }
}
#endif
void TiXmlElement::SetDoubleAttribute( const char * name, double val )
-{
- TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
- if ( attrib ) {
- attrib->SetDoubleValue( val );
- }
+{
+ TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
+ if ( attrib )
+ {
+ attrib->SetDoubleValue( val );
+ }
}
#ifdef TIXML_USE_STL
void TiXmlElement::SetDoubleAttribute( const std::string& name, double val )
-{
- TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
- if ( attrib ) {
- attrib->SetDoubleValue( val );
- }
+{
+ TiXmlAttribute* attrib = attributeSet.FindOrCreate( name );
+ if ( attrib )
+ {
+ attrib->SetDoubleValue( val );
+ }
}
-#endif
+#endif
void TiXmlElement::SetAttribute( const char * cname, const char * cvalue )
{
- TiXmlAttribute* attrib = attributeSet.FindOrCreate( cname );
- if ( attrib ) {
- attrib->SetValue( cvalue );
- }
+ TiXmlAttribute* attrib = attributeSet.FindOrCreate( cname );
+ if ( attrib )
+ {
+ attrib->SetValue( cvalue );
+ }
}
#ifdef TIXML_USE_STL
void TiXmlElement::SetAttribute( const std::string& _name, const std::string& _value )
{
- TiXmlAttribute* attrib = attributeSet.FindOrCreate( _name );
- if ( attrib ) {
- attrib->SetValue( _value );
- }
+ TiXmlAttribute* attrib = attributeSet.FindOrCreate( _name );
+ if ( attrib )
+ {
+ attrib->SetValue( _value );
+ }
}
#endif
void TiXmlElement::Print( FILE* cfile, int depth ) const
{
- int i;
- assert( cfile );
- for ( i=0; i<depth; i++ ) {
- fprintf( cfile, " " );
- }
-
- fprintf( cfile, "<%s", value.c_str() );
-
- const TiXmlAttribute* attrib;
- for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() )
- {
- fprintf( cfile, " " );
- attrib->Print( cfile, depth );
- }
-
- // There are 3 different formatting approaches:
- // 1) An element without children is printed as a <foo /> node
- // 2) An element with only a text child is printed as <foo> text </foo>
- // 3) An element with children is printed on multiple lines.
- TiXmlNode* node;
- if ( !firstChild )
- {
- fprintf( cfile, " />" );
- }
- else if ( firstChild == lastChild && firstChild->ToText() )
- {
- fprintf( cfile, ">" );
- firstChild->Print( cfile, depth + 1 );
- fprintf( cfile, "</%s>", value.c_str() );
- }
- else
- {
- fprintf( cfile, ">" );
-
- for ( node = firstChild; node; node=node->NextSibling() )
- {
- if ( !node->ToText() )
- {
- fprintf( cfile, "\n" );
- }
- node->Print( cfile, depth+1 );
- }
- fprintf( cfile, "\n" );
- for( i=0; i<depth; ++i ) {
- fprintf( cfile, " " );
- }
- fprintf( cfile, "</%s>", value.c_str() );
- }
+ int i;
+ assert( cfile );
+ for ( i=0; i<depth; i++ )
+ {
+ fprintf( cfile, " " );
+ }
+
+ fprintf( cfile, "<%s", value.c_str() );
+
+ const TiXmlAttribute* attrib;
+ for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() )
+ {
+ fprintf( cfile, " " );
+ attrib->Print( cfile, depth );
+ }
+
+ // There are 3 different formatting approaches:
+ // 1) An element without children is printed as a <foo /> node
+ // 2) An element with only a text child is printed as <foo> text </foo>
+ // 3) An element with children is printed on multiple lines.
+ TiXmlNode* node;
+ if ( !firstChild )
+ {
+ fprintf( cfile, " />" );
+ }
+ else if ( firstChild == lastChild && firstChild->ToText() )
+ {
+ fprintf( cfile, ">" );
+ firstChild->Print( cfile, depth + 1 );
+ fprintf( cfile, "</%s>", value.c_str() );
+ }
+ else
+ {
+ fprintf( cfile, ">" );
+
+ for ( node = firstChild; node; node=node->NextSibling() )
+ {
+ if ( !node->ToText() )
+ {
+ fprintf( cfile, "\n" );
+ }
+ node->Print( cfile, depth+1 );
+ }
+ fprintf( cfile, "\n" );
+ for( i=0; i<depth; ++i )
+ {
+ fprintf( cfile, " " );
+ }
+ fprintf( cfile, "</%s>", value.c_str() );
+ }
}
void TiXmlElement::CopyTo( TiXmlElement* target ) const
{
- // superclass:
- TiXmlNode::CopyTo( target );
+ // superclass:
+ TiXmlNode::CopyTo( target );
- // Element class:
- // Clone the attributes, then clone the children.
- const TiXmlAttribute* attribute = 0;
- for( attribute = attributeSet.First();
- attribute;
- attribute = attribute->Next() )
- {
- target->SetAttribute( attribute->Name(), attribute->Value() );
- }
+ // Element class:
+ // Clone the attributes, then clone the children.
+ const TiXmlAttribute* attribute = 0;
+ for( attribute = attributeSet.First();
+ attribute;
+ attribute = attribute->Next() )
+ {
+ target->SetAttribute( attribute->Name(), attribute->Value() );
+ }
- TiXmlNode* node = 0;
- for ( node = firstChild; node; node = node->NextSibling() )
- {
- target->LinkEndChild( node->Clone() );
- }
+ TiXmlNode* node = 0;
+ for ( node = firstChild; node; node = node->NextSibling() )
+ {
+ target->LinkEndChild( node->Clone() );
+ }
}
bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const
{
- if ( visitor->VisitEnter( *this, attributeSet.First() ) )
- {
- for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
- {
- if ( !node->Accept( visitor ) )
- break;
- }
- }
- return visitor->VisitExit( *this );
+ if ( visitor->VisitEnter( *this, attributeSet.First() ) )
+ {
+ for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
+ {
+ if ( !node->Accept( visitor ) )
+ break;
+ }
+ }
+ return visitor->VisitExit( *this );
}
TiXmlNode* TiXmlElement::Clone() const
{
- TiXmlElement* clone = new TiXmlElement( Value() );
- if ( !clone )
- return 0;
+ TiXmlElement* clone = new TiXmlElement( Value() );
+ if ( !clone )
+ return 0;
- CopyTo( clone );
- return clone;
+ CopyTo( clone );
+ return clone;
}
const char* TiXmlElement::GetText() const
{
- const TiXmlNode* child = this->FirstChild();
- if ( child ) {
- const TiXmlText* childText = child->ToText();
- if ( childText ) {
- return childText->Value();
- }
- }
- return 0;
+ const TiXmlNode* child = this->FirstChild();
+ if ( child )
+ {
+ const TiXmlText* childText = child->ToText();
+ if ( childText )
+ {
+ return childText->Value();
+ }
+ }
+ return 0;
}
TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )
{
- tabsize = 4;
- useMicrosoftBOM = false;
- ClearError();
+ tabsize = 4;
+ useMicrosoftBOM = false;
+ ClearError();
}
TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )
{
- tabsize = 4;
- useMicrosoftBOM = false;
- value = documentName;
- ClearError();
+ tabsize = 4;
+ useMicrosoftBOM = false;
+ value = documentName;
+ ClearError();
}
#ifdef TIXML_USE_STL
TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )
{
- tabsize = 4;
- useMicrosoftBOM = false;
+ tabsize = 4;
+ useMicrosoftBOM = false;
value = documentName;
- ClearError();
+ ClearError();
}
#endif
TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )
{
- copy.CopyTo( this );
+ copy.CopyTo( this );
}
void TiXmlDocument::operator=( const TiXmlDocument& copy )
{
- Clear();
- copy.CopyTo( this );
+ Clear();
+ copy.CopyTo( this );
}
bool TiXmlDocument::LoadFile( TiXmlEncoding encoding )
{
- return LoadFile( Value(), encoding );
+ return LoadFile( Value(), encoding );
}
bool TiXmlDocument::SaveFile() const
{
- return SaveFile( Value() );
+ return SaveFile( Value() );
}
bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
{
- TIXML_STRING filename( _filename );
- value = filename;
+ TIXML_STRING filename( _filename );
+ value = filename;
- // reading in binary mode so that tinyxml can normalize the EOL
- FILE* file = TiXmlFOpen( value.c_str (), "rb" );
+ // reading in binary mode so that tinyxml can normalize the EOL
+ FILE* file = TiXmlFOpen( value.c_str (), "rb" );
- if ( file )
- {
- bool result = LoadFile( file, encoding );
- fclose( file );
- return result;
- }
- else
- {
- SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
- return false;
- }
+ if ( file )
+ {
+ bool result = LoadFile( file, encoding );
+ fclose( file );
+ return result;
+ }
+ else
+ {
+ SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return false;
+ }
}
bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
{
- if ( !file )
- {
- SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
- return false;
- }
-
- // Delete the existing data:
- Clear();
- location.Clear();
-
- // Get the file size, so we can pre-allocate the string. HUGE speed impact.
- long length = 0;
- fseek( file, 0, SEEK_END );
- length = ftell( file );
- fseek( file, 0, SEEK_SET );
-
- // Strange case, but good to handle up front.
- if ( length <= 0 )
- {
- SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return false;
- }
-
- // Subtle bug here. TinyXml did use fgets. But from the XML spec:
- // 2.11 End-of-Line Handling
- // <snip>
- // <quote>
- // ...the XML processor MUST behave as if it normalized all line breaks in external
- // parsed entities (including the document entity) on input, before parsing, by translating
- // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
- // a single #xA character.
- // </quote>
- //
- // It is not clear fgets does that, and certainly isn't clear it works cross platform.
- // Generally, you expect fgets to translate from the convention of the OS to the c/unix
- // convention, and not work generally.
-
- /*
- while( fgets( buf, sizeof(buf), file ) )
- {
- data += buf;
- }
- */
-
- char* buf = new char[ length+1 ];
- buf[0] = 0;
-
- if ( fread( buf, length, 1, file ) != 1 ) {
- delete [] buf;
- SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
- return false;
- }
-
- // Process the buffer in place to normalize new lines. (See comment above.)
- // Copies from the 'p' to 'q' pointer, where p can advance faster if
- // a newline-carriage return is hit.
- //
- // Wikipedia:
- // Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or
- // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)...
- // * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
+ if ( !file )
+ {
+ SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return false;
+ }
+
+ // Delete the existing data:
+ Clear();
+ location.Clear();
+
+ // Get the file size, so we can pre-allocate the string. HUGE speed impact.
+ long length = 0;
+ fseek( file, 0, SEEK_END );
+ length = ftell( file );
+ fseek( file, 0, SEEK_SET );
+
+ // Strange case, but good to handle up front.
+ if ( length <= 0 )
+ {
+ SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return false;
+ }
+
+ // Subtle bug here. TinyXml did use fgets. But from the XML spec:
+ // 2.11 End-of-Line Handling
+ // <snip>
+ // <quote>
+ // ...the XML processor MUST behave as if it normalized all line breaks in external
+ // parsed entities (including the document entity) on input, before parsing, by translating
+ // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
+ // a single #xA character.
+ // </quote>
+ //
+ // It is not clear fgets does that, and certainly isn't clear it works cross platform.
+ // Generally, you expect fgets to translate from the convention of the OS to the c/unix
+ // convention, and not work generally.
+
+ /*
+ while( fgets( buf, sizeof(buf), file ) )
+ {
+ data += buf;
+ }
+ */
+
+ char* buf = new char[ length+1 ];
+ buf[0] = 0;
+
+ if ( fread( buf, length, 1, file ) != 1 )
+ {
+ delete [] buf;
+ SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return false;
+ }
+
+ // Process the buffer in place to normalize new lines. (See comment above.)
+ // Copies from the 'p' to 'q' pointer, where p can advance faster if
+ // a newline-carriage return is hit.
+ //
+ // Wikipedia:
+ // Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or
+ // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)...
+ // * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
// * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS
// * CR: Commodore 8-bit machines, Apple II family, Mac OS up to version 9 and OS-9
- const char* p = buf; // the read head
- char* q = buf; // the write head
- const char CR = 0x0d;
- const char LF = 0x0a;
-
- buf[length] = 0;
- while( *p ) {
- assert( p < (buf+length) );
- assert( q <= (buf+length) );
- assert( q <= p );
-
- if ( *p == CR ) {
- *q++ = LF;
- p++;
- if ( *p == LF ) { // check for CR+LF (and skip LF)
- p++;
- }
- }
- else {
- *q++ = *p++;
- }
- }
- assert( q <= (buf+length) );
- *q = 0;
-
- Parse( buf, 0, encoding );
-
- delete [] buf;
- return !Error();
+ const char* p = buf; // the read head
+ char* q = buf; // the write head
+ const char CR = 0x0d;
+ const char LF = 0x0a;
+
+ buf[length] = 0;
+ while( *p )
+ {
+ assert( p < (buf+length) );
+ assert( q <= (buf+length) );
+ assert( q <= p );
+
+ if ( *p == CR )
+ {
+ *q++ = LF;
+ p++;
+ if ( *p == LF ) // check for CR+LF (and skip LF)
+ {
+ p++;
+ }
+ }
+ else
+ {
+ *q++ = *p++;
+ }
+ }
+ assert( q <= (buf+length) );
+ *q = 0;
+
+ Parse( buf, 0, encoding );
+
+ delete [] buf;
+ return !Error();
}
bool TiXmlDocument::SaveFile( const char * filename ) const
{
- // The old c stuff lives on...
- FILE* fp = TiXmlFOpen( filename, "w" );
- if ( fp )
- {
- bool result = SaveFile( fp );
- fclose( fp );
- return result;
- }
- return false;
+ // The old c stuff lives on...
+ FILE* fp = TiXmlFOpen( filename, "w" );
+ if ( fp )
+ {
+ bool result = SaveFile( fp );
+ fclose( fp );
+ return result;
+ }
+ return false;
}
bool TiXmlDocument::SaveFile( FILE* fp ) const
{
- if ( useMicrosoftBOM )
- {
- const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
- const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
- const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
+ if ( useMicrosoftBOM )
+ {
+ const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
+ const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
+ const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
- fputc( TIXML_UTF_LEAD_0, fp );
- fputc( TIXML_UTF_LEAD_1, fp );
- fputc( TIXML_UTF_LEAD_2, fp );
- }
- Print( fp, 0 );
- return (ferror(fp) == 0);
+ fputc( TIXML_UTF_LEAD_0, fp );
+ fputc( TIXML_UTF_LEAD_1, fp );
+ fputc( TIXML_UTF_LEAD_2, fp );
+ }
+ Print( fp, 0 );
+ return (ferror(fp) == 0);
}
void TiXmlDocument::CopyTo( TiXmlDocument* target ) const
{
- TiXmlNode::CopyTo( target );
+ TiXmlNode::CopyTo( target );
- target->error = error;
- target->errorId = errorId;
- target->errorDesc = errorDesc;
- target->tabsize = tabsize;
- target->errorLocation = errorLocation;
- target->useMicrosoftBOM = useMicrosoftBOM;
+ target->error = error;
+ target->errorId = errorId;
+ target->errorDesc = errorDesc;
+ target->tabsize = tabsize;
+ target->errorLocation = errorLocation;
+ target->useMicrosoftBOM = useMicrosoftBOM;
- TiXmlNode* node = 0;
- for ( node = firstChild; node; node = node->NextSibling() )
- {
- target->LinkEndChild( node->Clone() );
- }
+ TiXmlNode* node = 0;
+ for ( node = firstChild; node; node = node->NextSibling() )
+ {
+ target->LinkEndChild( node->Clone() );
+ }
}
TiXmlNode* TiXmlDocument::Clone() const
{
- TiXmlDocument* clone = new TiXmlDocument();
- if ( !clone )
- return 0;
+ TiXmlDocument* clone = new TiXmlDocument();
+ if ( !clone )
+ return 0;
- CopyTo( clone );
- return clone;
+ CopyTo( clone );
+ return clone;
}
void TiXmlDocument::Print( FILE* cfile, int depth ) const
{
- assert( cfile );
- for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
- {
- node->Print( cfile, depth );
- fprintf( cfile, "\n" );
- }
+ assert( cfile );
+ for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
+ {
+ node->Print( cfile, depth );
+ fprintf( cfile, "\n" );
+ }
}
bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const
{
- if ( visitor->VisitEnter( *this ) )
- {
- for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
- {
- if ( !node->Accept( visitor ) )
- break;
- }
- }
- return visitor->VisitExit( *this );
+ if ( visitor->VisitEnter( *this ) )
+ {
+ for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
+ {
+ if ( !node->Accept( visitor ) )
+ break;
+ }
+ }
+ return visitor->VisitExit( *this );
}
const TiXmlAttribute* TiXmlAttribute::Next() const
{
- // We are using knowledge of the sentinel. The sentinel
- // have a value or name.
- if ( next->value.empty() && next->name.empty() )
- return 0;
- return next;
+ // We are using knowledge of the sentinel. The sentinel
+ // have a value or name.
+ if ( next->value.empty() && next->name.empty() )
+ return 0;
+ return next;
}
/*
@@ -1144,11 +1171,11 @@ TiXmlAttribute* TiXmlAttribute::Next()
const TiXmlAttribute* TiXmlAttribute::Previous() const
{
- // We are using knowledge of the sentinel. The sentinel
- // have a value or name.
- if ( prev->value.empty() && prev->name.empty() )
- return 0;
- return prev;
+ // We are using knowledge of the sentinel. The sentinel
+ // have a value or name.
+ if ( prev->value.empty() && prev->name.empty() )
+ return 0;
+ return prev;
}
/*
@@ -1164,676 +1191,709 @@ TiXmlAttribute* TiXmlAttribute::Previous()
void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const
{
- TIXML_STRING n, v;
-
- EncodeString( name, &n );
- EncodeString( value, &v );
-
- if (value.find ('\"') == TIXML_STRING::npos) {
- if ( cfile ) {
- fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() );
- }
- if ( str ) {
- (*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\"";
- }
- }
- else {
- if ( cfile ) {
- fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() );
- }
- if ( str ) {
- (*str) += n; (*str) += "='"; (*str) += v; (*str) += "'";
- }
- }
+ TIXML_STRING n, v;
+
+ EncodeString( name, &n );
+ EncodeString( value, &v );
+
+ if (value.find ('\"') == TIXML_STRING::npos)
+ {
+ if ( cfile )
+ {
+ fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() );
+ }
+ if ( str )
+ {
+ (*str) += n;
+ (*str) += "=\"";
+ (*str) += v;
+ (*str) += "\"";
+ }
+ }
+ else
+ {
+ if ( cfile )
+ {
+ fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() );
+ }
+ if ( str )
+ {
+ (*str) += n;
+ (*str) += "='";
+ (*str) += v;
+ (*str) += "'";
+ }
+ }
}
int TiXmlAttribute::QueryIntValue( int* ival ) const
{
- if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 )
- return TIXML_SUCCESS;
- return TIXML_WRONG_TYPE;
+ if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 )
+ return TIXML_SUCCESS;
+ return TIXML_WRONG_TYPE;
}
int TiXmlAttribute::QueryDoubleValue( double* dval ) const
{
- if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 )
- return TIXML_SUCCESS;
- return TIXML_WRONG_TYPE;
+ if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 )
+ return TIXML_SUCCESS;
+ return TIXML_WRONG_TYPE;
}
void TiXmlAttribute::SetIntValue( int _value )
{
- char buf [64];
- #if defined(TIXML_SNPRINTF)
- TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);
- #else
- sprintf (buf, "%d", _value);
- #endif
- SetValue (buf);
+ char buf [64];
+#if defined(TIXML_SNPRINTF)
+ TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);
+#else
+ sprintf (buf, "%d", _value);
+#endif
+ SetValue (buf);
}
void TiXmlAttribute::SetDoubleValue( double _value )
{
- char buf [256];
- #if defined(TIXML_SNPRINTF)
- TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value);
- #else
- sprintf (buf, "%g", _value);
- #endif
- SetValue (buf);
+ char buf [256];
+#if defined(TIXML_SNPRINTF)
+ TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value);
+#else
+ sprintf (buf, "%g", _value);
+#endif
+ SetValue (buf);
}
int TiXmlAttribute::IntValue() const
{
- return atoi (value.c_str ());
+ return atoi (value.c_str ());
}
double TiXmlAttribute::DoubleValue() const
{
- return atof (value.c_str ());
+ return atof (value.c_str ());
}
TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT )
{
- copy.CopyTo( this );
+ copy.CopyTo( this );
}
void TiXmlComment::operator=( const TiXmlComment& base )
{
- Clear();
- base.CopyTo( this );
+ Clear();
+ base.CopyTo( this );
}
void TiXmlComment::Print( FILE* cfile, int depth ) const
{
- assert( cfile );
- for ( int i=0; i<depth; i++ )
- {
- fprintf( cfile, " " );
- }
- fprintf( cfile, "<!--%s-->", value.c_str() );
+ assert( cfile );
+ for ( int i=0; i<depth; i++ )
+ {
+ fprintf( cfile, " " );
+ }
+ fprintf( cfile, "<!--%s-->", value.c_str() );
}
void TiXmlComment::CopyTo( TiXmlComment* target ) const
{
- TiXmlNode::CopyTo( target );
+ TiXmlNode::CopyTo( target );
}
bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const
{
- return visitor->Visit( *this );
+ return visitor->Visit( *this );
}
TiXmlNode* TiXmlComment::Clone() const
{
- TiXmlComment* clone = new TiXmlComment();
+ TiXmlComment* clone = new TiXmlComment();
- if ( !clone )
- return 0;
+ if ( !clone )
+ return 0;
- CopyTo( clone );
- return clone;
+ CopyTo( clone );
+ return clone;
}
void TiXmlText::Print( FILE* cfile, int depth ) const
{
- assert( cfile );
- if ( cdata )
- {
- int i;
- fprintf( cfile, "\n" );
- for ( i=0; i<depth; i++ ) {
- fprintf( cfile, " " );
- }
- fprintf( cfile, "<![CDATA[%s]]>\n", value.c_str() ); // unformatted output
- }
- else
- {
- TIXML_STRING buffer;
- EncodeString( value, &buffer );
- fprintf( cfile, "%s", buffer.c_str() );
- }
+ assert( cfile );
+ if ( cdata )
+ {
+ int i;
+ fprintf( cfile, "\n" );
+ for ( i=0; i<depth; i++ )
+ {
+ fprintf( cfile, " " );
+ }
+ fprintf( cfile, "<![CDATA[%s]]>\n", value.c_str() ); // unformatted output
+ }
+ else
+ {
+ TIXML_STRING buffer;
+ EncodeString( value, &buffer );
+ fprintf( cfile, "%s", buffer.c_str() );
+ }
}
void TiXmlText::CopyTo( TiXmlText* target ) const
{
- TiXmlNode::CopyTo( target );
- target->cdata = cdata;
+ TiXmlNode::CopyTo( target );
+ target->cdata = cdata;
}
bool TiXmlText::Accept( TiXmlVisitor* visitor ) const
{
- return visitor->Visit( *this );
+ return visitor->Visit( *this );
}
TiXmlNode* TiXmlText::Clone() const
-{
- TiXmlText* clone = 0;
- clone = new TiXmlText( "" );
+{
+ TiXmlText* clone = 0;
+ clone = new TiXmlText( "" );
- if ( !clone )
- return 0;
+ if ( !clone )
+ return 0;
- CopyTo( clone );
- return clone;
+ CopyTo( clone );
+ return clone;
}
TiXmlDeclaration::TiXmlDeclaration( const char * _version,
- const char * _encoding,
- const char * _standalone )
- : TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
+ const char * _encoding,
+ const char * _standalone )
+ : TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
{
- version = _version;
- encoding = _encoding;
- standalone = _standalone;
+ version = _version;
+ encoding = _encoding;
+ standalone = _standalone;
}
#ifdef TIXML_USE_STL
TiXmlDeclaration::TiXmlDeclaration( const std::string& _version,
- const std::string& _encoding,
- const std::string& _standalone )
- : TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
+ const std::string& _encoding,
+ const std::string& _standalone )
+ : TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
{
- version = _version;
- encoding = _encoding;
- standalone = _standalone;
+ version = _version;
+ encoding = _encoding;
+ standalone = _standalone;
}
#endif
TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy )
- : TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
+ : TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
{
- copy.CopyTo( this );
+ copy.CopyTo( this );
}
void TiXmlDeclaration::operator=( const TiXmlDeclaration& copy )
{
- Clear();
- copy.CopyTo( this );
+ Clear();
+ copy.CopyTo( this );
}
void TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const
{
- if ( cfile ) fprintf( cfile, "<?xml " );
- if ( str ) (*str) += "<?xml ";
-
- if ( !version.empty() ) {
- if ( cfile ) fprintf (cfile, "version=\"%s\" ", version.c_str ());
- if ( str ) { (*str) += "version=\""; (*str) += version; (*str) += "\" "; }
- }
- if ( !encoding.empty() ) {
- if ( cfile ) fprintf (cfile, "encoding=\"%s\" ", encoding.c_str ());
- if ( str ) { (*str) += "encoding=\""; (*str) += encoding; (*str) += "\" "; }
- }
- if ( !standalone.empty() ) {
- if ( cfile ) fprintf (cfile, "standalone=\"%s\" ", standalone.c_str ());
- if ( str ) { (*str) += "standalone=\""; (*str) += standalone; (*str) += "\" "; }
- }
- if ( cfile ) fprintf( cfile, "?>" );
- if ( str ) (*str) += "?>";
+ if ( cfile ) fprintf( cfile, "<?xml " );
+ if ( str ) (*str) += "<?xml ";
+
+ if ( !version.empty() )
+ {
+ if ( cfile ) fprintf (cfile, "version=\"%s\" ", version.c_str ());
+ if ( str )
+ {
+ (*str) += "version=\"";
+ (*str) += version;
+ (*str) += "\" ";
+ }
+ }
+ if ( !encoding.empty() )
+ {
+ if ( cfile ) fprintf (cfile, "encoding=\"%s\" ", encoding.c_str ());
+ if ( str )
+ {
+ (*str) += "encoding=\"";
+ (*str) += encoding;
+ (*str) += "\" ";
+ }
+ }
+ if ( !standalone.empty() )
+ {
+ if ( cfile ) fprintf (cfile, "standalone=\"%s\" ", standalone.c_str ());
+ if ( str )
+ {
+ (*str) += "standalone=\"";
+ (*str) += standalone;
+ (*str) += "\" ";
+ }
+ }
+ if ( cfile ) fprintf( cfile, "?>" );
+ if ( str ) (*str) += "?>";
}
void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const
{
- TiXmlNode::CopyTo( target );
+ TiXmlNode::CopyTo( target );
- target->version = version;
- target->encoding = encoding;
- target->standalone = standalone;
+ target->version = version;
+ target->encoding = encoding;
+ target->standalone = standalone;
}
bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const
{
- return visitor->Visit( *this );
+ return visitor->Visit( *this );
}
TiXmlNode* TiXmlDeclaration::Clone() const
-{
- TiXmlDeclaration* clone = new TiXmlDeclaration();
+{
+ TiXmlDeclaration* clone = new TiXmlDeclaration();
- if ( !clone )
- return 0;
+ if ( !clone )
+ return 0;
- CopyTo( clone );
- return clone;
+ CopyTo( clone );
+ return clone;
}
void TiXmlUnknown::Print( FILE* cfile, int depth ) const
{
- for ( int i=0; i<depth; i++ )
- fprintf( cfile, " " );
- fprintf( cfile, "<%s>", value.c_str() );
+ for ( int i=0; i<depth; i++ )
+ fprintf( cfile, " " );
+ fprintf( cfile, "<%s>", value.c_str() );
}
void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const
{
- TiXmlNode::CopyTo( target );
+ TiXmlNode::CopyTo( target );
}
bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const
{
- return visitor->Visit( *this );
+ return visitor->Visit( *this );
}
TiXmlNode* TiXmlUnknown::Clone() const
{
- TiXmlUnknown* clone = new TiXmlUnknown();
+ TiXmlUnknown* clone = new TiXmlUnknown();
- if ( !clone )
- return 0;
+ if ( !clone )
+ return 0;
- CopyTo( clone );
- return clone;
+ CopyTo( clone );
+ return clone;
}
TiXmlAttributeSet::TiXmlAttributeSet()
{
- sentinel.next = &sentinel;
- sentinel.prev = &sentinel;
+ sentinel.next = &sentinel;
+ sentinel.prev = &sentinel;
}
TiXmlAttributeSet::~TiXmlAttributeSet()
{
- assert( sentinel.next == &sentinel );
- assert( sentinel.prev == &sentinel );
+ assert( sentinel.next == &sentinel );
+ assert( sentinel.prev == &sentinel );
}
void TiXmlAttributeSet::Add( TiXmlAttribute* addMe )
{
- #ifdef TIXML_USE_STL
- assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set.
- #else
- assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set.
- #endif
+#ifdef TIXML_USE_STL
+ assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set.
+#else
+ assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set.
+#endif
- addMe->next = &sentinel;
- addMe->prev = sentinel.prev;
+ addMe->next = &sentinel;
+ addMe->prev = sentinel.prev;
- sentinel.prev->next = addMe;
- sentinel.prev = addMe;
+ sentinel.prev->next = addMe;
+ sentinel.prev = addMe;
}
void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe )
{
- TiXmlAttribute* node;
+ TiXmlAttribute* node;
- for( node = sentinel.next; node != &sentinel; node = node->next )
- {
- if ( node == removeMe )
- {
- node->prev->next = node->next;
- node->next->prev = node->prev;
- node->next = 0;
- node->prev = 0;
- return;
- }
- }
- assert( 0 ); // we tried to remove a non-linked attribute.
+ for( node = sentinel.next; node != &sentinel; node = node->next )
+ {
+ if ( node == removeMe )
+ {
+ node->prev->next = node->next;
+ node->next->prev = node->prev;
+ node->next = 0;
+ node->prev = 0;
+ return;
+ }
+ }
+ assert( 0 ); // we tried to remove a non-linked attribute.
}
#ifdef TIXML_USE_STL
TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const
{
- for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
- {
- if ( node->name == name )
- return node;
- }
- return 0;
+ for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
+ {
+ if ( node->name == name )
+ return node;
+ }
+ return 0;
}
TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const std::string& _name )
{
- TiXmlAttribute* attrib = Find( _name );
- if ( !attrib ) {
- attrib = new TiXmlAttribute();
- Add( attrib );
- attrib->SetName( _name );
- }
- return attrib;
+ TiXmlAttribute* attrib = Find( _name );
+ if ( !attrib )
+ {
+ attrib = new TiXmlAttribute();
+ Add( attrib );
+ attrib->SetName( _name );
+ }
+ return attrib;
}
#endif
TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const
{
- for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
- {
- if ( strcmp( node->name.c_str(), name ) == 0 )
- return node;
- }
- return 0;
+ for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
+ {
+ if ( strcmp( node->name.c_str(), name ) == 0 )
+ return node;
+ }
+ return 0;
}
TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name )
{
- TiXmlAttribute* attrib = Find( _name );
- if ( !attrib ) {
- attrib = new TiXmlAttribute();
- Add( attrib );
- attrib->SetName( _name );
- }
- return attrib;
+ TiXmlAttribute* attrib = Find( _name );
+ if ( !attrib )
+ {
+ attrib = new TiXmlAttribute();
+ Add( attrib );
+ attrib->SetName( _name );
+ }
+ return attrib;
}
-#ifdef TIXML_USE_STL
+#ifdef TIXML_USE_STL
std::istream& operator>> (std::istream & in, TiXmlNode & base)
{
- TIXML_STRING tag;
- tag.reserve( 8 * 1000 );
- base.StreamIn( &in, &tag );
+ TIXML_STRING tag;
+ tag.reserve( 8 * 1000 );
+ base.StreamIn( &in, &tag );
- base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING );
- return in;
+ base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING );
+ return in;
}
#endif
-#ifdef TIXML_USE_STL
+#ifdef TIXML_USE_STL
std::ostream& operator<< (std::ostream & out, const TiXmlNode & base)
{
- TiXmlPrinter printer;
- printer.SetStreamPrinting();
- base.Accept( &printer );
- out << printer.Str();
+ TiXmlPrinter printer;
+ printer.SetStreamPrinting();
+ base.Accept( &printer );
+ out << printer.Str();
- return out;
+ return out;
}
std::string& operator<< (std::string& out, const TiXmlNode& base )
{
- TiXmlPrinter printer;
- printer.SetStreamPrinting();
- base.Accept( &printer );
- out.append( printer.Str() );
+ TiXmlPrinter printer;
+ printer.SetStreamPrinting();
+ base.Accept( &printer );
+ out.append( printer.Str() );
- return out;
+ return out;
}
#endif
TiXmlHandle TiXmlHandle::FirstChild() const
{
- if ( node )
- {
- TiXmlNode* child = node->FirstChild();
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ TiXmlNode* child = node->FirstChild();
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const
{
- if ( node )
- {
- TiXmlNode* child = node->FirstChild( value );
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ TiXmlNode* child = node->FirstChild( value );
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
TiXmlHandle TiXmlHandle::FirstChildElement() const
{
- if ( node )
- {
- TiXmlElement* child = node->FirstChildElement();
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ TiXmlElement* child = node->FirstChildElement();
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const
{
- if ( node )
- {
- TiXmlElement* child = node->FirstChildElement( value );
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ TiXmlElement* child = node->FirstChildElement( value );
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
TiXmlHandle TiXmlHandle::Child( int count ) const
{
- if ( node )
- {
- int i;
- TiXmlNode* child = node->FirstChild();
- for ( i=0;
- child && i<count;
- child = child->NextSibling(), ++i )
- {
- // nothing
- }
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ int i;
+ TiXmlNode* child = node->FirstChild();
+ for ( i=0;
+ child && i<count;
+ child = child->NextSibling(), ++i )
+ {
+ // nothing
+ }
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const
{
- if ( node )
- {
- int i;
- TiXmlNode* child = node->FirstChild( value );
- for ( i=0;
- child && i<count;
- child = child->NextSibling( value ), ++i )
- {
- // nothing
- }
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ int i;
+ TiXmlNode* child = node->FirstChild( value );
+ for ( i=0;
+ child && i<count;
+ child = child->NextSibling( value ), ++i )
+ {
+ // nothing
+ }
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
TiXmlHandle TiXmlHandle::ChildElement( int count ) const
{
- if ( node )
- {
- int i;
- TiXmlElement* child = node->FirstChildElement();
- for ( i=0;
- child && i<count;
- child = child->NextSiblingElement(), ++i )
- {
- // nothing
- }
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ int i;
+ TiXmlElement* child = node->FirstChildElement();
+ for ( i=0;
+ child && i<count;
+ child = child->NextSiblingElement(), ++i )
+ {
+ // nothing
+ }
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const
{
- if ( node )
- {
- int i;
- TiXmlElement* child = node->FirstChildElement( value );
- for ( i=0;
- child && i<count;
- child = child->NextSiblingElement( value ), ++i )
- {
- // nothing
- }
- if ( child )
- return TiXmlHandle( child );
- }
- return TiXmlHandle( 0 );
+ if ( node )
+ {
+ int i;
+ TiXmlElement* child = node->FirstChildElement( value );
+ for ( i=0;
+ child && i<count;
+ child = child->NextSiblingElement( value ), ++i )
+ {
+ // nothing
+ }
+ if ( child )
+ return TiXmlHandle( child );
+ }
+ return TiXmlHandle( 0 );
}
bool TiXmlPrinter::VisitEnter( const TiXmlDocument& )
{
- return true;
+ return true;
}
bool TiXmlPrinter::VisitExit( const TiXmlDocument& )
{
- return true;
+ return true;
}
bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute )
{
- DoIndent();
- buffer += "<";
- buffer += element.Value();
-
- for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() )
- {
- buffer += " ";
- attrib->Print( 0, 0, &buffer );
- }
-
- if ( !element.FirstChild() )
- {
- buffer += " />";
- DoLineBreak();
- }
- else
- {
- buffer += ">";
- if ( element.FirstChild()->ToText()
- && element.LastChild() == element.FirstChild()
- && element.FirstChild()->ToText()->CDATA() == false )
- {
- simpleTextPrint = true;
- // no DoLineBreak()!
- }
- else
- {
- DoLineBreak();
- }
- }
- ++depth;
- return true;
+ DoIndent();
+ buffer += "<";
+ buffer += element.Value();
+
+ for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() )
+ {
+ buffer += " ";
+ attrib->Print( 0, 0, &buffer );
+ }
+
+ if ( !element.FirstChild() )
+ {
+ buffer += " />";
+ DoLineBreak();
+ }
+ else
+ {
+ buffer += ">";
+ if ( element.FirstChild()->ToText()
+ && element.LastChild() == element.FirstChild()
+ && element.FirstChild()->ToText()->CDATA() == false )
+ {
+ simpleTextPrint = true;
+ // no DoLineBreak()!
+ }
+ else
+ {
+ DoLineBreak();
+ }
+ }
+ ++depth;
+ return true;
}
bool TiXmlPrinter::VisitExit( const TiXmlElement& element )
{
- --depth;
- if ( !element.FirstChild() )
- {
- // nothing.
- }
- else
- {
- if ( simpleTextPrint )
- {
- simpleTextPrint = false;
- }
- else
- {
- DoIndent();
- }
- buffer += "</";
- buffer += element.Value();
- buffer += ">";
- DoLineBreak();
- }
- return true;
+ --depth;
+ if ( !element.FirstChild() )
+ {
+ // nothing.
+ }
+ else
+ {
+ if ( simpleTextPrint )
+ {
+ simpleTextPrint = false;
+ }
+ else
+ {
+ DoIndent();
+ }
+ buffer += "</";
+ buffer += element.Value();
+ buffer += ">";
+ DoLineBreak();
+ }
+ return true;
}
bool TiXmlPrinter::Visit( const TiXmlText& text )
{
- if ( text.CDATA() )
- {
- DoIndent();
- buffer += "<![CDATA[";
- buffer += text.Value();
- buffer += "]]>";
- DoLineBreak();
- }
- else if ( simpleTextPrint )
- {
- TIXML_STRING str;
- TiXmlBase::EncodeString( text.ValueTStr(), &str );
- buffer += str;
- }
- else
- {
- DoIndent();
- TIXML_STRING str;
- TiXmlBase::EncodeString( text.ValueTStr(), &str );
- buffer += str;
- DoLineBreak();
- }
- return true;
+ if ( text.CDATA() )
+ {
+ DoIndent();
+ buffer += "<![CDATA[";
+ buffer += text.Value();
+ buffer += "]]>";
+ DoLineBreak();
+ }
+ else if ( simpleTextPrint )
+ {
+ TIXML_STRING str;
+ TiXmlBase::EncodeString( text.ValueTStr(), &str );
+ buffer += str;
+ }
+ else
+ {
+ DoIndent();
+ TIXML_STRING str;
+ TiXmlBase::EncodeString( text.ValueTStr(), &str );
+ buffer += str;
+ DoLineBreak();
+ }
+ return true;
}
bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration )
{
- DoIndent();
- declaration.Print( 0, 0, &buffer );
- DoLineBreak();
- return true;
+ DoIndent();
+ declaration.Print( 0, 0, &buffer );
+ DoLineBreak();
+ return true;
}
bool TiXmlPrinter::Visit( const TiXmlComment& comment )
{
- DoIndent();
- buffer += "<!--";
- buffer += comment.Value();
- buffer += "-->";
- DoLineBreak();
- return true;
+ DoIndent();
+ buffer += "<!--";
+ buffer += comment.Value();
+ buffer += "-->";
+ DoLineBreak();
+ return true;
}
bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown )
{
- DoIndent();
- buffer += "<";
- buffer += unknown.Value();
- buffer += ">";
- DoLineBreak();
- return true;
+ DoIndent();
+ buffer += "<";
+ buffer += unknown.Value();
+ buffer += ">";
+ DoLineBreak();
+ return true;
}
diff --git a/shared/tinyxml/tinyxmlerror.cpp b/shared/tinyxml/tinyxmlerror.cpp
index d66f6ffb..3034074b 100644
--- a/shared/tinyxml/tinyxmlerror.cpp
+++ b/shared/tinyxml/tinyxmlerror.cpp
@@ -2,12 +2,12 @@
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
@@ -33,20 +33,20 @@ distribution.
const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
{
- "No error",
- "Error",
- "Failed to open file",
- "Error parsing Element.",
- "Failed to read Element name",
- "Error reading Element value.",
- "Error reading Attributes.",
- "Error: empty tag.",
- "Error reading end tag.",
- "Error parsing Unknown.",
- "Error parsing Comment.",
- "Error parsing Declaration.",
- "Error document empty.",
- "Error null (0) or unexpected EOF found in input stream.",
- "Error parsing CDATA.",
- "Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
+ "No error",
+ "Error",
+ "Failed to open file",
+ "Error parsing Element.",
+ "Failed to read Element name",
+ "Error reading Element value.",
+ "Error reading Attributes.",
+ "Error: empty tag.",
+ "Error reading end tag.",
+ "Error parsing Unknown.",
+ "Error parsing Comment.",
+ "Error parsing Declaration.",
+ "Error document empty.",
+ "Error null (0) or unexpected EOF found in input stream.",
+ "Error parsing CDATA.",
+ "Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
};
diff --git a/shared/tinyxml/tinyxmlparser.cpp b/shared/tinyxml/tinyxmlparser.cpp
index 666a4f75..92bee64d 100644
--- a/shared/tinyxml/tinyxmlparser.cpp
+++ b/shared/tinyxml/tinyxmlparser.cpp
@@ -2,23 +2,23 @@
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com)
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
-1. The origin of this software must not be misrepresented; you must
+1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
-2. Altered source versions must be plainly marked as such, and
+2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
-3. This notice may not be removed or altered from any source
+3. This notice may not be removed or altered from any source
distribution.
*/
@@ -39,14 +39,14 @@ distribution.
// Note tha "PutString" hardcodes the same list. This
// is less flexible than it appears. Changing the entries
-// or order will break putstring.
-TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] =
+// or order will break putstring.
+TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] =
{
- { "&amp;", 5, '&' },
- { "&lt;", 4, '<' },
- { "&gt;", 4, '>' },
- { "&quot;", 6, '\"' },
- { "&apos;", 6, '\'' }
+ { "&amp;", 5, '&' },
+ { "&lt;", 4, '<' },
+ { "&gt;", 4, '>' },
+ { "&quot;", 6, '\"' },
+ { "&apos;", 6, '\'' }
};
// Bunch of unicode info at:
@@ -54,91 +54,94 @@ TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] =
// Including the basic of this table, which determines the #bytes in the
// sequence from the lead byte. 1 placed for invalid sequences --
// although the result will be junk, pass it through as much as possible.
-// Beware of the non-characters in UTF-8:
+// Beware of the non-characters in UTF-8:
// ef bb bf (Microsoft "lead bytes")
// ef bf be
-// ef bf bf
+// ef bf bf
const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
-const int TiXmlBase::utf8ByteTable[256] =
+const int TiXmlBase::utf8ByteTable[256] =
{
- // 0 1 2 3 4 5 6 7 8 9 a b c d e f
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0
- 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte
- 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid
+ // 0 1 2 3 4 5 6 7 8 9 a b c d e f
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0
+ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte
+ 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid
};
void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )
{
- const unsigned long BYTE_MASK = 0xBF;
- const unsigned long BYTE_MARK = 0x80;
- const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
-
- if (input < 0x80)
- *length = 1;
- else if ( input < 0x800 )
- *length = 2;
- else if ( input < 0x10000 )
- *length = 3;
- else if ( input < 0x200000 )
- *length = 4;
- else
- { *length = 0; return; } // This code won't covert this correctly anyway.
-
- output += *length;
-
- // Scary scary fall throughs.
- switch (*length)
- {
- case 4:
- --output;
- *output = (char)((input | BYTE_MARK) & BYTE_MASK);
- input >>= 6;
- case 3:
- --output;
- *output = (char)((input | BYTE_MARK) & BYTE_MASK);
- input >>= 6;
- case 2:
- --output;
- *output = (char)((input | BYTE_MARK) & BYTE_MASK);
- input >>= 6;
- case 1:
- --output;
- *output = (char)(input | FIRST_BYTE_MARK[*length]);
- }
+ const unsigned long BYTE_MASK = 0xBF;
+ const unsigned long BYTE_MARK = 0x80;
+ const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
+
+ if (input < 0x80)
+ *length = 1;
+ else if ( input < 0x800 )
+ *length = 2;
+ else if ( input < 0x10000 )
+ *length = 3;
+ else if ( input < 0x200000 )
+ *length = 4;
+ else
+ {
+ *length = 0; // This code won't covert this correctly anyway.
+ return;
+ }
+
+ output += *length;
+
+ // Scary scary fall throughs.
+ switch (*length)
+ {
+ case 4:
+ --output;
+ *output = (char)((input | BYTE_MARK) & BYTE_MASK);
+ input >>= 6;
+ case 3:
+ --output;
+ *output = (char)((input | BYTE_MARK) & BYTE_MASK);
+ input >>= 6;
+ case 2:
+ --output;
+ *output = (char)((input | BYTE_MARK) & BYTE_MASK);
+ input >>= 6;
+ case 1:
+ --output;
+ *output = (char)(input | FIRST_BYTE_MARK[*length]);
+ }
}
/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ )
{
- // This will only work for low-ascii, everything else is assumed to be a valid
- // letter. I'm not sure this is the best approach, but it is quite tricky trying
- // to figure out alhabetical vs. not across encoding. So take a very
- // conservative approach.
+ // This will only work for low-ascii, everything else is assumed to be a valid
+ // letter. I'm not sure this is the best approach, but it is quite tricky trying
+ // to figure out alhabetical vs. not across encoding. So take a very
+ // conservative approach.
// if ( encoding == TIXML_ENCODING_UTF8 )
// {
- if ( anyByte < 127 )
- return isalpha( anyByte );
- else
- return 1; // What else to do? The unicode set is huge...get the english ones right.
+ if ( anyByte < 127 )
+ return isalpha( anyByte );
+ else
+ return 1; // What else to do? The unicode set is huge...get the english ones right.
// }
// else
// {
@@ -149,17 +152,17 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ )
{
- // This will only work for low-ascii, everything else is assumed to be a valid
- // letter. I'm not sure this is the best approach, but it is quite tricky trying
- // to figure out alhabetical vs. not across encoding. So take a very
- // conservative approach.
+ // This will only work for low-ascii, everything else is assumed to be a valid
+ // letter. I'm not sure this is the best approach, but it is quite tricky trying
+ // to figure out alhabetical vs. not across encoding. So take a very
+ // conservative approach.
// if ( encoding == TIXML_ENCODING_UTF8 )
// {
- if ( anyByte < 127 )
- return isalnum( anyByte );
- else
- return 1; // What else to do? The unicode set is huge...get the english ones right.
+ if ( anyByte < 127 )
+ return isalnum( anyByte );
+ else
+ return 1; // What else to do? The unicode set is huge...get the english ones right.
// }
// else
// {
@@ -170,228 +173,237 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
class TiXmlParsingData
{
- friend class TiXmlDocument;
- public:
- void Stamp( const char* now, TiXmlEncoding encoding );
-
- const TiXmlCursor& Cursor() { return cursor; }
-
- private:
- // Only used by the document!
- TiXmlParsingData( const char* start, int _tabsize, int row, int col )
- {
- assert( start );
- stamp = start;
- tabsize = _tabsize;
- cursor.row = row;
- cursor.col = col;
- }
-
- TiXmlCursor cursor;
- const char* stamp;
- int tabsize;
+ friend class TiXmlDocument;
+public:
+ void Stamp( const char* now, TiXmlEncoding encoding );
+
+ const TiXmlCursor& Cursor()
+ {
+ return cursor;
+ }
+
+private:
+ // Only used by the document!
+ TiXmlParsingData( const char* start, int _tabsize, int row, int col )
+ {
+ assert( start );
+ stamp = start;
+ tabsize = _tabsize;
+ cursor.row = row;
+ cursor.col = col;
+ }
+
+ TiXmlCursor cursor;
+ const char* stamp;
+ int tabsize;
};
void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
{
- assert( now );
-
- // Do nothing if the tabsize is 0.
- if ( tabsize < 1 )
- {
- return;
- }
-
- // Get the current row, column.
- int row = cursor.row;
- int col = cursor.col;
- const char* p = stamp;
- assert( p );
-
- while ( p < now )
- {
- // Treat p as unsigned, so we have a happy compiler.
- const unsigned char* pU = (const unsigned char*)p;
-
- // Code contributed by Fletcher Dunn: (modified by lee)
- switch (*pU) {
- case 0:
- // We *should* never get here, but in case we do, don't
- // advance past the terminating null character, ever
- return;
-
- case '\r':
- // bump down to the next line
- ++row;
- col = 0;
- // Eat the character
- ++p;
-
- // Check for \r\n sequence, and treat this as a single character
- if (*p == '\n') {
- ++p;
- }
- break;
-
- case '\n':
- // bump down to the next line
- ++row;
- col = 0;
-
- // Eat the character
- ++p;
-
- // Check for \n\r sequence, and treat this as a single
- // character. (Yes, this bizarre thing does occur still
- // on some arcane platforms...)
- if (*p == '\r') {
- ++p;
- }
- break;
-
- case '\t':
- // Eat the character
- ++p;
-
- // Skip to next tab stop
- col = (col / tabsize + 1) * tabsize;
- break;
-
- case TIXML_UTF_LEAD_0:
- if ( encoding == TIXML_ENCODING_UTF8 )
- {
- if ( *(p+1) && *(p+2) )
- {
- // In these cases, don't advance the column. These are
- // 0-width spaces.
- if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )
- p += 3;
- else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )
- p += 3;
- else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )
- p += 3;
- else
- { p +=3; ++col; } // A normal character.
- }
- }
- else
- {
- ++p;
- ++col;
- }
- break;
-
- default:
- if ( encoding == TIXML_ENCODING_UTF8 )
- {
- // Eat the 1 to 4 byte utf8 character.
- int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)];
- if ( step == 0 )
- step = 1; // Error case from bad encoding, but handle gracefully.
- p += step;
-
- // Just advance one column, of course.
- ++col;
- }
- else
- {
- ++p;
- ++col;
- }
- break;
- }
- }
- cursor.row = row;
- cursor.col = col;
- assert( cursor.row >= -1 );
- assert( cursor.col >= -1 );
- stamp = p;
- assert( stamp );
+ assert( now );
+
+ // Do nothing if the tabsize is 0.
+ if ( tabsize < 1 )
+ {
+ return;
+ }
+
+ // Get the current row, column.
+ int row = cursor.row;
+ int col = cursor.col;
+ const char* p = stamp;
+ assert( p );
+
+ while ( p < now )
+ {
+ // Treat p as unsigned, so we have a happy compiler.
+ const unsigned char* pU = (const unsigned char*)p;
+
+ // Code contributed by Fletcher Dunn: (modified by lee)
+ switch (*pU)
+ {
+ case 0:
+ // We *should* never get here, but in case we do, don't
+ // advance past the terminating null character, ever
+ return;
+
+ case '\r':
+ // bump down to the next line
+ ++row;
+ col = 0;
+ // Eat the character
+ ++p;
+
+ // Check for \r\n sequence, and treat this as a single character
+ if (*p == '\n')
+ {
+ ++p;
+ }
+ break;
+
+ case '\n':
+ // bump down to the next line
+ ++row;
+ col = 0;
+
+ // Eat the character
+ ++p;
+
+ // Check for \n\r sequence, and treat this as a single
+ // character. (Yes, this bizarre thing does occur still
+ // on some arcane platforms...)
+ if (*p == '\r')
+ {
+ ++p;
+ }
+ break;
+
+ case '\t':
+ // Eat the character
+ ++p;
+
+ // Skip to next tab stop
+ col = (col / tabsize + 1) * tabsize;
+ break;
+
+ case TIXML_UTF_LEAD_0:
+ if ( encoding == TIXML_ENCODING_UTF8 )
+ {
+ if ( *(p+1) && *(p+2) )
+ {
+ // In these cases, don't advance the column. These are
+ // 0-width spaces.
+ if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )
+ p += 3;
+ else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )
+ p += 3;
+ else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )
+ p += 3;
+ else
+ {
+ p +=3; // A normal character.
+ ++col;
+ }
+ }
+ }
+ else
+ {
+ ++p;
+ ++col;
+ }
+ break;
+
+ default:
+ if ( encoding == TIXML_ENCODING_UTF8 )
+ {
+ // Eat the 1 to 4 byte utf8 character.
+ int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)];
+ if ( step == 0 )
+ step = 1; // Error case from bad encoding, but handle gracefully.
+ p += step;
+
+ // Just advance one column, of course.
+ ++col;
+ }
+ else
+ {
+ ++p;
+ ++col;
+ }
+ break;
+ }
+ }
+ cursor.row = row;
+ cursor.col = col;
+ assert( cursor.row >= -1 );
+ assert( cursor.col >= -1 );
+ stamp = p;
+ assert( stamp );
}
const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
{
- if ( !p || !*p )
- {
- return 0;
- }
- if ( encoding == TIXML_ENCODING_UTF8 )
- {
- while ( *p )
- {
- const unsigned char* pU = (const unsigned char*)p;
-
- // Skip the stupid Microsoft UTF-8 Byte order marks
- if ( *(pU+0)==TIXML_UTF_LEAD_0
- && *(pU+1)==TIXML_UTF_LEAD_1
- && *(pU+2)==TIXML_UTF_LEAD_2 )
- {
- p += 3;
- continue;
- }
- else if(*(pU+0)==TIXML_UTF_LEAD_0
- && *(pU+1)==0xbfU
- && *(pU+2)==0xbeU )
- {
- p += 3;
- continue;
- }
- else if(*(pU+0)==TIXML_UTF_LEAD_0
- && *(pU+1)==0xbfU
- && *(pU+2)==0xbfU )
- {
- p += 3;
- continue;
- }
-
- if ( IsWhiteSpace( *p ) ) // Still using old rules for white space.
- ++p;
- else
- break;
- }
- }
- else
- {
- while ( *p && IsWhiteSpace( *p ) )
- ++p;
- }
-
- return p;
+ if ( !p || !*p )
+ {
+ return 0;
+ }
+ if ( encoding == TIXML_ENCODING_UTF8 )
+ {
+ while ( *p )
+ {
+ const unsigned char* pU = (const unsigned char*)p;
+
+ // Skip the stupid Microsoft UTF-8 Byte order marks
+ if ( *(pU+0)==TIXML_UTF_LEAD_0
+ && *(pU+1)==TIXML_UTF_LEAD_1
+ && *(pU+2)==TIXML_UTF_LEAD_2 )
+ {
+ p += 3;
+ continue;
+ }
+ else if(*(pU+0)==TIXML_UTF_LEAD_0
+ && *(pU+1)==0xbfU
+ && *(pU+2)==0xbeU )
+ {
+ p += 3;
+ continue;
+ }
+ else if(*(pU+0)==TIXML_UTF_LEAD_0
+ && *(pU+1)==0xbfU
+ && *(pU+2)==0xbfU )
+ {
+ p += 3;
+ continue;
+ }
+
+ if ( IsWhiteSpace( *p ) ) // Still using old rules for white space.
+ ++p;
+ else
+ break;
+ }
+ }
+ else
+ {
+ while ( *p && IsWhiteSpace( *p ) )
+ ++p;
+ }
+
+ return p;
}
#ifdef TIXML_USE_STL
/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag )
{
- for( ;; )
- {
- if ( !in->good() ) return false;
+ for( ;; )
+ {
+ if ( !in->good() ) return false;
- int c = in->peek();
- // At this scope, we can't get to a document. So fail silently.
- if ( !IsWhiteSpace( c ) || c <= 0 )
- return true;
+ int c = in->peek();
+ // At this scope, we can't get to a document. So fail silently.
+ if ( !IsWhiteSpace( c ) || c <= 0 )
+ return true;
- *tag += (char) in->get();
- }
+ *tag += (char) in->get();
+ }
}
/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag )
{
- //assert( character > 0 && character < 128 ); // else it won't work in utf-8
- while ( in->good() )
- {
- int c = in->peek();
- if ( c == character )
- return true;
- if ( c <= 0 ) // Silent failure: can't get document at this scope
- return false;
-
- in->get();
- *tag += (char) c;
- }
- return false;
+ //assert( character > 0 && character < 128 ); // else it won't work in utf-8
+ while ( in->good() )
+ {
+ int c = in->peek();
+ if ( c == character )
+ return true;
+ if ( c <= 0 ) // Silent failure: can't get document at this scope
+ return false;
+
+ in->get();
+ *tag += (char) c;
+ }
+ return false;
}
#endif
@@ -400,1236 +412,1244 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
//
const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding )
{
- // Oddly, not supported on some comilers,
- //name->clear();
- // So use this:
- *name = "";
- assert( p );
-
- // Names start with letters or underscores.
- // Of course, in unicode, tinyxml has no idea what a letter *is*. The
- // algorithm is generous.
- //
- // After that, they can be letters, underscores, numbers,
- // hyphens, or colons. (Colons are valid ony for namespaces,
- // but tinyxml can't tell namespaces from names.)
- if ( p && *p
- && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) )
- {
- const char* start = p;
- while( p && *p
- && ( IsAlphaNum( (unsigned char ) *p, encoding )
- || *p == '_'
- || *p == '-'
- || *p == '.'
- || *p == ':' ) )
- {
- //(*name) += *p; // expensive
- ++p;
- }
- if ( p-start > 0 ) {
- name->assign( start, p-start );
- }
- return p;
- }
- return 0;
+ // Oddly, not supported on some comilers,
+ //name->clear();
+ // So use this:
+ *name = "";
+ assert( p );
+
+ // Names start with letters or underscores.
+ // Of course, in unicode, tinyxml has no idea what a letter *is*. The
+ // algorithm is generous.
+ //
+ // After that, they can be letters, underscores, numbers,
+ // hyphens, or colons. (Colons are valid ony for namespaces,
+ // but tinyxml can't tell namespaces from names.)
+ if ( p && *p
+ && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) )
+ {
+ const char* start = p;
+ while( p && *p
+ && ( IsAlphaNum( (unsigned char ) *p, encoding )
+ || *p == '_'
+ || *p == '-'
+ || *p == '.'
+ || *p == ':' ) )
+ {
+ //(*name) += *p; // expensive
+ ++p;
+ }
+ if ( p-start > 0 )
+ {
+ name->assign( start, p-start );
+ }
+ return p;
+ }
+ return 0;
}
const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding )
{
- // Presume an entity, and pull it out.
+ // Presume an entity, and pull it out.
TIXML_STRING ent;
- int i;
- *length = 0;
-
- if ( *(p+1) && *(p+1) == '#' && *(p+2) )
- {
- unsigned long ucs = 0;
- ptrdiff_t delta = 0;
- unsigned mult = 1;
-
- if ( *(p+2) == 'x' )
- {
- // Hexadecimal.
- if ( !*(p+3) ) return 0;
-
- const char* q = p+3;
- q = strchr( q, ';' );
-
- if ( !q || !*q ) return 0;
-
- delta = q-p;
- --q;
-
- while ( *q != 'x' )
- {
- if ( *q >= '0' && *q <= '9' )
- ucs += mult * (*q - '0');
- else if ( *q >= 'a' && *q <= 'f' )
- ucs += mult * (*q - 'a' + 10);
- else if ( *q >= 'A' && *q <= 'F' )
- ucs += mult * (*q - 'A' + 10 );
- else
- return 0;
- mult *= 16;
- --q;
- }
- }
- else
- {
- // Decimal.
- if ( !*(p+2) ) return 0;
-
- const char* q = p+2;
- q = strchr( q, ';' );
-
- if ( !q || !*q ) return 0;
-
- delta = q-p;
- --q;
-
- while ( *q != '#' )
- {
- if ( *q >= '0' && *q <= '9' )
- ucs += mult * (*q - '0');
- else
- return 0;
- mult *= 10;
- --q;
- }
- }
- if ( encoding == TIXML_ENCODING_UTF8 )
- {
- // convert the UCS to UTF-8
- ConvertUTF32ToUTF8( ucs, value, length );
- }
- else
- {
- *value = (char)ucs;
- *length = 1;
- }
- return p + delta + 1;
- }
-
- // Now try to match it.
- for( i=0; i<NUM_ENTITY; ++i )
- {
- if ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 )
- {
- assert( strlen( entity[i].str ) == entity[i].strLength );
- *value = entity[i].chr;
- *length = 1;
- return ( p + entity[i].strLength );
- }
- }
-
- // So it wasn't an entity, its unrecognized, or something like that.
- *value = *p; // Don't put back the last one, since we return it!
- //*length = 1; // Leave unrecognized entities - this doesn't really work.
- // Just writes strange XML.
- return p+1;
+ int i;
+ *length = 0;
+
+ if ( *(p+1) && *(p+1) == '#' && *(p+2) )
+ {
+ unsigned long ucs = 0;
+ ptrdiff_t delta = 0;
+ unsigned mult = 1;
+
+ if ( *(p+2) == 'x' )
+ {
+ // Hexadecimal.
+ if ( !*(p+3) ) return 0;
+
+ const char* q = p+3;
+ q = strchr( q, ';' );
+
+ if ( !q || !*q ) return 0;
+
+ delta = q-p;
+ --q;
+
+ while ( *q != 'x' )
+ {
+ if ( *q >= '0' && *q <= '9' )
+ ucs += mult * (*q - '0');
+ else if ( *q >= 'a' && *q <= 'f' )
+ ucs += mult * (*q - 'a' + 10);
+ else if ( *q >= 'A' && *q <= 'F' )
+ ucs += mult * (*q - 'A' + 10 );
+ else
+ return 0;
+ mult *= 16;
+ --q;
+ }
+ }
+ else
+ {
+ // Decimal.
+ if ( !*(p+2) ) return 0;
+
+ const char* q = p+2;
+ q = strchr( q, ';' );
+
+ if ( !q || !*q ) return 0;
+
+ delta = q-p;
+ --q;
+
+ while ( *q != '#' )
+ {
+ if ( *q >= '0' && *q <= '9' )
+ ucs += mult * (*q - '0');
+ else
+ return 0;
+ mult *= 10;
+ --q;
+ }
+ }
+ if ( encoding == TIXML_ENCODING_UTF8 )
+ {
+ // convert the UCS to UTF-8
+ ConvertUTF32ToUTF8( ucs, value, length );
+ }
+ else
+ {
+ *value = (char)ucs;
+ *length = 1;
+ }
+ return p + delta + 1;
+ }
+
+ // Now try to match it.
+ for( i=0; i<NUM_ENTITY; ++i )
+ {
+ if ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 )
+ {
+ assert( strlen( entity[i].str ) == entity[i].strLength );
+ *value = entity[i].chr;
+ *length = 1;
+ return ( p + entity[i].strLength );
+ }
+ }
+
+ // So it wasn't an entity, its unrecognized, or something like that.
+ *value = *p; // Don't put back the last one, since we return it!
+ //*length = 1; // Leave unrecognized entities - this doesn't really work.
+ // Just writes strange XML.
+ return p+1;
}
bool TiXmlBase::StringEqual( const char* p,
- const char* tag,
- bool ignoreCase,
- TiXmlEncoding encoding )
+ const char* tag,
+ bool ignoreCase,
+ TiXmlEncoding encoding )
{
- assert( p );
- assert( tag );
- if ( !p || !*p )
- {
- assert( 0 );
- return false;
- }
-
- const char* q = p;
-
- if ( ignoreCase )
- {
- while ( *q && *tag && ToLower( *q, encoding ) == ToLower( *tag, encoding ) )
- {
- ++q;
- ++tag;
- }
-
- if ( *tag == 0 )
- return true;
- }
- else
- {
- while ( *q && *tag && *q == *tag )
- {
- ++q;
- ++tag;
- }
-
- if ( *tag == 0 ) // Have we found the end of the tag, and everything equal?
- return true;
- }
- return false;
+ assert( p );
+ assert( tag );
+ if ( !p || !*p )
+ {
+ assert( 0 );
+ return false;
+ }
+
+ const char* q = p;
+
+ if ( ignoreCase )
+ {
+ while ( *q && *tag && ToLower( *q, encoding ) == ToLower( *tag, encoding ) )
+ {
+ ++q;
+ ++tag;
+ }
+
+ if ( *tag == 0 )
+ return true;
+ }
+ else
+ {
+ while ( *q && *tag && *q == *tag )
+ {
+ ++q;
+ ++tag;
+ }
+
+ if ( *tag == 0 ) // Have we found the end of the tag, and everything equal?
+ return true;
+ }
+ return false;
}
-const char* TiXmlBase::ReadText( const char* p,
- TIXML_STRING * text,
- bool trimWhiteSpace,
- const char* endTag,
- bool caseInsensitive,
- TiXmlEncoding encoding )
+const char* TiXmlBase::ReadText( const char* p,
+ TIXML_STRING * text,
+ bool trimWhiteSpace,
+ const char* endTag,
+ bool caseInsensitive,
+ TiXmlEncoding encoding )
{
*text = "";
- if ( !trimWhiteSpace // certain tags always keep whitespace
- || !condenseWhiteSpace ) // if true, whitespace is always kept
- {
- // Keep all the white space.
- while ( p && *p
- && !StringEqual( p, endTag, caseInsensitive, encoding )
- )
- {
- int len;
- char cArr[4] = { 0, 0, 0, 0 };
- p = GetChar( p, cArr, &len, encoding );
- text->append( cArr, len );
- }
- }
- else
- {
- bool whitespace = false;
-
- // Remove leading white space:
- p = SkipWhiteSpace( p, encoding );
- while ( p && *p
- && !StringEqual( p, endTag, caseInsensitive, encoding ) )
- {
- if ( *p == '\r' || *p == '\n' )
- {
- whitespace = true;
- ++p;
- }
- else if ( IsWhiteSpace( *p ) )
- {
- whitespace = true;
- ++p;
- }
- else
- {
- // If we've found whitespace, add it before the
- // new character. Any whitespace just becomes a space.
- if ( whitespace )
- {
- (*text) += ' ';
- whitespace = false;
- }
- int len;
- char cArr[4] = { 0, 0, 0, 0 };
- p = GetChar( p, cArr, &len, encoding );
- if ( len == 1 )
- (*text) += cArr[0]; // more efficient
- else
- text->append( cArr, len );
- }
- }
- }
- if ( p && *p )
- p += strlen( endTag );
- return p;
+ if ( !trimWhiteSpace // certain tags always keep whitespace
+ || !condenseWhiteSpace ) // if true, whitespace is always kept
+ {
+ // Keep all the white space.
+ while ( p && *p
+ && !StringEqual( p, endTag, caseInsensitive, encoding )
+ )
+ {
+ int len;
+ char cArr[4] = { 0, 0, 0, 0 };
+ p = GetChar( p, cArr, &len, encoding );
+ text->append( cArr, len );
+ }
+ }
+ else
+ {
+ bool whitespace = false;
+
+ // Remove leading white space:
+ p = SkipWhiteSpace( p, encoding );
+ while ( p && *p
+ && !StringEqual( p, endTag, caseInsensitive, encoding ) )
+ {
+ if ( *p == '\r' || *p == '\n' )
+ {
+ whitespace = true;
+ ++p;
+ }
+ else if ( IsWhiteSpace( *p ) )
+ {
+ whitespace = true;
+ ++p;
+ }
+ else
+ {
+ // If we've found whitespace, add it before the
+ // new character. Any whitespace just becomes a space.
+ if ( whitespace )
+ {
+ (*text) += ' ';
+ whitespace = false;
+ }
+ int len;
+ char cArr[4] = { 0, 0, 0, 0 };
+ p = GetChar( p, cArr, &len, encoding );
+ if ( len == 1 )
+ (*text) += cArr[0]; // more efficient
+ else
+ text->append( cArr, len );
+ }
+ }
+ }
+ if ( p && *p )
+ p += strlen( endTag );
+ return p;
}
#ifdef TIXML_USE_STL
void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )
{
- // The basic issue with a document is that we don't know what we're
- // streaming. Read something presumed to be a tag (and hope), then
- // identify it, and call the appropriate stream method on the tag.
- //
- // This "pre-streaming" will never read the closing ">" so the
- // sub-tag can orient itself.
-
- if ( !StreamTo( in, '<', tag ) )
- {
- SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
-
- while ( in->good() )
- {
- int tagIndex = (int) tag->length();
- while ( in->good() && in->peek() != '>' )
- {
- int c = in->get();
- if ( c <= 0 )
- {
- SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- break;
- }
- (*tag) += (char) c;
- }
-
- if ( in->good() )
- {
- // We now have something we presume to be a node of
- // some sort. Identify it, and call the node to
- // continue streaming.
- TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING );
-
- if ( node )
- {
- node->StreamIn( in, tag );
- bool isElement = node->ToElement() != 0;
- delete node;
- node = 0;
-
- // If this is the root element, we're done. Parsing will be
- // done by the >> operator.
- if ( isElement )
- {
- return;
- }
- }
- else
- {
- SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
- }
- }
- // We should have returned sooner.
- SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );
+ // The basic issue with a document is that we don't know what we're
+ // streaming. Read something presumed to be a tag (and hope), then
+ // identify it, and call the appropriate stream method on the tag.
+ //
+ // This "pre-streaming" will never read the closing ">" so the
+ // sub-tag can orient itself.
+
+ if ( !StreamTo( in, '<', tag ) )
+ {
+ SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+
+ while ( in->good() )
+ {
+ int tagIndex = (int) tag->length();
+ while ( in->good() && in->peek() != '>' )
+ {
+ int c = in->get();
+ if ( c <= 0 )
+ {
+ SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ break;
+ }
+ (*tag) += (char) c;
+ }
+
+ if ( in->good() )
+ {
+ // We now have something we presume to be a node of
+ // some sort. Identify it, and call the node to
+ // continue streaming.
+ TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING );
+
+ if ( node )
+ {
+ node->StreamIn( in, tag );
+ bool isElement = node->ToElement() != 0;
+ delete node;
+ node = 0;
+
+ // If this is the root element, we're done. Parsing will be
+ // done by the >> operator.
+ if ( isElement )
+ {
+ return;
+ }
+ }
+ else
+ {
+ SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+ }
+ }
+ // We should have returned sooner.
+ SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );
}
#endif
const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding )
{
- ClearError();
-
- // Parse away, at the document level. Since a document
- // contains nothing but other tags, most of what happens
- // here is skipping white space.
- if ( !p || !*p )
- {
- SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return 0;
- }
-
- // Note that, for a document, this needs to come
- // before the while space skip, so that parsing
- // starts from the pointer we are given.
- location.Clear();
- if ( prevData )
- {
- location.row = prevData->cursor.row;
- location.col = prevData->cursor.col;
- }
- else
- {
- location.row = 0;
- location.col = 0;
- }
- TiXmlParsingData data( p, TabSize(), location.row, location.col );
- location = data.Cursor();
-
- if ( encoding == TIXML_ENCODING_UNKNOWN )
- {
- // Check for the Microsoft UTF-8 lead bytes.
- const unsigned char* pU = (const unsigned char*)p;
- if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0
- && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1
- && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 )
- {
- encoding = TIXML_ENCODING_UTF8;
- useMicrosoftBOM = true;
- }
- }
+ ClearError();
+
+ // Parse away, at the document level. Since a document
+ // contains nothing but other tags, most of what happens
+ // here is skipping white space.
+ if ( !p || !*p )
+ {
+ SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return 0;
+ }
+
+ // Note that, for a document, this needs to come
+ // before the while space skip, so that parsing
+ // starts from the pointer we are given.
+ location.Clear();
+ if ( prevData )
+ {
+ location.row = prevData->cursor.row;
+ location.col = prevData->cursor.col;
+ }
+ else
+ {
+ location.row = 0;
+ location.col = 0;
+ }
+ TiXmlParsingData data( p, TabSize(), location.row, location.col );
+ location = data.Cursor();
+
+ if ( encoding == TIXML_ENCODING_UNKNOWN )
+ {
+ // Check for the Microsoft UTF-8 lead bytes.
+ const unsigned char* pU = (const unsigned char*)p;
+ if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0
+ && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1
+ && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 )
+ {
+ encoding = TIXML_ENCODING_UTF8;
+ useMicrosoftBOM = true;
+ }
+ }
p = SkipWhiteSpace( p, encoding );
- if ( !p )
- {
- SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
- return 0;
- }
-
- while ( p && *p )
- {
- TiXmlNode* node = Identify( p, encoding );
- if ( node )
- {
- p = node->Parse( p, &data, encoding );
- LinkEndChild( node );
- }
- else
- {
- break;
- }
-
- // Did we get encoding info?
- if ( encoding == TIXML_ENCODING_UNKNOWN
- && node->ToDeclaration() )
- {
- TiXmlDeclaration* dec = node->ToDeclaration();
- const char* enc = dec->Encoding();
- assert( enc );
-
- if ( *enc == 0 )
- encoding = TIXML_ENCODING_UTF8;
- else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) )
- encoding = TIXML_ENCODING_UTF8;
- else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) )
- encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice
- else
- encoding = TIXML_ENCODING_LEGACY;
- }
-
- p = SkipWhiteSpace( p, encoding );
- }
-
- // Was this empty?
- if ( !firstChild ) {
- SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding );
- return 0;
- }
-
- // All is well.
- return p;
+ if ( !p )
+ {
+ SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return 0;
+ }
+
+ while ( p && *p )
+ {
+ TiXmlNode* node = Identify( p, encoding );
+ if ( node )
+ {
+ p = node->Parse( p, &data, encoding );
+ LinkEndChild( node );
+ }
+ else
+ {
+ break;
+ }
+
+ // Did we get encoding info?
+ if ( encoding == TIXML_ENCODING_UNKNOWN
+ && node->ToDeclaration() )
+ {
+ TiXmlDeclaration* dec = node->ToDeclaration();
+ const char* enc = dec->Encoding();
+ assert( enc );
+
+ if ( *enc == 0 )
+ encoding = TIXML_ENCODING_UTF8;
+ else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) )
+ encoding = TIXML_ENCODING_UTF8;
+ else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) )
+ encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice
+ else
+ encoding = TIXML_ENCODING_LEGACY;
+ }
+
+ p = SkipWhiteSpace( p, encoding );
+ }
+
+ // Was this empty?
+ if ( !firstChild )
+ {
+ SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding );
+ return 0;
+ }
+
+ // All is well.
+ return p;
}
void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding )
-{
- // The first error in a chain is more accurate - don't set again!
- if ( error )
- return;
-
- assert( err > 0 && err < TIXML_ERROR_STRING_COUNT );
- error = true;
- errorId = err;
- errorDesc = errorString[ errorId ];
-
- errorLocation.Clear();
- if ( pError && data )
- {
- data->Stamp( pError, encoding );
- errorLocation = data->Cursor();
- }
+{
+ // The first error in a chain is more accurate - don't set again!
+ if ( error )
+ return;
+
+ assert( err > 0 && err < TIXML_ERROR_STRING_COUNT );
+ error = true;
+ errorId = err;
+ errorDesc = errorString[ errorId ];
+
+ errorLocation.Clear();
+ if ( pError && data )
+ {
+ data->Stamp( pError, encoding );
+ errorLocation = data->Cursor();
+ }
}
TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding )
{
- TiXmlNode* returnNode = 0;
-
- p = SkipWhiteSpace( p, encoding );
- if( !p || !*p || *p != '<' )
- {
- return 0;
- }
-
- p = SkipWhiteSpace( p, encoding );
-
- if ( !p || !*p )
- {
- return 0;
- }
-
- // What is this thing?
- // - Elements start with a letter or underscore, but xml is reserved.
- // - Comments: <!--
- // - Decleration: <?xml
- // - Everthing else is unknown to tinyxml.
- //
-
- const char* xmlHeader = { "<?xml" };
- const char* commentHeader = { "<!--" };
- const char* dtdHeader = { "<!" };
- const char* cdataHeader = { "<![CDATA[" };
-
- if ( StringEqual( p, xmlHeader, true, encoding ) )
- {
- #ifdef DEBUG_PARSER
- TIXML_LOG( "XML parsing Declaration\n" );
- #endif
- returnNode = new TiXmlDeclaration();
- }
- else if ( StringEqual( p, commentHeader, false, encoding ) )
- {
- #ifdef DEBUG_PARSER
- TIXML_LOG( "XML parsing Comment\n" );
- #endif
- returnNode = new TiXmlComment();
- }
- else if ( StringEqual( p, cdataHeader, false, encoding ) )
- {
- #ifdef DEBUG_PARSER
- TIXML_LOG( "XML parsing CDATA\n" );
- #endif
- TiXmlText* text = new TiXmlText( "" );
- text->SetCDATA( true );
- returnNode = text;
- }
- else if ( StringEqual( p, dtdHeader, false, encoding ) )
- {
- #ifdef DEBUG_PARSER
- TIXML_LOG( "XML parsing Unknown(1)\n" );
- #endif
- returnNode = new TiXmlUnknown();
- }
- else if ( IsAlpha( *(p+1), encoding )
- || *(p+1) == '_' )
- {
- #ifdef DEBUG_PARSER
- TIXML_LOG( "XML parsing Element\n" );
- #endif
- returnNode = new TiXmlElement( "" );
- }
- else
- {
- #ifdef DEBUG_PARSER
- TIXML_LOG( "XML parsing Unknown(2)\n" );
- #endif
- returnNode = new TiXmlUnknown();
- }
-
- if ( returnNode )
- {
- // Set the parent, so it can report errors
- returnNode->parent = this;
- }
- return returnNode;
+ TiXmlNode* returnNode = 0;
+
+ p = SkipWhiteSpace( p, encoding );
+ if( !p || !*p || *p != '<' )
+ {
+ return 0;
+ }
+
+ p = SkipWhiteSpace( p, encoding );
+
+ if ( !p || !*p )
+ {
+ return 0;
+ }
+
+ // What is this thing?
+ // - Elements start with a letter or underscore, but xml is reserved.
+ // - Comments: <!--
+ // - Decleration: <?xml
+ // - Everthing else is unknown to tinyxml.
+ //
+
+ const char* xmlHeader = { "<?xml" };
+ const char* commentHeader = { "<!--" };
+ const char* dtdHeader = { "<!" };
+ const char* cdataHeader = { "<![CDATA[" };
+
+ if ( StringEqual( p, xmlHeader, true, encoding ) )
+ {
+#ifdef DEBUG_PARSER
+ TIXML_LOG( "XML parsing Declaration\n" );
+#endif
+ returnNode = new TiXmlDeclaration();
+ }
+ else if ( StringEqual( p, commentHeader, false, encoding ) )
+ {
+#ifdef DEBUG_PARSER
+ TIXML_LOG( "XML parsing Comment\n" );
+#endif
+ returnNode = new TiXmlComment();
+ }
+ else if ( StringEqual( p, cdataHeader, false, encoding ) )
+ {
+#ifdef DEBUG_PARSER
+ TIXML_LOG( "XML parsing CDATA\n" );
+#endif
+ TiXmlText* text = new TiXmlText( "" );
+ text->SetCDATA( true );
+ returnNode = text;
+ }
+ else if ( StringEqual( p, dtdHeader, false, encoding ) )
+ {
+#ifdef DEBUG_PARSER
+ TIXML_LOG( "XML parsing Unknown(1)\n" );
+#endif
+ returnNode = new TiXmlUnknown();
+ }
+ else if ( IsAlpha( *(p+1), encoding )
+ || *(p+1) == '_' )
+ {
+#ifdef DEBUG_PARSER
+ TIXML_LOG( "XML parsing Element\n" );
+#endif
+ returnNode = new TiXmlElement( "" );
+ }
+ else
+ {
+#ifdef DEBUG_PARSER
+ TIXML_LOG( "XML parsing Unknown(2)\n" );
+#endif
+ returnNode = new TiXmlUnknown();
+ }
+
+ if ( returnNode )
+ {
+ // Set the parent, so it can report errors
+ returnNode->parent = this;
+ }
+ return returnNode;
}
#ifdef TIXML_USE_STL
void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
{
- // We're called with some amount of pre-parsing. That is, some of "this"
- // element is in "tag". Go ahead and stream to the closing ">"
- while( in->good() )
- {
- int c = in->get();
- if ( c <= 0 )
- {
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
- (*tag) += (char) c ;
-
- if ( c == '>' )
- break;
- }
-
- if ( tag->length() < 3 ) return;
-
- // Okay...if we are a "/>" tag, then we're done. We've read a complete tag.
- // If not, identify and stream.
-
- if ( tag->at( tag->length() - 1 ) == '>'
- && tag->at( tag->length() - 2 ) == '/' )
- {
- // All good!
- return;
- }
- else if ( tag->at( tag->length() - 1 ) == '>' )
- {
- // There is more. Could be:
- // text
- // cdata text (which looks like another node)
- // closing tag
- // another node.
- for ( ;; )
- {
- StreamWhiteSpace( in, tag );
-
- // Do we have text?
- if ( in->good() && in->peek() != '<' )
- {
- // Yep, text.
- TiXmlText text( "" );
- text.StreamIn( in, tag );
-
- // What follows text is a closing tag or another node.
- // Go around again and figure it out.
- continue;
- }
-
- // We now have either a closing tag...or another node.
- // We should be at a "<", regardless.
- if ( !in->good() ) return;
- assert( in->peek() == '<' );
- int tagIndex = (int) tag->length();
-
- bool closingTag = false;
- bool firstCharFound = false;
-
- for( ;; )
- {
- if ( !in->good() )
- return;
-
- int c = in->peek();
- if ( c <= 0 )
- {
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
-
- if ( c == '>' )
- break;
-
- *tag += (char) c;
- in->get();
-
- // Early out if we find the CDATA id.
- if ( c == '[' && tag->size() >= 9 )
- {
- size_t len = tag->size();
- const char* start = tag->c_str() + len - 9;
- if ( strcmp( start, "<![CDATA[" ) == 0 ) {
- assert( !closingTag );
- break;
- }
- }
-
- if ( !firstCharFound && c != '<' && !IsWhiteSpace( c ) )
- {
- firstCharFound = true;
- if ( c == '/' )
- closingTag = true;
- }
- }
- // If it was a closing tag, then read in the closing '>' to clean up the input stream.
- // If it was not, the streaming will be done by the tag.
- if ( closingTag )
- {
- if ( !in->good() )
- return;
-
- int c = in->get();
- if ( c <= 0 )
- {
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
- assert( c == '>' );
- *tag += (char) c;
-
- // We are done, once we've found our closing tag.
- return;
- }
- else
- {
- // If not a closing tag, id it, and stream.
- const char* tagloc = tag->c_str() + tagIndex;
- TiXmlNode* node = Identify( tagloc, TIXML_DEFAULT_ENCODING );
- if ( !node )
- return;
- node->StreamIn( in, tag );
- delete node;
- node = 0;
-
- // No return: go around from the beginning: text, closing tag, or node.
- }
- }
- }
+ // We're called with some amount of pre-parsing. That is, some of "this"
+ // element is in "tag". Go ahead and stream to the closing ">"
+ while( in->good() )
+ {
+ int c = in->get();
+ if ( c <= 0 )
+ {
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+ (*tag) += (char) c ;
+
+ if ( c == '>' )
+ break;
+ }
+
+ if ( tag->length() < 3 ) return;
+
+ // Okay...if we are a "/>" tag, then we're done. We've read a complete tag.
+ // If not, identify and stream.
+
+ if ( tag->at( tag->length() - 1 ) == '>'
+ && tag->at( tag->length() - 2 ) == '/' )
+ {
+ // All good!
+ return;
+ }
+ else if ( tag->at( tag->length() - 1 ) == '>' )
+ {
+ // There is more. Could be:
+ // text
+ // cdata text (which looks like another node)
+ // closing tag
+ // another node.
+ for ( ;; )
+ {
+ StreamWhiteSpace( in, tag );
+
+ // Do we have text?
+ if ( in->good() && in->peek() != '<' )
+ {
+ // Yep, text.
+ TiXmlText text( "" );
+ text.StreamIn( in, tag );
+
+ // What follows text is a closing tag or another node.
+ // Go around again and figure it out.
+ continue;
+ }
+
+ // We now have either a closing tag...or another node.
+ // We should be at a "<", regardless.
+ if ( !in->good() ) return;
+ assert( in->peek() == '<' );
+ int tagIndex = (int) tag->length();
+
+ bool closingTag = false;
+ bool firstCharFound = false;
+
+ for( ;; )
+ {
+ if ( !in->good() )
+ return;
+
+ int c = in->peek();
+ if ( c <= 0 )
+ {
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+
+ if ( c == '>' )
+ break;
+
+ *tag += (char) c;
+ in->get();
+
+ // Early out if we find the CDATA id.
+ if ( c == '[' && tag->size() >= 9 )
+ {
+ size_t len = tag->size();
+ const char* start = tag->c_str() + len - 9;
+ if ( strcmp( start, "<![CDATA[" ) == 0 )
+ {
+ assert( !closingTag );
+ break;
+ }
+ }
+
+ if ( !firstCharFound && c != '<' && !IsWhiteSpace( c ) )
+ {
+ firstCharFound = true;
+ if ( c == '/' )
+ closingTag = true;
+ }
+ }
+ // If it was a closing tag, then read in the closing '>' to clean up the input stream.
+ // If it was not, the streaming will be done by the tag.
+ if ( closingTag )
+ {
+ if ( !in->good() )
+ return;
+
+ int c = in->get();
+ if ( c <= 0 )
+ {
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+ assert( c == '>' );
+ *tag += (char) c;
+
+ // We are done, once we've found our closing tag.
+ return;
+ }
+ else
+ {
+ // If not a closing tag, id it, and stream.
+ const char* tagloc = tag->c_str() + tagIndex;
+ TiXmlNode* node = Identify( tagloc, TIXML_DEFAULT_ENCODING );
+ if ( !node )
+ return;
+ node->StreamIn( in, tag );
+ delete node;
+ node = 0;
+
+ // No return: go around from the beginning: text, closing tag, or node.
+ }
+ }
+ }
}
#endif
const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
{
- p = SkipWhiteSpace( p, encoding );
- TiXmlDocument* document = GetDocument();
+ p = SkipWhiteSpace( p, encoding );
+ TiXmlDocument* document = GetDocument();
- if ( !p || !*p )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, 0, 0, encoding );
- return 0;
- }
+ if ( !p || !*p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, 0, 0, encoding );
+ return 0;
+ }
- if ( data )
- {
- data->Stamp( p, encoding );
- location = data->Cursor();
- }
+ if ( data )
+ {
+ data->Stamp( p, encoding );
+ location = data->Cursor();
+ }
- if ( *p != '<' )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding );
- return 0;
- }
+ if ( *p != '<' )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding );
+ return 0;
+ }
- p = SkipWhiteSpace( p+1, encoding );
+ p = SkipWhiteSpace( p+1, encoding );
- // Read the name.
- const char* pErr = p;
+ // Read the name.
+ const char* pErr = p;
p = ReadName( p, &value, encoding );
- if ( !p || !*p )
- {
- if ( document ) document->SetError( TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, pErr, data, encoding );
- return 0;
- }
+ if ( !p || !*p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, pErr, data, encoding );
+ return 0;
+ }
TIXML_STRING endTag ("</");
- endTag += value;
-
- // Check for and read attributes. Also look for an empty
- // tag or an end tag.
- while ( p && *p )
- {
- pErr = p;
- p = SkipWhiteSpace( p, encoding );
- if ( !p || !*p )
- {
- if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );
- return 0;
- }
- if ( *p == '/' )
- {
- ++p;
- // Empty tag.
- if ( *p != '>' )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );
- return 0;
- }
- return (p+1);
- }
- else if ( *p == '>' )
- {
- // Done with attributes (if there were any.)
- // Read the value -- which can include other
- // elements -- read the end tag, and return.
- ++p;
- p = ReadValue( p, data, encoding ); // Note this is an Element method, and will set the error if one happens.
- if ( !p || !*p ) {
- // We were looking for the end tag, but found nothing.
- // Fix for [ 1663758 ] Failure to report error on bad XML
- if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
- return 0;
- }
-
- // We should find the end tag now
- // note that:
- // </foo > and
- // </foo>
- // are both valid end tags.
- if ( StringEqual( p, endTag.c_str(), false, encoding ) )
- {
- p += endTag.length();
- p = SkipWhiteSpace( p, encoding );
- if ( p && *p && *p == '>' ) {
- ++p;
- return p;
- }
- if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
- return 0;
- }
- else
- {
- if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
- return 0;
- }
- }
- else
- {
- // Try to read an attribute:
- TiXmlAttribute* attrib = new TiXmlAttribute();
- if ( !attrib )
- {
- return 0;
- }
-
- attrib->SetDocument( document );
- pErr = p;
- p = attrib->Parse( p, data, encoding );
-
- if ( !p || !*p )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, pErr, data, encoding );
- delete attrib;
- return 0;
- }
-
- // Handle the strange case of double attributes:
- #ifdef TIXML_USE_STL
- TiXmlAttribute* node = attributeSet.Find( attrib->NameTStr() );
- #else
- TiXmlAttribute* node = attributeSet.Find( attrib->Name() );
- #endif
- if ( node )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, pErr, data, encoding );
- delete attrib;
- return 0;
- }
-
- attributeSet.Add( attrib );
- }
- }
- return p;
+ endTag += value;
+
+ // Check for and read attributes. Also look for an empty
+ // tag or an end tag.
+ while ( p && *p )
+ {
+ pErr = p;
+ p = SkipWhiteSpace( p, encoding );
+ if ( !p || !*p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );
+ return 0;
+ }
+ if ( *p == '/' )
+ {
+ ++p;
+ // Empty tag.
+ if ( *p != '>' )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );
+ return 0;
+ }
+ return (p+1);
+ }
+ else if ( *p == '>' )
+ {
+ // Done with attributes (if there were any.)
+ // Read the value -- which can include other
+ // elements -- read the end tag, and return.
+ ++p;
+ p = ReadValue( p, data, encoding ); // Note this is an Element method, and will set the error if one happens.
+ if ( !p || !*p )
+ {
+ // We were looking for the end tag, but found nothing.
+ // Fix for [ 1663758 ] Failure to report error on bad XML
+ if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
+ return 0;
+ }
+
+ // We should find the end tag now
+ // note that:
+ // </foo > and
+ // </foo>
+ // are both valid end tags.
+ if ( StringEqual( p, endTag.c_str(), false, encoding ) )
+ {
+ p += endTag.length();
+ p = SkipWhiteSpace( p, encoding );
+ if ( p && *p && *p == '>' )
+ {
+ ++p;
+ return p;
+ }
+ if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
+ return 0;
+ }
+ else
+ {
+ if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
+ return 0;
+ }
+ }
+ else
+ {
+ // Try to read an attribute:
+ TiXmlAttribute* attrib = new TiXmlAttribute();
+ if ( !attrib )
+ {
+ return 0;
+ }
+
+ attrib->SetDocument( document );
+ pErr = p;
+ p = attrib->Parse( p, data, encoding );
+
+ if ( !p || !*p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, pErr, data, encoding );
+ delete attrib;
+ return 0;
+ }
+
+ // Handle the strange case of double attributes:
+#ifdef TIXML_USE_STL
+ TiXmlAttribute* node = attributeSet.Find( attrib->NameTStr() );
+#else
+ TiXmlAttribute* node = attributeSet.Find( attrib->Name() );
+#endif
+ if ( node )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, pErr, data, encoding );
+ delete attrib;
+ return 0;
+ }
+
+ attributeSet.Add( attrib );
+ }
+ }
+ return p;
}
const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
{
- TiXmlDocument* document = GetDocument();
-
- // Read in text and elements in any order.
- const char* pWithWhiteSpace = p;
- p = SkipWhiteSpace( p, encoding );
-
- while ( p && *p )
- {
- if ( *p != '<' )
- {
- // Take what we have, make a text element.
- TiXmlText* textNode = new TiXmlText( "" );
-
- if ( !textNode )
- {
- return 0;
- }
-
- if ( TiXmlBase::IsWhiteSpaceCondensed() )
- {
- p = textNode->Parse( p, data, encoding );
- }
- else
- {
- // Special case: we want to keep the white space
- // so that leading spaces aren't removed.
- p = textNode->Parse( pWithWhiteSpace, data, encoding );
- }
-
- if ( !textNode->Blank() )
- LinkEndChild( textNode );
- else
- delete textNode;
- }
- else
- {
- // We hit a '<'
- // Have we hit a new element or an end tag? This could also be
- // a TiXmlText in the "CDATA" style.
- if ( StringEqual( p, "</", false, encoding ) )
- {
- return p;
- }
- else
- {
- TiXmlNode* node = Identify( p, encoding );
- if ( node )
- {
- p = node->Parse( p, data, encoding );
- LinkEndChild( node );
- }
- else
- {
- return 0;
- }
- }
- }
- pWithWhiteSpace = p;
- p = SkipWhiteSpace( p, encoding );
- }
-
- if ( !p )
- {
- if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding );
- }
- return p;
+ TiXmlDocument* document = GetDocument();
+
+ // Read in text and elements in any order.
+ const char* pWithWhiteSpace = p;
+ p = SkipWhiteSpace( p, encoding );
+
+ while ( p && *p )
+ {
+ if ( *p != '<' )
+ {
+ // Take what we have, make a text element.
+ TiXmlText* textNode = new TiXmlText( "" );
+
+ if ( !textNode )
+ {
+ return 0;
+ }
+
+ if ( TiXmlBase::IsWhiteSpaceCondensed() )
+ {
+ p = textNode->Parse( p, data, encoding );
+ }
+ else
+ {
+ // Special case: we want to keep the white space
+ // so that leading spaces aren't removed.
+ p = textNode->Parse( pWithWhiteSpace, data, encoding );
+ }
+
+ if ( !textNode->Blank() )
+ LinkEndChild( textNode );
+ else
+ delete textNode;
+ }
+ else
+ {
+ // We hit a '<'
+ // Have we hit a new element or an end tag? This could also be
+ // a TiXmlText in the "CDATA" style.
+ if ( StringEqual( p, "</", false, encoding ) )
+ {
+ return p;
+ }
+ else
+ {
+ TiXmlNode* node = Identify( p, encoding );
+ if ( node )
+ {
+ p = node->Parse( p, data, encoding );
+ LinkEndChild( node );
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ }
+ pWithWhiteSpace = p;
+ p = SkipWhiteSpace( p, encoding );
+ }
+
+ if ( !p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding );
+ }
+ return p;
}
#ifdef TIXML_USE_STL
void TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )
{
- while ( in->good() )
- {
- int c = in->get();
- if ( c <= 0 )
- {
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
- (*tag) += (char) c;
-
- if ( c == '>' )
- {
- // All is well.
- return;
- }
- }
+ while ( in->good() )
+ {
+ int c = in->get();
+ if ( c <= 0 )
+ {
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+ (*tag) += (char) c;
+
+ if ( c == '>' )
+ {
+ // All is well.
+ return;
+ }
+ }
}
#endif
const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
{
- TiXmlDocument* document = GetDocument();
- p = SkipWhiteSpace( p, encoding );
-
- if ( data )
- {
- data->Stamp( p, encoding );
- location = data->Cursor();
- }
- if ( !p || !*p || *p != '<' )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding );
- return 0;
- }
- ++p;
+ TiXmlDocument* document = GetDocument();
+ p = SkipWhiteSpace( p, encoding );
+
+ if ( data )
+ {
+ data->Stamp( p, encoding );
+ location = data->Cursor();
+ }
+ if ( !p || !*p || *p != '<' )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding );
+ return 0;
+ }
+ ++p;
value = "";
- while ( p && *p && *p != '>' )
- {
- value += *p;
- ++p;
- }
-
- if ( !p )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
- }
- if ( *p == '>' )
- return p+1;
- return p;
+ while ( p && *p && *p != '>' )
+ {
+ value += *p;
+ ++p;
+ }
+
+ if ( !p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
+ }
+ if ( *p == '>' )
+ return p+1;
+ return p;
}
#ifdef TIXML_USE_STL
void TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )
{
- while ( in->good() )
- {
- int c = in->get();
- if ( c <= 0 )
- {
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
-
- (*tag) += (char) c;
-
- if ( c == '>'
- && tag->at( tag->length() - 2 ) == '-'
- && tag->at( tag->length() - 3 ) == '-' )
- {
- // All is well.
- return;
- }
- }
+ while ( in->good() )
+ {
+ int c = in->get();
+ if ( c <= 0 )
+ {
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+
+ (*tag) += (char) c;
+
+ if ( c == '>'
+ && tag->at( tag->length() - 2 ) == '-'
+ && tag->at( tag->length() - 3 ) == '-' )
+ {
+ // All is well.
+ return;
+ }
+ }
}
#endif
const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
{
- TiXmlDocument* document = GetDocument();
- value = "";
-
- p = SkipWhiteSpace( p, encoding );
-
- if ( data )
- {
- data->Stamp( p, encoding );
- location = data->Cursor();
- }
- const char* startTag = "<!--";
- const char* endTag = "-->";
-
- if ( !StringEqual( p, startTag, false, encoding ) )
- {
- document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding );
- return 0;
- }
- p += strlen( startTag );
-
- // [ 1475201 ] TinyXML parses entities in comments
- // Oops - ReadText doesn't work, because we don't want to parse the entities.
- // p = ReadText( p, &value, false, endTag, false, encoding );
- //
- // from the XML spec:
- /*
- [Definition: Comments may appear anywhere in a document outside other markup; in addition,
- they may appear within the document type declaration at places allowed by the grammar.
- They are not part of the document's character data; an XML processor MAY, but need not,
- make it possible for an application to retrieve the text of comments. For compatibility,
- the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity
- references MUST NOT be recognized within comments.
-
- An example of a comment:
-
- <!-- declarations for <head> & <body> -->
- */
+ TiXmlDocument* document = GetDocument();
+ value = "";
+
+ p = SkipWhiteSpace( p, encoding );
+
+ if ( data )
+ {
+ data->Stamp( p, encoding );
+ location = data->Cursor();
+ }
+ const char* startTag = "<!--";
+ const char* endTag = "-->";
+
+ if ( !StringEqual( p, startTag, false, encoding ) )
+ {
+ document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding );
+ return 0;
+ }
+ p += strlen( startTag );
+
+ // [ 1475201 ] TinyXML parses entities in comments
+ // Oops - ReadText doesn't work, because we don't want to parse the entities.
+ // p = ReadText( p, &value, false, endTag, false, encoding );
+ //
+ // from the XML spec:
+ /*
+ [Definition: Comments may appear anywhere in a document outside other markup; in addition,
+ they may appear within the document type declaration at places allowed by the grammar.
+ They are not part of the document's character data; an XML processor MAY, but need not,
+ make it possible for an application to retrieve the text of comments. For compatibility,
+ the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity
+ references MUST NOT be recognized within comments.
+
+ An example of a comment:
+
+ <!-- declarations for <head> & <body> -->
+ */
value = "";
- // Keep all the white space.
- while ( p && *p && !StringEqual( p, endTag, false, encoding ) )
- {
- value.append( p, 1 );
- ++p;
- }
- if ( p && *p )
- p += strlen( endTag );
-
- return p;
+ // Keep all the white space.
+ while ( p && *p && !StringEqual( p, endTag, false, encoding ) )
+ {
+ value.append( p, 1 );
+ ++p;
+ }
+ if ( p && *p )
+ p += strlen( endTag );
+
+ return p;
}
const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
{
- p = SkipWhiteSpace( p, encoding );
- if ( !p || !*p ) return 0;
-
- if ( data )
- {
- data->Stamp( p, encoding );
- location = data->Cursor();
- }
- // Read the name, the '=' and the value.
- const char* pErr = p;
- p = ReadName( p, &name, encoding );
- if ( !p || !*p )
- {
- if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );
- return 0;
- }
- p = SkipWhiteSpace( p, encoding );
- if ( !p || !*p || *p != '=' )
- {
- if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
- return 0;
- }
-
- ++p; // skip '='
- p = SkipWhiteSpace( p, encoding );
- if ( !p || !*p )
- {
- if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
- return 0;
- }
-
- const char* end;
- const char SINGLE_QUOTE = '\'';
- const char DOUBLE_QUOTE = '\"';
-
- if ( *p == SINGLE_QUOTE )
- {
- ++p;
- end = "\'"; // single quote in string
- p = ReadText( p, &value, false, end, false, encoding );
- }
- else if ( *p == DOUBLE_QUOTE )
- {
- ++p;
- end = "\""; // double quote in string
- p = ReadText( p, &value, false, end, false, encoding );
- }
- else
- {
- // All attribute values should be in single or double quotes.
- // But this is such a common error that the parser will try
- // its best, even without them.
- value = "";
- while ( p && *p // existence
- && !IsWhiteSpace( *p ) // whitespace
- && *p != '/' && *p != '>' ) // tag end
- {
- if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) {
- // [ 1451649 ] Attribute values with trailing quotes not handled correctly
- // We did not have an opening quote but seem to have a
- // closing one. Give up and throw an error.
- if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
- return 0;
- }
- value += *p;
- ++p;
- }
- }
- return p;
+ p = SkipWhiteSpace( p, encoding );
+ if ( !p || !*p ) return 0;
+
+ if ( data )
+ {
+ data->Stamp( p, encoding );
+ location = data->Cursor();
+ }
+ // Read the name, the '=' and the value.
+ const char* pErr = p;
+ p = ReadName( p, &name, encoding );
+ if ( !p || !*p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );
+ return 0;
+ }
+ p = SkipWhiteSpace( p, encoding );
+ if ( !p || !*p || *p != '=' )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
+ return 0;
+ }
+
+ ++p; // skip '='
+ p = SkipWhiteSpace( p, encoding );
+ if ( !p || !*p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
+ return 0;
+ }
+
+ const char* end;
+ const char SINGLE_QUOTE = '\'';
+ const char DOUBLE_QUOTE = '\"';
+
+ if ( *p == SINGLE_QUOTE )
+ {
+ ++p;
+ end = "\'"; // single quote in string
+ p = ReadText( p, &value, false, end, false, encoding );
+ }
+ else if ( *p == DOUBLE_QUOTE )
+ {
+ ++p;
+ end = "\""; // double quote in string
+ p = ReadText( p, &value, false, end, false, encoding );
+ }
+ else
+ {
+ // All attribute values should be in single or double quotes.
+ // But this is such a common error that the parser will try
+ // its best, even without them.
+ value = "";
+ while ( p && *p // existence
+ && !IsWhiteSpace( *p ) // whitespace
+ && *p != '/' && *p != '>' ) // tag end
+ {
+ if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE )
+ {
+ // [ 1451649 ] Attribute values with trailing quotes not handled correctly
+ // We did not have an opening quote but seem to have a
+ // closing one. Give up and throw an error.
+ if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
+ return 0;
+ }
+ value += *p;
+ ++p;
+ }
+ }
+ return p;
}
#ifdef TIXML_USE_STL
void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )
{
- while ( in->good() )
- {
- int c = in->peek();
- if ( !cdata && (c == '<' ) )
- {
- return;
- }
- if ( c <= 0 )
- {
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
-
- (*tag) += (char) c;
- in->get(); // "commits" the peek made above
-
- if ( cdata && c == '>' && tag->size() >= 3 ) {
- size_t len = tag->size();
- if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) {
- // terminator of cdata.
- return;
- }
- }
- }
+ while ( in->good() )
+ {
+ int c = in->peek();
+ if ( !cdata && (c == '<' ) )
+ {
+ return;
+ }
+ if ( c <= 0 )
+ {
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+
+ (*tag) += (char) c;
+ in->get(); // "commits" the peek made above
+
+ if ( cdata && c == '>' && tag->size() >= 3 )
+ {
+ size_t len = tag->size();
+ if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' )
+ {
+ // terminator of cdata.
+ return;
+ }
+ }
+ }
}
#endif
const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
{
- value = "";
- TiXmlDocument* document = GetDocument();
-
- if ( data )
- {
- data->Stamp( p, encoding );
- location = data->Cursor();
- }
-
- const char* const startTag = "<![CDATA[";
- const char* const endTag = "]]>";
-
- if ( cdata || StringEqual( p, startTag, false, encoding ) )
- {
- cdata = true;
-
- if ( !StringEqual( p, startTag, false, encoding ) )
- {
- document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding );
- return 0;
- }
- p += strlen( startTag );
-
- // Keep all the white space, ignore the encoding, etc.
- while ( p && *p
- && !StringEqual( p, endTag, false, encoding )
- )
- {
- value += *p;
- ++p;
- }
-
- TIXML_STRING dummy;
- p = ReadText( p, &dummy, false, endTag, false, encoding );
- return p;
- }
- else
- {
- bool ignoreWhite = true;
-
- const char* end = "<";
- p = ReadText( p, &value, ignoreWhite, end, false, encoding );
- if ( p )
- return p-1; // don't truncate the '<'
- return 0;
- }
+ value = "";
+ TiXmlDocument* document = GetDocument();
+
+ if ( data )
+ {
+ data->Stamp( p, encoding );
+ location = data->Cursor();
+ }
+
+ const char* const startTag = "<![CDATA[";
+ const char* const endTag = "]]>";
+
+ if ( cdata || StringEqual( p, startTag, false, encoding ) )
+ {
+ cdata = true;
+
+ if ( !StringEqual( p, startTag, false, encoding ) )
+ {
+ document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding );
+ return 0;
+ }
+ p += strlen( startTag );
+
+ // Keep all the white space, ignore the encoding, etc.
+ while ( p && *p
+ && !StringEqual( p, endTag, false, encoding )
+ )
+ {
+ value += *p;
+ ++p;
+ }
+
+ TIXML_STRING dummy;
+ p = ReadText( p, &dummy, false, endTag, false, encoding );
+ return p;
+ }
+ else
+ {
+ bool ignoreWhite = true;
+
+ const char* end = "<";
+ p = ReadText( p, &value, ignoreWhite, end, false, encoding );
+ if ( p )
+ return p-1; // don't truncate the '<'
+ return 0;
+ }
}
#ifdef TIXML_USE_STL
void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag )
{
- while ( in->good() )
- {
- int c = in->get();
- if ( c <= 0 )
- {
- TiXmlDocument* document = GetDocument();
- if ( document )
- document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
- return;
- }
- (*tag) += (char) c;
-
- if ( c == '>' )
- {
- // All is well.
- return;
- }
- }
+ while ( in->good() )
+ {
+ int c = in->get();
+ if ( c <= 0 )
+ {
+ TiXmlDocument* document = GetDocument();
+ if ( document )
+ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+ return;
+ }
+ (*tag) += (char) c;
+
+ if ( c == '>' )
+ {
+ // All is well.
+ return;
+ }
+ }
}
#endif
const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding )
{
- p = SkipWhiteSpace( p, _encoding );
- // Find the beginning, find the end, and look for
- // the stuff in-between.
- TiXmlDocument* document = GetDocument();
- if ( !p || !*p || !StringEqual( p, "<?xml", true, _encoding ) )
- {
- if ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding );
- return 0;
- }
- if ( data )
- {
- data->Stamp( p, _encoding );
- location = data->Cursor();
- }
- p += 5;
-
- version = "";
- encoding = "";
- standalone = "";
-
- while ( p && *p )
- {
- if ( *p == '>' )
- {
- ++p;
- return p;
- }
-
- p = SkipWhiteSpace( p, _encoding );
- if ( StringEqual( p, "version", true, _encoding ) )
- {
- TiXmlAttribute attrib;
- p = attrib.Parse( p, data, _encoding );
- version = attrib.Value();
- }
- else if ( StringEqual( p, "encoding", true, _encoding ) )
- {
- TiXmlAttribute attrib;
- p = attrib.Parse( p, data, _encoding );
- encoding = attrib.Value();
- }
- else if ( StringEqual( p, "standalone", true, _encoding ) )
- {
- TiXmlAttribute attrib;
- p = attrib.Parse( p, data, _encoding );
- standalone = attrib.Value();
- }
- else
- {
- // Read over whatever it is.
- while( p && *p && *p != '>' && !IsWhiteSpace( *p ) )
- ++p;
- }
- }
- return 0;
+ p = SkipWhiteSpace( p, _encoding );
+ // Find the beginning, find the end, and look for
+ // the stuff in-between.
+ TiXmlDocument* document = GetDocument();
+ if ( !p || !*p || !StringEqual( p, "<?xml", true, _encoding ) )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding );
+ return 0;
+ }
+ if ( data )
+ {
+ data->Stamp( p, _encoding );
+ location = data->Cursor();
+ }
+ p += 5;
+
+ version = "";
+ encoding = "";
+ standalone = "";
+
+ while ( p && *p )
+ {
+ if ( *p == '>' )
+ {
+ ++p;
+ return p;
+ }
+
+ p = SkipWhiteSpace( p, _encoding );
+ if ( StringEqual( p, "version", true, _encoding ) )
+ {
+ TiXmlAttribute attrib;
+ p = attrib.Parse( p, data, _encoding );
+ version = attrib.Value();
+ }
+ else if ( StringEqual( p, "encoding", true, _encoding ) )
+ {
+ TiXmlAttribute attrib;
+ p = attrib.Parse( p, data, _encoding );
+ encoding = attrib.Value();
+ }
+ else if ( StringEqual( p, "standalone", true, _encoding ) )
+ {
+ TiXmlAttribute attrib;
+ p = attrib.Parse( p, data, _encoding );
+ standalone = attrib.Value();
+ }
+ else
+ {
+ // Read over whatever it is.
+ while( p && *p && *p != '>' && !IsWhiteSpace( *p ) )
+ ++p;
+ }
+ }
+ return 0;
}
bool TiXmlText::Blank() const
{
- for ( unsigned i=0; i<value.length(); i++ )
- if ( !IsWhiteSpace( value[i] ) )
- return false;
- return true;
+ for ( unsigned i=0; i<value.length(); i++ )
+ if ( !IsWhiteSpace( value[i] ) )
+ return false;
+ return true;
}
diff --git a/shared/util.cpp b/shared/util.cpp
index e6571151..e50ab961 100644
--- a/shared/util.cpp
+++ b/shared/util.cpp
@@ -66,26 +66,26 @@ wxString FreeFileSync::formatFilesizeToShortString(double filesize)
//print just three significant digits: 0,01 | 0,11 | 1,11 | 11,1 | 111
- const unsigned int leadDigitCount = globalFunctions::getDigitCount(static_cast<unsigned int>(filesize)); //number of digits before decimal point
+ const size_t leadDigitCount = globalFunctions::getDigitCount(static_cast<size_t>(filesize)); //number of digits before decimal point
if (leadDigitCount == 0 || leadDigitCount > 3)
return _("Error");
- if (leadDigitCount == 3)
- return wxString::Format(wxT("%i"), static_cast<int>(filesize)) + unit;
- else if (leadDigitCount == 2)
- {
- wxString output = wxString::Format(wxT("%i"), static_cast<int>(filesize * 10));
- output.insert(leadDigitCount, getDecimalPoint());
- return output + unit;
- }
- else //leadDigitCount == 1
- {
- wxString output = wxString::Format(wxT("%03i"), static_cast<int>(filesize * 100));
- output.insert(leadDigitCount, getDecimalPoint());
- return output + unit;
- }
-
- //return wxString::Format(wxT("%.*f"), 3 - leadDigitCount, filesize) + unit;
+// if (leadDigitCount == 3)
+// return wxString::Format(wxT("%i"), static_cast<int>(filesize)) + unit;
+// else if (leadDigitCount == 2)
+// {
+// wxString output = wxString::Format(wxT("%i"), static_cast<int>(filesize * 10));
+// output.insert(leadDigitCount, getDecimalPoint());
+// return output + unit;
+// }
+// else //leadDigitCount == 1
+// {
+// wxString output = wxString::Format(wxT("%03i"), static_cast<int>(filesize * 100));
+// output.insert(leadDigitCount, getDecimalPoint());
+// return output + unit;
+// }
+
+ return wxString::Format(wxT("%.*f"), static_cast<int>(3 - leadDigitCount), filesize) + unit;
}
@@ -103,7 +103,7 @@ namespace
wxString includeNumberSeparator(const wxString& number)
{
wxString output(number);
- for (size_t i = output.size(); i > 3; i -= 3)
+ for (size_t i = output.size(); i > 3; i -= 3)
output.insert(i - 3, FreeFileSync::getThousandsSeparator());
return output;
@@ -177,32 +177,34 @@ void FreeFileSync::scrollToBottom(wxScrolledWindow* scrWindow)
}
+namespace
+{
inline
-void writeTwoDigitNumber(unsigned int number, wxString& string)
+void writeTwoDigitNumber(size_t number, wxString& string)
{
assert (number < 100);
- string += '0' + number / 10;
- string += '0' + number % 10;
+ string += wxChar('0' + number / 10);
+ string += wxChar('0' + number % 10);
}
inline
-void writeFourDigitNumber(unsigned int number, wxString& string)
+void writeFourDigitNumber(size_t number, wxString& string)
{
assert (number < 10000);
- string += '0' + number / 1000;
+ string += wxChar('0' + number / 1000);
number %= 1000;
- string += '0' + number / 100;
+ string += wxChar('0' + number / 100);
number %= 100;
- string += '0' + number / 10;
+ string += wxChar('0' + number / 10);
number %= 10;
- string += '0' + number;
+ string += wxChar('0' + number);
+}
}
-
-wxString FreeFileSync::utcTimeToLocalString(const wxLongLong& utcTime, const Zstring& filename)
+wxString FreeFileSync::utcTimeToLocalString(const wxLongLong& utcTime)
{
#ifdef FFS_WIN
//convert ansi C time to FILETIME
@@ -223,7 +225,7 @@ wxString FreeFileSync::utcTimeToLocalString(const wxLongLong& utcTime, const Zst
) == 0)
throw std::runtime_error(std::string((wxString(_("Conversion error:")) + wxT(" FILETIME -> local FILETIME: ") +
wxT("(") + wxULongLong(lastWriteTimeUtc.dwHighDateTime, lastWriteTimeUtc.dwLowDateTime).ToString() + wxT(") ") +
- filename.c_str() + wxT("\n\n") + getLastErrorFormatted()).ToAscii()));
+ wxT("\n\n") + getLastErrorFormatted()).ToAscii()));
if (localFileTime.dwHighDateTime > 0x7fffffff)
return _("Error"); //this actually CAN happen if UTC time is just below this border and ::FileTimeToLocalFileTime() adds 2 hours due to DST or whatever!
@@ -237,7 +239,7 @@ wxString FreeFileSync::utcTimeToLocalString(const wxLongLong& utcTime, const Zst
) == 0)
throw std::runtime_error(std::string((wxString(_("Conversion error:")) + wxT(" local FILETIME -> SYSTEMTIME: ") +
wxT("(") + wxULongLong(localFileTime.dwHighDateTime, localFileTime.dwLowDateTime).ToString() + wxT(") ") +
- filename.c_str() + wxT("\n\n") + getLastErrorFormatted()).ToAscii()));
+ wxT("\n\n") + getLastErrorFormatted()).ToAscii()));
//assemble time string (performance optimized)
wxString formattedTime;
diff --git a/shared/util.h b/shared/util.h
index 918ba509..cc721ac1 100644
--- a/shared/util.h
+++ b/shared/util.h
@@ -33,7 +33,7 @@ void setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerC
void setDirectoryName(const wxString& dirname, wxComboBox* txtCtrl, wxDirPickerCtrl* dirPicker);
void scrollToBottom(wxScrolledWindow* scrWindow);
-wxString utcTimeToLocalString(const wxLongLong& utcTime, const Zstring& filename);
+wxString utcTimeToLocalString(const wxLongLong& utcTime); //throw std::runtime_error
}
diff --git a/shared/xmlBase.cpp b/shared/xmlBase.cpp
index 3288fa3e..42e33016 100644
--- a/shared/xmlBase.cpp
+++ b/shared/xmlBase.cpp
@@ -5,14 +5,12 @@
// **************************************************************************
//
#include "xmlBase.h"
-#include "globalFunctions.h"
#include <wx/intl.h>
-#include <wx/ffile.h>
#include "fileIO.h"
#include "stringConv.h"
#include "systemConstants.h"
#include <boost/scoped_array.hpp>
-#include <wx/log.h>
+#include "fileHandling.h"
using namespace FreeFileSync;
@@ -37,57 +35,6 @@ std::string getTypeName(xmlAccess::XmlType type)
}
-xmlAccess::XmlType xmlAccess::getXmlType(const wxString& filename) //throw()
-{
-#ifndef __WXDEBUG__
- wxLogNull noWxLogs; //hide wxWidgets log messages in release build
-#endif
-
- if (!wxFileExists(filename))
- return XML_OTHER;
-
- //workaround to get a FILE* from a unicode filename
- wxFFile configFile(filename, wxT("rb"));
- if (!configFile.IsOpened())
- return XML_OTHER;
-
- FILE* inputFile = configFile.fp();
-
- TiXmlDocument doc;
- try
- {
- if (!doc.LoadFile(inputFile)) //fails if inputFile is no proper XML
- return XML_OTHER;
- }
- catch (const std::exception&)
- {
- //unfortunately TiXml isn't very smart and tries to allocate space for the complete file: length_error exception is thrown for large files!
- return XML_OTHER;
- }
-
- TiXmlElement* root = doc.RootElement();
-
- if (!root || (root->ValueStr() != std::string("FreeFileSync"))) //check for FFS configuration xml
- return XML_OTHER;
-
- const char* cfgType = root->Attribute("XmlType");
- if (!cfgType)
- return XML_OTHER;
-
- const std::string type(cfgType);
-
- if (type == getTypeName(XML_GUI_CONFIG))
- return XML_GUI_CONFIG;
- else if (type == getTypeName(XML_BATCH_CONFIG))
- return XML_BATCH_CONFIG;
- else if (type == getTypeName(XML_GLOBAL_SETTINGS))
- return XML_GLOBAL_SETTINGS;
- else if (type == getTypeName(XML_REAL_CONFIG))
- return XML_REAL_CONFIG;
-
- return XML_OTHER;
-}
-
namespace
{
//convert (0xD, 0xA) and (0xD) to 0xA: just like in TiXmlDocument::LoadFile(); not sure if actually needed
@@ -108,50 +55,91 @@ void normalize(std::vector<char>& stream)
stream.swap(tmp);
}
-}
-void xmlAccess::loadXmlDocument(const wxString& filename, const xmlAccess::XmlType type, TiXmlDocument& document) //throw FileError()
+void loadRawXmlDocument(const wxString& filename, TiXmlDocument& document) //throw XmlError()
{
- std::vector<char> inputStream;
+ using xmlAccess::XmlError;
+
+ const size_t BUFFER_SIZE = 2 * 1024 * 1024; //maximum size of a valid FreeFileSync XML file!
+
+ std::vector<char> inputBuffer;
+ inputBuffer.resize(BUFFER_SIZE);
try
{
- const size_t BUFFER_SIZE = 512 * 1024;
- static boost::scoped_array<unsigned char> buffer(new unsigned char[BUFFER_SIZE]);
-
FileInput inputFile(wxToZ(filename)); //throw FileError();
- do
- {
- const size_t bytesRead = inputFile.read(buffer.get(), BUFFER_SIZE); //throw FileError()
- inputStream.insert(inputStream.end(), buffer.get(), buffer.get() + bytesRead);
- }
- while (!inputFile.eof());
+ const size_t bytesRead = inputFile.read(&inputBuffer[0], inputBuffer.size()); //throw FileError()
+
+ if (bytesRead == 0 || bytesRead >= inputBuffer.size()) //treat XML files larger than 2 MB as erroneous: loading larger files just wastes CPU + memory
+ throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + filename + wxT("\""));
+
+ inputBuffer.resize(bytesRead + 1);
+ inputBuffer[bytesRead] = 0; //set null-termination!!!!
}
catch (const FileError& error) //more detailed error messages than with wxWidgets
{
throw XmlError(error.show());
}
- if (!inputStream.empty())
- {
- inputStream.push_back(0);
+ //convert (0xD, 0xA) and (0xD) to (0xA): just like in TiXmlDocument::LoadFile(); not sure if actually needed
+ normalize(inputBuffer);
+
+ document.Parse(&inputBuffer[0], 0, TIXML_DEFAULT_ENCODING); //respect null-termination!
- //convert (0xD, 0xA) and (0xD) to (0xA): just like in TiXmlDocument::LoadFile(); not sure if actually needed
- ::normalize(inputStream);
+ TiXmlElement* root = document.RootElement();
- TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters
- document.Parse(&inputStream[0], 0, TIXML_DEFAULT_ENCODING);
+ if (root && (root->ValueStr() == std::string("FreeFileSync"))) //check for FFS configuration xml
+ return; //finally... success!
- TiXmlElement* root = document.RootElement();
+ throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + filename + wxT("\""));
+}
+}
- if (root && (root->ValueStr() == std::string("FreeFileSync"))) //check for FFS configuration xml
+
+xmlAccess::XmlType xmlAccess::getXmlType(const wxString& filename) //throw()
+{
+ try
+ {
+ TiXmlDocument doc;
+ ::loadRawXmlDocument(filename, doc); //throw XmlError()
+
+ TiXmlElement* root = doc.RootElement();
+ if (root)
{
const char* cfgType = root->Attribute("XmlType");
- if (cfgType && std::string(cfgType) == getTypeName(type))
- return; //finally... success!
+ if (cfgType)
+ {
+ const std::string type(cfgType);
+
+ if (type == getTypeName(XML_GUI_CONFIG))
+ return XML_GUI_CONFIG;
+ else if (type == getTypeName(XML_BATCH_CONFIG))
+ return XML_BATCH_CONFIG;
+ else if (type == getTypeName(XML_GLOBAL_SETTINGS))
+ return XML_GLOBAL_SETTINGS;
+ else if (type == getTypeName(XML_REAL_CONFIG))
+ return XML_REAL_CONFIG;
+ }
}
}
+ catch (const XmlError&) {}
+
+ return XML_OTHER;
+}
+
+
+void xmlAccess::loadXmlDocument(const wxString& filename, const xmlAccess::XmlType type, TiXmlDocument& document) //throw XmlError()
+{
+ ::loadRawXmlDocument(filename, document); //throw XmlError()
+
+ TiXmlElement* root = document.RootElement();
+ if (root)
+ {
+ const char* cfgType = root->Attribute("XmlType");
+ if (cfgType && std::string(cfgType) == getTypeName(type))
+ return; //finally... success!
+ }
throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + filename + wxT("\""));
}
@@ -159,35 +147,64 @@ void xmlAccess::loadXmlDocument(const wxString& filename, const xmlAccess::XmlTy
void xmlAccess::getDefaultXmlDocument(const XmlType type, TiXmlDocument& document)
{
- TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters
-
TiXmlDeclaration* decl = new TiXmlDeclaration("1.0", "UTF-8", ""); //delete won't be necessary later; ownership passed to TiXmlDocument!
document.LinkEndChild(decl);
TiXmlElement* root = new TiXmlElement("FreeFileSync");
-
root->SetAttribute("XmlType", getTypeName(type)); //xml configuration type
document.LinkEndChild(root);
}
+namespace
+{
+bool saveNecessary(const Zstring& filename, const std::string& dataToWrite) //throw()
+{
+ try
+ {
+ if (FreeFileSync::getFilesize(filename) != static_cast<unsigned long>(dataToWrite.size())) //throw FileError();
+ return true;
+
+ boost::scoped_array<char> inputBuffer(new char[dataToWrite.size() + 1]); //+ 1 in order to test for end of file!
+
+ FileInput inputFile(filename); //throw FileError();
+
+ const size_t bytesRead = inputFile.read(inputBuffer.get(), dataToWrite.size() + 1); //throw FileError()
+ if (bytesRead != dataToWrite.size()) //implicit test for eof!
+ return true;
+
+ return ::memcmp(inputBuffer.get(), dataToWrite.c_str(), dataToWrite.size()) != 0;
+ }
+ catch (const FileError&)
+ {
+ return true;
+ }
+}
+}
+
+
void xmlAccess::saveXmlDocument(const wxString& filename, const TiXmlDocument& document) //throw (XmlError)
{
+ TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters
+
//convert XML into continuous byte sequence
TiXmlPrinter printer;
printer.SetLineBreak(wxString(globalFunctions::LINE_BREAK).ToUTF8());
document.Accept(&printer);
const std::string buffer = printer.Str();
- try
+ if (saveNecessary(wxToZ(filename), buffer)) //only write file if different data will be written
{
- FileOutput outputFile(wxToZ(filename)); //throw FileError()
- outputFile.write(buffer.c_str(), buffer.length()); //
- }
- catch (const FileError& error) //more detailed error messages than with wxWidgets
- {
- throw XmlError(error.show());
+ try
+ {
+ FileOutput outputFile(wxToZ(filename)); //throw FileError()
+ outputFile.write(buffer.c_str(), buffer.length()); //
+ }
+ catch (const FileError& error) //more detailed error messages than with wxWidgets
+ {
+ throw XmlError(error.show());
+ }
}
}
//################################################################################################################
@@ -224,41 +241,6 @@ bool xmlAccess::readXmlElement(const std::string& name, const TiXmlElement* pare
}
-bool xmlAccess::readXmlElement(const std::string& name, const TiXmlElement* parent, int& output)
-{
- std::string temp;
- if (!readXmlElement(name, parent, temp))
- return false;
-
- output = globalFunctions::stringToInt(temp);
- return true;
-}
-
-
-bool xmlAccess::readXmlElement(const std::string& name, const TiXmlElement* parent, unsigned int& output)
-{
- int dummy = 0;
- if (!xmlAccess::readXmlElement(name, parent, dummy))
- return false;
-
- output = static_cast<unsigned int>(dummy);
- return true;
-}
-
-
-bool xmlAccess::readXmlElement(const std::string& name, const TiXmlElement* parent, long& output)
-{
- std::string temp;
- if (readXmlElement(name, parent, temp))
- {
- output = globalFunctions::stringToLong(temp);
- return true;
- }
- else
- return false;
-}
-
-
bool xmlAccess::readXmlElement(const std::string& name, const TiXmlElement* parent, bool& output)
{
std::string dummy;
@@ -323,32 +305,6 @@ bool xmlAccess::readXmlAttribute(const std::string& name, const TiXmlElement* no
}
-bool xmlAccess::readXmlAttribute(const std::string& name, const TiXmlElement* node, int& output)
-{
- std::string dummy;
- if (readXmlAttribute(name, node, dummy))
- {
- output = globalFunctions::stringToInt(dummy);
- return true;
- }
- else
- return false;
-}
-
-
-bool xmlAccess::readXmlAttribute(const std::string& name, const TiXmlElement* node, unsigned int& output)
-{
- std::string dummy;
- if (readXmlAttribute(name, node, dummy))
- {
- output = globalFunctions::stringToInt(dummy);
- return true;
- }
- else
- return false;
-}
-
-
bool xmlAccess::readXmlAttribute(const std::string& name, const TiXmlElement* node, bool& output)
{
std::string dummy;
@@ -382,24 +338,6 @@ void xmlAccess::addXmlElement(const std::string& name, const wxString& value, Ti
}
-void xmlAccess::addXmlElement(const std::string& name, const int value, TiXmlElement* parent)
-{
- addXmlElement(name, globalFunctions::numberToString(value), parent);
-}
-
-
-void xmlAccess::addXmlElement(const std::string& name, const unsigned int value, TiXmlElement* parent)
-{
- addXmlElement(name, static_cast<int>(value), parent);
-}
-
-
-void xmlAccess::addXmlElement(const std::string& name, const long value, TiXmlElement* parent)
-{
- addXmlElement(name, globalFunctions::numberToString(value), parent);
-}
-
-
void xmlAccess::addXmlElement(const std::string& name, const bool value, TiXmlElement* parent)
{
if (value)
@@ -429,18 +367,6 @@ void xmlAccess::addXmlAttribute(const std::string& name, const wxString& value,
}
-void xmlAccess::addXmlAttribute(const std::string& name, const int value, TiXmlElement* node)
-{
- addXmlAttribute(name, globalFunctions::numberToString(value), node);
-}
-
-
-void xmlAccess::addXmlAttribute(const std::string& name, const unsigned int value, TiXmlElement* node)
-{
- addXmlAttribute(name, globalFunctions::numberToString(value), node);
-}
-
-
void xmlAccess::addXmlAttribute(const std::string& name, const bool value, TiXmlElement* node)
{
if (value)
diff --git a/shared/xmlBase.h b/shared/xmlBase.h
index ceed1afe..62927cae 100644
--- a/shared/xmlBase.h
+++ b/shared/xmlBase.h
@@ -8,9 +8,11 @@
#define XMLBASE_H_INCLUDED
#include "tinyxml/tinyxml.h"
+#include "globalFunctions.h"
#include <string>
#include <vector>
#include <wx/string.h>
+#include "xmlError.h"
namespace xmlAccess
@@ -35,32 +37,31 @@ void saveXmlDocument(const wxString& fileName, const TiXmlDocument& document); /
//------------------------------------------------------------------------------------------
//small helper functions
+template <class T>
+bool readXmlElement(const std::string& name, const TiXmlElement* parent, T& output);
bool readXmlElement(const std::string& name, const TiXmlElement* parent, std::string& output);
bool readXmlElement(const std::string& name, const TiXmlElement* parent, wxString& output);
-bool readXmlElement(const std::string& name, const TiXmlElement* parent, int& output);
-bool readXmlElement(const std::string& name, const TiXmlElement* parent, unsigned int& output);
-bool readXmlElement(const std::string& name, const TiXmlElement* parent, long& output);
bool readXmlElement(const std::string& name, const TiXmlElement* parent, bool& output);
bool readXmlElement(const std::string& name, const TiXmlElement* parent, std::vector<wxString>& output);
+
+template <class T>
+bool readXmlAttribute(const std::string& name, const TiXmlElement* node, T& output);
bool readXmlAttribute(const std::string& name, const TiXmlElement* node, std::string& output);
bool readXmlAttribute(const std::string& name, const TiXmlElement* node, wxString& output);
-bool readXmlAttribute(const std::string& name, const TiXmlElement* node, int& output);
-bool readXmlAttribute(const std::string& name, const TiXmlElement* node, unsigned int& output);
bool readXmlAttribute(const std::string& name, const TiXmlElement* node, bool& output);
+template <class T>
+void addXmlElement(const std::string& name, T value, TiXmlElement* parent);
void addXmlElement(const std::string& name, const std::string& value, TiXmlElement* parent);
void addXmlElement(const std::string& name, const wxString& value, TiXmlElement* parent);
-void addXmlElement(const std::string& name, const int value, TiXmlElement* parent);
-void addXmlElement(const std::string& name, const unsigned int value, TiXmlElement* parent);
-void addXmlElement(const std::string& name, const long value, TiXmlElement* parent);
void addXmlElement(const std::string& name, const bool value, TiXmlElement* parent);
void addXmlElement(const std::string& name, const std::vector<wxString>& value, TiXmlElement* parent);
+template <class T>
+void addXmlAttribute(const std::string& name, T value, TiXmlElement* node);
void addXmlAttribute(const std::string& name, const std::string& value, TiXmlElement* node);
void addXmlAttribute(const std::string& name, const wxString& value, TiXmlElement* node);
-void addXmlAttribute(const std::string& name, const int value, TiXmlElement* node);
-void addXmlAttribute(const std::string& name, const unsigned int value, TiXmlElement* node);
void addXmlAttribute(const std::string& name, const bool value, TiXmlElement* node);
@@ -99,31 +100,6 @@ private:
const TiXmlElement* const root;
std::vector<wxString> failedNodes;
};
-
-
-class XmlError //Exception class
-{
-public:
- enum Severity
- {
- WARNING = 77,
- FATAL
- };
-
- XmlError(const wxString& message, Severity sev = FATAL) : errorMessage(message), m_severity(sev) {}
-
- const wxString& show() const
- {
- return errorMessage;
- }
- Severity getSeverity() const
- {
- return m_severity;
- }
-private:
- const wxString errorMessage;
- const Severity m_severity;
-};
}
@@ -147,4 +123,88 @@ private:
};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//++++++++++++++ inline implementation +++++++++++++++++++++++++++++++++++++++
+template <class T>
+inline
+bool xmlAccess::readXmlElement(const std::string& name, const TiXmlElement* parent, T& output)
+{
+ std::string temp;
+ if (!readXmlElement(name, parent, temp))
+ return false;
+
+ globalFunctions::stringToNumber(temp, output);
+ return true;
+}
+
+
+template <class T>
+inline
+void xmlAccess::addXmlElement(const std::string& name, T value, TiXmlElement* parent)
+{
+ addXmlElement(name, globalFunctions::numberToString(value), parent);
+}
+
+
+template <class T>
+inline
+bool xmlAccess::readXmlAttribute(const std::string& name, const TiXmlElement* node, T& output)
+{
+ std::string dummy;
+ if (readXmlAttribute(name, node, dummy))
+ {
+ globalFunctions::stringToNumber(dummy, output);
+ return true;
+ }
+ else
+ return false;
+}
+
+
+template <class T>
+inline
+void xmlAccess::addXmlAttribute(const std::string& name, T value, TiXmlElement* node)
+{
+ addXmlAttribute(name, globalFunctions::numberToString(value), node);
+}
+
#endif // XMLBASE_H_INCLUDED
diff --git a/shared/xmlError.h b/shared/xmlError.h
new file mode 100644
index 00000000..f5f02c6a
--- /dev/null
+++ b/shared/xmlError.h
@@ -0,0 +1,41 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef XMLERROR_H_INCLUDED
+#define XMLERROR_H_INCLUDED
+
+#include <wx/string.h>
+
+
+namespace xmlAccess
+{
+
+class XmlError //Exception class
+{
+public:
+ enum Severity
+ {
+ WARNING = 77,
+ FATAL
+ };
+
+ XmlError(const wxString& message, Severity sev = FATAL) : errorMessage(message), m_severity(sev) {}
+
+ const wxString& show() const
+ {
+ return errorMessage;
+ }
+ Severity getSeverity() const
+ {
+ return m_severity;
+ }
+private:
+ const wxString errorMessage;
+ const Severity m_severity;
+};
+}
+
+#endif // XMLERROR_H_INCLUDED
diff --git a/shared/zstring.cpp b/shared/zstring.cpp
index ce46d3e9..4652a6fe 100644
--- a/shared/zstring.cpp
+++ b/shared/zstring.cpp
@@ -273,7 +273,7 @@ namespace
{
#ifdef ZSTRING_CHAR
inline
-bool defaultIsWhiteSpace(const char ch)
+bool defaultIsWhiteSpace(char ch)
{
// some compilers (e.g. VC++ 6.0) return true for a call to isspace('\xEA') => exclude char(128) to char(255)
return (static_cast<unsigned char>(ch) < 128) && isspace(static_cast<unsigned char>(ch)) != 0;
@@ -281,7 +281,7 @@ bool defaultIsWhiteSpace(const char ch)
#elif defined ZSTRING_WIDE_CHAR
inline
-bool defaultIsWhiteSpace(const wchar_t ch)
+bool defaultIsWhiteSpace(wchar_t ch)
{
// some compilers (e.g. VC++ 6.0) return true for a call to isspace('\xEA') => exclude char(128) to char(255)
return (ch < 128 || ch > 255) && iswspace(ch) != 0;
diff --git a/shared/zstring.h b/shared/zstring.h
index f6050bb5..f5769223 100644
--- a/shared/zstring.h
+++ b/shared/zstring.h
@@ -51,20 +51,19 @@ public:
bool EndsWith(const DefaultChar end) const;
bool EndsWith(const Zstring& end) const;
Zstring& Truncate(size_t newLen);
-#ifdef FFS_WIN
- Zstring& MakeUpper();
-#endif
-
Zstring& Replace(const DefaultChar* old, const DefaultChar* replacement, bool replaceAll = true);
Zstring AfterLast( DefaultChar ch) const; //returns the whole string if ch not found
Zstring BeforeLast( DefaultChar ch) const; //returns empty string if ch not found
Zstring AfterFirst( DefaultChar ch) const; //returns empty string if ch not found
Zstring BeforeFirst(DefaultChar ch) const; //returns the whole string if ch not found
- size_t Find(DefaultChar ch, bool fromEnd) const; //returns npos if not found
+ size_t Find(DefaultChar ch, bool fromEnd = false) const; //returns npos if not found
bool Matches(const DefaultChar* mask) const;
static bool Matches(const DefaultChar* name, const DefaultChar* mask);
Zstring& Trim(bool fromRight); //from right or left
std::vector<Zstring> Tokenize(const DefaultChar delimiter) const;
+#ifdef FFS_WIN
+ Zstring& MakeUpper();
+#endif
//std::string functions
size_t length() const;
@@ -85,23 +84,25 @@ public:
Zstring& operator=(const Zstring& source);
Zstring& operator=(const DefaultChar* source);
- bool operator==(const Zstring& other) const;
- bool operator==(const DefaultChar* other) const;
- bool operator< (const Zstring& other) const;
- bool operator< (const DefaultChar* other) const;
- bool operator!=(const Zstring& other) const;
- bool operator!=(const DefaultChar* other) const;
- const DefaultChar operator[](const size_t pos) const;
+ friend bool operator==(const Zstring& lhs, const Zstring& rhs);
+ friend bool operator==(const Zstring& lhs, const DefaultChar* rhs);
+ friend bool operator==(const DefaultChar* lhs, const Zstring& rhs);
+
+ friend bool operator< (const Zstring& lhs, const Zstring& rhs);
+ friend bool operator< (const Zstring& lhs, const DefaultChar* rhs);
+ friend bool operator< (const DefaultChar* lhs, const Zstring& rhs);
+
+ friend bool operator!=(const Zstring& lhs, const Zstring& rhs);
+ friend bool operator!=(const Zstring& lhs, const DefaultChar* rhs);
+ friend bool operator!=(const DefaultChar* lhs, const Zstring& rhs);
+
+ const DefaultChar operator[](size_t pos) const;
Zstring& operator+=(const Zstring& other);
Zstring& operator+=(const DefaultChar* other);
Zstring& operator+=(DefaultChar ch);
- const Zstring operator+(const Zstring& string2) const;
- const Zstring operator+(const DefaultChar* string2) const;
- const Zstring operator+(const DefaultChar ch) const;
-
static const size_t npos = static_cast<size_t>(-1);
private:
@@ -136,6 +137,13 @@ private:
};
+const Zstring operator+(const Zstring& lhs, const Zstring& rhs);
+const Zstring operator+(const Zstring& lhs, const DefaultChar* rhs);
+const Zstring operator+(const DefaultChar* lhs, const Zstring& rhs);
+const Zstring operator+(DefaultChar lhs, const Zstring& rhs);
+const Zstring operator+(const Zstring& lhs, DefaultChar rhs);
+
+
template <class T>
Zstring numberToZstring(const T& number); //convert number to Zstring
@@ -375,7 +383,6 @@ void Zstring::decRef()
AllocationCount::getInstance().dec(c_str()); //test Zstring for memory leaks
#endif
::free(descr); //beginning of whole memory block
- descr = NULL;
}
}
@@ -553,44 +560,65 @@ size_t Zstring::find(DefaultChar ch, size_t pos) const
inline
-bool Zstring::operator==(const Zstring& other) const
+bool operator==(const Zstring& lhs, const Zstring& rhs)
+{
+ return lhs.length() != rhs.length() ? false : Zstring::defaultCompare(lhs.c_str(), rhs.c_str()) == 0; //memcmp() offers no better performance here...
+}
+
+
+inline
+bool operator==(const Zstring& lhs, const DefaultChar* rhs)
+{
+ return Zstring::defaultCompare(lhs.c_str(), rhs) == 0; //overload using strcmp(char*, char*) should be fastest!
+}
+
+
+inline
+bool operator==(const DefaultChar* lhs, const Zstring& rhs)
+{
+ return operator==(rhs, lhs);
+}
+
+
+inline
+bool operator<(const Zstring& lhs, const Zstring& rhs)
{
- return length() != other.length() ? false : defaultCompare(c_str(), other.c_str()) == 0; //memcmp() offers no better performance here...
+ return Zstring::defaultCompare(lhs.c_str(), rhs.c_str()) < 0;
}
inline
-bool Zstring::operator==(const DefaultChar* other) const
+bool operator<(const Zstring& lhs, const DefaultChar* rhs)
{
- return defaultCompare(c_str(), other) == 0; //overload using strcmp(char*, char*) should be fastest!
+ return Zstring::defaultCompare(lhs.c_str(), rhs) < 0;
}
inline
-bool Zstring::operator<(const Zstring& other) const
+bool operator<(const DefaultChar* lhs, const Zstring& rhs)
{
- return defaultCompare(c_str(), other.c_str()) < 0;
+ return Zstring::defaultCompare(lhs, rhs.c_str()) < 0;
}
inline
-bool Zstring::operator<(const DefaultChar* other) const
+bool operator!=(const Zstring& lhs, const Zstring& rhs)
{
- return defaultCompare(c_str(), other) < 0; //overload using strcmp(char*, char*) should be fastest!
+ return !operator==(lhs, rhs);
}
inline
-bool Zstring::operator!=(const Zstring& other) const
+bool operator!=(const Zstring& lhs, const DefaultChar* rhs)
{
- return !(*this==other);
+ return !operator==(lhs, rhs);
}
inline
-bool Zstring::operator!=(const DefaultChar* other) const
+bool operator!=(const DefaultChar* lhs, const Zstring& rhs)
{
- return !(*this==other);
+ return !operator==(lhs, rhs);
}
@@ -653,23 +681,37 @@ const DefaultChar Zstring::operator[](const size_t pos) const
inline
-const Zstring Zstring::operator+(const Zstring& string2) const
+const Zstring operator+(const Zstring& lhs, const Zstring& rhs)
+{
+ return Zstring(lhs) += rhs;
+}
+
+
+inline
+const Zstring operator+(const Zstring& lhs, const DefaultChar* rhs)
+{
+ return Zstring(lhs) += rhs;
+}
+
+
+inline
+const Zstring operator+(const DefaultChar* lhs, const Zstring& rhs)
{
- return Zstring(*this)+=string2;
+ return Zstring(lhs) += rhs;
}
inline
-const Zstring Zstring::operator+(const DefaultChar* string2) const
+const Zstring operator+(DefaultChar lhs, const Zstring& rhs)
{
- return Zstring(*this)+=string2;
+return Zstring(lhs) += rhs;
}
inline
-const Zstring Zstring::operator+(const DefaultChar ch) const
+const Zstring operator+(const Zstring& lhs, DefaultChar rhs)
{
- return Zstring(*this)+=ch;
+ return Zstring(lhs) += rhs;
}
@@ -716,7 +758,7 @@ Zstring numberToZstring(const T& number) //convert number to string the C++ way
std::wstringstream ss;
#endif
ss << number;
- return Zstring(ss.str().c_str(), ss.str().length());
+ return Zstring(ss.str().c_str());
}
#endif // ZSTRING_H_INCLUDED
diff --git a/structures.cpp b/structures.cpp
index 47777b84..90863a41 100644
--- a/structures.cpp
+++ b/structures.cpp
@@ -6,7 +6,6 @@
//
#include "structures.h"
#include <wx/intl.h>
-#include "shared/systemConstants.h"
#include <stdexcept>
using namespace FreeFileSync;
@@ -168,7 +167,7 @@ wxString FreeFileSync::getDescription(CompareFilesResult cmpRes)
case FILE_RIGHT_NEWER:
return _("Files that exist on both sides, right one is newer");
case FILE_DIFFERENT:
- return _("Files that exist on both sides and have different content");
+ return _("Files that have different content");
case FILE_EQUAL:
return _("Files that are equal on both sides");
case FILE_CONFLICT:
diff --git a/structures.h b/structures.h
index 98db615e..c8a67393 100644
--- a/structures.h
+++ b/structures.h
@@ -14,7 +14,6 @@
#include "shared/staticAssert.h"
#include <boost/shared_ptr.hpp>
-
namespace FreeFileSync
{
enum CompareVariant
@@ -163,21 +162,15 @@ struct HiddenSettings
{
HiddenSettings() :
fileTimeTolerance(2), //default 2s: FAT vs NTFS
- traverseDirectorySymlinks(false),
- copyFileSymlinks(true),
verifyFileCopy(false) {}
- unsigned int fileTimeTolerance; //max. allowed file time deviation
- bool traverseDirectorySymlinks;
- bool copyFileSymlinks; //copy symbolic link instead of target file
+ size_t fileTimeTolerance; //max. allowed file time deviation
bool verifyFileCopy; //verify copied files
bool operator==(const HiddenSettings& other) const
{
- return fileTimeTolerance == other.fileTimeTolerance &&
- traverseDirectorySymlinks == other.traverseDirectorySymlinks &&
- copyFileSymlinks == other.copyFileSymlinks &&
- verifyFileCopy == other.verifyFileCopy;
+ return fileTimeTolerance == other.fileTimeTolerance &&
+ verifyFileCopy == other.verifyFileCopy;
}
};
@@ -270,9 +263,10 @@ struct MainConfiguration
{
MainConfiguration() :
compareVar(CMP_BY_TIME_SIZE),
- filterIsActive(true),
- includeFilter(DefaultStr("*")),
- excludeFilter(standardExcludeFilter()),
+ processSymlinks(false),
+ traverseDirectorySymlinks(true),
+ copyFileSymlinks(false),
+ globalFilter(DefaultStr("*"), standardExcludeFilter()),
handleDeletion(MOVE_TO_RECYCLE_BIN) {}
FolderPairEnh firstPair; //there needs to be at least one pair!
@@ -281,13 +275,15 @@ struct MainConfiguration
//Compare setting
CompareVariant compareVar;
+ bool processSymlinks; //include Symbolic links into file listing at all?
+ bool traverseDirectorySymlinks; //traverse dir symlinks <=> not copying symlink
+ bool copyFileSymlinks; //copy symbolic link instead of target file
+
//Synchronisation settings
SyncConfiguration syncConfiguration;
//GLOBAL filter settings
- bool filterIsActive;
- Zstring includeFilter;
- Zstring excludeFilter;
+ FilterConfig globalFilter;
//misc options
HiddenSettings hidden; //settings not visible on GUI
@@ -302,10 +298,11 @@ struct MainConfiguration
return firstPair == other.firstPair &&
additionalPairs == other.additionalPairs &&
compareVar == other.compareVar &&
+ processSymlinks == other.processSymlinks &&
+ traverseDirectorySymlinks == other.traverseDirectorySymlinks &&
+ copyFileSymlinks == other.copyFileSymlinks &&
syncConfiguration == other.syncConfiguration &&
- filterIsActive == other.filterIsActive &&
- includeFilter == other.includeFilter &&
- excludeFilter == other.excludeFilter &&
+ globalFilter == other.globalFilter &&
hidden == other.hidden &&
handleDeletion == other.handleDeletion &&
customDeletionDirectory == other.customDeletionDirectory;
diff --git a/synchronization.cpp b/synchronization.cpp
index b4f30b1e..dfc68fe7 100644
--- a/synchronization.cpp
+++ b/synchronization.cpp
@@ -185,10 +185,10 @@ void SyncStatistics::getDirNumbers(const DirMapping& dirObj)
case SO_OVERWRITE_LEFT:
case SO_OVERWRITE_RIGHT:
- case SO_UNRESOLVED_CONFLICT:
assert(false);
break;
+ case SO_UNRESOLVED_CONFLICT:
case SO_DO_NOTHING:
case SO_EQUAL:
break;
@@ -226,12 +226,15 @@ std::vector<FreeFileSync::FolderPairSyncCfg> FreeFileSync::extractSyncCfg(const
}
//------------------------------------------------------------------------------------------------------------
+namespace
+{
-template <bool recyclerUsed>
class DiskSpaceNeeded
{
public:
- DiskSpaceNeeded(const BaseDirMapping& baseObj)
+ DiskSpaceNeeded(const BaseDirMapping& baseObj, bool freeSpaceDelLeft, bool freeSpaceDelRight) :
+ freeSpaceDelLeft_(freeSpaceDelLeft),
+ freeSpaceDelRight_(freeSpaceDelRight)
{
processRecursively(baseObj);
}
@@ -259,23 +262,23 @@ private:
break;
case SO_DELETE_LEFT:
- if (!recyclerUsed)
+ if (freeSpaceDelLeft_)
spaceNeededLeft -= globalFunctions::convertToSigned(i->getFileSize<LEFT_SIDE>());
break;
case SO_DELETE_RIGHT:
- if (!recyclerUsed)
+ if (freeSpaceDelRight_)
spaceNeededRight -= globalFunctions::convertToSigned(i->getFileSize<RIGHT_SIDE>());
break;
case SO_OVERWRITE_LEFT:
- if (!recyclerUsed)
+ if (freeSpaceDelLeft_)
spaceNeededLeft -= globalFunctions::convertToSigned(i->getFileSize<LEFT_SIDE>());
spaceNeededLeft += globalFunctions::convertToSigned(i->getFileSize<RIGHT_SIDE>());
break;
case SO_OVERWRITE_RIGHT:
- if (!recyclerUsed)
+ if (freeSpaceDelRight_)
spaceNeededRight -= globalFunctions::convertToSigned(i->getFileSize<RIGHT_SIDE>());
spaceNeededRight += globalFunctions::convertToSigned(i->getFileSize<LEFT_SIDE>());
break;
@@ -288,29 +291,54 @@ private:
//recurse into sub-dirs
- std::for_each(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), boost::bind(&DiskSpaceNeeded<recyclerUsed>::processRecursively, this, _1));
+ std::for_each(hierObj.useSubDirs().begin(), hierObj.useSubDirs().end(), boost::bind(&DiskSpaceNeeded::processRecursively, this, _1));
}
+ const bool freeSpaceDelLeft_;
+ const bool freeSpaceDelRight_;
+
wxLongLong spaceNeededLeft;
wxLongLong spaceNeededRight;
};
-std::pair<wxLongLong, wxLongLong> freeDiskSpaceNeeded(const BaseDirMapping& baseDirObj, const DeletionPolicy handleDeletion)
+//evaluate whether a deletion will actually free space within a volume
+bool deletionFreesSpace(const Zstring& baseDir,
+ const DeletionPolicy handleDeletion,
+ const Zstring& custDelFolderFmt)
{
switch (handleDeletion)
{
- case FreeFileSync::DELETE_PERMANENTLY:
- return DiskSpaceNeeded<false>(baseDirObj).getSpaceTotal();
- case FreeFileSync::MOVE_TO_RECYCLE_BIN:
- return DiskSpaceNeeded<true>(baseDirObj).getSpaceTotal();
- case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY:
- //warning: this is not necessarily correct! it needs to be checked if user-def recycle bin dir and sync-dir are on same drive
- return DiskSpaceNeeded<true>(baseDirObj).getSpaceTotal();
+ case DELETE_PERMANENTLY:
+ return true;
+ case MOVE_TO_RECYCLE_BIN:
+ return false; //in general... (unless Recycle Bin is full)
+ case MOVE_TO_CUSTOM_DIRECTORY:
+ switch (FreeFileSync::onSameVolume(baseDir, custDelFolderFmt))
+ {
+ case VOLUME_SAME:
+ return false;
+ case VOLUME_DIFFERENT:
+ return true; //but other volume (custDelFolderFmt) may become full...
+ case VOLUME_CANT_SAY:
+ return true; //a rough guess!
+ }
}
-
assert(false);
- return std::make_pair(2000000000, 2000000000); //dummy
+ return true;
+}
+
+
+std::pair<wxLongLong, wxLongLong> freeDiskSpaceNeeded(
+ const BaseDirMapping& baseDirObj,
+ const DeletionPolicy handleDeletion,
+ const Zstring& custDelFolderFmt)
+{
+ const bool freeSpaceDelLeft = deletionFreesSpace(baseDirObj.getBaseDir<LEFT_SIDE>(), handleDeletion, custDelFolderFmt);
+ const bool freeSpaceDelRight = deletionFreesSpace(baseDirObj.getBaseDir<RIGHT_SIDE>(), handleDeletion, custDelFolderFmt);
+
+ return DiskSpaceNeeded(baseDirObj, freeSpaceDelLeft, freeSpaceDelRight).getSpaceTotal();
+}
}
//------------------------------------------------------------------------------------------------------------
@@ -399,32 +427,29 @@ add some postfix to alternate deletion directory: deletionDirectory\<prefix>2010
*/
Zstring getSessionDeletionDir(const Zstring& deletionDirectory, const Zstring& prefix = Zstring())
{
- Zstring formattedDirectory = deletionDirectory;
- if (formattedDirectory.empty())
+ Zstring formattedDir = deletionDirectory;
+ if (formattedDir.empty())
return Zstring(); //no valid directory for deletion specified (checked later)
- if (!formattedDirectory.EndsWith(globalFunctions::FILE_NAME_SEPARATOR))
- formattedDirectory += globalFunctions::FILE_NAME_SEPARATOR;
+ if (!formattedDir.EndsWith(globalFunctions::FILE_NAME_SEPARATOR))
+ formattedDir += globalFunctions::FILE_NAME_SEPARATOR;
wxString timeNow = wxDateTime::Now().FormatISOTime();
timeNow.Replace(wxT(":"), wxT("-"));
const wxString sessionName = wxDateTime::Now().FormatISODate() + wxChar(' ') + timeNow;
- formattedDirectory += prefix + wxToZ(sessionName);
+ formattedDir += prefix + wxToZ(sessionName);
+
//ensure that session directory does not yet exist (must be unique)
- if (FreeFileSync::dirExists(formattedDirectory))
- {
- //if it's not unique, add a postfix number
- int postfix = 1;
- while (FreeFileSync::dirExists(formattedDirectory + DefaultStr("_") + numberToZstring(postfix)))
- ++postfix;
+ Zstring output = formattedDir;
- formattedDirectory += Zstring(DefaultStr("_")) + numberToZstring(postfix);
- }
+ //ensure uniqueness
+ for (int i = 1; FreeFileSync::somethingExists(output); ++i)
+ output = formattedDir + DefaultChar('_') + numberToZstring(i);
- formattedDirectory += globalFunctions::FILE_NAME_SEPARATOR;
- return formattedDirectory;
+ output += globalFunctions::FILE_NAME_SEPARATOR;
+ return output;
}
@@ -767,8 +792,8 @@ bool diskSpaceIsReduced(const DirMapping& dirObj)
case SO_OVERWRITE_LEFT:
case SO_OVERWRITE_RIGHT:
- case SO_UNRESOLVED_CONFLICT:
assert(false);
+ case SO_UNRESOLVED_CONFLICT:
case SO_CREATE_NEW_LEFT:
case SO_CREATE_NEW_RIGHT:
case SO_DO_NOTHING:
@@ -780,22 +805,6 @@ bool diskSpaceIsReduced(const DirMapping& dirObj)
//----------------------------------------------------------------------------------------
-class RemoveInvalid
-{
-public:
- RemoveInvalid(BaseDirMapping& baseDir) :
- baseDir_(baseDir) {}
-
- ~RemoveInvalid()
- {
- FileSystemObject::removeEmpty(baseDir_);
- }
-
-private:
- BaseDirMapping& baseDir_;
-};
-
-
class FreeFileSync::SynchronizeFolderPair
{
public:
@@ -888,8 +897,8 @@ void SynchronizeFolderPair::execute(HierarchyObject& hierObj)
break;
case SO_OVERWRITE_RIGHT:
case SO_OVERWRITE_LEFT:
- case SO_UNRESOLVED_CONFLICT:
assert(false);
+ case SO_UNRESOLVED_CONFLICT:
case SO_DELETE_LEFT:
case SO_DELETE_RIGHT:
case SO_DO_NOTHING:
@@ -1134,8 +1143,8 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const
case SO_OVERWRITE_RIGHT:
case SO_OVERWRITE_LEFT:
- case SO_UNRESOLVED_CONFLICT:
assert(false);
+ case SO_UNRESOLVED_CONFLICT:
case SO_DO_NOTHING:
case SO_EQUAL:
return; //no update on processed data!
@@ -1239,7 +1248,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
}
//check for sufficient free diskspace in left directory
- const std::pair<wxLongLong, wxLongLong> spaceNeeded = freeDiskSpaceNeeded(*j, folderPairCfg.handleDeletion);
+ const std::pair<wxLongLong, wxLongLong> spaceNeeded = freeDiskSpaceNeeded(*j, folderPairCfg.handleDeletion, folderPairCfg.custDelFolder);
wxLongLong freeDiskSpaceLeft;
if (wxGetDiskSpace(zToWx(j->getBaseDir<LEFT_SIDE>()), NULL, &freeDiskSpaceLeft))
@@ -1324,20 +1333,26 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
//------------------------------------------------------------------------------------------
//generate name of alternate deletion directory (unique for session AND folder pair)
- const DeletionHandling currentDelHandling(folderPairCfg.handleDeletion,
- folderPairCfg.custDelFolder,
- j->getBaseDir<LEFT_SIDE>(), j->getBaseDir<RIGHT_SIDE>(),
- statusUpdater);
+ const DeletionHandling currentDelHandling(
+ folderPairCfg.handleDeletion,
+ folderPairCfg.custDelFolder,
+ j->getBaseDir<LEFT_SIDE>(), j->getBaseDir<RIGHT_SIDE>(),
+ statusUpdater);
//------------------------------------------------------------------------------------------
//execute synchronization recursively
//enforce removal of invalid entries (where both sides are empty)
- RemoveInvalid dummy(*j);
+ struct RemoveInvalid
+ {
+ RemoveInvalid(BaseDirMapping& baseDir) : baseDir_(baseDir) {}
+ ~RemoveInvalid()
+ {
+ FileSystemObject::removeEmpty(baseDir_);
+ }
+ BaseDirMapping& baseDir_;
+ } dummy1(*j);
- //detect renamed files: currently in automatic mode only
- // if (folderPairCfg.inAutomaticMode)
- // DetectRenamedFiles::execute(*j, statusUpdater);
SynchronizeFolderPair syncFP( *this,
#ifdef FFS_WIN
@@ -1366,7 +1381,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf
}
catch (const std::exception& e)
{
- statusUpdater.reportFatalError(wxString::FromAscii(e.what()));
+ statusUpdater.reportFatalError(wxString::FromUTF8(e.what()));
return; //should be obsolete!
}
}
@@ -1430,11 +1445,13 @@ void SynchronizeFolderPair::copyFileUpdating(const Zstring& source, const Zstrin
try
{
+ FreeFileSync::copyFile(source,
+ target,
+ copyFileSymLinks_,
#ifdef FFS_WIN
- FreeFileSync::copyFile(source, target, copyFileSymLinks_, shadowCopyHandler_, &callback);
-#elif defined FFS_LINUX
- FreeFileSync::copyFile(source, target, copyFileSymLinks_, &callback);
+ shadowCopyHandler_,
#endif
+ &callback);
if (verifyCopiedFiles_) //verify if data was copied correctly
verifyFileCopy(source, target);
@@ -1464,9 +1481,9 @@ public:
void verifyFiles(const Zstring& source, const Zstring& target, VerifyCallback* callback) // throw (FileError)
{
- const unsigned int BUFFER_SIZE = 512 * 1024; //512 kb seems to be the perfect buffer size
- static boost::scoped_array<unsigned char> memory1(new unsigned char[BUFFER_SIZE]);
- static boost::scoped_array<unsigned char> memory2(new unsigned char[BUFFER_SIZE]);
+ const size_t BUFFER_SIZE = 1024 * 1024; //1024 kb seems to be a reasonable buffer size
+ static const boost::scoped_array<char> memory1(new char[BUFFER_SIZE]);
+ static const boost::scoped_array<char> memory2(new char[BUFFER_SIZE]);
#ifdef FFS_WIN
wxFile file1(FreeFileSync::applyLongPathPrefix(source).c_str(), wxFile::read); //don't use buffered file input for verification!
@@ -1488,18 +1505,17 @@ void verifyFiles(const Zstring& source, const Zstring& target, VerifyCallback* c
{
const size_t length1 = file1.Read(memory1.get(), BUFFER_SIZE);
if (file1.Error()) throw FileError(wxString(_("Error reading file:")) + wxT(" \"") + zToWx(source) + wxT("\""));
+ callback->updateStatus(); //send progress updates
const size_t length2 = file2.Read(memory2.get(), BUFFER_SIZE);
if (file2.Error()) throw FileError(wxString(_("Error reading file:")) + wxT(" \"") + zToWx(target) + wxT("\""));
+ callback->updateStatus(); //send progress updates
if (length1 != length2 || ::memcmp(memory1.get(), memory2.get(), length1) != 0)
{
const wxString errorMsg = wxString(_("Data verification error: Source and target file have different content!")) + wxT("\n");
throw FileError(errorMsg + wxT("\"") + zToWx(source) + wxT("\" -> \n\"") + zToWx(target) + wxT("\""));
}
-
- //send progress updates
- callback->updateStatus();
}
while (!file1.Eof());
diff --git a/synchronization.h b/synchronization.h
index 79c91fe6..937dce33 100644
--- a/synchronization.h
+++ b/synchronization.h
@@ -62,7 +62,7 @@ struct FolderPairSyncCfg
bool inAutomaticMode; //update database if in automatic mode
DeletionPolicy handleDeletion;
- Zstring custDelFolder; //formatted directory name
+ Zstring custDelFolder; //formatted(!) directory name
};
std::vector<FolderPairSyncCfg> extractSyncCfg(const MainConfiguration& mainCfg);
diff --git a/ui/MainDialog.cpp b/ui/MainDialog.cpp
index 9c5e0f46..976b9bdb 100644
--- a/ui/MainDialog.cpp
+++ b/ui/MainDialog.cpp
@@ -18,13 +18,16 @@
#include "../comparison.h"
#include "../synchronization.h"
#include "../algorithm.h"
+#include "../shared/appMain.h"
#include "../shared/util.h"
#include "checkVersion.h"
#include "guiStatusHandler.h"
-#include "settingsDialog.h"
+#include "syncConfig.h"
#include "../shared/localization.h"
#include "../shared/stringConv.h"
#include "smallDialogs.h"
+#include "mouseMoveWindow.h"
+#include "progressIndicator.h"
#include "messagePopup.h"
#include "../shared/dragAndDrop.h"
#include "../library/filter.h"
@@ -43,6 +46,8 @@
#include <wx/sound.h>
#include "search.h"
#include "../shared/helpProvider.h"
+#include "isNullFilter.h"
+#include "batchConfig.h"
using namespace FreeFileSync;
using FreeFileSync::CustomLocale;
@@ -80,7 +85,7 @@ public:
}
//disable the sync button
- mainDlg_.syncPreview.enableSynchronization(false);
+ mainDlg_.syncPreview->enableSynchronization(false);
//clear grids
mainDlg_.gridDataView->clearAllRows();
@@ -249,29 +254,88 @@ struct DirNotFound
//##################################################################################################################################
-MainDialog::MainDialog(wxFrame* frame,
- const wxString& cfgFileName,
- xmlAccess::XmlGlobalSettings& settings) :
- MainDialogGenerated(frame),
- globalSettings(settings),
- gridDataView(new FreeFileSync::GridView()),
- contextMenu(new wxMenu), //initialize right-click context menu; will be dynamically re-created on each R-mouse-click
- compareStatus(*this),
- cleanedUp(false),
- lastSortColumn(-1),
- lastSortGrid(NULL),
-#ifdef FFS_WIN
- updateFileIcons(new IconUpdater(m_gridLeft, m_gridRight)),
- moveWholeWindow(this),
-#endif
- syncPreview(this)
+MainDialog::MainDialog(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings& settings) :
+ MainDialogGenerated(NULL)
+{
+ xmlAccess::XmlGuiConfig guiCfg; //structure to receive gui settings, already defaulted!!
+
+ const wxString actualConfigFile = cfgFileName.empty() ? lastConfigFileName() : cfgFileName;
+
+ bool loadCfgSuccess = false;
+ if (!cfgFileName.empty() || fileExists(wxToZ(lastConfigFileName())))
+ {
+ //load XML
+ try
+ {
+ xmlAccess::readGuiOrBatchConfig(actualConfigFile, guiCfg); //allow reading batch configurations also
+ loadCfgSuccess = true;
+ }
+ catch (const xmlAccess::XmlError& error)
+ {
+ if (error.getSeverity() == xmlAccess::XmlError::WARNING)
+ wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING);
+ else
+ wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
+ }
+ }
+
+ init(guiCfg,
+ settings,
+ !cfgFileName.empty() && loadCfgSuccess);
+
+ setLastUsedConfig(actualConfigFile, loadCfgSuccess ? guiCfg : xmlAccess::XmlGuiConfig()); //simulate changed config on parsing errors
+}
+
+
+MainDialog::MainDialog(const xmlAccess::XmlGuiConfig& guiCfg,
+ xmlAccess::XmlGlobalSettings& settings,
+ bool startComparison) :
+ MainDialogGenerated(NULL)
+{
+ init(guiCfg,
+ settings,
+ startComparison);
+}
+
+
+MainDialog::~MainDialog()
+{
+ //keep non-inline destructor for std::auto_ptr to work with forward declaration
+
+ cleanUp(true); //do NOT include any other code here! cleanUp() is re-used when switching languages
+}
+
+
+void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg,
+ xmlAccess::XmlGlobalSettings& settings,
+ bool startComparison)
{
wxWindowUpdateLocker dummy(this); //avoid display distortion
-//avoid mirroring this dialog in RTL languages like Hebrew or Arabic
+ globalSettings = &settings;
+ gridDataView.reset(new FreeFileSync::GridView);
+ contextMenu.reset(new wxMenu); //initialize right-click context menu; will be dynamically re-created on each R-mouse-click
+
+ compareStatus.reset(new CompareStatus(*this));
+ cleanedUp = false;
+ lastSortColumn = -1;
+ lastSortGrid = NULL;
+#ifdef FFS_WIN
+ updateFileIcons.reset(new IconUpdater(m_gridLeft, m_gridRight));
+ moveWholeWindow.reset(new MouseMoveWindow(this));
+#endif
+ syncPreview.reset(new SyncPreview(this));
+
+ SetTitle(wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization"));
+
+ //avoid mirroring this dialog in RTL languages like Hebrew or Arabic
SetLayoutDirection(wxLayout_LeftToRight);
m_panelStatusBar->SetLayoutDirection(wxLayout_LeftToRight);
+ SetIcon(*GlobalResources::getInstance().programIcon); //set application icon
+
+ //notify about (logical) application main window => program won't quit, but stay on this dialog
+ FreeFileSync::AppMainWindow::setMainWindow(this);
//init handling of first folder pair
firstFolderPair.reset(new FirstFolderPairCfg(*this));
@@ -280,12 +344,7 @@ MainDialog::MainDialog(wxFrame* frame,
//initialize and load configuration
readGlobalSettings();
-
- bool loadCfgSuccess = false;
- if (cfgFileName.empty())
- loadCfgSuccess = readConfigurationFromXml(lastConfigFileName(), true);
- else
- loadCfgSuccess = readConfigurationFromXml(cfgFileName, true);
+ setCurrentConfiguration(guiCfg);
//set icons for this dialog
m_bpButton10->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("exit")));
@@ -321,9 +380,9 @@ MainDialog::MainDialog(wxFrame* frame,
#ifdef FFS_WIN
//allow moving main dialog by clicking (nearly) anywhere...
- moveWholeWindow.connectSourceWindow(m_panel71);
- moveWholeWindow.connectSourceWindow(m_panelBottom);
- moveWholeWindow.connectSourceWindow(m_panelStatusBar);
+ moveWholeWindow->connectSourceWindow(m_panel71);
+ moveWholeWindow->connectSourceWindow(m_panelBottom);
+ moveWholeWindow->connectSourceWindow(m_panelStatusBar);
#endif
#ifdef FFS_LINUX
@@ -354,6 +413,8 @@ MainDialog::MainDialog(wxFrame* frame,
Connect(wxEVT_SIZE, wxSizeEventHandler(MainDialog::OnResize), NULL, this);
Connect(wxEVT_MOVE, wxSizeEventHandler(MainDialog::OnResize), NULL, this);
+ m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(MainDialog::OnGlobalFilterOpenContext), NULL, this);
+
//calculate witdh of folder pair manually (if scrollbars are visible)
m_scrolledWindowFolderPairs->Connect(wxEVT_SIZE, wxSizeEventHandler(MainDialog::OnResizeFolderPairs), NULL, this);
@@ -367,15 +428,15 @@ MainDialog::MainDialog(wxFrame* frame,
m_gridRight ->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, gridDataView.get());
//disable sync button as long as "compare" hasn't been triggered.
- syncPreview.enableSynchronization(false);
+ syncPreview->enableSynchronization(false);
//mainly to update row label sizes...
updateGuiGrid();
//integrate the compare status panel (in hidden state)
- bSizer1->Insert(1, compareStatus.getAsWindow(), 0, wxEXPAND | wxBOTTOM, 5 );
+ bSizer1->Insert(1, compareStatus->getAsWindow(), 0, wxEXPAND | wxBOTTOM, 5 );
Layout(); //avoid screen flicker when panel is shown later
- compareStatus.getAsWindow()->Hide();
+ compareStatus->getAsWindow()->Hide();
//correct width of swap button above middle grid
const wxSize source = m_gridMiddle->GetSize();
@@ -392,7 +453,7 @@ MainDialog::MainDialog(wxFrame* frame,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------
//some convenience: if FFS is started with a *.ffs_gui file as commandline parameter AND all directories contained exist, comparison shall be started right off
- if (!cfgFileName.empty() && loadCfgSuccess)
+ if (startComparison)
{
const FreeFileSync::MainConfiguration currMainCfg = getCurrentConfiguration().mainCfg;
const bool allFoldersExist = !DirNotFound()(currMainCfg.firstPair) &&
@@ -408,15 +469,7 @@ MainDialog::MainDialog(wxFrame* frame,
}
-MainDialog::~MainDialog()
-{
- //keep non-inline destructor for std::auto_ptr to work with forward declaration
-
- cleanUp(); //do NOT include any other code here! cleanUp() is re-used when switching languages
-}
-
-
-void MainDialog::cleanUp()
+void MainDialog::cleanUp(bool saveLastUsedConfig)
{
if (!cleanedUp)
{
@@ -425,7 +478,8 @@ void MainDialog::cleanUp()
//no need for wxEventHandler::Disconnect() here; done automatically when window is destoyed!
//save configuration
- writeConfigurationToXml(lastConfigFileName()); //don't throw exceptions in destructors
+ if (saveLastUsedConfig)
+ writeConfigurationToXml(lastConfigFileName()); //don't throw exceptions in destructors
writeGlobalSettings();
}
}
@@ -434,10 +488,10 @@ void MainDialog::cleanUp()
void MainDialog::readGlobalSettings()
{
//apply window size and position at program startup ONLY
- widthNotMaximized = globalSettings.gui.widthNotMaximized;
- heightNotMaximized = globalSettings.gui.heightNotMaximized;
- posXNotMaximized = globalSettings.gui.posXNotMaximized;
- posYNotMaximized = globalSettings.gui.posYNotMaximized;
+ widthNotMaximized = globalSettings->gui.widthNotMaximized;
+ heightNotMaximized = globalSettings->gui.heightNotMaximized;
+ posXNotMaximized = globalSettings->gui.posXNotMaximized;
+ posYNotMaximized = globalSettings->gui.posYNotMaximized;
//apply window size and position
if ( widthNotMaximized != wxDefaultCoord &&
@@ -448,68 +502,68 @@ void MainDialog::readGlobalSettings()
else
Centre();
- Maximize(globalSettings.gui.isMaximized);
+ Maximize(globalSettings->gui.isMaximized);
//set column attributes
- m_gridLeft->setColumnAttributes(globalSettings.gui.columnAttribLeft);
- m_gridRight->setColumnAttributes(globalSettings.gui.columnAttribRight);
+ m_gridLeft->setColumnAttributes(globalSettings->gui.columnAttribLeft);
+ m_gridRight->setColumnAttributes(globalSettings->gui.columnAttribRight);
//load list of last used configuration files (in reverse order)
- for (std::vector<wxString>::reverse_iterator i = globalSettings.gui.cfgFileHistory.rbegin();
- i != globalSettings.gui.cfgFileHistory.rend();
+ for (std::vector<wxString>::reverse_iterator i = globalSettings->gui.cfgFileHistory.rbegin();
+ i != globalSettings->gui.cfgFileHistory.rend();
++i)
addFileToCfgHistory(*i);
//load list of last used folders
- for (std::vector<wxString>::reverse_iterator i = globalSettings.gui.folderHistoryLeft.rbegin();
- i != globalSettings.gui.folderHistoryLeft.rend();
+ for (std::vector<wxString>::reverse_iterator i = globalSettings->gui.folderHistoryLeft.rbegin();
+ i != globalSettings->gui.folderHistoryLeft.rend();
++i)
addLeftFolderToHistory(*i);
- for (std::vector<wxString>::reverse_iterator i = globalSettings.gui.folderHistoryRight.rbegin();
- i != globalSettings.gui.folderHistoryRight.rend();
+ for (std::vector<wxString>::reverse_iterator i = globalSettings->gui.folderHistoryRight.rbegin();
+ i != globalSettings->gui.folderHistoryRight.rend();
++i)
addRightFolderToHistory(*i);
//show/hide file icons
#ifdef FFS_WIN
- m_gridLeft->enableFileIcons(globalSettings.gui.showFileIconsLeft);
- m_gridRight->enableFileIcons(globalSettings.gui.showFileIconsRight);
+ m_gridLeft->enableFileIcons(globalSettings->gui.showFileIconsLeft);
+ m_gridRight->enableFileIcons(globalSettings->gui.showFileIconsRight);
#endif
//set selected tab
- m_notebookBottomLeft->ChangeSelection(globalSettings.gui.selectedTabBottomLeft);
+ m_notebookBottomLeft->ChangeSelection(globalSettings->gui.selectedTabBottomLeft);
}
void MainDialog::writeGlobalSettings()
{
//write global settings to (global) variable stored in application instance
- globalSettings.gui.widthNotMaximized = widthNotMaximized;
- globalSettings.gui.heightNotMaximized = heightNotMaximized;
- globalSettings.gui.posXNotMaximized = posXNotMaximized;
- globalSettings.gui.posYNotMaximized = posYNotMaximized;
- globalSettings.gui.isMaximized = IsMaximized();
+ globalSettings->gui.widthNotMaximized = widthNotMaximized;
+ globalSettings->gui.heightNotMaximized = heightNotMaximized;
+ globalSettings->gui.posXNotMaximized = posXNotMaximized;
+ globalSettings->gui.posYNotMaximized = posYNotMaximized;
+ globalSettings->gui.isMaximized = IsMaximized();
//retrieve column attributes
- globalSettings.gui.columnAttribLeft = m_gridLeft->getColumnAttributes();
- globalSettings.gui.columnAttribRight = m_gridRight->getColumnAttributes();
+ globalSettings->gui.columnAttribLeft = m_gridLeft->getColumnAttributes();
+ globalSettings->gui.columnAttribRight = m_gridRight->getColumnAttributes();
//write list of last used configuration files
- globalSettings.gui.cfgFileHistory = cfgFileNames;
+ globalSettings->gui.cfgFileHistory = cfgFileNames;
//write list of last used folders
- globalSettings.gui.folderHistoryLeft.clear();
+ globalSettings->gui.folderHistoryLeft.clear();
const wxArrayString leftFolderHistory = m_directoryLeft->GetStrings();
for (unsigned i = 0; i < leftFolderHistory.GetCount(); ++i)
- globalSettings.gui.folderHistoryLeft.push_back(leftFolderHistory[i]);
+ globalSettings->gui.folderHistoryLeft.push_back(leftFolderHistory[i]);
- globalSettings.gui.folderHistoryRight.clear();
+ globalSettings->gui.folderHistoryRight.clear();
const wxArrayString rightFolderHistory = m_directoryRight->GetStrings();
for (unsigned i = 0; i < rightFolderHistory.GetCount(); ++i)
- globalSettings.gui.folderHistoryRight.push_back(rightFolderHistory[i]);
+ globalSettings->gui.folderHistoryRight.push_back(rightFolderHistory[i]);
//get selected tab
- globalSettings.gui.selectedTabBottomLeft = m_notebookBottomLeft->GetSelection();
+ globalSettings->gui.selectedTabBottomLeft = m_notebookBottomLeft->GetSelection();
}
@@ -743,11 +797,11 @@ void MainDialog::deleteSelectedFiles()
if (FreeFileSync::showDeleteDialog(compRefLeft,
compRefRight,
- globalSettings.gui.deleteOnBothSides,
- globalSettings.gui.useRecyclerForManualDeletion,
+ globalSettings->gui.deleteOnBothSides,
+ globalSettings->gui.useRecyclerForManualDeletion,
totalDeleteCount) == DefaultReturnCode::BUTTON_OKAY)
{
- if (globalSettings.gui.useRecyclerForManualDeletion && !FreeFileSync::recycleBinExists())
+ if (globalSettings->gui.useRecyclerForManualDeletion && !FreeFileSync::recycleBinExists())
{
wxMessageBox(_("Recycle Bin not yet supported for this system!"));
return;
@@ -761,8 +815,8 @@ void MainDialog::deleteSelectedFiles()
FreeFileSync::deleteFromGridAndHD(gridDataView->getDataTentative(),
compRefLeft,
compRefRight,
- globalSettings.gui.deleteOnBothSides,
- globalSettings.gui.useRecyclerForManualDeletion,
+ globalSettings->gui.deleteOnBothSides,
+ globalSettings->gui.useRecyclerForManualDeletion,
getCurrentConfiguration().mainCfg,
&statusHandler);
}
@@ -1023,7 +1077,7 @@ void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event)
break;
case 'F': //CTRL + F
- FreeFileSync::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings.gui.textSearchRespectCase);
+ FreeFileSync::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase);
break;
case WXK_NUMPAD_ADD: //CTRL + '+'
@@ -1082,7 +1136,7 @@ void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event)
case WXK_F3: //F3
case WXK_NUMPAD_F3: //
- FreeFileSync::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings.gui.textSearchRespectCase);
+ FreeFileSync::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase);
break;
}
@@ -1121,7 +1175,7 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event)
break;
case 'F': //CTRL + F
- FreeFileSync::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings.gui.textSearchRespectCase);
+ FreeFileSync::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase);
break;
case WXK_NUMPAD_ADD: //CTRL + '+'
@@ -1180,7 +1234,7 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event)
case WXK_F3: //F3
case WXK_NUMPAD_F3: //
- FreeFileSync::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings.gui.textSearchRespectCase);
+ FreeFileSync::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase);
break;
}
@@ -1245,9 +1299,9 @@ void MainDialog::OnContextRim(wxGridEvent& event)
const std::set<size_t> selectionRight = getSelectedRows(m_gridRight);
const size_t selectionBegin = selectionLeft.size() + selectionRight.size() == 0 ? 0 :
- selectionLeft.size() == 0 ? *selectionRight.begin() :
- selectionRight.size() == 0 ? *selectionLeft.begin() :
- std::min(*selectionLeft.begin(), *selectionRight.begin());
+ selectionLeft.size() == 0 ? *selectionRight.begin() :
+ selectionRight.size() == 0 ? *selectionLeft.begin() :
+ std::min(*selectionLeft.begin(), *selectionRight.begin());
const FileSystemObject* fsObj = gridDataView->getObject(selectionBegin);
@@ -1256,7 +1310,7 @@ void MainDialog::OnContextRim(wxGridEvent& event)
//re-create context menu
contextMenu.reset(new wxMenu);
- if (syncPreview.previewIsEnabled() &&
+ if (syncPreview->previewIsEnabled() &&
fsObj && fsObj->getSyncOperation() != SO_EQUAL)
{
if (selectionLeft.size() + selectionRight.size() > 0)
@@ -1374,7 +1428,7 @@ void MainDialog::OnContextRim(wxGridEvent& event)
//CONTEXT_EXTERNAL_APP
- if (!globalSettings.gui.externelApplications.empty())
+ if (!globalSettings->gui.externelApplications.empty())
{
contextMenu->AppendSeparator();
@@ -1382,8 +1436,8 @@ void MainDialog::OnContextRim(wxGridEvent& event)
(selectionLeft.size() + selectionRight.size() == 1);
int newID = externalAppIDFirst;
- for (xmlAccess::ExternalApps::iterator i = globalSettings.gui.externelApplications.begin();
- i != globalSettings.gui.externelApplications.end();
+ for (xmlAccess::ExternalApps::iterator i = globalSettings->gui.externelApplications.begin();
+ i != globalSettings->gui.externelApplications.end();
++i, ++newID)
{
//some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly"
@@ -1391,7 +1445,7 @@ void MainDialog::OnContextRim(wxGridEvent& event)
if (description.empty())
description = wxT(" "); //wxWidgets doesn't like empty items
- if (i == globalSettings.gui.externelApplications.begin())
+ if (i == globalSettings->gui.externelApplications.begin())
contextMenu->Append(newID, description + wxT("\t") + wxString(_("D-Click")) + wxT("; ENTER"));
else
contextMenu->Append(newID, description);
@@ -1452,12 +1506,13 @@ void MainDialog::OnContextExcludeExtension(wxCommandEvent& event)
SelectedExtension* selExtension = dynamic_cast<SelectedExtension*>(event.m_callbackUserData);
if (selExtension)
{
- if (!currentCfg.mainCfg.excludeFilter.empty() && !currentCfg.mainCfg.excludeFilter.EndsWith(DefaultStr(";")))
- currentCfg.mainCfg.excludeFilter += DefaultStr("\n");
+ Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter;
+
+ if (!excludeFilter.empty() && !excludeFilter.EndsWith(DefaultStr(";")))
+ excludeFilter += DefaultStr("\n");
- currentCfg.mainCfg.excludeFilter += Zstring(DefaultStr("*.")) + selExtension->extension + DefaultStr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line
+ excludeFilter += Zstring(DefaultStr("*.")) + selExtension->extension + DefaultStr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line
- m_checkBoxActivateFilter->SetValue(true);
updateFilterButtons();
applyFiltering(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative());
@@ -1482,16 +1537,17 @@ void MainDialog::OnContextExcludeObject(wxCommandEvent& event)
{
for (std::vector<FilterObject>::const_iterator i = objCont->selectedObjects.begin(); i != objCont->selectedObjects.end(); ++i)
{
- if (!currentCfg.mainCfg.excludeFilter.empty() && !currentCfg.mainCfg.excludeFilter.EndsWith(DefaultStr("\n")))
- currentCfg.mainCfg.excludeFilter += DefaultStr("\n");
+ Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter;
+
+ if (!excludeFilter.empty() && !excludeFilter.EndsWith(DefaultStr("\n")))
+ excludeFilter += DefaultStr("\n");
if (!i->isDir)
- currentCfg.mainCfg.excludeFilter += Zstring() + globalFunctions::FILE_NAME_SEPARATOR + i->relativeName;
+ excludeFilter += Zstring() + globalFunctions::FILE_NAME_SEPARATOR + i->relativeName;
else
- currentCfg.mainCfg.excludeFilter += Zstring() + globalFunctions::FILE_NAME_SEPARATOR + i->relativeName + globalFunctions::FILE_NAME_SEPARATOR;
+ excludeFilter += Zstring() + globalFunctions::FILE_NAME_SEPARATOR + i->relativeName + globalFunctions::FILE_NAME_SEPARATOR;
}
- m_checkBoxActivateFilter->SetValue(true);
updateFilterButtons();
applyFiltering(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative());
@@ -1529,8 +1585,8 @@ void MainDialog::OnContextOpenWith(wxCommandEvent& event)
const int index = event.GetId() - externalAppIDFirst;
if ( selection.size() == 1 &&
- 0 <= index && static_cast<size_t>(index) < globalSettings.gui.externelApplications.size())
- openExternalApplication(*selection.begin(), m_gridLeft->isLeadGrid(), globalSettings.gui.externelApplications[index].second);
+ 0 <= index && static_cast<size_t>(index) < globalSettings->gui.externelApplications.size())
+ openExternalApplication(*selection.begin(), m_gridLeft->isLeadGrid(), globalSettings->gui.externelApplications[index].second);
}
}
@@ -1574,7 +1630,7 @@ void MainDialog::OnContextRimLabelLeft(wxGridEvent& event)
wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), CONTEXT_AUTO_ADJUST_COLUMN_LEFT, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
contextMenu->Append(itemAutoAdjust);
- itemAutoAdjust->Check(globalSettings.gui.autoAdjustColumnsLeft);
+ itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsLeft);
contextMenu->Connect(CONTEXT_CUSTOMIZE_COLUMN_LEFT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnLeft), NULL, this);
contextMenu->Connect(CONTEXT_AUTO_ADJUST_COLUMN_LEFT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustLeft), NULL, this);
@@ -1592,7 +1648,7 @@ void MainDialog::OnContextRimLabelRight(wxGridEvent& event)
wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), CONTEXT_AUTO_ADJUST_COLUMN_RIGHT, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
contextMenu->Append(itemAutoAdjust);
- itemAutoAdjust->Check(globalSettings.gui.autoAdjustColumnsRight);
+ itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsRight);
contextMenu->Connect(CONTEXT_CUSTOMIZE_COLUMN_RIGHT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnRight), NULL, this);
contextMenu->Connect(CONTEXT_AUTO_ADJUST_COLUMN_RIGHT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustRight), NULL, this);
@@ -1633,14 +1689,14 @@ void MainDialog::OnContextCustColumnRight(wxCommandEvent& event)
void MainDialog::OnContextAutoAdjustLeft(wxCommandEvent& event)
{
- globalSettings.gui.autoAdjustColumnsLeft = !globalSettings.gui.autoAdjustColumnsLeft;
+ globalSettings->gui.autoAdjustColumnsLeft = !globalSettings->gui.autoAdjustColumnsLeft;
updateGuiGrid();
}
void MainDialog::OnContextAutoAdjustRight(wxCommandEvent& event)
{
- globalSettings.gui.autoAdjustColumnsRight = !globalSettings.gui.autoAdjustColumnsRight;
+ globalSettings->gui.autoAdjustColumnsRight = !globalSettings->gui.autoAdjustColumnsRight;
updateGuiGrid();
}
@@ -1672,7 +1728,7 @@ void MainDialog::OnContextMiddleLabel(wxGridEvent& event)
wxMenuItem* itemSyncPreview = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_PREVIEW, _("Synchronization Preview"));
wxMenuItem* itemCmpResult = new wxMenuItem(contextMenu.get(), CONTEXT_COMPARISON_RESULT, _("Comparison Result"));
- if (syncPreview.previewIsEnabled())
+ if (syncPreview->previewIsEnabled())
itemSyncPreview->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("syncViewSmall")));
else
itemCmpResult->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("cmpViewSmall")));
@@ -1703,13 +1759,13 @@ void MainDialog::OnContextExcludeAll(wxCommandEvent& event)
void MainDialog::OnContextComparisonView(wxCommandEvent& event)
{
- syncPreview.enablePreview(false); //change view
+ syncPreview->enablePreview(false); //change view
}
void MainDialog::OnContextSyncView(wxCommandEvent& event)
{
- syncPreview.enablePreview(true); //change view
+ syncPreview->enablePreview(true); //change view
}
@@ -1718,7 +1774,7 @@ void MainDialog::OnDirSelected(wxFileDirPickerEvent& event)
//left and right directory text-control and dirpicker are synchronized by MainFolderDragDrop automatically
//disable the sync button
- syncPreview.enableSynchronization(false);
+ syncPreview->enableSynchronization(false);
//clear grids
gridDataView->clearAllRows();
@@ -1756,7 +1812,7 @@ private:
void MainDialog::addFileToCfgHistory(const wxString& filename)
{
//only (still) existing files should be included in the list
- if (!wxFileExists(filename))
+ if (!fileExists(wxToZ(filename)))
return;
std::vector<wxString>::const_iterator i = find_if(cfgFileNames.begin(), cfgFileNames.end(), FindDuplicates(wxToZ(filename)));
@@ -1779,24 +1835,24 @@ void MainDialog::addFileToCfgHistory(const wxString& filename)
}
//keep maximal size of history list
- if (cfgFileNames.size() > globalSettings.gui.cfgHistoryMax)
+ if (cfgFileNames.size() > globalSettings->gui.cfgHistoryMax)
{
//delete last rows
cfgFileNames.pop_back();
- m_choiceHistory->Delete(globalSettings.gui.cfgHistoryMax);
+ m_choiceHistory->Delete(globalSettings->gui.cfgHistoryMax);
}
}
void MainDialog::addLeftFolderToHistory(const wxString& leftFolder)
{
- m_directoryLeft->addPairToFolderHistory(leftFolder, globalSettings.gui.folderHistLeftMax);
+ m_directoryLeft->addPairToFolderHistory(leftFolder, globalSettings->gui.folderHistLeftMax);
}
void MainDialog::addRightFolderToHistory(const wxString& rightFolder)
{
- m_directoryRight->addPairToFolderHistory(rightFolder, globalSettings.gui.folderHistRightMax);
+ m_directoryRight->addPairToFolderHistory(rightFolder, globalSettings->gui.folderHistRightMax);
}
@@ -1876,11 +1932,11 @@ void MainDialog::OnLoadFromHistory(wxCommandEvent& event)
bool MainDialog::saveOldConfig() //return false on user abort
{
//notify user about changed settings
- if (globalSettings.optDialogs.popupOnConfigChange && !currentConfigFileName.empty()) //only if check is active and non-default config file loaded
+ if (globalSettings->optDialogs.popupOnConfigChange && !currentConfigFileName.empty()) //only if check is active and non-default config file loaded
{
if (lastConfigurationSaved != getCurrentConfiguration())
{
- bool dontShowAgain = !globalSettings.optDialogs.popupOnConfigChange;
+ bool dontShowAgain = !globalSettings->optDialogs.popupOnConfigChange;
QuestionDlg* notifyChangeDlg = new QuestionDlg(this,
QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_NO | QuestionDlg::BUTTON_CANCEL,
@@ -1894,7 +1950,7 @@ bool MainDialog::saveOldConfig() //return false on user abort
return false;
break;
case QuestionDlg::BUTTON_NO:
- globalSettings.optDialogs.popupOnConfigChange = !dontShowAgain;
+ globalSettings->optDialogs.popupOnConfigChange = !dontShowAgain;
break;
case QuestionDlg::BUTTON_CANCEL:
return false;
@@ -1995,37 +2051,37 @@ void MainDialog::OnSetSyncDirection(FFSSyncDirectionEvent& event)
}
-bool MainDialog::readConfigurationFromXml(const wxString& filename, bool programStartup)
+bool MainDialog::readConfigurationFromXml(const wxString& filename)
{
//load XML
xmlAccess::XmlGuiConfig newGuiCfg; //structure to receive gui settings, already defaulted!!
- bool parsingError = false;
+ bool parsingError = true;
try
{
xmlAccess::readGuiOrBatchConfig(filename, newGuiCfg); //allow reading batch configurations also
+ parsingError = false;
}
catch (const xmlAccess::XmlError& error)
{
- if (programStartup && filename == lastConfigFileName() && !wxFileExists(filename)) //do not show error message in this case
- ;
+ if (error.getSeverity() == xmlAccess::XmlError::WARNING)
+ wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING);
else
{
- parsingError = true;
-
- if (error.getSeverity() == xmlAccess::XmlError::WARNING)
- wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING);
- else
- {
- wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
- if (!programStartup)
- return false;
- }
+ wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
+ return false;
}
}
setCurrentConfiguration(newGuiCfg);
- //###########################################################
+ setLastUsedConfig(filename, parsingError ? xmlAccess::XmlGuiConfig() : newGuiCfg); //simulate changed config on parsing errors
+
+ return !parsingError;
+}
+
+
+void MainDialog::setLastUsedConfig(const wxString& filename, const xmlAccess::XmlGuiConfig& guiConfig)
+{
addFileToCfgHistory(filename); //put filename on list of last used config files
//set title
@@ -2038,11 +2094,9 @@ bool MainDialog::readConfigurationFromXml(const wxString& filename, bool program
{
SetTitle(wxString(wxT("FreeFileSync - ")) + filename);
currentConfigFileName = filename;
-
- lastConfigurationSaved = parsingError ? xmlAccess::XmlGuiConfig() : currentCfg; //simulate changed config on parsing errors
}
- return !parsingError;
+ lastConfigurationSaved = guiConfig;
}
@@ -2061,21 +2115,7 @@ bool MainDialog::writeConfigurationToXml(const wxString& filename)
return false;
}
- //###########################################################
- addFileToCfgHistory(filename); //put filename on list of last used config files
-
- lastConfigurationSaved = guiCfg;
-
- if (filename == lastConfigFileName()) //set title
- {
- SetTitle(wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization"));
- currentConfigFileName.clear();
- }
- else
- {
- SetTitle(wxString(wxT("FreeFileSync - ")) + filename);
- currentConfigFileName = filename;
- }
+ setLastUsedConfig(filename, guiCfg);
return true;
}
@@ -2088,7 +2128,7 @@ void MainDialog::setCurrentConfiguration(const xmlAccess::XmlGuiConfig& newGuiCf
//evaluate new settings...
//disable the sync button
- syncPreview.enableSynchronization(false);
+ syncPreview->enableSynchronization(false);
//clear grids
gridDataView->clearAllRows();
@@ -2097,7 +2137,6 @@ void MainDialog::setCurrentConfiguration(const xmlAccess::XmlGuiConfig& newGuiCf
//(re-)set view filter buttons
initViewFilterButtons();
- m_checkBoxActivateFilter->SetValue(currentCfg.mainCfg.filterIsActive);
updateFilterButtons();
//set first folder pair
@@ -2119,7 +2158,7 @@ void MainDialog::setCurrentConfiguration(const xmlAccess::XmlGuiConfig& newGuiCf
//read GUI layout
m_checkBoxHideFilt->SetValue(currentCfg.hideFilteredElements);
- syncPreview.enablePreview(currentCfg.syncPreviewEnabled);
+ syncPreview->enablePreview(currentCfg.syncPreviewEnabled);
//###########################################################
//update compare variant name
@@ -2158,11 +2197,8 @@ xmlAccess::XmlGuiConfig MainDialog::getCurrentConfiguration() const
std::transform(additionalFolderPairs.begin(), additionalFolderPairs.end(),
std::back_inserter(guiCfg.mainCfg.additionalPairs), getEnahncedPair);
- //filter active status
- guiCfg.mainCfg.filterIsActive = m_checkBoxActivateFilter->GetValue();
-
//sync preview
- guiCfg.syncPreviewEnabled = syncPreview.previewIsEnabled();
+ guiCfg.syncPreviewEnabled = syncPreview->previewIsEnabled();
return guiCfg;
}
@@ -2196,15 +2232,6 @@ void MainDialog::refreshGridAfterFilterChange(const int delay)
}
-void MainDialog::OnFilterButton(wxCommandEvent &event)
-{
- //make sure, button-appearance and "m_checkBoxActivateFilter" are in sync.
- updateFilterButtons();
-
- updateFilterConfig(); //refresh filtering
-}
-
-
void MainDialog::OnHideFilteredButton(wxCommandEvent &event)
{
//toggle showing filtered rows
@@ -2223,9 +2250,8 @@ void MainDialog::OnHideFilteredButton(wxCommandEvent &event)
void MainDialog::OnConfigureFilter(wxCommandEvent &event)
{
if (showFilterDialog(true, //is main filter dialog
- currentCfg.mainCfg.includeFilter,
- currentCfg.mainCfg.excludeFilter,
- m_checkBoxActivateFilter->GetValue()) == DefaultReturnCode::BUTTON_OKAY)
+ currentCfg.mainCfg.globalFilter.includeFilter,
+ currentCfg.mainCfg.globalFilter.excludeFilter) == DefaultReturnCode::BUTTON_OKAY)
{
updateFilterButtons(); //refresh global filter icon
updateFilterConfig(); //re-apply filter
@@ -2235,6 +2261,29 @@ void MainDialog::OnConfigureFilter(wxCommandEvent &event)
}
+void MainDialog::OnGlobalFilterOpenContext(wxCommandEvent& event)
+{
+ const int menuId = 1234;
+ contextMenu.reset(new wxMenu); //re-create context menu
+ contextMenu->Append(menuId, _("Clear filter settings"));
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnGlobalFilterRemConfirm), NULL, this);
+
+ if (isNullFilter(currentCfg.mainCfg.globalFilter))
+ contextMenu->Enable(menuId, false); //disable menu item, if clicking wouldn't make sense anyway
+
+ PopupMenu(contextMenu.get()); //show context menu
+}
+
+
+void MainDialog::OnGlobalFilterRemConfirm(wxCommandEvent& event)
+{
+ currentCfg.mainCfg.globalFilter = FilterConfig();
+
+ updateFilterButtons(); //refresh global filter icon
+ updateFilterConfig(); //re-apply filter
+}
+
+
void MainDialog::OnLeftOnlyFiles(wxCommandEvent& event)
{
m_bpButtonLeftOnly->toggle();
@@ -2438,35 +2487,22 @@ void MainDialog::updateFilterButtons()
m_notebookBottomLeft->AssignImageList(panelIcons); //pass ownership
}
- //global filter
- if (m_checkBoxActivateFilter->GetValue()) //filter active?
+ //global filter: test for Null-filter
+ if (isNullFilter(currentCfg.mainCfg.globalFilter))
{
- //test for Null-filter
- const bool isNullFilter = NameFilter(currentCfg.mainCfg.includeFilter, currentCfg.mainCfg.excludeFilter).isNull();
- if (isNullFilter)
- {
- m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOff")));
- m_bpButtonFilter->SetToolTip(_("No filter selected"));
-
- //additional filter icon
- m_notebookBottomLeft->SetPageImage(1, 1);
- }
- else
- {
- m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOn")));
- m_bpButtonFilter->SetToolTip(_("Filter has been selected"));
+ m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOff")));
+ m_bpButtonFilter->SetToolTip(_("No filter selected"));
- //show filter icon
- m_notebookBottomLeft->SetPageImage(1, 0);
- }
+ //additional filter icon
+ m_notebookBottomLeft->SetPageImage(1, 1);
}
else
{
- m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOff")));
- m_bpButtonFilter->SetToolTip(_("Filtering is deactivated"));
+ m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOn")));
+ m_bpButtonFilter->SetToolTip(_("Filter is active"));
- //additional filter icon
- m_notebookBottomLeft->SetPageImage(1, 1);
+ //show filter icon
+ m_notebookBottomLeft->SetPageImage(1, 0);
}
//update main local filter
@@ -2499,10 +2535,11 @@ void MainDialog::OnCompare(wxCommandEvent &event)
CompareStatusHandler statusHandler(this);
//begin comparison
- FreeFileSync::CompareProcess comparison(currentCfg.mainCfg.hidden.traverseDirectorySymlinks,
+ FreeFileSync::CompareProcess comparison(currentCfg.mainCfg.processSymlinks,
+ currentCfg.mainCfg.traverseDirectorySymlinks,
currentCfg.mainCfg.hidden.fileTimeTolerance,
- globalSettings.ignoreOneHourDiff,
- globalSettings.optDialogs,
+ globalSettings->ignoreOneHourDiff,
+ globalSettings->optDialogs,
&statusHandler);
//technical representation of comparison data
@@ -2528,14 +2565,14 @@ void MainDialog::OnCompare(wxCommandEvent &event)
if (aborted)
{
//disable the sync button
- syncPreview.enableSynchronization(false);
+ syncPreview->enableSynchronization(false);
m_buttonCompare->SetFocus();
updateGuiGrid(); //refresh grid in ANY case! (also on abort)
}
else
{
//once compare is finished enable the sync button
- syncPreview.enableSynchronization(true);
+ syncPreview->enableSynchronization(true);
m_buttonStartSync->SetFocus();
//hide sort direction indicator on GUI grids
@@ -2583,19 +2620,19 @@ void MainDialog::updateGuiGrid()
if (nrOfRows >= 0)
{
#ifdef FFS_WIN
- const unsigned int digitWidth = 8;
+ const size_t digitWidth = 8;
#elif defined FFS_LINUX
- const unsigned int digitWidth = 10;
+ const size_t digitWidth = 10;
#endif
- const unsigned int nrOfDigits = globalFunctions::getDigitCount(static_cast<unsigned int>(nrOfRows));
- m_gridLeft ->SetRowLabelSize(nrOfDigits * digitWidth + 4);
- m_gridRight->SetRowLabelSize(nrOfDigits * digitWidth + 4);
+ const size_t nrOfDigits = globalFunctions::getDigitCount(static_cast<size_t>(nrOfRows));
+ m_gridLeft ->SetRowLabelSize(static_cast<int>(nrOfDigits * digitWidth + 4));
+ m_gridRight->SetRowLabelSize(static_cast<int>(nrOfDigits * digitWidth + 4));
}
//support for column auto adjustment
- if (globalSettings.gui.autoAdjustColumnsLeft)
+ if (globalSettings->gui.autoAdjustColumnsLeft)
m_gridLeft->autoSizeColumns();
- if (globalSettings.gui.autoAdjustColumnsRight)
+ if (globalSettings->gui.autoAdjustColumnsRight)
m_gridRight->autoSizeColumns();
//update sync preview statistics
@@ -2626,7 +2663,7 @@ void MainDialog::calculatePreview()
void MainDialog::OnSwitchView(wxCommandEvent& event)
{
//toggle view
- syncPreview.enablePreview(!syncPreview.previewIsEnabled());
+ syncPreview->enablePreview(!syncPreview->previewIsEnabled());
}
@@ -2647,45 +2684,42 @@ void MainDialog::OnSyncSettings(wxCommandEvent& event)
void MainDialog::OnCmpSettings(wxCommandEvent& event)
{
- CompareVariant newCmpVariant = currentCfg.mainCfg.compareVar;
-
//show window right next to the compare-config button
wxPoint windowPos = m_bpButtonCmpConfig->GetScreenPosition();
windowPos.x += m_bpButtonCmpConfig->GetSize().GetWidth() + 5;
- if (FreeFileSync::showCompareCfgDialog(windowPos, newCmpVariant) == DefaultReturnCode::BUTTON_OKAY)
+ if (FreeFileSync::showCompareCfgDialog(windowPos,
+ currentCfg.mainCfg.compareVar,
+ currentCfg.mainCfg.processSymlinks,
+ currentCfg.mainCfg.traverseDirectorySymlinks,
+ currentCfg.mainCfg.copyFileSymlinks) == DefaultReturnCode::BUTTON_OKAY)
{
- if (currentCfg.mainCfg.compareVar != newCmpVariant)
- {
- currentCfg.mainCfg.compareVar = newCmpVariant;
-
- //update compare variant name
- m_staticTextCmpVariant->SetLabel(wxString(wxT("(")) + getVariantName(currentCfg.mainCfg.compareVar) + wxT(")"));
- bSizer6->Layout(); //adapt layout for variant text
+ //update compare variant name
+ m_staticTextCmpVariant->SetLabel(wxString(wxT("(")) + getVariantName(currentCfg.mainCfg.compareVar) + wxT(")"));
+ bSizer6->Layout(); //adapt layout for variant text
- //disable the sync button
- syncPreview.enableSynchronization(false);
+ //disable the sync button
+ syncPreview->enableSynchronization(false);
- //clear grids
- gridDataView->clearAllRows();
- updateGuiGrid();
+ //clear grids
+ gridDataView->clearAllRows();
+ updateGuiGrid();
- m_buttonCompare->SetFocus();
- }
+ m_buttonCompare->SetFocus();
}
}
void MainDialog::OnStartSync(wxCommandEvent& event)
{
- if (!syncPreview.synchronizationIsEnabled())
+ if (!syncPreview->synchronizationIsEnabled())
{
pushStatusInformation(_("Please run a Compare first before synchronizing!"));
return;
}
//show sync preview screen
- if (globalSettings.optDialogs.showSummaryBeforeSync)
+ if (globalSettings->optDialogs.showSummaryBeforeSync)
{
bool dontShowAgain = false;
@@ -2695,7 +2729,7 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
dontShowAgain) != DefaultReturnCode::BUTTON_OKAY)
return;
- globalSettings.optDialogs.showSummaryBeforeSync = !dontShowAgain;
+ globalSettings->optDialogs.showSummaryBeforeSync = !dontShowAgain;
}
//check if there are files/folders to be sync'ed at all
@@ -2717,11 +2751,11 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
//start synchronization and mark all elements processed
FreeFileSync::SyncProcess synchronization(
- currentCfg.mainCfg.hidden.copyFileSymlinks,
- currentCfg.mainCfg.hidden.traverseDirectorySymlinks,
- globalSettings.optDialogs,
+ currentCfg.mainCfg.copyFileSymlinks,
+ currentCfg.mainCfg.traverseDirectorySymlinks,
+ globalSettings->optDialogs,
currentCfg.mainCfg.hidden.verifyFileCopy,
- globalSettings.copyLockedFiles,
+ globalSettings->copyLockedFiles,
statusHandler);
const std::vector<FreeFileSync::FolderPairSyncCfg> syncProcessCfg = FreeFileSync::extractSyncCfg(getCurrentConfiguration().mainCfg);
@@ -2756,16 +2790,16 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
void MainDialog::OnLeftGridDoubleClick(wxGridEvent& event)
{
- if (!globalSettings.gui.externelApplications.empty())
- openExternalApplication(event.GetRow(), true, globalSettings.gui.externelApplications[0].second);
+ if (!globalSettings->gui.externelApplications.empty())
+ openExternalApplication(event.GetRow(), true, globalSettings->gui.externelApplications[0].second);
// event.Skip();
}
void MainDialog::OnRightGridDoubleClick(wxGridEvent& event)
{
- if (!globalSettings.gui.externelApplications.empty())
- openExternalApplication(event.GetRow(), false, globalSettings.gui.externelApplications[0].second);
+ if (!globalSettings->gui.externelApplications.empty())
+ openExternalApplication(event.GetRow(), false, globalSettings->gui.externelApplications[0].second);
// event.Skip();
}
@@ -2834,7 +2868,7 @@ void MainDialog::OnSortMiddleGrid(wxGridEvent& event)
lastSortGrid = m_gridMiddle;
//start sort
- if (syncPreview.previewIsEnabled())
+ if (syncPreview->previewIsEnabled())
gridDataView->sortView(GridView::SORT_BY_SYNC_DIRECTION, true, sortAscending);
else
gridDataView->sortView(GridView::SORT_BY_CMP_RESULT, true, sortAscending);
@@ -2974,7 +3008,7 @@ void MainDialog::updateGridViewData()
- if (syncPreview.previewIsEnabled())
+ if (syncPreview->previewIsEnabled())
{
const GridView::StatusSyncPreview result = gridDataView->updateSyncPreview(currentCfg.hideFilteredElements,
m_bpButtonSyncCreateLeft-> isActive(),
@@ -3194,7 +3228,7 @@ void MainDialog::OnAddFolderPair(wxCommandEvent& event)
cfgEmpty.localFilter);
//disable the sync button
- syncPreview.enableSynchronization(false);
+ syncPreview->enableSynchronization(false);
//clear grids
gridDataView->clearAllRows();
@@ -3204,16 +3238,8 @@ void MainDialog::OnAddFolderPair(wxCommandEvent& event)
void MainDialog::updateFilterConfig()
{
- if (m_checkBoxActivateFilter->GetValue())
- {
- applyFiltering(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative());
- refreshGridAfterFilterChange(400);
- }
- else
- {
- FreeFileSync::setActiveStatus(true, gridDataView->getDataTentative());
- refreshGridAfterFilterChange(0);
- }
+ applyFiltering(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative());
+ refreshGridAfterFilterChange(400);
}
@@ -3247,7 +3273,7 @@ void MainDialog::updateSyncConfig()
private:
bool& warningSyncDatabase_;
wxWindow* parent_;
- } redetCallback(globalSettings.optDialogs.warningSyncDatabase, this);
+ } redetCallback(globalSettings->optDialogs.warningSyncDatabase, this);
FreeFileSync::redetermineSyncDirection(getCurrentConfiguration().mainCfg, gridDataView->getDataTentative(), &redetCallback);
updateGuiGrid();
@@ -3271,7 +3297,7 @@ void MainDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
//------------------------------------------------------------------
//disable the sync button
- syncPreview.enableSynchronization(false);
+ syncPreview->enableSynchronization(false);
//clear grids
gridDataView->clearAllRows();
@@ -3290,7 +3316,7 @@ void MainDialog::OnRemoveFolderPair(wxCommandEvent& event)
//------------------------------------------------------------------
//disable the sync button
- syncPreview.enableSynchronization(false);
+ syncPreview->enableSynchronization(false);
//clear grids
gridDataView->clearAllRows();
@@ -3394,7 +3420,7 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool
}
-void MainDialog::removeAddFolderPair(const unsigned int pos)
+void MainDialog::removeAddFolderPair(size_t pos)
{
wxWindowUpdateLocker dummy(this); //avoid display distortion
@@ -3439,7 +3465,7 @@ void MainDialog::clearAddFolderPairs()
//menu events
void MainDialog::OnMenuGlobalSettings(wxCommandEvent& event)
{
- FreeFileSync::showGlobalSettingsDlg(globalSettings);
+ FreeFileSync::showGlobalSettingsDlg(*globalSettings);
//event.Skip();
}
@@ -3470,7 +3496,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event)
wxString exportString;
//write legend
exportString += wxString(_("Legend")) + wxT('\n');
- if (syncPreview.previewIsEnabled())
+ if (syncPreview->previewIsEnabled())
{
exportString += wxString(wxT("\"")) + getDescription(SO_CREATE_NEW_LEFT) + wxT("\";") + getSymbol(SO_CREATE_NEW_LEFT) + wxT('\n');
exportString += wxString(wxT("\"")) + getDescription(SO_CREATE_NEW_RIGHT) + wxT("\";") + getSymbol(SO_CREATE_NEW_RIGHT) + wxT('\n');
@@ -3584,7 +3610,7 @@ void MainDialog::OnRegularUpdateCheck(wxIdleEvent& event)
//execute just once per startup!
Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), NULL, this);
- FreeFileSync::checkForUpdatePeriodically(globalSettings.gui.lastUpdateCheck);
+ FreeFileSync::checkForUpdatePeriodically(globalSettings->gui.lastUpdateCheck);
}
@@ -3628,14 +3654,15 @@ void MainDialog::OnMenuQuit(wxCommandEvent& event)
//language selection
void MainDialog::switchProgramLanguage(const int langID)
{
+ //create new dialog with respect to new language
CustomLocale::getInstance().setLanguage(langID); //language is a global attribute
- //create new main window and delete old one
- cleanUp(); //destructor's code: includes writing settings to HD
+ const xmlAccess::XmlGuiConfig currentGuiCfg = getCurrentConfiguration();
- //create new dialog with respect to new language
- MainDialog* frame = new MainDialog(NULL, wxEmptyString, globalSettings);
- frame->SetIcon(*GlobalResources::getInstance().programIcon); //set application icon
+ cleanUp(false); //destructor's code: includes updating global settings
+
+ //create new main window and delete old one
+ MainDialog* frame = new MainDialog(currentGuiCfg, *globalSettings, false);
frame->Show();
Destroy();
diff --git a/ui/MainDialog.h b/ui/MainDialog.h
index 5f28b36c..3142cab8 100644
--- a/ui/MainDialog.h
+++ b/ui/MainDialog.h
@@ -13,8 +13,6 @@
#include <memory>
#include <map>
#include <set>
-#include "mouseMoveWindow.h"
-#include "progressIndicator.h"
class CompareStatusHandler;
class MainFolderDragDrop;
@@ -25,17 +23,30 @@ class IconUpdater;
class ManualDeletionHandler;
class FolderPairPanel;
class FirstFolderPairCfg;
+class CompareStatus;
namespace FreeFileSync
{
class CustomLocale;
class GridView;
+class MouseMoveWindow;
}
class MainDialog : public MainDialogGenerated
{
+public:
+ MainDialog(const wxString& cfgFileName,
+ xmlAccess::XmlGlobalSettings& settings);
+
+ MainDialog(const xmlAccess::XmlGuiConfig& guiCfg,
+ xmlAccess::XmlGlobalSettings& settings,
+ bool startComparison);
+
+ ~MainDialog();
+
+private:
friend class CompareStatusHandler;
friend class ManualDeletionHandler;
friend class MainFolderDragDrop;
@@ -76,20 +87,18 @@ class MainDialog : public MainDialogGenerated
CONTEXT_SYNC_PREVIEW
};
+ MainDialog();
-public:
- MainDialog(wxFrame* frame,
- const wxString& cfgFileName,
- xmlAccess::XmlGlobalSettings& settings);
-
- ~MainDialog();
+ void init(const xmlAccess::XmlGuiConfig guiCfg,
+ xmlAccess::XmlGlobalSettings& settings,
+ bool startComparison);
-private:
- void cleanUp();
+void cleanUp(bool saveLastUsedConfig);
//configuration load/save
- bool readConfigurationFromXml(const wxString& filename, bool programStartup = false);
+ bool readConfigurationFromXml(const wxString& filename);
bool writeConfigurationToXml(const wxString& filename);
+ void setLastUsedConfig(const wxString& filename, const xmlAccess::XmlGuiConfig& guiConfig);
xmlAccess::XmlGuiConfig getCurrentConfiguration() const;
void setCurrentConfiguration(const xmlAccess::XmlGuiConfig& newGuiCfg);
@@ -111,7 +120,7 @@ private:
void addRightFolderToHistory(const wxString& rightFolder);
void addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront = false);
- void removeAddFolderPair(const unsigned int pos);
+ void removeAddFolderPair(size_t pos);
void clearAddFolderPairs();
void updateGuiForFolderPair(); //helper method: add usability by showing/hiding buttons related to folder pairs
@@ -213,7 +222,6 @@ private:
void OnResize( wxSizeEvent& event);
void OnResizeFolderPairs( wxSizeEvent& event);
- void OnFilterButton( wxCommandEvent& event);
void OnHideFilteredButton( wxCommandEvent& event);
void OnConfigureFilter( wxCommandEvent& event);
void OnSwapSides( wxCommandEvent& event);
@@ -225,6 +233,9 @@ private:
void OnClose( wxCloseEvent& event);
void OnQuit( wxCommandEvent& event);
+ void OnGlobalFilterOpenContext(wxCommandEvent& event);
+ void OnGlobalFilterRemConfirm(wxCommandEvent& event);
+
void calculatePreview();
void OnAddFolderPair( wxCommandEvent& event);
@@ -254,7 +265,7 @@ private:
//application variables are stored here:
//global settings used by GUI and batch mode
- xmlAccess::XmlGlobalSettings& globalSettings;
+ xmlAccess::XmlGlobalSettings* globalSettings; //always bound
//UI view of FolderComparison structure
std::auto_ptr<FreeFileSync::GridView> gridDataView;
@@ -283,14 +294,14 @@ private:
std::stack<wxString> stackObjects;
//compare status panel (hidden on start, shown when comparing)
- CompareStatus compareStatus;
+ std::auto_ptr<CompareStatus> compareStatus; //always bound
+
+bool cleanedUp;
//save the last used config filename history
std::vector<wxString> cfgFileNames;
- bool cleanedUp; //determines if destructor code was already executed
-
//remember last sort executed (for determination of sort order)
int lastSortColumn;
const wxGrid* lastSortGrid;
@@ -300,7 +311,7 @@ private:
std::auto_ptr<IconUpdater> updateFileIcons;
//enable moving window by clicking on sub-windows instead of header line
- FreeFileSync::MouseMoveWindow moveWholeWindow;
+ std::auto_ptr<FreeFileSync::MouseMoveWindow> moveWholeWindow;
#endif
//encapsulation of handling of sync preview
@@ -319,7 +330,8 @@ private:
MainDialog* mainDlg_;
bool syncPreviewEnabled; //toggle to display configuration preview instead of comparison result
bool synchronizationEnabled; //determines whether synchronization should be allowed
- } syncPreview;
+ };
+ std::auto_ptr<SyncPreview> syncPreview; //always bound
};
#endif // MAINDIALOG_H
diff --git a/ui/SmallDialogs.cpp b/ui/SmallDialogs.cpp
index bd90f14d..04456024 100644
--- a/ui/SmallDialogs.cpp
+++ b/ui/SmallDialogs.cpp
@@ -185,8 +185,7 @@ public:
FilterDlg(wxWindow* window,
bool isGlobalFilter,
Zstring& filterIncl,
- Zstring& filterExcl,
- bool filterActive);
+ Zstring& filterExcl);
~FilterDlg() {}
enum
@@ -210,8 +209,7 @@ private:
FilterDlg::FilterDlg(wxWindow* window,
bool isGlobalFilter, //global or local filter dialog?
Zstring& filterIncl,
- Zstring& filterExcl,
- bool filterActive) :
+ Zstring& filterExcl) :
FilterDlgGenerated(window),
isGlobalFilter_(isGlobalFilter),
includeFilter(filterIncl),
@@ -228,14 +226,11 @@ FilterDlg::FilterDlg(wxWindow* window,
m_panel13->Hide();
m_button10->SetFocus();
- if (filterActive)
- m_staticTextFilteringInactive->Hide();
-
//adapt header for global/local dialog
if (isGlobalFilter_)
- m_staticTexHeader->SetLabel(_("Global filter"));
+ m_staticTexHeader->SetLabel(_("Filter: All pairs"));
else
- m_staticTexHeader->SetLabel(_("Local filter"));
+ m_staticTexHeader->SetLabel(_("Filter: Single pair"));
Fit();
}
@@ -299,15 +294,13 @@ void FilterDlg::OnClose(wxCloseEvent& event)
DefaultReturnCode::Response FreeFileSync::showFilterDialog(bool isGlobalFilter,
Zstring& filterIncl,
- Zstring& filterExcl,
- bool filterActive)
+ Zstring& filterExcl)
{
DefaultReturnCode::Response rv = DefaultReturnCode::BUTTON_CANCEL;
FilterDlg* filterDlg = new FilterDlg(NULL,
isGlobalFilter, //is main filter dialog
filterIncl,
- filterExcl,
- filterActive);
+ filterExcl);
if (filterDlg->ShowModal() == FilterDlg::BUTTON_APPLY)
rv = DefaultReturnCode::BUTTON_OKAY;
@@ -687,7 +680,12 @@ DefaultReturnCode::Response FreeFileSync::showSyncPreviewDlg(
class CompareCfgDialog : public CmpCfgDlgGenerated
{
public:
- CompareCfgDialog(wxWindow* parentWindow, const wxPoint& position, FreeFileSync::CompareVariant& cmpVar);
+ CompareCfgDialog(wxWindow* parentWindow,
+ const wxPoint& position,
+ FreeFileSync::CompareVariant& cmpVar,
+ bool& processSymlinks,
+ bool& traverseDirectorySymlinks,
+ bool& copyFileSymlinks);
enum
{
@@ -695,19 +693,35 @@ public:
};
private:
+ void OnOkay(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void OnCancel(wxCommandEvent& event);
void OnTimeSize(wxCommandEvent& event);
void OnContent(wxCommandEvent& event);
+ void OnIncludeSymlinks(wxCommandEvent& event);
+ void OnTraverseDirSymlink(wxCommandEvent& event);
void OnShowHelp(wxCommandEvent& event);
- FreeFileSync::CompareVariant& m_cmpVar;
+ void updateView();
+
+ FreeFileSync::CompareVariant& cmpVarOut;
+ bool& processSymlinksOut;
+ bool& traverseDirectorySymlinksOut;
+ bool& copyFileSymlinksOut;
};
-CompareCfgDialog::CompareCfgDialog(wxWindow* parentWindow, const wxPoint& position, CompareVariant& cmpVar) :
+CompareCfgDialog::CompareCfgDialog(wxWindow* parentWindow,
+ const wxPoint& position,
+ CompareVariant& cmpVar,
+ bool& processSymlinks,
+ bool& traverseDirectorySymlinks,
+ bool& copyFileSymlinks) :
CmpCfgDlgGenerated(parentWindow),
- m_cmpVar(cmpVar)
+ cmpVarOut(cmpVar),
+ processSymlinksOut(processSymlinks),
+ traverseDirectorySymlinksOut(traverseDirectorySymlinks),
+ copyFileSymlinksOut(copyFileSymlinks)
{
//move dialog up so that compare-config button and first config-variant are on same level
Move(wxPoint(position.x, std::max(0, position.y - (m_buttonTimeSize->GetScreenPosition() - GetScreenPosition()).y)));
@@ -727,9 +741,49 @@ CompareCfgDialog::CompareCfgDialog(wxWindow* parentWindow, const wxPoint& positi
m_buttonTimeSize->SetFocus(); //set focus on the other button
break;
}
+
+ m_checkBoxIncludeSymlinks->SetValue(processSymlinksOut);
+// m_checkBoxTraverseDirSymlink->SetValue(traverseDirectorySymlinksOut);
+// m_checkBoxCopyFileSymlink->SetValue(copyFileSymlinksOut);
+
+ updateView();
+}
+
+void CompareCfgDialog::updateView()
+{
Fit();
}
+void CompareCfgDialog::OnOkay(wxCommandEvent& event)
+{
+ if (m_radioBtnContent->GetValue())
+ cmpVarOut = CMP_BY_CONTENT;
+ else
+ cmpVarOut = CMP_BY_TIME_SIZE;
+
+ processSymlinksOut = m_checkBoxIncludeSymlinks->GetValue();
+// traverseDirectorySymlinksOut = m_checkBoxTraverseDirSymlink->GetValue();
+// copyFileSymlinksOut = m_checkBoxCopyFileSymlink->GetValue();
+
+ //simplify GUI: set reasonable default values for "traverseDirectorySymlinks" and "copyFileSymlinks"
+ traverseDirectorySymlinksOut = true;
+ copyFileSymlinksOut = false;
+
+ EndModal(BUTTON_OKAY);
+}
+
+void CompareCfgDialog::OnIncludeSymlinks(wxCommandEvent& event)
+{
+ updateView();
+ event.Skip();
+}
+
+void CompareCfgDialog::OnTraverseDirSymlink(wxCommandEvent& event)
+{
+ updateView();
+ event.Skip();
+}
+
void CompareCfgDialog::OnClose(wxCloseEvent& event)
{
@@ -745,15 +799,15 @@ void CompareCfgDialog::OnCancel(wxCommandEvent& event)
void CompareCfgDialog::OnTimeSize(wxCommandEvent& event)
{
- m_cmpVar = CMP_BY_TIME_SIZE;
- EndModal(BUTTON_OKAY);
+ m_radioBtnSizeDate->SetValue(true);
+ OnOkay(event);
}
void CompareCfgDialog::OnContent(wxCommandEvent& event)
{
- m_cmpVar = CMP_BY_CONTENT;
- EndModal(BUTTON_OKAY);
+ m_radioBtnContent->SetValue(true);
+ OnOkay(event);
}
@@ -764,17 +818,18 @@ void CompareCfgDialog::OnShowHelp(wxCommandEvent& event)
}
-DefaultReturnCode::Response FreeFileSync::showCompareCfgDialog(const wxPoint& position, CompareVariant& cmpVar)
+DefaultReturnCode::Response FreeFileSync::showCompareCfgDialog(
+ const wxPoint& position,
+ CompareVariant& cmpVar,
+ bool& processSymlinks,
+ bool& traverseDirectorySymlinks,
+ bool& copyFileSymlinks)
{
- DefaultReturnCode::Response rv = DefaultReturnCode::BUTTON_CANCEL;
+ CompareCfgDialog syncDlg(NULL, position, cmpVar, processSymlinks, traverseDirectorySymlinks, copyFileSymlinks);
- CompareCfgDialog* syncDlg = new CompareCfgDialog(NULL, position, cmpVar);
- if (syncDlg->ShowModal() == CompareCfgDialog::BUTTON_OKAY)
- rv = DefaultReturnCode::BUTTON_OKAY;
-
- syncDlg->Destroy();
-
- return rv;
+ return syncDlg.ShowModal() == CompareCfgDialog::BUTTON_OKAY ?
+ DefaultReturnCode::BUTTON_OKAY :
+ DefaultReturnCode::BUTTON_CANCEL;
}
//########################################################################################
@@ -818,7 +873,6 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* window, xmlAccess::XmlGlobalSetti
m_checkBoxCopyLocked->SetValue(globalSettings.copyLockedFiles);
#ifndef FFS_WIN
- m_staticTextCopyLocked->Hide();
m_checkBoxCopyLocked->Hide();
#endif
diff --git a/ui/SmallDialogs.h b/ui/SmallDialogs.h
index 73e4d13a..74c12f33 100644
--- a/ui/SmallDialogs.h
+++ b/ui/SmallDialogs.h
@@ -30,8 +30,7 @@ void showHelpDialog();
DefaultReturnCode::Response showFilterDialog(bool isGlobalFilter,
Zstring& filterIncl,
- Zstring& filterExcl,
- bool filterActive);
+ Zstring& filterExcl);
DefaultReturnCode::Response showDeleteDialog(
const std::vector<FileSystemObject*>& rowsOnLeft,
@@ -47,7 +46,12 @@ DefaultReturnCode::Response showSyncPreviewDlg(
const SyncStatistics& statistics,
bool& dontShowAgain);
-DefaultReturnCode::Response showCompareCfgDialog(const wxPoint& position, CompareVariant& cmpVar);
+DefaultReturnCode::Response showCompareCfgDialog(
+ const wxPoint& position,
+ CompareVariant& cmpVar,
+ bool& processSymlinks,
+ bool& traverseDirectorySymlinks,
+ bool& copyFileSymlinks);
DefaultReturnCode::Response showGlobalSettingsDlg(xmlAccess::XmlGlobalSettings& globalSettings);
}
diff --git a/ui/batchConfig.cpp b/ui/batchConfig.cpp
new file mode 100644
index 00000000..e58821e4
--- /dev/null
+++ b/ui/batchConfig.cpp
@@ -0,0 +1,802 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#include "batchConfig.h"
+#include "../shared/xmlBase.h"
+#include "folderPair.h"
+#include <wx/wupdlock.h>
+#include "../shared/helpProvider.h"
+#include "../shared/fileHandling.h"
+#include "messagePopup.h"
+#include <wx/dnd.h>
+#include <wx/msgdlg.h>
+
+using namespace FreeFileSync;
+
+
+class BatchFileDropEvent : public wxFileDropTarget
+{
+public:
+ BatchFileDropEvent(BatchDialog& dlg) :
+ batchDlg(dlg) {}
+
+ virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames)
+ {
+ if (!filenames.IsEmpty())
+ {
+ const wxString droppedFileName = filenames[0];
+
+ xmlAccess::XmlType fileType = xmlAccess::getXmlType(droppedFileName);
+
+ //test if ffs batch file has been dropped
+ if (fileType == xmlAccess::XML_BATCH_CONFIG)
+ batchDlg.loadBatchFile(droppedFileName);
+ else
+ {
+ wxString errorMessage = _("%x is not a valid FreeFileSync batch file!");
+ errorMessage.Replace(wxT("%x"), wxString(wxT("\"")) + droppedFileName + wxT("\""), false);
+ wxMessageBox(errorMessage, _("Error"), wxOK | wxICON_ERROR);
+ }
+ }
+ return false;
+ }
+
+private:
+ BatchDialog& batchDlg;
+};
+
+//###################################################################################################################################
+
+//------------------------------------------------------------------
+/* class hierarchy:
+
+ template<>
+ FolderPairPanelBasic
+ /|\
+ |
+ template<>
+ FolderPairCallback BatchFolderPairGenerated
+ /|\ /|\
+ _________|______________ ________|
+ | | |
+ FirstBatchFolderPairCfg BatchFolderPairPanel
+*/
+
+template <class GuiPanel>
+class FolderPairCallback : public FolderPairPanelBasic<GuiPanel> //implements callback functionality to BatchDialog as imposed by FolderPairPanelBasic
+{
+public:
+ FolderPairCallback(GuiPanel& basicPanel, BatchDialog& batchDialog) :
+ FolderPairPanelBasic<GuiPanel>(basicPanel), //pass FolderPairGenerated part...
+ batchDlg(batchDialog) {}
+
+private:
+ virtual wxWindow* getParentWindow()
+ {
+ return &batchDlg;
+ }
+
+ virtual MainConfiguration getMainConfig() const
+ {
+ return batchDlg.getCurrentConfiguration().mainCfg;
+ }
+
+ BatchDialog& batchDlg;
+};
+
+
+class BatchFolderPairPanel :
+ public BatchFolderPairGenerated, //BatchFolderPairPanel "owns" BatchFolderPairGenerated!
+ public FolderPairCallback<BatchFolderPairGenerated>
+{
+public:
+ BatchFolderPairPanel(wxWindow* parent, BatchDialog& batchDialog) :
+ BatchFolderPairGenerated(parent),
+ FolderPairCallback<BatchFolderPairGenerated>(static_cast<BatchFolderPairGenerated&>(*this), batchDialog), //pass BatchFolderPairGenerated part...
+ dragDropOnLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft),
+ dragDropOnRight(m_panelRight, m_dirPickerRight, m_directoryRight) {}
+
+private:
+ //support for drag and drop
+ DragDropOnDlg dragDropOnLeft;
+ DragDropOnDlg dragDropOnRight;
+};
+
+
+class FirstBatchFolderPairCfg : public FolderPairCallback<BatchDlgGenerated>
+{
+public:
+ FirstBatchFolderPairCfg(BatchDialog& batchDialog) :
+ FolderPairCallback<BatchDlgGenerated>(batchDialog, batchDialog),
+
+ //prepare drag & drop
+ dragDropOnLeft(batchDialog.m_panelLeft,
+ batchDialog.m_dirPickerLeft,
+ batchDialog.m_directoryLeft),
+ dragDropOnRight(batchDialog.m_panelRight,
+ batchDialog.m_dirPickerRight,
+ batchDialog.m_directoryRight) {}
+
+private:
+ //support for drag and drop
+ DragDropOnDlg dragDropOnLeft;
+ DragDropOnDlg dragDropOnRight;
+};
+
+
+//###################################################################################################################################
+BatchDialog::BatchDialog(wxWindow* window, const xmlAccess::XmlBatchConfig& batchCfg) :
+ BatchDlgGenerated(window)
+{
+ init();
+ loadBatchCfg(batchCfg);
+}
+
+
+BatchDialog::BatchDialog(wxWindow* window, const wxString& filename) :
+ BatchDlgGenerated(window)
+{
+ init();
+ loadBatchFile(filename);
+}
+
+
+BatchDialog::~BatchDialog() {} //non-inline destructor for std::auto_ptr to work with forward declaration
+
+
+void BatchDialog::init()
+{
+ wxWindowUpdateLocker dummy(this); //avoid display distortion
+
+ m_bpButtonCmpConfig->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("cmpConfig")));
+ m_bpButtonSyncConfig->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("syncConfig")));
+
+ m_bpButtonHelp->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("help")));
+
+ //init handling of first folder pair
+ firstFolderPair.reset(new FirstBatchFolderPairCfg(*this));
+
+ m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnGlobalFilterOpenContext), NULL, this);
+
+ //prepare drag & drop for loading of *.ffs_batch files
+ SetDropTarget(new BatchFileDropEvent(*this));
+ dragDropOnLogfileDir.reset(new DragDropOnDlg(m_panelLogging, m_dirPickerLogfileDir, m_textCtrlLogfileDir));
+
+ //set icons for this dialog
+ m_bpButtonAddPair->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("addFolderPair")));
+ m_bitmap27->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("batch")));
+
+ m_buttonSave->SetFocus();
+}
+
+//------------------- error handling --------------------------
+
+xmlAccess::OnError BatchDialog::getSelectionHandleError() const
+{
+ switch (m_choiceHandleError->GetSelection())
+ {
+ case 0:
+ return xmlAccess::ON_ERROR_POPUP;
+ case 1:
+ return xmlAccess::ON_ERROR_IGNORE;
+ case 2:
+ return xmlAccess::ON_ERROR_EXIT;
+ default:
+ assert(false);
+ return xmlAccess::ON_ERROR_POPUP;
+ }
+}
+
+
+void BatchDialog::updateToolTipErrorHandling(const xmlAccess::OnError value)
+{
+ switch (value)
+ {
+ case xmlAccess::ON_ERROR_POPUP:
+ m_choiceHandleError->SetToolTip(_("Show popup on errors or warnings"));
+ break;
+ case xmlAccess::ON_ERROR_IGNORE:
+ m_choiceHandleError->SetToolTip(_("Hide all error and warning messages"));
+ break;
+ case xmlAccess::ON_ERROR_EXIT:
+ m_choiceHandleError->SetToolTip(_("Abort synchronization immediately"));
+ break;
+ }
+}
+
+
+void BatchDialog::setSelectionHandleError(const xmlAccess::OnError value)
+{
+ m_choiceHandleError->Clear();
+ m_choiceHandleError->Append(_("Show popup"));
+ m_choiceHandleError->Append(_("Ignore errors"));
+ if (m_checkBoxSilent->GetValue()) //this option shall be available for silent mode only!
+ m_choiceHandleError->Append(_("Exit instantly"));
+
+ //default
+ m_choiceHandleError->SetSelection(0);
+
+ switch (value)
+ {
+ case xmlAccess::ON_ERROR_POPUP:
+ m_choiceHandleError->SetSelection(0);
+ break;
+ case xmlAccess::ON_ERROR_IGNORE:
+ m_choiceHandleError->SetSelection(1);
+ break;
+ case xmlAccess::ON_ERROR_EXIT:
+ if (m_checkBoxSilent->GetValue()) //this option shall be available for silent mode only!
+ m_choiceHandleError->SetSelection(2);
+ break;
+ }
+
+ updateToolTipErrorHandling(getSelectionHandleError());
+}
+
+
+void BatchDialog::OnChangeErrorHandling(wxCommandEvent& event)
+{
+ updateToolTipErrorHandling(getSelectionHandleError());
+}
+
+
+void BatchDialog::OnCmpSettings(wxCommandEvent& event)
+{
+
+ //show window right next to the compare-config button
+ wxPoint windowPos = m_bpButtonCmpConfig->GetScreenPosition();
+ windowPos.x += m_bpButtonCmpConfig->GetSize().GetWidth() + 5;
+
+ if (FreeFileSync::showCompareCfgDialog(windowPos,
+ localBatchCfg.mainCfg.compareVar,
+ localBatchCfg.mainCfg.processSymlinks,
+ localBatchCfg.mainCfg.traverseDirectorySymlinks,
+ localBatchCfg.mainCfg.copyFileSymlinks) == DefaultReturnCode::BUTTON_OKAY)
+ {
+ updateGui();
+ }
+}
+
+
+void BatchDialog::OnSyncSettings(wxCommandEvent& event)
+{
+ SyncCfgDialog* syncDlg = new SyncCfgDialog(this,
+ localBatchCfg.mainCfg.compareVar,
+ localBatchCfg.mainCfg.syncConfiguration,
+ localBatchCfg.mainCfg.handleDeletion,
+ localBatchCfg.mainCfg.customDeletionDirectory,
+ NULL);
+ if (syncDlg->ShowModal() == SyncCfgDialog::BUTTON_APPLY)
+ {
+ updateGui();
+ }
+}
+
+
+void BatchDialog::OnConfigureFilter(wxCommandEvent& event)
+{
+ if (showFilterDialog(true, //is main filter dialog
+ localBatchCfg.mainCfg.globalFilter.includeFilter,
+ localBatchCfg.mainCfg.globalFilter.excludeFilter) == DefaultReturnCode::BUTTON_OKAY)
+ {
+ updateGui();
+ }
+}
+
+
+void BatchDialog::updateGui() //re-evaluate gui after config changes
+{
+ //update compare variant name
+ m_staticTextCmpVariant->SetLabel(wxString(wxT("(")) + getVariantName(localBatchCfg.mainCfg.compareVar) + wxT(")"));
+
+ //update sync variant name
+ m_staticTextSyncVariant->SetLabel(wxString(wxT("(")) + localBatchCfg.mainCfg.getSyncVariantName() + wxT(")"));
+
+ //set filter icon
+ if (isNullFilter(localBatchCfg.mainCfg.globalFilter))
+ {
+ m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOff")));
+ m_bpButtonFilter->SetToolTip(_("No filter selected"));
+ }
+ else
+ {
+ m_bpButtonFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterOn")));
+ m_bpButtonFilter->SetToolTip(_("Filter is active"));
+ }
+
+ m_panelOverview->Layout(); //adjust stuff inside scrolled window
+}
+
+
+void BatchDialog::OnGlobalFilterOpenContext(wxCommandEvent& event)
+{
+ const int menuId = 1234;
+ contextMenu.reset(new wxMenu); //re-create context menu
+ contextMenu->Append(menuId, _("Clear filter settings"));
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(BatchDialog::OnGlobalFilterRemConfirm), NULL, this);
+
+ if (isNullFilter(localBatchCfg.mainCfg.globalFilter))
+ contextMenu->Enable(menuId, false); //disable menu item, if clicking wouldn't make sense anyway
+
+ PopupMenu(contextMenu.get()); //show context menu
+}
+
+
+void BatchDialog::OnGlobalFilterRemConfirm(wxCommandEvent& event)
+{
+ localBatchCfg.mainCfg.globalFilter = FilterConfig();
+ updateGui();
+}
+
+
+void BatchDialog::OnCheckSilent(wxCommandEvent& event)
+{
+ updateVisibleTabs();
+
+ //reset error handling depending on "m_checkBoxSilent"
+ setSelectionHandleError(getSelectionHandleError());
+}
+
+
+void BatchDialog::OnHelp(wxCommandEvent& event)
+{
+#ifdef FFS_WIN
+ FreeFileSync::displayHelpEntry(wxT("html\\advanced\\ScheduleBatch.html"));
+#elif defined FFS_LINUX
+ FreeFileSync::displayHelpEntry(wxT("html/advanced/ScheduleBatch.html"));
+#endif
+}
+
+
+void BatchDialog::updateVisibleTabs()
+{
+ showNotebookpage(m_panelLogging, _("Logging"), m_checkBoxSilent->GetValue());
+}
+
+
+void BatchDialog::showNotebookpage(wxWindow* page, const wxString& pageName, bool show)
+{
+ int windowPosition = -1;
+ for (size_t i = 0; i < m_notebookSettings->GetPageCount(); ++i)
+ if (m_notebookSettings->GetPage(i) == page)
+ {
+ windowPosition = static_cast<int>(i);
+ break;
+ }
+
+ if (show)
+ {
+ if (windowPosition == -1)
+ m_notebookSettings->AddPage(page, pageName, false);
+ }
+ else
+ {
+ if (windowPosition != -1)
+ {
+ //do not delete currently selected tab!!
+ if (m_notebookSettings->GetCurrentPage() == m_notebookSettings->GetPage(windowPosition))
+ m_notebookSettings->ChangeSelection(0);
+
+ m_notebookSettings->RemovePage(windowPosition);
+ }
+ }
+}
+
+
+void BatchDialog::OnClose(wxCloseEvent& event)
+{
+ EndModal(0);
+}
+
+
+void BatchDialog::OnCancel(wxCommandEvent& event)
+{
+ EndModal(0);
+}
+
+
+void BatchDialog::OnSaveBatchJob(wxCommandEvent& event)
+{
+ //get a filename
+ const wxString defaultFileName = proposedBatchFileName.empty() ? wxT("SyncJob.ffs_batch") : proposedBatchFileName;
+
+ wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, defaultFileName, wxString(_("FreeFileSync batch file")) + wxT(" (*.ffs_batch)|*.ffs_batch"), wxFD_SAVE);
+ if (filePicker->ShowModal() == wxID_OK)
+ {
+ const wxString newFileName = filePicker->GetPath();
+ if (FreeFileSync::fileExists(wxToZ(newFileName)))
+ {
+ QuestionDlg* messageDlg = new QuestionDlg(this,
+ QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_CANCEL,
+ wxString(_("File already exists. Overwrite?")) + wxT(" \"") + newFileName + wxT("\""));
+
+ if (messageDlg->ShowModal() != QuestionDlg::BUTTON_YES)
+ {
+ OnSaveBatchJob(event); //retry
+ return;
+ }
+ }
+
+ //create batch file
+ if (saveBatchFile(newFileName))
+ EndModal(BATCH_FILE_SAVED);
+ }
+}
+
+
+void BatchDialog::OnLoadBatchJob(wxCommandEvent& event)
+{
+ wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, wxEmptyString, wxString(_("FreeFileSync batch file")) + wxT(" (*.ffs_batch)|*.ffs_batch"), wxFD_OPEN);;
+ if (filePicker->ShowModal() == wxID_OK)
+ loadBatchFile(filePicker->GetPath());
+}
+
+
+
+inline
+FolderPairEnh getEnahncedPair(const BatchFolderPairPanel* panel)
+{
+ return FolderPairEnh(panel->getLeftDir(),
+ panel->getRightDir(),
+ panel->getAltSyncConfig(),
+ panel->getAltFilterConfig());
+}
+
+
+xmlAccess::XmlBatchConfig BatchDialog::getCurrentConfiguration() const
+{
+ xmlAccess::XmlBatchConfig batchCfg = localBatchCfg;
+
+ //load parameter with ownership within wxWidgets controls...
+
+ //first folder pair
+ batchCfg.mainCfg.firstPair = FolderPairEnh(firstFolderPair->getLeftDir(),
+ firstFolderPair->getRightDir(),
+ firstFolderPair->getAltSyncConfig(),
+ firstFolderPair->getAltFilterConfig());
+
+ //add additional pairs
+ batchCfg.mainCfg.additionalPairs.clear();
+ std::transform(additionalFolderPairs.begin(), additionalFolderPairs.end(),
+ std::back_inserter(batchCfg.mainCfg.additionalPairs), getEnahncedPair);
+
+
+ //load structure with batch settings "batchCfg"
+ batchCfg.silent = m_checkBoxSilent->GetValue();
+ batchCfg.logFileDirectory = m_textCtrlLogfileDir->GetValue();
+ batchCfg.handleError = getSelectionHandleError();
+
+ return batchCfg;
+}
+
+
+bool BatchDialog::saveBatchFile(const wxString& filename)
+{
+ const xmlAccess::XmlBatchConfig batchCfg = getCurrentConfiguration();
+
+ //write config to XML
+ try
+ {
+ xmlAccess::writeBatchConfig(batchCfg, filename);
+ }
+ catch (const xmlAccess::XmlError& error)
+ {
+ wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR);
+ return false;
+ }
+
+ SetTitle(wxString(_("Create a batch job")) + wxT(" - ") + filename);
+ proposedBatchFileName = filename; //may be used on next save
+
+ return true;
+}
+
+
+void BatchDialog::loadBatchFile(const wxString& filename)
+{
+ //load XML settings
+ xmlAccess::XmlBatchConfig batchCfg; //structure to receive gui settings
+ try
+ {
+ xmlAccess::readBatchConfig(filename, batchCfg);
+ }
+ catch (const xmlAccess::XmlError& error)
+ {
+ if (error.getSeverity() == xmlAccess::XmlError::WARNING)
+ wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING);
+ else
+ {
+ wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
+ return;
+ }
+ }
+
+ SetTitle(wxString(_("Create a batch job")) + wxT(" - ") + filename);
+ proposedBatchFileName = filename; //may be used on next save
+ this->loadBatchCfg(batchCfg);
+}
+
+
+void BatchDialog::loadBatchCfg(const xmlAccess::XmlBatchConfig& batchCfg)
+{
+ wxWindowUpdateLocker dummy(this); //avoid display distortion
+
+//make working copy
+ localBatchCfg = batchCfg;
+
+ m_checkBoxSilent->SetValue(batchCfg.silent);
+ m_textCtrlLogfileDir->SetValue(batchCfg.logFileDirectory);
+ //error handling is dependent from m_checkBoxSilent! /|\ \|/
+ setSelectionHandleError(batchCfg.handleError);
+
+ //set first folder pair
+ firstFolderPair->setValues(batchCfg.mainCfg.firstPair.leftDirectory,
+ batchCfg.mainCfg.firstPair.rightDirectory,
+ batchCfg.mainCfg.firstPair.altSyncConfig,
+ batchCfg.mainCfg.firstPair.localFilter);
+
+ //remove existing additional folder pairs
+ clearAddFolderPairs();
+
+ //set additional pairs
+ addFolderPair(batchCfg.mainCfg.additionalPairs);
+
+ updateVisibleTabs();
+
+ updateGui(); //re-evaluate gui after config changes
+
+ Fit(); //needed
+ Refresh(); //needed
+ Centre();
+}
+
+
+void BatchDialog::OnAddFolderPair(wxCommandEvent& event)
+{
+ wxWindowUpdateLocker dummy(this); //avoid display distortion
+
+ std::vector<FolderPairEnh> newPairs;
+ newPairs.push_back(getCurrentConfiguration().mainCfg.firstPair);
+
+ addFolderPair(newPairs, true); //add pair in front of additonal pairs
+
+ //clear first pair
+ const FolderPairEnh cfgEmpty;
+ firstFolderPair->setValues(cfgEmpty.leftDirectory,
+ cfgEmpty.rightDirectory,
+ cfgEmpty.altSyncConfig,
+ cfgEmpty.localFilter);
+}
+
+
+void BatchDialog::OnRemoveFolderPair(wxCommandEvent& event)
+{
+ //find folder pair originating the event
+ const wxObject* const eventObj = event.GetEventObject();
+ for (std::vector<BatchFolderPairPanel*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
+ {
+ if (eventObj == static_cast<wxObject*>((*i)->m_bpButtonRemovePair))
+ {
+ removeAddFolderPair(i - additionalFolderPairs.begin());
+ return;
+ }
+ }
+}
+
+
+void BatchDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
+{
+ if (additionalFolderPairs.size() > 0)
+ {
+ //get settings from second folder pair
+ const FolderPairEnh cfgSecond = getEnahncedPair(additionalFolderPairs[0]);
+
+ //reset first pair
+ firstFolderPair->setValues(cfgSecond.leftDirectory,
+ cfgSecond.rightDirectory,
+ cfgSecond.altSyncConfig,
+ cfgSecond.localFilter);
+
+ removeAddFolderPair(0); //remove second folder pair (first of additional folder pairs)
+ }
+}
+
+
+const size_t MAX_FOLDER_PAIRS = 3;
+
+
+void BatchDialog::updateGuiForFolderPair()
+{
+ //adapt delete top folder pair button
+ if (additionalFolderPairs.size() == 0)
+ m_bpButtonRemovePair->Hide();
+ else
+ m_bpButtonRemovePair->Show();
+
+ //adapt local filter and sync cfg for first folder pair
+ if ( additionalFolderPairs.size() == 0 &&
+ firstFolderPair->getAltSyncConfig().get() == NULL &&
+ NameFilter(firstFolderPair->getAltFilterConfig().includeFilter,
+ firstFolderPair->getAltFilterConfig().excludeFilter).isNull())
+ {
+ m_bpButtonLocalFilter->Hide();
+ m_bpButtonAltSyncCfg->Hide();
+ }
+ else
+ {
+ m_bpButtonLocalFilter->Show();
+ m_bpButtonAltSyncCfg->Show();
+ }
+
+ m_scrolledWindow6->Fit(); //adjust scrolled window size
+ m_panelOverview->Layout(); //adjust stuff inside scrolled window
+}
+
+
+void BatchDialog::addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront)
+{
+ wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
+
+ if (!newPairs.empty())
+ {
+ //add folder pairs
+ int pairHeight = 0;
+ for (std::vector<FreeFileSync::FolderPairEnh>::const_iterator i = newPairs.begin(); i != newPairs.end(); ++i)
+ {
+ BatchFolderPairPanel* newPair = new BatchFolderPairPanel(m_scrolledWindow6, *this);
+
+ if (addFront)
+ {
+ bSizerAddFolderPairs->Insert(0, newPair, 0, wxEXPAND, 5);
+ additionalFolderPairs.insert(additionalFolderPairs.begin(), newPair);
+ }
+ else
+ {
+ bSizerAddFolderPairs->Add(newPair, 0, wxEXPAND, 5);
+ additionalFolderPairs.push_back(newPair);
+ }
+
+ //get size of scrolled window
+ pairHeight = newPair->GetSize().GetHeight();
+
+ //register events
+ newPair->m_bpButtonRemovePair->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BatchDialog::OnRemoveFolderPair), NULL, this );
+
+ //set alternate configuration
+ newPair->setValues(i->leftDirectory,
+ i->rightDirectory,
+ i->altSyncConfig,
+ i->localFilter);
+ }
+ //set size of scrolled window
+ const size_t visiblePairs = std::min(additionalFolderPairs.size() + 1, MAX_FOLDER_PAIRS); //up to MAX_FOLDER_PAIRS pairs shall be shown
+ m_scrolledWindow6->SetMinSize(wxSize( -1, pairHeight * static_cast<int>(visiblePairs)));
+
+ //update controls
+ m_scrolledWindow6->Fit(); //adjust scrolled window size
+ m_panelOverview->Layout(); //adjust stuff inside scrolled window
+ Fit(); //adapt dialog size
+
+ //after changing folder pairs window focus is lost: results in scrolled window scrolling to top each time window is shown: we don't want this
+ m_bpButtonAddPair->SetFocus();
+ }
+
+ updateGuiForFolderPair();
+}
+
+
+void BatchDialog::removeAddFolderPair(const int pos)
+{
+ wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
+
+ if (0 <= pos && pos < static_cast<int>(additionalFolderPairs.size()))
+ {
+ //remove folder pairs from window
+ BatchFolderPairPanel* pairToDelete = additionalFolderPairs[pos];
+ const int pairHeight = pairToDelete->GetSize().GetHeight();
+
+ bSizerAddFolderPairs->Detach(pairToDelete); //Remove() does not work on Window*, so do it manually
+ pairToDelete->Destroy(); //
+ additionalFolderPairs.erase(additionalFolderPairs.begin() + pos); //remove last element in vector
+
+ //set size of scrolled window
+ const size_t visiblePairs = std::min(additionalFolderPairs.size() + 1, MAX_FOLDER_PAIRS); //up to MAX_FOLDER_PAIRS pairs shall be shown
+ m_scrolledWindow6->SetMinSize(wxSize(-1, pairHeight * static_cast<int>(visiblePairs)));
+
+ //update controls
+ m_scrolledWindow6->Fit(); //adjust scrolled window size
+ m_panelOverview->Layout(); //adjust stuff inside scrolled window
+
+ m_panelOverview->InvalidateBestSize(); //needed for Fit() to work correctly!
+ Fit(); //adapt dialog size
+
+ //after changing folder pairs window focus is lost: results in scrolled window scrolling to top each time window is shown: we don't want this
+ m_bpButtonCmpConfig->SetFocus();
+ }
+
+ updateGuiForFolderPair();
+}
+
+
+void BatchDialog::clearAddFolderPairs()
+{
+ wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
+
+ additionalFolderPairs.clear();
+ bSizerAddFolderPairs->Clear(true);
+
+ m_scrolledWindow6->SetMinSize(wxSize(-1, sbSizerMainPair->GetSize().GetHeight())); //respect height of main pair
+}
+
+
+/*
+#ifdef FFS_WIN
+#include <wx/msw/wrapwin.h> //includes "windows.h"
+#include <shlobj.h>
+#endif // FFS_WIN
+
+template <typename T>
+struct CleanUp
+{
+ CleanUp(T* element) : m_element(element) {}
+
+ ~CleanUp()
+ {
+ m_element->Release();
+ }
+
+ T* m_element;
+};
+
+
+bool BatchDialog::createBatchFile(const wxString& filename)
+{
+ //create shell link (instead of batch file) for full Unicode support
+ HRESULT hResult = E_FAIL;
+ IShellLink* pShellLink = NULL;
+
+ if (FAILED(CoCreateInstance(CLSID_ShellLink, //class identifier
+ NULL, //object isn't part of an aggregate
+ CLSCTX_INPROC_SERVER, //context for running executable code
+ IID_IShellLink, //interface identifier
+ (void**)&pShellLink))) //pointer to storage of interface pointer
+ return false;
+ CleanUp<IShellLink> cleanOnExit(pShellLink);
+
+ wxString freeFileSyncExe = wxStandardPaths::Get().GetExecutablePath();
+ if (FAILED(pShellLink->SetPath(freeFileSyncExe.c_str())))
+ return false;
+
+ if (FAILED(pShellLink->SetArguments(getCommandlineArguments().c_str())))
+ return false;
+
+ if (FAILED(pShellLink->SetIconLocation(freeFileSyncExe.c_str(), 1))) //second icon from executable file is used
+ return false;
+
+ if (FAILED(pShellLink->SetDescription(_("FreeFileSync Batch Job"))))
+ return false;
+
+ IPersistFile* pPersistFile = NULL;
+ if (FAILED(pShellLink->QueryInterface(IID_IPersistFile, (void**)&pPersistFile)))
+ return false;
+ CleanUp<IPersistFile> cleanOnExit2(pPersistFile);
+
+ //pPersistFile->Save accepts unicode input only
+#ifdef _UNICODE
+ hResult = pPersistFile->Save(filename.c_str(), TRUE);
+#else
+ WCHAR wszTemp [MAX_PATH];
+ if (MultiByteToWideChar(CP_ACP, 0, filename.c_str(), -1, wszTemp, MAX_PATH) == 0)
+ return false;
+
+ hResult = pPersistFile->Save(wszTemp, TRUE);
+#endif
+ if (FAILED(hResult))
+ return false;
+
+ return true;
+}
+*/
diff --git a/ui/batchConfig.h b/ui/batchConfig.h
new file mode 100644
index 00000000..5fcf54a3
--- /dev/null
+++ b/ui/batchConfig.h
@@ -0,0 +1,96 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef BATCHCONFIG_H_INCLUDED
+#define BATCHCONFIG_H_INCLUDED
+
+#include "guiGenerated.h"
+#include "../library/processXml.h"
+
+
+namespace FreeFileSync
+{
+class DragDropOnDlg;
+}
+
+class BatchFolderPairPanel;
+class FirstBatchFolderPairCfg;
+
+
+class BatchDialog: public BatchDlgGenerated
+{
+ friend class BatchFileDropEvent;
+ template <class GuiPanel>
+ friend class FolderPairCallback;
+
+public:
+ BatchDialog(wxWindow* window, const xmlAccess::XmlBatchConfig& batchCfg);
+ BatchDialog(wxWindow* window, const wxString& filename);
+ ~BatchDialog();
+
+ enum
+ {
+ BATCH_FILE_SAVED = 15
+ };
+
+private:
+ void init();
+
+ virtual void OnCmpSettings( wxCommandEvent& event);
+ virtual void OnSyncSettings( wxCommandEvent& event);
+ virtual void OnConfigureFilter( wxCommandEvent& event);
+
+ virtual void OnHelp( wxCommandEvent& event);
+
+ void OnGlobalFilterOpenContext(wxCommandEvent& event);
+ void OnGlobalFilterRemConfirm(wxCommandEvent& event);
+ virtual void OnCheckSilent( wxCommandEvent& event);
+ virtual void OnClose( wxCloseEvent& event);
+ virtual void OnCancel( wxCommandEvent& event);
+ virtual void OnSaveBatchJob( wxCommandEvent& event);
+ virtual void OnLoadBatchJob( wxCommandEvent& event);
+ virtual void OnAddFolderPair( wxCommandEvent& event);
+ virtual void OnRemoveFolderPair( wxCommandEvent& event);
+ virtual void OnRemoveTopFolderPair(wxCommandEvent& event);
+
+ void addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront = false);
+ void removeAddFolderPair(const int pos);
+ void clearAddFolderPairs();
+
+ void updateGuiForFolderPair();
+
+ void updateGui(); //re-evaluate gui after config changes
+
+ void updateVisibleTabs();
+ void showNotebookpage(wxWindow* page, const wxString& pageName, bool show);
+
+ //error handling
+ xmlAccess::OnError getSelectionHandleError() const;
+ void setSelectionHandleError(const xmlAccess::OnError value);
+ void OnChangeErrorHandling(wxCommandEvent& event);
+ void updateToolTipErrorHandling(const xmlAccess::OnError value);
+
+ bool saveBatchFile(const wxString& filename);
+ void loadBatchFile(const wxString& filename);
+ void loadBatchCfg(const xmlAccess::XmlBatchConfig& batchCfg);
+
+ xmlAccess::XmlBatchConfig getCurrentConfiguration() const;
+
+ boost::shared_ptr<FirstBatchFolderPairCfg> firstFolderPair; //always bound!!!
+ std::vector<BatchFolderPairPanel*> additionalFolderPairs;
+
+ //used when saving batch file
+ wxString proposedBatchFileName;
+
+ xmlAccess::XmlBatchConfig localBatchCfg;
+
+ std::auto_ptr<wxMenu> contextMenu;
+
+ //add drag & drop support when selecting logfile directory
+ std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnLogfileDir;
+};
+
+#endif // BATCHCONFIG_H_INCLUDED
diff --git a/ui/batchStatusHandler.cpp b/ui/batchStatusHandler.cpp
index e8b2b31b..b7589497 100644
--- a/ui/batchStatusHandler.cpp
+++ b/ui/batchStatusHandler.cpp
@@ -99,21 +99,14 @@ private:
//add timestamp
wxString timeNow = wxDateTime::Now().FormatISOTime();
- timeNow.Replace(wxT(":"), wxT("-"));
+ timeNow.Replace(wxT(":"), wxT(""));
logfileName += wxDateTime::Now().FormatISODate() + wxChar(' ') + timeNow;
wxString output = logfileName + wxT(".log");
//ensure uniqueness
- if (FreeFileSync::fileExists(wxToZ(output)))
- {
- //if it's not unique, add a postfix number
- int postfix = 1;
- while (FreeFileSync::fileExists(wxToZ(logfileName + wxT('_') + FreeFileSync::numberToWxString(postfix, false) + wxT(".log"))))
- ++postfix;
-
- output = logfileName + wxT('_') + numberToWxString(postfix, false) + wxT(".log");
- }
+ for (int i = 1; FreeFileSync::somethingExists(wxToZ(output)); ++i)
+ output = logfileName + wxChar('_') + numberToWxString(i, false) + wxT(".log");
return output;
}
@@ -128,8 +121,11 @@ BatchStatusHandler::BatchStatusHandler(bool runSilent,
const wxString& batchFilename,
const wxString* logfileDirectory,
const xmlAccess::OnError handleError,
+ const SwitchToGui& switchBatchToGui, //functionality to change from batch mode to GUI mode
int& returnVal) :
+ switchBatchToGui_(switchBatchToGui),
exitWhenFinished(runSilent), //=> exit immediately when finished
+ switchToGuiRequested(false),
handleError_(handleError),
currentProcess(StatusHandler::PROCESS_NONE),
returnValue(returnVal),
@@ -177,7 +173,12 @@ BatchStatusHandler::~BatchStatusHandler()
logFile->writeLog(errorLog);
//decide whether to stay on status screen or exit immediately...
- if (!exitWhenFinished || syncStatusFrame.getAsWindow()->IsShown()) //warning: wxWindow::Show() is called within processHasFinished()!
+ if (switchToGuiRequested) //-> avoid recursive yield() calls, thous switch not before ending batch mode
+ {
+ switchBatchToGui_.execute(); //open FreeFileSync GUI
+ syncStatusFrame.closeWindowDirectly(); //syncStatusFrame is main window => program will quit directly
+ }
+ else if (!exitWhenFinished || syncStatusFrame.getAsWindow()->IsShown()) //warning: wxWindow::Show() is called within processHasFinished()!
{
//print the results list: GUI
wxString finalMessage;
@@ -285,8 +286,8 @@ void BatchStatusHandler::reportWarning(const wxString& warningMessage, bool& war
//show popup and ask user how to handle warning
bool dontWarnAgain = false;
WarningDlg warningDlg(NULL,
- WarningDlg::BUTTON_IGNORE | WarningDlg::BUTTON_ABORT,
- warningMessage,
+ WarningDlg::BUTTON_IGNORE | WarningDlg::BUTTON_SWITCH | WarningDlg::BUTTON_ABORT,
+ warningMessage + wxT("\n\n") + _("Press \"Switch\" to open FreeFileSync GUI modus."),
dontWarnAgain);
warningDlg.Raise();
const WarningDlg::Response rv = static_cast<WarningDlg::Response>(warningDlg.ShowModal());
@@ -296,6 +297,12 @@ void BatchStatusHandler::reportWarning(const wxString& warningMessage, bool& war
abortThisProcess();
break;
+ case WarningDlg::BUTTON_SWITCH:
+ errorLog.logWarning(_("Switching to FreeFileSync GUI modus..."));
+ switchToGuiRequested = true;
+ abortThisProcess();
+ break;
+
case WarningDlg::BUTTON_IGNORE: //no unhandled error situation!
warningActive = !dontWarnAgain;
break;
@@ -322,7 +329,7 @@ ErrorHandler::Response BatchStatusHandler::reportError(const wxString& errorMess
bool ignoreNextErrors = false;
ErrorDlg errorDlg(NULL,
ErrorDlg::BUTTON_IGNORE | ErrorDlg::BUTTON_RETRY | ErrorDlg::BUTTON_ABORT,
- errorMessage + wxT("\n\n\n") + _("Ignore this error, retry or abort?"),
+ errorMessage,
ignoreNextErrors);
errorDlg.Raise();
const ErrorDlg::ReturnCodes rv = static_cast<ErrorDlg::ReturnCodes>(errorDlg.ShowModal());
diff --git a/ui/batchStatusHandler.h b/ui/batchStatusHandler.h
index b2ef125b..fb37c62a 100644
--- a/ui/batchStatusHandler.h
+++ b/ui/batchStatusHandler.h
@@ -11,6 +11,7 @@
#include "../library/processXml.h"
#include "../library/errorLogging.h"
#include "progressIndicator.h"
+#include "switchToGui.h"
class LogFile;
class SyncStatus;
@@ -23,6 +24,7 @@ public:
const wxString& batchFilename,
const wxString* logfileDirectory, //optional: enable logging if available
const xmlAccess::OnError handleError,
+ const FreeFileSync::SwitchToGui& switchBatchToGui, //functionality to change from batch mode to GUI mode
int& returnVal);
~BatchStatusHandler();
@@ -39,7 +41,9 @@ public:
private:
virtual void abortThisProcess();
+ const FreeFileSync::SwitchToGui& switchBatchToGui_; //functionality to change from batch mode to GUI mode
bool exitWhenFinished;
+ bool switchToGuiRequested;
xmlAccess::OnError handleError_;
FreeFileSync::ErrorLogging errorLog; //list of non-resolved errors and warnings
Process currentProcess;
diff --git a/ui/folderPair.h b/ui/folderPair.h
index d20dde76..7a027fba 100644
--- a/ui/folderPair.h
+++ b/ui/folderPair.h
@@ -11,9 +11,11 @@
#include "../shared/dragAndDrop.h"
#include "../library/resources.h"
#include "smallDialogs.h"
-#include "settingsDialog.h"
+#include "syncConfig.h"
#include <wx/event.h>
-
+#include "isNullFilter.h"
+#include "../shared/util.h"
+#include "../shared/stringConv.h"
namespace FreeFileSync
{
@@ -76,26 +78,16 @@ public:
basicPanel_.m_bpButtonAltSyncCfg->SetToolTip(_("Select alternate synchronization settings"));
}
-
- if (getMainConfig().filterIsActive)
+ //test for Null-filter
+ if (isNullFilter(localFilter))
{
- //test for Null-filter
- const bool isNullFilter = NameFilter(localFilter.includeFilter, localFilter.excludeFilter).isNull();
- if (isNullFilter)
- {
- basicPanel_.m_bpButtonLocalFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterSmallGrey")));
- basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("No filter selected"));
- }
- else
- {
- basicPanel_.m_bpButtonLocalFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterSmall")));
- basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("Filter has been selected"));
- }
+ basicPanel_.m_bpButtonLocalFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterSmallGrey")));
+ basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("No filter selected"));
}
else
{
- basicPanel_.m_bpButtonLocalFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterSmallGrey")));
- basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("Filtering is deactivated"));
+ basicPanel_.m_bpButtonLocalFilter->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("filterSmall")));
+ basicPanel_.m_bpButtonLocalFilter->SetToolTip(_("Filter is active"));
}
}
@@ -131,7 +123,7 @@ private:
{
const int menuId = 1234;
contextMenu.reset(new wxMenu); //re-create context menu
- contextMenu->Append(menuId, _("Remove local filter settings"));
+ contextMenu->Append(menuId, _("Clear filter settings"));
contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgRemoveConfirm), NULL, this);
if (NameFilter(localFilter.includeFilter, localFilter.excludeFilter).isNull())
@@ -189,8 +181,7 @@ private:
if (showFilterDialog(false, //is local filter dialog
localFiltTmp.includeFilter,
- localFiltTmp.excludeFilter,
- getMainConfig().filterIsActive) == DefaultReturnCode::BUTTON_OKAY)
+ localFiltTmp.excludeFilter) == DefaultReturnCode::BUTTON_OKAY)
{
localFilter = localFiltTmp;
refreshButtons();
diff --git a/ui/gridView.cpp b/ui/gridView.cpp
index 4989db3d..b1ecb9eb 100644
--- a/ui/gridView.cpp
+++ b/ui/gridView.cpp
@@ -270,7 +270,7 @@ void GridView::clearAllRows()
class GridView::SerializeHierarchy
{
public:
- SerializeHierarchy(std::vector<GridView::RefIndex>& sortedRef, unsigned int index) :
+ SerializeHierarchy(std::vector<GridView::RefIndex>& sortedRef, size_t index) :
index_(index),
sortedRef_(sortedRef) {}
@@ -295,7 +295,7 @@ public:
}
private:
- unsigned int index_;
+ size_t index_;
std::vector<GridView::RefIndex>& sortedRef_;
};
@@ -306,11 +306,9 @@ void GridView::setData(FolderComparison& newData)
sortedRef.clear();
folderCmp.swap(newData);
- unsigned int index = 0;
-
//fill sortedRef
for (FolderComparison::const_iterator j = folderCmp.begin(); j != folderCmp.end(); ++j)
- SerializeHierarchy(sortedRef, index++).execute(*j);
+ SerializeHierarchy(sortedRef, j - folderCmp.begin()).execute(*j);
}
diff --git a/ui/gridView.h b/ui/gridView.h
index 5310eb7e..53ca017b 100644
--- a/ui/gridView.h
+++ b/ui/gridView.h
@@ -118,10 +118,10 @@ private:
struct RefIndex
{
- RefIndex(unsigned int folderInd, HierarchyObject::ObjectID id) :
+ RefIndex(size_t folderInd, HierarchyObject::ObjectID id) :
folderIndex(folderInd),
objId(id) {}
- unsigned int folderIndex;
+ size_t folderIndex;
HierarchyObject::ObjectID objId;
};
diff --git a/ui/guiGenerated.cpp b/ui/guiGenerated.cpp
index 90929704..9b2f8145 100644
--- a/ui/guiGenerated.cpp
+++ b/ui/guiGenerated.cpp
@@ -456,12 +456,6 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
wxBoxSizer* bSizer23;
bSizer23 = new wxBoxSizer( wxVERTICAL );
- m_checkBoxActivateFilter = new wxCheckBox( m_panelFilter, wxID_ANY, _("Activate filter"), wxDefaultPosition, wxDefaultSize, 0 );
-
- m_checkBoxActivateFilter->SetToolTip( _("Enable filter to exclude files from synchronization") );
-
- bSizer23->Add( m_checkBoxActivateFilter, 0, wxBOTTOM, 5 );
-
m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") );
@@ -752,7 +746,6 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_choiceHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
m_choiceHistory->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_checkBoxActivateFilter->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnFilterButton ), NULL, this );
m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
m_bpButtonSyncDirOverwLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this );
@@ -813,7 +806,6 @@ MainDialogGenerated::~MainDialogGenerated()
m_choiceHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
m_choiceHistory->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_checkBoxActivateFilter->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnFilterButton ), NULL, this );
m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
m_bpButtonSyncDirOverwLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this );
@@ -1041,7 +1033,7 @@ BatchFolderPairGenerated::~BatchFolderPairGenerated()
BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetSizeHints( wxSize( 400,420 ), wxDefaultSize );
wxBoxSizer* bSizer54;
bSizer54 = new wxBoxSizer( wxVERTICAL );
@@ -1113,10 +1105,73 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
bSizer67 = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer120;
- bSizer120 = new wxBoxSizer( wxHORIZONTAL );
+ bSizer120 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer175;
+ bSizer175 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticBoxSizer* sbSizer241;
+ sbSizer241 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare") ), wxHORIZONTAL );
+
+ m_bpButtonCmpConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
+
+ m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
+
+ sbSizer241->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL, 3 );
+
+
+ sbSizer241->Add( 10, 0, 0, 0, 5 );
+
+ m_staticTextCmpVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCmpVariant->Wrap( -1 );
+ m_staticTextCmpVariant->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ sbSizer241->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer175->Add( sbSizer241, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer175->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer26;
+ sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL );
+
+ m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
+ sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 );
- wxBoxSizer* bSizer100;
- bSizer100 = new wxBoxSizer( wxVERTICAL );
+ bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer175->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer252;
+ sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL );
+
+ m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSyncVariant->Wrap( -1 );
+ m_staticTextSyncVariant->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ sbSizer252->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizer252->Add( 10, 0, 0, 0, 5 );
+
+ m_bpButtonSyncConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
+
+ m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
+
+ sbSizer252->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL, 3 );
+
+ bSizer175->Add( sbSizer252, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer120->Add( bSizer175, 0, wxEXPAND, 5 );
+
+
+ bSizer120->Add( 0, 5, 0, 0, 5 );
m_scrolledWindow6 = new wxScrolledWindow( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_scrolledWindow6->SetScrollRate( 5, 5 );
@@ -1234,67 +1289,16 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
m_scrolledWindow6->SetSizer( bSizer141 );
m_scrolledWindow6->Layout();
bSizer141->Fit( m_scrolledWindow6 );
- bSizer100->Add( m_scrolledWindow6, 0, wxEXPAND, 5 );
+ bSizer120->Add( m_scrolledWindow6, 0, wxEXPAND, 5 );
- bSizer100->Add( 0, 10, 0, 0, 5 );
+ bSizer120->Add( 0, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
wxFlexGridSizer* fgSizer15;
fgSizer15 = new wxFlexGridSizer( 2, 2, 10, 10 );
fgSizer15->SetFlexibleDirection( wxBOTH );
fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- wxStaticBoxSizer* sbSizer6;
- sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare by...") ), wxVERTICAL );
-
-
- sbSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_radioBtnSizeDate = new wxRadioButton( m_panelOverview, wxID_ANY, _("File size and date"), wxDefaultPosition, wxDefaultSize, 0 );
- m_radioBtnSizeDate->SetValue( true );
- m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\nare the same") );
-
- sbSizer6->Add( m_radioBtnSizeDate, 0, 0, 5 );
-
- m_radioBtnContent = new wxRadioButton( m_panelOverview, wxID_ANY, _("File content"), wxDefaultPosition, wxDefaultSize, 0 );
- m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
-
- sbSizer6->Add( m_radioBtnContent, 0, wxTOP, 5 );
-
-
- sbSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-
- fgSizer15->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer24;
- sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, wxEmptyString ), wxVERTICAL );
-
-
- sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_checkBoxAutomatic = new wxCheckBox( m_panelOverview, wxID_ANY, _("Automatic mode"), wxDefaultPosition, wxDefaultSize, 0 );
-
- m_checkBoxAutomatic->SetToolTip( _("Synchronize both sides using a database. Deletions are detected automatically") );
-
- sbSizer24->Add( m_checkBoxAutomatic, 0, wxALL, 5 );
-
- m_checkBoxFilter = new wxCheckBox( m_panelOverview, wxID_ANY, _("Activate filter"), wxDefaultPosition, wxDefaultSize, 0 );
-
- m_checkBoxFilter->SetToolTip( _("Enable filter to exclude files from synchronization") );
-
- sbSizer24->Add( m_checkBoxFilter, 0, wxALL, 5 );
-
- m_checkBoxSilent = new wxCheckBox( m_panelOverview, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 );
-
- m_checkBoxSilent->SetToolTip( _("Run minimized and write status information to a logfile") );
-
- sbSizer24->Add( m_checkBoxSilent, 0, wxALL, 5 );
-
-
- sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 );
-
- fgSizer15->Add( sbSizer24, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
wxStaticBoxSizer* sbSizer25;
sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Error handling") ), wxHORIZONTAL );
@@ -1305,236 +1309,31 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
fgSizer15->Add( sbSizer25, 0, wxEXPAND, 5 );
- wxStaticBoxSizer* sbSizer23;
- sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Deletion handling") ), wxVERTICAL );
-
- wxArrayString m_choiceHandleDeletionChoices;
- m_choiceHandleDeletion = new wxChoice( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 );
- m_choiceHandleDeletion->SetSelection( 0 );
- sbSizer23->Add( m_choiceHandleDeletion, 0, wxBOTTOM, 5 );
-
- m_panelCustomDeletionDir = new wxPanel( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1151;
- bSizer1151 = new wxBoxSizer( wxHORIZONTAL );
-
- m_textCtrlCustomDelFolder = new wxTextCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_textCtrlCustomDelFolder->SetMinSize( wxSize( 160,-1 ) );
-
- bSizer1151->Add( m_textCtrlCustomDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerCustomDelFolder = new wxDirPickerCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer1151->Add( m_dirPickerCustomDelFolder, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelCustomDeletionDir->SetSizer( bSizer1151 );
- m_panelCustomDeletionDir->Layout();
- bSizer1151->Fit( m_panelCustomDeletionDir );
- sbSizer23->Add( m_panelCustomDeletionDir, 0, 0, 5 );
-
- fgSizer15->Add( sbSizer23, 0, wxEXPAND, 5 );
-
- bSizer100->Add( fgSizer15, 0, 0, 5 );
-
- bSizer120->Add( bSizer100, 1, 0, 5 );
-
-
- bSizer120->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizerSyncDirections = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Configuration") ), wxVERTICAL );
-
- wxGridSizer* gSizer3;
- gSizer3 = new wxGridSizer( 1, 2, 0, 5 );
-
- m_staticText21 = new wxStaticText( m_panelOverview, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText21->Wrap( -1 );
- m_staticText21->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
-
- gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText31 = new wxStaticText( m_panelOverview, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText31->Wrap( -1 );
- m_staticText31->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
-
- gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizerSyncDirections->Add( gSizer3, 0, wxEXPAND, 5 );
-
- m_staticline3 = new wxStaticLine( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- sbSizerSyncDirections->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer121;
- bSizer121 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer122;
- bSizer122 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeftOnly = new wxStaticBitmap( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapLeftOnly->SetToolTip( _("Files/folders that exist on left side only") );
-
- bSizer122->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer122->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLeftOnly = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizer122->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizer122, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- wxBoxSizer* bSizer123;
- bSizer123 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapRightOnly = new wxStaticBitmap( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapRightOnly->SetToolTip( _("Files/folders that exist on right side only") );
-
- bSizer123->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer123->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonRightOnly = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizer123->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizer123, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- wxBoxSizer* bSizer124;
- bSizer124 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeftNewer = new wxStaticBitmap( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapLeftNewer->SetToolTip( _("Files that exist on both sides, left one is newer") );
-
- bSizer124->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer124->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonLeftNewer = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizer124->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizer124, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- wxBoxSizer* bSizer125;
- bSizer125 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapRightNewer = new wxStaticBitmap( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapRightNewer->SetToolTip( _("Files that exist on both sides, right one is newer") );
-
- bSizer125->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer125->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonRightNewer = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizer125->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizer125, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- wxBoxSizer* bSizer126;
- bSizer126 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapDifferent = new wxStaticBitmap( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapDifferent->SetToolTip( _("Files that exist on both sides and have different content") );
-
- bSizer126->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer126->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonDifferent = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizer126->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizer126, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ wxStaticBoxSizer* sbSizer24;
+ sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Status feedback") ), wxVERTICAL );
- wxBoxSizer* bSizer127;
- bSizer127 = new wxBoxSizer( wxHORIZONTAL );
- m_bitmapConflict = new wxStaticBitmap( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapConflict->SetToolTip( _("Conflicts/files that cannot be categorized") );
+ sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 );
- bSizer127->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_checkBoxSilent = new wxCheckBox( m_panelOverview, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxSilent->SetToolTip( _("Run minimized and write status information to a logfile") );
- bSizer127->Add( 5, 0, 0, 0, 5 );
+ sbSizer24->Add( m_checkBoxSilent, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 14 );
- m_bpButtonConflict = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizer127->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer121->Add( bSizer127, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 );
- sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+ fgSizer15->Add( sbSizer24, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
- bSizer120->Add( sbSizerSyncDirections, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer120->Add( fgSizer15, 0, 0, 5 );
- bSizer67->Add( bSizer120, 1, wxALL, 10 );
+ bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
m_panelOverview->SetSizer( bSizer67 );
m_panelOverview->Layout();
bSizer67->Fit( m_panelOverview );
m_notebookSettings->AddPage( m_panelOverview, _("Overview"), true );
- m_panelFilter = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer114;
- bSizer114 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer8;
- sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( m_panelFilter, wxID_ANY, wxEmptyString ), wxVERTICAL );
-
- wxFlexGridSizer* fgSizer3;
- fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 );
- fgSizer3->AddGrowableCol( 1 );
- fgSizer3->AddGrowableRow( 1 );
- fgSizer3->SetFlexibleDirection( wxBOTH );
- fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
-
- fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_staticText15 = new wxStaticText( m_panelFilter, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText15->Wrap( -1 );
- m_staticText15->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
-
- fgSizer3->Add( m_staticText15, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
-
- m_bitmap8 = new wxStaticBitmap( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
- m_bitmap8->SetToolTip( _("Include") );
-
- fgSizer3->Add( m_bitmap8, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_textCtrlInclude = new wxTextCtrl( m_panelFilter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- fgSizer3->Add( m_textCtrlInclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- sbSizer8->Add( fgSizer3, 1, wxEXPAND, 5 );
-
- wxFlexGridSizer* fgSizer4;
- fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
- fgSizer4->AddGrowableCol( 1 );
- fgSizer4->AddGrowableRow( 1 );
- fgSizer4->SetFlexibleDirection( wxBOTH );
- fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
-
- fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_staticText16 = new wxStaticText( m_panelFilter, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText16->Wrap( -1 );
- m_staticText16->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
-
- fgSizer4->Add( m_staticText16, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
-
- m_bitmap9 = new wxStaticBitmap( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
- m_bitmap9->SetToolTip( _("Exclude") );
-
- fgSizer4->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_textCtrlExclude = new wxTextCtrl( m_panelFilter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- fgSizer4->Add( m_textCtrlExclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- sbSizer8->Add( fgSizer4, 1, wxEXPAND, 5 );
-
- bSizer114->Add( sbSizer8, 1, wxALL|wxEXPAND, 10 );
-
- m_panelFilter->SetSizer( bSizer114 );
- m_panelFilter->Layout();
- bSizer114->Fit( m_panelFilter );
- m_notebookSettings->AddPage( m_panelFilter, _("Filter"), false );
m_panelLogging = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer117;
bSizer117 = new wxBoxSizer( wxVERTICAL );
@@ -1571,7 +1370,7 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
wxBoxSizer* bSizer68;
bSizer68 = new wxBoxSizer( wxHORIZONTAL );
- m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( 120,35 ), 0 );
+ m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 );
m_buttonSave->SetDefault();
m_buttonSave->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
@@ -1600,21 +1399,13 @@ BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
+ m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this );
+ m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this );
m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this );
m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this );
- m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this );
- m_checkBoxAutomatic->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckAutomatic ), NULL, this );
- m_checkBoxFilter->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckFilter ), NULL, this );
- m_checkBoxSilent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this );
m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeDeletionHandling ), NULL, this );
- m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExLeftSideOnly ), NULL, this );
- m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExRightSideOnly ), NULL, this );
- m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLeftNewer ), NULL, this );
- m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRightNewer ), NULL, this );
- m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnDifferent ), NULL, this );
- m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConflict ), NULL, this );
+ m_checkBoxSilent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this );
m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this );
m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
@@ -1625,21 +1416,13 @@ BatchDlgGenerated::~BatchDlgGenerated()
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
+ m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this );
+ m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this );
+ m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this );
m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this );
m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this );
- m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this );
- m_checkBoxAutomatic->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckAutomatic ), NULL, this );
- m_checkBoxFilter->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckFilter ), NULL, this );
- m_checkBoxSilent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this );
m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeDeletionHandling ), NULL, this );
- m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExLeftSideOnly ), NULL, this );
- m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExRightSideOnly ), NULL, this );
- m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLeftNewer ), NULL, this );
- m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRightNewer ), NULL, this );
- m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnDifferent ), NULL, this );
- m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConflict ), NULL, this );
+ m_checkBoxSilent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), NULL, this );
m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this );
m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
@@ -1652,116 +1435,125 @@ CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id,
bSizer42 = new wxBoxSizer( wxHORIZONTAL );
- wxStaticBoxSizer* sbSizer10;
- sbSizer10 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxHORIZONTAL );
+ wxBoxSizer* bSizer157;
+ bSizer157 = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizer118;
- bSizer118 = new wxBoxSizer( wxHORIZONTAL );
+ bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL );
- m_staticText321 = new wxStaticText( this, wxID_ANY, _("Files/folders found:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText321 = new wxStaticText( this, wxID_ANY, _("Elements found:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText321->Wrap( -1 );
m_staticText321->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Arial") ) );
- bSizer118->Add( m_staticText321, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 5 );
+ bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 );
m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextScanned->Wrap( -1 );
m_staticTextScanned->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
- bSizer118->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
- sbSizer10->Add( bSizer118, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer42->Add( sbSizer10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
+ bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
- sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comparing content") ), wxVERTICAL );
+ bSizer157->Add( bSizerFilesFound, 0, 0, 5 );
- wxFlexGridSizer* fgSizer12;
- fgSizer12 = new wxFlexGridSizer( 2, 4, 3, 5 );
- fgSizer12->SetFlexibleDirection( wxBOTH );
- fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL );
- m_staticText46 = new wxStaticText( this, wxID_ANY, _("Files remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText46 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText46->Wrap( -1 );
- m_staticText46->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Arial") ) );
+ m_staticText46->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Arial") ) );
- fgSizer12->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 );
+ bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 );
+
+ wxBoxSizer* bSizer154;
+ bSizer154 = new wxBoxSizer( wxHORIZONTAL );
m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextFilesRemaining->Wrap( -1 );
- m_staticTextFilesRemaining->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticTextFilesRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
- fgSizer12->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 );
+ bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 );
- m_staticText32 = new wxStaticText( this, wxID_ANY, _("Data remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText32->Wrap( -1 );
- m_staticText32->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Arial") ) );
+ m_staticText117 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText117->Wrap( -1 );
+ m_staticText117->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
- fgSizer12->Add( m_staticText32, 0, wxALIGN_BOTTOM, 5 );
+ bSizer154->Add( m_staticText117, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDataRemaining->Wrap( -1 );
- m_staticTextDataRemaining->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText118 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText118->Wrap( -1 );
+ m_staticText118->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
- fgSizer12->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 );
+ bSizer154->Add( m_staticText118, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+ bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 );
+
+ bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sSizerSpeed = new wxBoxSizer( wxHORIZONTAL );
m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText104->Wrap( -1 );
- m_staticText104->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Arial") ) );
+ m_staticText104->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Arial") ) );
- fgSizer12->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 );
+ sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 );
m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSpeed->Wrap( -1 );
- m_staticTextSpeed->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- fgSizer12->Add( m_staticTextSpeed, 0, wxALIGN_BOTTOM, 5 );
- m_staticText103 = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText103->Wrap( -1 );
- m_staticText103->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Arial") ) );
+ bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
- fgSizer12->Add( m_staticText103, 0, wxALIGN_BOTTOM, 5 );
+ sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeRemFixed->Wrap( -1 );
+ m_staticTextTimeRemFixed->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Arial") ) );
+
+ sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 );
m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTimeRemaining->Wrap( -1 );
- m_staticTextTimeRemaining->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
-
- fgSizer12->Add( m_staticTextTimeRemaining, 0, wxALIGN_BOTTOM, 5 );
+ m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
- sbSizer13->Add( fgSizer12, 1, wxEXPAND, 5 );
+ sSizerTimeRemaining->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
- bSizer42->Add( sbSizer13, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
- wxStaticBoxSizer* sbSizer131;
- sbSizer131 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxHORIZONTAL );
-
- wxBoxSizer* bSizer117;
- bSizer117 = new wxBoxSizer( wxHORIZONTAL );
+ sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL );
+ wxStaticText* m_staticText37;
m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText37->Wrap( -1 );
m_staticText37->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Arial") ) );
- bSizer117->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 );
+ sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 );
m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTimeElapsed->Wrap( -1 );
m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
- bSizer117->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
- sbSizer131->Add( bSizer117, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
- bSizer42->Add( sbSizer131, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+ bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 );
+ bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizer48;
bSizer48 = new wxBoxSizer( wxHORIZONTAL );
@@ -1941,7 +1733,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const
wxBoxSizer* bSizer291;
bSizer291 = new wxBoxSizer( wxHORIZONTAL );
- m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,35 ), 0 );
+ m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
m_buttonOK->SetDefault();
m_buttonOK->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
@@ -2055,7 +1847,7 @@ SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const
bSizer126 = new wxBoxSizer( wxHORIZONTAL );
m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapDifferent->SetToolTip( _("Files that exist on both sides and have different content") );
+ m_bitmapDifferent->SetToolTip( _("Files that have different content") );
bSizer126->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
@@ -2202,15 +1994,30 @@ CmpCfgDlgGenerated::CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id, const w
sbSizer6->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL, 2 );
+ bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 );
bSizer55->Add( 0, 4, 0, 0, 5 );
+ m_checkBoxIncludeSymlinks = new wxCheckBox( this, wxID_ANY, _("Include Symbolic Links"), wxDefaultPosition, wxDefaultSize, 0 );
+
+ bSizer55->Add( m_checkBoxIncludeSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer22;
+ bSizer22 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button10->SetDefault();
+ m_button10->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
+
+ bSizer22->Add( m_button10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
m_button6->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
- bSizer55->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer55->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
bSizer136->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
@@ -2225,6 +2032,8 @@ CmpCfgDlgGenerated::CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id, const w
m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
+ m_checkBoxIncludeSymlinks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnIncludeSymlinks ), NULL, this );
+ m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
}
@@ -2237,6 +2046,8 @@ CmpCfgDlgGenerated::~CmpCfgDlgGenerated()
m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
+ m_checkBoxIncludeSymlinks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnIncludeSymlinks ), NULL, this );
+ m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
}
@@ -2298,26 +2109,40 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id,
bSizer31 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText21 = new wxStaticText( this, wxID_ANY, _("Current operation:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText21->Wrap( -1 );
- m_staticText21->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+ bSizerSpeed = new wxBoxSizer( wxHORIZONTAL );
- bSizer31->Add( m_staticText21, 0, wxALIGN_BOTTOM, 5 );
+ m_staticText108 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText108->Wrap( -1 );
+ m_staticText108->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizerSpeed->Add( m_staticText108, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSpeed->Wrap( -1 );
+ m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ bSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ bSizer31->Add( bSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
- m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText55->Wrap( -1 );
- m_staticText55->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+ bSizerRemTime = new wxBoxSizer( wxHORIZONTAL );
- bSizer31->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 );
+ m_staticText21 = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText21->Wrap( -1 );
+ m_staticText21->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
- m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+ bSizerRemTime->Add( m_staticText21, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeRemaining->Wrap( -1 );
+ m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ bSizerRemTime->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
- bSizer31->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+ bSizer31->Add( bSizerRemTime, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
bSizer27->Add( bSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@@ -2336,7 +2161,7 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id,
bSizerObjectsRemaining = new wxBoxSizer( wxHORIZONTAL );
- m_staticText25 = new wxStaticText( this, wxID_ANY, _("Files/folders remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText25 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText25->Wrap( -1 );
m_staticText25->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
@@ -2348,11 +2173,29 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id,
bSizerObjectsRemaining->Add( m_staticTextRemainingObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+ m_staticText96 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText96->Wrap( -1 );
+ m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizerObjectsRemaining->Add( m_staticText96, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataRemaining->Wrap( -1 );
+ m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizerObjectsRemaining->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText97 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText97->Wrap( -1 );
+ m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizerObjectsRemaining->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 );
+
bSizer111->Add( bSizerObjectsRemaining, 0, 0, 5 );
bSizerObjectsProcessed = new wxBoxSizer( wxHORIZONTAL );
- m_staticText251 = new wxStaticText( this, wxID_ANY, _("Files/folders processed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText251 = new wxStaticText( this, wxID_ANY, _("Elements processed:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText251->Wrap( -1 );
m_staticText251->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
@@ -2364,23 +2207,25 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id,
bSizerObjectsProcessed->Add( m_staticTextProcessedObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
- bSizer111->Add( bSizerObjectsProcessed, 0, 0, 5 );
+ m_staticText98 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText98->Wrap( -1 );
+ m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Tahoma") ) );
- bSizerSpeed = new wxBoxSizer( wxHORIZONTAL );
+ bSizerObjectsProcessed->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
- m_staticText108 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText108->Wrap( -1 );
- m_staticText108->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticTextDataProcessed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataProcessed->Wrap( -1 );
+ m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Tahoma") ) );
- bSizerSpeed->Add( m_staticText108, 0, wxALIGN_BOTTOM, 5 );
+ bSizerObjectsProcessed->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 );
- m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSpeed->Wrap( -1 );
- m_staticTextSpeed->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticText99 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText99->Wrap( -1 );
+ m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Tahoma") ) );
- bSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+ bSizerObjectsProcessed->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 );
- bSizer111->Add( bSizerSpeed, 0, wxTOP, 5 );
+ bSizer111->Add( bSizerObjectsProcessed, 0, 0, 5 );
bSizer28->Add( bSizer111, 0, wxALIGN_CENTER_VERTICAL, 5 );
@@ -2408,55 +2253,19 @@ SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id,
bSizer28->Add( 0, 0, 1, 0, 5 );
wxBoxSizer* bSizer114;
- bSizer114 = new wxBoxSizer( wxVERTICAL );
-
- bSizerDataRemaining = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText26 = new wxStaticText( this, wxID_ANY, _("Data remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText26->Wrap( -1 );
- m_staticText26->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
-
- bSizerDataRemaining->Add( m_staticText26, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataRemaining->Wrap( -1 );
- m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- bSizerDataRemaining->Add( m_staticTextDataRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- bSizer114->Add( bSizerDataRemaining, 0, wxALIGN_RIGHT, 5 );
-
- bSizerDataProcessed = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText261 = new wxStaticText( this, wxID_ANY, _("Data transferred:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText261->Wrap( -1 );
- m_staticText261->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
-
- bSizerDataProcessed->Add( m_staticText261, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataProcessed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataProcessed->Wrap( -1 );
- m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- bSizerDataProcessed->Add( m_staticTextDataProcessed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- bSizer114->Add( bSizerDataProcessed, 0, wxALIGN_RIGHT, 5 );
-
- bSizerRemTime = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText106 = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText106->Wrap( -1 );
- m_staticText106->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ bSizer114 = new wxBoxSizer( wxHORIZONTAL );
- bSizerRemTime->Add( m_staticText106, 0, wxALIGN_BOTTOM, 5 );
+ m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText55->Wrap( -1 );
+ m_staticText55->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
- m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeRemaining->Wrap( -1 );
- m_staticTextTimeRemaining->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ bSizer114->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 );
- bSizerRemTime->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+ m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
- bSizer114->Add( bSizerRemTime, 0, wxALIGN_RIGHT|wxTOP, 5 );
+ bSizer114->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
bSizer28->Add( bSizer114, 0, wxALIGN_CENTER_VERTICAL, 5 );
@@ -2986,6 +2795,11 @@ WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const
bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+ m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonSwitch->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 );
m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
@@ -3002,6 +2816,7 @@ WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) );
m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this );
+ m_buttonSwitch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this );
m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this );
}
@@ -3010,6 +2825,7 @@ WarningDlgGenerated::~WarningDlgGenerated()
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) );
m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this );
+ m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this );
m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this );
}
@@ -3286,13 +3102,6 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w
bSizer69->Fit( m_panel13 );
bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 );
- m_staticTextFilteringInactive = new wxStaticText( this, wxID_ANY, _("Filtering is deactivated"), wxDefaultPosition, wxDefaultSize, 0|wxRAISED_BORDER );
- m_staticTextFilteringInactive->Wrap( -1 );
- m_staticTextFilteringInactive->SetFont( wxFont( 12, 74, 90, 92, false, wxT("Arial Black") ) );
- m_staticTextFilteringInactive->SetForegroundColour( wxColour( 255, 0, 0 ) );
-
- bSizer21->Add( m_staticTextFilteringInactive, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
wxStaticBoxSizer* sbSizer8;
sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
@@ -3482,7 +3291,7 @@ CustomizeColsDlgGenerated::~CustomizeColsDlgGenerated()
GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize );
wxBoxSizer* bSizer95;
bSizer95 = new wxBoxSizer( wxVERTICAL );
@@ -3521,45 +3330,17 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind
wxStaticBoxSizer* sbSizer23;
sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
- wxBoxSizer* bSizer120;
- bSizer120 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText114 = new wxStaticText( this, wxID_ANY, _("Ignore 1-hour file time difference"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText114->Wrap( -1 );
- m_staticText114->SetToolTip( _("Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes") );
-
- bSizer120->Add( m_staticText114, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer120->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_checkBoxIgnoreOneHour = new wxCheckBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxIgnoreOneHour = new wxCheckBox( this, wxID_ANY, _("Ignore 1-hour file time difference"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxIgnoreOneHour->SetToolTip( _("Treat file times that differ by exactly +/- 1 hour as equal, less than 1 hour as conflict in order to handle Daylight Saving Time changes") );
- bSizer120->Add( m_checkBoxIgnoreOneHour, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizer23->Add( bSizer120, 0, wxEXPAND, 5 );
+ sbSizer23->Add( m_checkBoxIgnoreOneHour, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- wxBoxSizer* bSizer1201;
- bSizer1201 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCopyLocked->Wrap( -1 );
- m_staticTextCopyLocked->SetToolTip( _("Copy shared or locked files using Volume Shadow Copy Service") );
-
- bSizer1201->Add( m_staticTextCopyLocked, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer1201->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using Volume Shadow Copy Service") );
- bSizer1201->Add( m_checkBoxCopyLocked, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizer23->Add( bSizer1201, 0, wxEXPAND, 5 );
+ sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
sbSizer23->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
@@ -3580,9 +3361,9 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind
bSizer101->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- sbSizer23->Add( bSizer101, 1, wxEXPAND, 5 );
+ sbSizer23->Add( bSizer101, 0, wxEXPAND, 5 );
- bSizer95->Add( sbSizer23, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+ bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizer95->Add( 0, 10, 0, 0, 5 );
@@ -3591,7 +3372,7 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind
sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("External applications") ), wxHORIZONTAL );
- sbSizer26->Add( 0, 0, 1, wxEXPAND, 5 );
+ sbSizer26->Add( 5, 0, 0, 0, 5 );
m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
@@ -3621,7 +3402,7 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind
// Cell Defaults
m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
- sbSizer26->Add( m_gridCustomCommand, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+ sbSizer26->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
wxBoxSizer* bSizer157;
bSizer157 = new wxBoxSizer( wxVERTICAL );
@@ -3635,9 +3416,9 @@ GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWind
sbSizer26->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- sbSizer26->Add( 0, 0, 1, wxEXPAND, 5 );
+ sbSizer26->Add( 5, 0, 0, 0, 5 );
- bSizer95->Add( sbSizer26, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+ bSizer95->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizer97;
bSizer97 = new wxBoxSizer( wxHORIZONTAL );
diff --git a/ui/guiGenerated.h b/ui/guiGenerated.h
index 2c5659b5..32e0c2a4 100644
--- a/ui/guiGenerated.h
+++ b/ui/guiGenerated.h
@@ -43,9 +43,9 @@ class wxButtonWithImage;
#include <wx/textctrl.h>
#include <wx/statline.h>
#include <wx/frame.h>
-#include <wx/radiobut.h>
#include <wx/dialog.h>
#include <wx/gauge.h>
+#include <wx/radiobut.h>
#include <wx/animate.h>
#include <wx/treectrl.h>
#include <wx/hyperlink.h>
@@ -116,7 +116,6 @@ class MainDialogGenerated : public wxFrame
wxChoice* m_choiceHistory;
wxPanel* m_panelFilter;
wxBitmapButton* m_bpButtonFilter;
- wxCheckBox* m_checkBoxActivateFilter;
wxCheckBox* m_checkBoxHideFilt;
wxPanel* m_panel112;
@@ -195,7 +194,6 @@ class MainDialogGenerated : public wxFrame
virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ){ event.Skip(); }
virtual void OnLoadFromHistory( wxCommandEvent& event ){ event.Skip(); }
virtual void OnConfigureFilter( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnFilterButton( wxCommandEvent& event ){ event.Skip(); }
virtual void OnHideFilteredButton( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSyncCreateLeft( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSyncDirLeft( wxCommandEvent& event ){ event.Skip(); }
@@ -226,7 +224,7 @@ class MainDialogGenerated : public wxFrame
wxDirPickerCtrl* m_dirPickerRight;
wxPanel* m_panelLeft;
wxPanel* m_panelRight;
- MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FreeFileSync - Folder Comparison and Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+ MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
~MainDialogGenerated();
};
@@ -309,58 +307,26 @@ class BatchDlgGenerated : public wxDialog
wxStaticText* m_staticText531;
wxNotebook* m_notebookSettings;
wxPanel* m_panelOverview;
+ wxBitmapButton* m_bpButtonCmpConfig;
+
+ wxStaticText* m_staticTextCmpVariant;
+
+ wxBitmapButton* m_bpButtonFilter;
+
+ wxStaticText* m_staticTextSyncVariant;
+
+ wxBitmapButton* m_bpButtonSyncConfig;
+
wxBoxSizer* sbSizerMainPair;
wxPanel* m_panelMainPair;
wxStaticText* m_staticText532;
wxStaticText* m_staticText5411;
wxBoxSizer* bSizerAddFolderPairs;
-
- wxRadioButton* m_radioBtnSizeDate;
- wxRadioButton* m_radioBtnContent;
-
-
- wxCheckBox* m_checkBoxAutomatic;
- wxCheckBox* m_checkBoxFilter;
- wxCheckBox* m_checkBoxSilent;
-
wxChoice* m_choiceHandleError;
- wxChoice* m_choiceHandleDeletion;
- wxPanel* m_panelCustomDeletionDir;
- wxTextCtrl* m_textCtrlCustomDelFolder;
- wxDirPickerCtrl* m_dirPickerCustomDelFolder;
-
- wxStaticBoxSizer* sbSizerSyncDirections;
- wxStaticText* m_staticText21;
- wxStaticText* m_staticText31;
- wxStaticLine* m_staticline3;
- wxStaticBitmap* m_bitmapLeftOnly;
-
- wxBitmapButton* m_bpButtonLeftOnly;
- wxStaticBitmap* m_bitmapRightOnly;
-
- wxBitmapButton* m_bpButtonRightOnly;
- wxStaticBitmap* m_bitmapLeftNewer;
-
- wxBitmapButton* m_bpButtonLeftNewer;
- wxStaticBitmap* m_bitmapRightNewer;
-
- wxBitmapButton* m_bpButtonRightNewer;
- wxStaticBitmap* m_bitmapDifferent;
-
- wxBitmapButton* m_bpButtonDifferent;
- wxStaticBitmap* m_bitmapConflict;
-
- wxBitmapButton* m_bpButtonConflict;
- wxPanel* m_panelFilter;
- wxStaticText* m_staticText15;
- wxStaticBitmap* m_bitmap8;
- wxTextCtrl* m_textCtrlInclude;
+ wxCheckBox* m_checkBoxSilent;
- wxStaticText* m_staticText16;
- wxStaticBitmap* m_bitmap9;
- wxTextCtrl* m_textCtrlExclude;
wxPanel* m_panelLogging;
wxStaticText* m_staticText120;
wxTextCtrl* m_textCtrlLogfileDir;
@@ -372,20 +338,13 @@ class BatchDlgGenerated : public wxDialog
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
virtual void OnHelp( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnCmpSettings( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnConfigureFilter( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnSyncSettings( wxCommandEvent& event ){ event.Skip(); }
virtual void OnAddFolderPair( wxCommandEvent& event ){ event.Skip(); }
virtual void OnRemoveTopFolderPair( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnChangeCompareVar( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnCheckAutomatic( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnCheckFilter( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnCheckSilent( wxCommandEvent& event ){ event.Skip(); }
virtual void OnChangeErrorHandling( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnChangeDeletionHandling( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnExLeftSideOnly( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnExRightSideOnly( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnLeftNewer( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnRightNewer( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnDifferent( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnConflict( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnCheckSilent( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSaveBatchJob( wxCommandEvent& event ){ event.Skip(); }
virtual void OnLoadBatchJob( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); }
@@ -417,20 +376,25 @@ class CompareStatusGenerated : public wxPanel
protected:
wxBoxSizer* bSizer42;
+ wxBoxSizer* bSizerFilesFound;
wxStaticText* m_staticText321;
wxStaticText* m_staticTextScanned;
-
- wxStaticBoxSizer* sbSizer13;
+ wxBoxSizer* bSizerFilesRemaining;
wxStaticText* m_staticText46;
wxStaticText* m_staticTextFilesRemaining;
- wxStaticText* m_staticText32;
+ wxStaticText* m_staticText117;
wxStaticText* m_staticTextDataRemaining;
+ wxStaticText* m_staticText118;
+
+ wxBoxSizer* sSizerSpeed;
wxStaticText* m_staticText104;
wxStaticText* m_staticTextSpeed;
- wxStaticText* m_staticText103;
+
+ wxBoxSizer* sSizerTimeRemaining;
+ wxStaticText* m_staticTextTimeRemFixed;
wxStaticText* m_staticTextTimeRemaining;
- wxStaticText* m_staticText37;
+ wxBoxSizer* sSizerTimeElapsed;
wxStaticText* m_staticTextTimeElapsed;
wxStaticText* m_staticText30;
wxTextCtrl* m_textCtrlStatus;
@@ -542,6 +506,8 @@ class CmpCfgDlgGenerated : public wxDialog
wxStaticLine* m_staticline14;
wxBitmapButton* m_bpButtonHelp;
+ wxCheckBox* m_checkBoxIncludeSymlinks;
+ wxButton* m_button10;
wxButton* m_button6;
// Virtual event handlers, overide them in your derived class
@@ -549,6 +515,8 @@ class CmpCfgDlgGenerated : public wxDialog
virtual void OnTimeSize( wxCommandEvent& event ){ event.Skip(); }
virtual void OnContent( wxCommandEvent& event ){ event.Skip(); }
virtual void OnShowHelp( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnIncludeSymlinks( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); }
@@ -575,35 +543,34 @@ class SyncStatusDlgGenerated : public wxFrame
wxStaticText* m_staticTextStatus;
wxBoxSizer* bSizer31;
- wxStaticText* m_staticText21;
+ wxBoxSizer* bSizerSpeed;
+ wxStaticText* m_staticText108;
+ wxStaticText* m_staticTextSpeed;
- wxStaticText* m_staticText55;
- wxStaticText* m_staticTextTimeElapsed;
+ wxBoxSizer* bSizerRemTime;
+ wxStaticText* m_staticText21;
+ wxStaticText* m_staticTextTimeRemaining;
wxTextCtrl* m_textCtrlInfo;
wxBoxSizer* bSizer28;
wxBoxSizer* bSizerObjectsRemaining;
wxStaticText* m_staticText25;
wxStaticText* m_staticTextRemainingObj;
+ wxStaticText* m_staticText96;
+ wxStaticText* m_staticTextDataRemaining;
+ wxStaticText* m_staticText97;
wxBoxSizer* bSizerObjectsProcessed;
wxStaticText* m_staticText251;
wxStaticText* m_staticTextProcessedObj;
- wxBoxSizer* bSizerSpeed;
- wxStaticText* m_staticText108;
- wxStaticText* m_staticTextSpeed;
+ wxStaticText* m_staticText98;
+ wxStaticText* m_staticTextDataProcessed;
+ wxStaticText* m_staticText99;
wxButton* m_buttonOK;
wxButton* m_buttonPause;
wxButton* m_buttonAbort;
- wxBoxSizer* bSizerDataRemaining;
- wxStaticText* m_staticText26;
- wxStaticText* m_staticTextDataRemaining;
- wxBoxSizer* bSizerDataProcessed;
- wxStaticText* m_staticText261;
- wxStaticText* m_staticTextDataProcessed;
- wxBoxSizer* bSizerRemTime;
- wxStaticText* m_staticText106;
- wxStaticText* m_staticTextTimeRemaining;
+ wxStaticText* m_staticText55;
+ wxStaticText* m_staticTextTimeElapsed;
// Virtual event handlers, overide them in your derived class
@@ -768,12 +735,14 @@ class WarningDlgGenerated : public wxDialog
wxCheckBox* m_checkBoxDontShowAgain;
wxButton* m_buttonIgnore;
+ wxButton* m_buttonSwitch;
wxButton* m_buttonAbort;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
virtual void OnIgnore( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnSwitch( wxCommandEvent& event ){ event.Skip(); }
virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); }
@@ -872,7 +841,6 @@ class FilterDlgGenerated : public wxDialog
wxStaticText* m_staticText85;
wxStaticText* m_staticText181;
wxStaticText* m_staticText1811;
- wxStaticText* m_staticTextFilteringInactive;
wxStaticText* m_staticText15;
wxStaticBitmap* m_bitmap8;
@@ -945,11 +913,7 @@ class GlobalSettingsDlgGenerated : public wxDialog
wxPanel* m_panel8;
wxStaticText* m_staticText56;
- wxStaticText* m_staticText114;
-
wxCheckBox* m_checkBoxIgnoreOneHour;
- wxStaticText* m_staticTextCopyLocked;
-
wxCheckBox* m_checkBoxCopyLocked;
wxStaticLine* m_staticline10;
wxStaticText* m_staticText100;
@@ -977,7 +941,7 @@ class GlobalSettingsDlgGenerated : public wxDialog
public:
- GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~GlobalSettingsDlgGenerated();
};
diff --git a/ui/guiStatusHandler.cpp b/ui/guiStatusHandler.cpp
index 19eccb1c..0cd32383 100644
--- a/ui/guiStatusHandler.cpp
+++ b/ui/guiStatusHandler.cpp
@@ -28,7 +28,7 @@ CompareStatusHandler::CompareStatusHandler(MainDialog* dlg) :
mainDialog->disableAllElements();
//display status panel during compare
- mainDialog->compareStatus.init(); //clear old values and make visible
+ mainDialog->compareStatus->init(); //clear old values and make visible
mainDialog->bSizer1->Layout(); //both sizers need to recalculate!
mainDialog->bSizer6->Layout(); //adapt layout for wxBitmapWithImage
@@ -37,7 +37,7 @@ CompareStatusHandler::CompareStatusHandler(MainDialog* dlg) :
//register abort button
mainDialog->m_buttonAbort->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompareStatusHandler::OnAbortCompare ), NULL, this);
- //register key event
+ //register key event
mainDialog->Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(CompareStatusHandler::OnKeyPressed), NULL, this);
}
@@ -53,13 +53,13 @@ CompareStatusHandler::~CompareStatusHandler()
mainDialog->pushStatusInformation(_("Operation aborted!"));
//hide status panel from main window
- mainDialog->compareStatus.finalize();
+ mainDialog->compareStatus->finalize();
mainDialog->bSizer6->Layout(); //adapt layout for wxBitmapWithImage
mainDialog->Layout();
mainDialog->Refresh();
- //register key event
+ //register key event
mainDialog->Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(CompareStatusHandler::OnKeyPressed), NULL, this);
//de-register abort button
mainDialog->m_buttonAbort->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompareStatusHandler::OnAbortCompare ), NULL, this);
@@ -70,10 +70,10 @@ void CompareStatusHandler::OnKeyPressed(wxKeyEvent& event)
{
const int keyCode = event.GetKeyCode();
if (keyCode == WXK_ESCAPE)
- {
- wxCommandEvent dummy;
- OnAbortCompare(dummy);
- }
+ {
+ wxCommandEvent dummy;
+ OnAbortCompare(dummy);
+ }
event.Skip();
}
@@ -81,7 +81,7 @@ void CompareStatusHandler::OnKeyPressed(wxKeyEvent& event)
void CompareStatusHandler::updateStatusText(const Zstring& text)
{
- mainDialog->compareStatus.setStatusText_NoUpdate(text);
+ mainDialog->compareStatus->setStatusText_NoUpdate(text);
}
@@ -94,7 +94,7 @@ void CompareStatusHandler::initNewProcess(int objectsTotal, wxLongLong dataTotal
case StatusHandler::PROCESS_SCANNING:
break;
case StatusHandler::PROCESS_COMPARING_CONTENT:
- mainDialog->compareStatus.switchToCompareBytewise(objectsTotal, dataTotal);
+ mainDialog->compareStatus->switchToCompareBytewise(objectsTotal, dataTotal);
mainDialog->Layout();
break;
case StatusHandler::PROCESS_SYNCHRONIZING:
@@ -111,10 +111,10 @@ void CompareStatusHandler::updateProcessedData(int objectsProcessed, wxLongLong
switch (currentProcess)
{
case StatusHandler::PROCESS_SCANNING:
- mainDialog->compareStatus.incScannedObjects_NoUpdate(objectsProcessed);
+ mainDialog->compareStatus->incScannedObjects_NoUpdate(objectsProcessed);
break;
case StatusHandler::PROCESS_COMPARING_CONTENT:
- mainDialog->compareStatus.incProcessedCmpData_NoUpdate(objectsProcessed, dataProcessed);
+ mainDialog->compareStatus->incProcessedCmpData_NoUpdate(objectsProcessed, dataProcessed);
break;
case StatusHandler::PROCESS_SYNCHRONIZING:
case StatusHandler::PROCESS_NONE:
@@ -129,13 +129,12 @@ ErrorHandler::Response CompareStatusHandler::reportError(const wxString& message
if (ignoreErrors)
return ErrorHandler::IGNORE_ERROR;
- mainDialog->compareStatus.updateStatusPanelNow();
+ mainDialog->compareStatus->updateStatusPanelNow();
bool ignoreNextErrors = false;
- const wxString errorMessage = message + wxT("\n\n\n") + _("Ignore this error, retry or abort?");
ErrorDlg errorDlg(NULL,
ErrorDlg::BUTTON_IGNORE | ErrorDlg::BUTTON_RETRY | ErrorDlg::BUTTON_ABORT,
- errorMessage, ignoreNextErrors);
+ message, ignoreNextErrors);
errorDlg.Raise();
switch (static_cast<ErrorDlg::ReturnCodes>(errorDlg.ShowModal()))
{
@@ -157,7 +156,7 @@ ErrorHandler::Response CompareStatusHandler::reportError(const wxString& message
void CompareStatusHandler::reportFatalError(const wxString& errorMessage)
{
- mainDialog->compareStatus.updateStatusPanelNow();
+ mainDialog->compareStatus->updateStatusPanelNow();
bool dummy = false;
ErrorDlg errorDlg(NULL,
@@ -174,7 +173,7 @@ void CompareStatusHandler::reportWarning(const wxString& warningMessage, bool& w
if (!warningActive || ignoreErrors) //if errors are ignored, then warnings should also
return;
- mainDialog->compareStatus.updateStatusPanelNow();
+ mainDialog->compareStatus->updateStatusPanelNow();
//show popup and ask user how to handle warning
bool dontWarnAgain = false;
@@ -185,13 +184,15 @@ void CompareStatusHandler::reportWarning(const wxString& warningMessage, bool& w
warningDlg.Raise();
switch (static_cast<WarningDlg::Response>(warningDlg.ShowModal()))
{
- case WarningDlg::BUTTON_ABORT:
- abortThisProcess();
- break;
-
case WarningDlg::BUTTON_IGNORE:
warningActive = !dontWarnAgain;
break;
+
+ case WarningDlg::BUTTON_SWITCH:
+ assert(false);
+ case WarningDlg::BUTTON_ABORT:
+ abortThisProcess();
+ break;
}
}
@@ -199,7 +200,7 @@ void CompareStatusHandler::reportWarning(const wxString& warningMessage, bool& w
inline
void CompareStatusHandler::forceUiRefresh()
{
- mainDialog->compareStatus.updateStatusPanelNow();
+ mainDialog->compareStatus->updateStatusPanelNow();
}
@@ -305,7 +306,7 @@ ErrorHandler::Response SyncStatusHandler::reportError(const wxString& errorMessa
bool ignoreNextErrors = false;
ErrorDlg errorDlg(NULL,
ErrorDlg::BUTTON_IGNORE | ErrorDlg::BUTTON_RETRY | ErrorDlg::BUTTON_ABORT,
- errorMessage + wxT("\n\n\n") + _("Ignore this error, retry or abort synchronization?"),
+ errorMessage,
ignoreNextErrors);
errorDlg.Raise();
const ErrorDlg::ReturnCodes rv = static_cast<ErrorDlg::ReturnCodes>(errorDlg.ShowModal());
@@ -361,6 +362,8 @@ void SyncStatusHandler::reportWarning(const wxString& warningMessage, bool& warn
warningActive = !dontWarnAgain;
return;
+ case WarningDlg::BUTTON_SWITCH:
+ assert(false);
case WarningDlg::BUTTON_ABORT:
abortThisProcess();
return;
diff --git a/ui/guiStatusHandler.h b/ui/guiStatusHandler.h
index 3dab9a85..add3ffaa 100644
--- a/ui/guiStatusHandler.h
+++ b/ui/guiStatusHandler.h
@@ -35,7 +35,7 @@ public:
virtual void reportWarning(const wxString& warningMessage, bool& warningActive);
private:
-void OnKeyPressed(wxKeyEvent& event);
+ void OnKeyPressed(wxKeyEvent& event);
void OnAbortCompare(wxCommandEvent& event); //handle abort button click
virtual void abortThisProcess();
diff --git a/ui/isNullFilter.h b/ui/isNullFilter.h
new file mode 100644
index 00000000..f68bc65d
--- /dev/null
+++ b/ui/isNullFilter.h
@@ -0,0 +1,24 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef ISNULLFILTER_H_INCLUDED
+#define ISNULLFILTER_H_INCLUDED
+
+#include "../structures.h"
+#include "../library/filter.h"
+
+namespace FreeFileSync
+{
+
+inline
+bool isNullFilter(const FilterConfig& filterCfg)
+{
+ return NameFilter(filterCfg.includeFilter, filterCfg.excludeFilter).isNull();
+}
+
+}
+
+#endif // ISNULLFILTER_H_INCLUDED
diff --git a/ui/messagePopup.cpp b/ui/messagePopup.cpp
index fe051eed..771df4f3 100644
--- a/ui/messagePopup.cpp
+++ b/ui/messagePopup.cpp
@@ -81,6 +81,9 @@ WarningDlg::WarningDlg(wxWindow* parentWindow, int activeButtons, const wxStrin
m_checkBoxDontShowAgain->Hide();
}
+ if (~activeButtons & BUTTON_SWITCH)
+ m_buttonSwitch->Hide();
+
if (~activeButtons & BUTTON_ABORT)
m_buttonAbort->Hide();
@@ -91,8 +94,6 @@ WarningDlg::WarningDlg(wxWindow* parentWindow, int activeButtons, const wxStrin
m_buttonAbort->SetFocus();
}
-WarningDlg::~WarningDlg() {}
-
void WarningDlg::OnClose(wxCloseEvent& event)
{
@@ -108,6 +109,13 @@ void WarningDlg::OnIgnore(wxCommandEvent& event)
}
+void WarningDlg::OnSwitch(wxCommandEvent& event)
+{
+ dontShowAgain = m_checkBoxDontShowAgain->GetValue();
+ EndModal(BUTTON_SWITCH);
+}
+
+
void WarningDlg::OnAbort(wxCommandEvent& event)
{
dontShowAgain = m_checkBoxDontShowAgain->GetValue();
diff --git a/ui/messagePopup.h b/ui/messagePopup.h
index e1fa58fb..d41594b5 100644
--- a/ui/messagePopup.h
+++ b/ui/messagePopup.h
@@ -36,21 +36,19 @@ class WarningDlg : public WarningDlgGenerated
{
public:
WarningDlg(wxWindow* parentWindow, int activeButtons, const wxString messageText, bool& dontShowAgain);
- ~WarningDlg();
enum Response
{
BUTTON_IGNORE = 1,
- BUTTON_ABORT = 2
+ BUTTON_SWITCH = 2,
+ BUTTON_ABORT = 4
};
private:
void OnClose(wxCloseEvent& event);
void OnIgnore(wxCommandEvent& event);
- void OnResolve(wxCommandEvent& event);
+ void OnSwitch(wxCommandEvent& event);
void OnAbort(wxCommandEvent& event);
- void OnOkay(wxCommandEvent& event);
-
bool& dontShowAgain;
};
diff --git a/ui/progressIndicator.cpp b/ui/progressIndicator.cpp
index e2680b0e..09af2f6f 100644
--- a/ui/progressIndicator.cpp
+++ b/ui/progressIndicator.cpp
@@ -184,7 +184,11 @@ void CompareStatus::CompareStatusImpl::init()
m_gauge2->SetValue(0);
//initially hide status that's relevant for comparing bytewise only
- bSizer42->Hide(sbSizer13);
+ bSizerFilesFound->Show(true);
+ bSizerFilesRemaining->Show(false);
+ sSizerSpeed->Show(false);
+ sSizerTimeRemaining->Show(false);
+
m_gauge2->Hide();
bSizer42->Layout();
@@ -239,7 +243,11 @@ void CompareStatus::CompareStatusImpl::switchToCompareBytewise(int totalObjectsT
lastStatCallRemTime = -1000000;
//show status for comparing bytewise
- bSizer42->Show(sbSizer13);
+ bSizerFilesFound->Show(false);
+ bSizerFilesRemaining->Show(true);
+ sSizerSpeed->Show(true);
+ sSizerTimeRemaining->Show(true);
+
m_gauge2->Show();
bSizer42->Layout();
}
@@ -502,7 +510,7 @@ void SyncStatus::processHasFinished(SyncStatusID id, const wxString& finalMessag
SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWindow* parentWindow) :
SyncStatusDlgGenerated(parentWindow,
wxID_ANY,
- parentWindow ? wxEmptyString : _("FreeFileSync - Folder Comparison and Synchronization"),
+ parentWindow ? wxString(wxEmptyString) : (wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization")),
wxDefaultPosition, wxSize(638, 376),
parentWindow ?
wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT : //wxTAB_TRAVERSAL is needed for standard button handling: wxID_OK/wxID_CANCEL
@@ -551,7 +559,7 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWin
//hide "processed" statistics until end of process
bSizerObjectsProcessed->Show(false);
- bSizerDataProcessed->Show(false);
+ //bSizerDataProcessed->Show(false);
SetIcon(*GlobalResources::getInstance().programIcon); //set application icon
@@ -865,13 +873,13 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id,
totalData == currentData)
{
bSizerObjectsRemaining->Show(false);
- bSizerDataRemaining ->Show(false);
+ //bSizerDataRemaining ->Show(false);
//show processed statistics at the end (but only if there was some work to be done)
if (totalObjects != 0 || totalData != 0)
{
bSizerObjectsProcessed->Show(true);
- bSizerDataProcessed ->Show(true);
+ //bSizerDataProcessed ->Show(true);
m_staticTextProcessedObj->SetLabel(numberToWxString(currentObjects, true));
m_staticTextDataProcessed->SetLabel(FreeFileSync::formatFilesizeToShortString(currentData));
diff --git a/ui/search.cpp b/ui/search.cpp
index 418ef2ac..367d6502 100644
--- a/ui/search.cpp
+++ b/ui/search.cpp
@@ -8,6 +8,7 @@
#include "guiGenerated.h"
#include <wx/msgdlg.h>
#include <wx/utils.h>
+#include <utility>
class SearchDlg : public SearchDialogGenerated
diff --git a/ui/settingsDialog.cpp b/ui/settingsDialog.cpp
deleted file mode 100644
index 5199b987..00000000
--- a/ui/settingsDialog.cpp
+++ /dev/null
@@ -1,1389 +0,0 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
-// **************************************************************************
-//
-#include "settingsDialog.h"
-#include "../shared/systemConstants.h"
-#include "../library/resources.h"
-#include <wx/msgdlg.h>
-#include "../shared/customButton.h"
-#include "../synchronization.h"
-#include "../shared/stringConv.h"
-#include "../shared/util.h"
-#include <wx/dnd.h>
-#include "../shared/dragAndDrop.h"
-#include "../shared/fileHandling.h"
-#include "../shared/xmlBase.h"
-#include <wx/wupdlock.h>
-#include "folderPair.h"
-#include "messagePopup.h"
-#include "../shared/helpProvider.h"
-
-using namespace FreeFileSync;
-
-
-SyncCfgDialog::SyncCfgDialog(wxWindow* window,
- const CompareVariant compareVar,
- SyncConfiguration& syncConfiguration,
- DeletionPolicy& handleDeletion,
- wxString& customDeletionDirectory,
- bool* ignoreErrors) :
- SyncCfgDlgGenerated(window),
- cmpVariant(compareVar),
- currentSyncConfig(syncConfiguration), //make working copy of syncConfiguration
- refSyncConfiguration(syncConfiguration),
- refHandleDeletion(handleDeletion),
- refCustomDeletionDirectory(customDeletionDirectory),
- refIgnoreErrors(ignoreErrors),
- dragDropCustomDelFolder(new DragDropOnDlg(m_panelCustomDeletionDir, m_dirPickerCustomDelFolder, m_textCtrlCustomDelFolder))
-{
- setDeletionHandling(handleDeletion);
- m_textCtrlCustomDelFolder->SetValue(customDeletionDirectory);
-
- //error handling
- if (ignoreErrors)
- setErrorHandling(*ignoreErrors);
- else
- {
- sbSizerErrorHandling->Show(false);
- Layout();
- }
-
- //set sync config icons
- updateConfigIcons(cmpVariant, currentSyncConfig);
-
- //set icons for this dialog
- m_bitmapLeftOnly->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("leftOnly")));
- m_bitmapRightOnly->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("rightOnly")));
- m_bitmapLeftNewer->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("leftNewer")));
- m_bitmapRightNewer->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("rightNewer")));
- m_bitmapDifferent->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("different")));
- m_bitmapConflict->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("conflictGrey")));
-
- bSizer201->Layout(); //wxButtonWithImage size might have changed
-
- m_buttonOK->SetFocus();
-
- Fit();
-}
-
-//#################################################################################################################
-
-SyncCfgDialog::~SyncCfgDialog() {} //non-inline destructor for std::auto_ptr to work with forward declaration
-
-
-void SyncCfgDialog::updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig)
-{
- //wxWindowUpdateLocker dummy(this); //avoid display distortion
- wxWindowUpdateLocker dummy2(m_panelCustomDeletionDir); //avoid display distortion
- wxWindowUpdateLocker dummy3(m_bpButtonLeftOnly);
- wxWindowUpdateLocker dummy4(m_bpButtonRightOnly);
- wxWindowUpdateLocker dummy5(m_bpButtonLeftNewer);
- wxWindowUpdateLocker dummy6(m_bpButtonRightNewer);
- wxWindowUpdateLocker dummy7(m_bpButtonDifferent);
- wxWindowUpdateLocker dummy8(m_bpButtonConflict);
-
-
- updateConfigIcons(cmpVar,
- syncConfig,
- m_bpButtonLeftOnly,
- m_bpButtonRightOnly,
- m_bpButtonLeftNewer,
- m_bpButtonRightNewer,
- m_bpButtonDifferent,
- m_bpButtonConflict,
- m_bitmapLeftOnly,
- m_bitmapRightOnly,
- m_bitmapLeftNewer,
- m_bitmapRightNewer,
- m_bitmapDifferent,
- m_bitmapConflict,
- sbSizerSyncDirections);
-
- //set radiobuttons -> have no parameter-ownership at all!
- switch (FreeFileSync::getVariant(currentSyncConfig))
- {
- case SyncConfiguration::AUTOMATIC:
- m_radioBtnAutomatic->SetValue(true); //automatic mode
- break;
- case SyncConfiguration::MIRROR:
- m_radioBtnMirror->SetValue(true); //one way ->
- break;
- case SyncConfiguration::UPDATE:
- m_radioBtnUpdate->SetValue(true); //Update ->
- break;
- case SyncConfiguration::CUSTOM:
- m_radioBtnCustom->SetValue(true); //custom
- break;
- }
-
- GetSizer()->SetSizeHints(this); //this works like a charm for GTK2 with window resizing problems!!! (includes call to Fit())
-}
-
-
-void SyncCfgDialog::updateConfigIcons(const CompareVariant compareVar,
- const SyncConfiguration& syncConfig,
- wxBitmapButton* buttonLeftOnly,
- wxBitmapButton* buttonRightOnly,
- wxBitmapButton* buttonLeftNewer,
- wxBitmapButton* buttonRightNewer,
- wxBitmapButton* buttonDifferent,
- wxBitmapButton* buttonConflict,
- wxStaticBitmap* bitmapLeftOnly,
- wxStaticBitmap* bitmapRightOnly,
- wxStaticBitmap* bitmapLeftNewer,
- wxStaticBitmap* bitmapRightNewer,
- wxStaticBitmap* bitmapDifferent,
- wxStaticBitmap* bitmapConflict,
- wxSizer* syncDirections) //sizer containing all sync-directions
-{
- //display only relevant sync options
- syncDirections->Show(true);
-
- buttonLeftOnly ->Show(); //
- buttonRightOnly ->Show(); //
- buttonLeftNewer ->Show(); //
- buttonRightNewer->Show(); // enable everything by default
- buttonDifferent ->Show(); //
- buttonConflict ->Show(); //
-
- bitmapLeftOnly ->Show(); //
- bitmapRightOnly ->Show(); //
- bitmapLeftNewer ->Show(); //
- bitmapRightNewer->Show(); //
- bitmapDifferent ->Show(); //
- bitmapConflict ->Show(); //
-
- switch (compareVar)
- {
- case CMP_BY_TIME_SIZE:
- buttonDifferent ->Hide();
-
- bitmapDifferent ->Hide();
- break;
-
- case CMP_BY_CONTENT:
- buttonLeftNewer ->Hide();
- buttonRightNewer->Hide();
-
- bitmapLeftNewer ->Hide();
- bitmapRightNewer->Hide();
- break;
- }
-
- if (syncConfig.automatic) //automatic mode needs no sync-directions
- syncDirections->Show(false);
-
- switch (syncConfig.exLeftSideOnly)
- {
- case SYNC_DIR_RIGHT:
- buttonLeftOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRightCr")));
- buttonLeftOnly->SetToolTip(getDescription(SO_CREATE_NEW_RIGHT));
- break;
- case SYNC_DIR_LEFT:
- buttonLeftOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("deleteLeft")));
- buttonLeftOnly->SetToolTip(getDescription(SO_DELETE_LEFT));
- break;
- case SYNC_DIR_NONE:
- buttonLeftOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
- buttonLeftOnly->SetToolTip(getDescription(SO_DO_NOTHING));
- break;
- }
-
- switch (syncConfig.exRightSideOnly)
- {
- case SYNC_DIR_RIGHT:
- buttonRightOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("deleteRight")));
- buttonRightOnly->SetToolTip(getDescription(SO_DELETE_RIGHT));
- break;
- case SYNC_DIR_LEFT:
- buttonRightOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeftCr")));
- buttonRightOnly->SetToolTip(getDescription(SO_CREATE_NEW_LEFT));
- break;
- case SYNC_DIR_NONE:
- buttonRightOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
- buttonRightOnly->SetToolTip(getDescription(SO_DO_NOTHING));
- break;
- }
-
- switch (syncConfig.leftNewer)
- {
- case SYNC_DIR_RIGHT:
- buttonLeftNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
- buttonLeftNewer->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
- break;
- case SYNC_DIR_LEFT:
- buttonLeftNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
- buttonLeftNewer->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
- break;
- case SYNC_DIR_NONE:
- buttonLeftNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
- buttonLeftNewer->SetToolTip(getDescription(SO_DO_NOTHING));
- break;
- }
-
- switch (syncConfig.rightNewer)
- {
- case SYNC_DIR_RIGHT:
- buttonRightNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
- buttonRightNewer->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
- break;
- case SYNC_DIR_LEFT:
- buttonRightNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
- buttonRightNewer->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
- break;
- case SYNC_DIR_NONE:
- buttonRightNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
- buttonRightNewer->SetToolTip(getDescription(SO_DO_NOTHING));
- break;
- }
-
- switch (syncConfig.different)
- {
- case SYNC_DIR_RIGHT:
- buttonDifferent->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
- buttonDifferent->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
- break;
- case SYNC_DIR_LEFT:
- buttonDifferent->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
- buttonDifferent->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
- break;
- case SYNC_DIR_NONE:
- buttonDifferent->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
- buttonDifferent->SetToolTip(getDescription(SO_DO_NOTHING));
- break;
- }
-
- switch (syncConfig.conflict)
- {
- case SYNC_DIR_RIGHT:
- buttonConflict->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
- buttonConflict->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
- break;
- case SYNC_DIR_LEFT:
- buttonConflict->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
- buttonConflict->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
- break;
- case SYNC_DIR_NONE:
- buttonConflict->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("conflict")));
- buttonConflict->SetToolTip(_("Leave as unresolved conflict"));
- break;
- }
-}
-
-
-void SyncCfgDialog::OnClose(wxCloseEvent& event)
-{
- EndModal(0);
-}
-
-
-void SyncCfgDialog::OnCancel(wxCommandEvent& event)
-{
- EndModal(0);
-}
-
-
-void SyncCfgDialog::OnApply(wxCommandEvent& event)
-{
- //write configuration to main dialog
- refSyncConfiguration = currentSyncConfig;
- refHandleDeletion = getDeletionHandling();
- refCustomDeletionDirectory = m_textCtrlCustomDelFolder->GetValue();
- if (refIgnoreErrors)
- *refIgnoreErrors = getErrorHandling();
-
- EndModal(BUTTON_APPLY);
-}
-
-
-void SyncCfgDialog::updateToolTipErrorHandling(bool ignoreErrors)
-{
- if (ignoreErrors)
- m_choiceHandleError->SetToolTip(_("Hide all error and warning messages"));
- else
- m_choiceHandleError->SetToolTip(_("Show popup on errors or warnings"));
-}
-
-
-bool SyncCfgDialog::getErrorHandling()
-{
- if (m_choiceHandleError->GetSelection() == 1) //Ignore errors
- return true;
- else
- return false; // Show popup
-}
-
-
-void SyncCfgDialog::setErrorHandling(bool ignoreErrors)
-{
- m_choiceHandleError->Clear();
- m_choiceHandleError->Append(_("Show popup"));
- m_choiceHandleError->Append(_("Ignore errors"));
-
- if (ignoreErrors)
- m_choiceHandleError->SetSelection(1);
- else
- m_choiceHandleError->SetSelection(0);
-
- updateToolTipErrorHandling(ignoreErrors);
-}
-
-
-void SyncCfgDialog::OnChangeErrorHandling(wxCommandEvent& event)
-{
- updateToolTipErrorHandling(getErrorHandling());
-}
-
-//-------------------
-
-void updateToolTipDeletionHandling(wxChoice* choiceHandleError, wxPanel* customDir, const FreeFileSync::DeletionPolicy value)
-{
- customDir->Disable();
-
- switch (value)
- {
- case FreeFileSync::DELETE_PERMANENTLY:
- choiceHandleError->SetToolTip(_("Delete or overwrite files permanently"));
- break;
-
- case FreeFileSync::MOVE_TO_RECYCLE_BIN:
- choiceHandleError->SetToolTip(_("Use Recycle Bin when deleting or overwriting files"));
- break;
-
- case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY:
- choiceHandleError->SetToolTip(_("Move files into a time-stamped subdirectory"));
- customDir->Enable();
- break;
- }
-}
-
-
-FreeFileSync::DeletionPolicy SyncCfgDialog::getDeletionHandling()
-{
- switch (m_choiceHandleDeletion->GetSelection())
- {
- case 0:
- return FreeFileSync::DELETE_PERMANENTLY;
- case 1:
- return FreeFileSync::MOVE_TO_RECYCLE_BIN;
- case 2:
- return FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY;
- default:
- assert(false);
- return FreeFileSync::MOVE_TO_RECYCLE_BIN;
- }
-}
-
-
-void SyncCfgDialog::setDeletionHandling(FreeFileSync::DeletionPolicy newValue)
-{
- m_choiceHandleDeletion->Clear();
- m_choiceHandleDeletion->Append(_("Delete permanently"));
- m_choiceHandleDeletion->Append(_("Use Recycle Bin"));
- m_choiceHandleDeletion->Append(_("User-defined directory"));
-
- switch (newValue)
- {
- case FreeFileSync::DELETE_PERMANENTLY:
- m_choiceHandleDeletion->SetSelection(0);
- break;
- case FreeFileSync::MOVE_TO_RECYCLE_BIN:
- m_choiceHandleDeletion->SetSelection(1);
- break;
- case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY:
- m_choiceHandleDeletion->SetSelection(2);
- break;
- }
-
- updateToolTipDeletionHandling(m_choiceHandleDeletion, m_panelCustomDeletionDir, newValue);
-}
-
-
-void SyncCfgDialog::OnChangeDeletionHandling(wxCommandEvent& event)
-{
- updateToolTipDeletionHandling(m_choiceHandleDeletion, m_panelCustomDeletionDir, getDeletionHandling());
-}
-
-
-void SyncCfgDialog::OnSyncAutomatic(wxCommandEvent& event)
-{
- FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::AUTOMATIC);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void SyncCfgDialog::OnSyncLeftToRight(wxCommandEvent& event)
-{
- FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::MIRROR);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void SyncCfgDialog::OnSyncUpdate(wxCommandEvent& event)
-{
- FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::UPDATE);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void toggleSyncDirection(SyncDirection& current)
-{
- switch (current)
- {
- case SYNC_DIR_RIGHT:
- current = SYNC_DIR_LEFT;
- break;
- case SYNC_DIR_LEFT:
- current = SYNC_DIR_NONE;
- break;
- case SYNC_DIR_NONE:
- current = SYNC_DIR_RIGHT;
- break;
- }
-}
-
-
-void SyncCfgDialog::OnExLeftSideOnly(wxCommandEvent& event )
-{
- toggleSyncDirection(currentSyncConfig.exLeftSideOnly);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void SyncCfgDialog::OnExRightSideOnly(wxCommandEvent& event )
-{
- toggleSyncDirection(currentSyncConfig.exRightSideOnly);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void SyncCfgDialog::OnLeftNewer(wxCommandEvent& event )
-{
- toggleSyncDirection(currentSyncConfig.leftNewer);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void SyncCfgDialog::OnRightNewer(wxCommandEvent& event )
-{
- toggleSyncDirection(currentSyncConfig.rightNewer);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void SyncCfgDialog::OnDifferent(wxCommandEvent& event )
-{
- toggleSyncDirection(currentSyncConfig.different);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-void SyncCfgDialog::OnConflict(wxCommandEvent& event)
-{
- toggleSyncDirection(currentSyncConfig.conflict);
- updateConfigIcons(cmpVariant, currentSyncConfig);
-}
-
-
-//###################################################################################################################################
-
-class BatchFileDropEvent : public wxFileDropTarget
-{
-public:
- BatchFileDropEvent(BatchDialog& dlg) :
- batchDlg(dlg) {}
-
- virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames)
- {
- if (!filenames.IsEmpty())
- {
- const wxString droppedFileName = filenames[0];
-
- xmlAccess::XmlType fileType = xmlAccess::getXmlType(droppedFileName);
-
- //test if ffs batch file has been dropped
- if (fileType == xmlAccess::XML_BATCH_CONFIG)
- batchDlg.loadBatchFile(droppedFileName);
- else
- {
- wxString errorMessage = _("%x is not a valid FreeFileSync batch file!");
- errorMessage.Replace(wxT("%x"), wxString(wxT("\"")) + droppedFileName + wxT("\""), false);
- wxMessageBox(errorMessage, _("Error"), wxOK | wxICON_ERROR);
- }
- }
- return false;
- }
-
-private:
- BatchDialog& batchDlg;
-};
-
-//###################################################################################################################################
-
-//------------------------------------------------------------------
-/* class hierarchy:
-
- template<>
- FolderPairPanelBasic
- /|\
- |
- template<>
- FolderPairCallback BatchFolderPairGenerated
- /|\ /|\
- _________|______________ ________|
- | | |
- FirstBatchFolderPairCfg BatchFolderPairPanel
-*/
-
-template <class GuiPanel>
-class FolderPairCallback : public FolderPairPanelBasic<GuiPanel> //implements callback functionality to BatchDialog as imposed by FolderPairPanelBasic
-{
-public:
- FolderPairCallback(GuiPanel& basicPanel, BatchDialog& batchDialog) :
- FolderPairPanelBasic<GuiPanel>(basicPanel), //pass FolderPairGenerated part...
- batchDlg(batchDialog) {}
-
-private:
- virtual wxWindow* getParentWindow()
- {
- return &batchDlg;
- }
-
- virtual MainConfiguration getMainConfig() const
- {
- return batchDlg.getCurrentConfiguration().mainCfg;
- }
-
- BatchDialog& batchDlg;
-};
-
-
-class BatchFolderPairPanel :
- public BatchFolderPairGenerated, //BatchFolderPairPanel "owns" BatchFolderPairGenerated!
- public FolderPairCallback<BatchFolderPairGenerated>
-{
-public:
- BatchFolderPairPanel(wxWindow* parent, BatchDialog& batchDialog) :
- BatchFolderPairGenerated(parent),
- FolderPairCallback<BatchFolderPairGenerated>(static_cast<BatchFolderPairGenerated&>(*this), batchDialog), //pass BatchFolderPairGenerated part...
- dragDropOnLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft),
- dragDropOnRight(m_panelRight, m_dirPickerRight, m_directoryRight) {}
-
-private:
- //support for drag and drop
- DragDropOnDlg dragDropOnLeft;
- DragDropOnDlg dragDropOnRight;
-};
-
-
-class FirstBatchFolderPairCfg : public FolderPairCallback<BatchDlgGenerated>
-{
-public:
- FirstBatchFolderPairCfg(BatchDialog& batchDialog) :
- FolderPairCallback<BatchDlgGenerated>(batchDialog, batchDialog),
-
- //prepare drag & drop
- dragDropOnLeft(batchDialog.m_panelLeft,
- batchDialog.m_dirPickerLeft,
- batchDialog.m_directoryLeft),
- dragDropOnRight(batchDialog.m_panelRight,
- batchDialog.m_dirPickerRight,
- batchDialog.m_directoryRight) {}
-
-private:
- //support for drag and drop
- DragDropOnDlg dragDropOnLeft;
- DragDropOnDlg dragDropOnRight;
-};
-
-
-//###################################################################################################################################
-BatchDialog::BatchDialog(wxWindow* window, const xmlAccess::XmlBatchConfig& batchCfg) :
- BatchDlgGenerated(window)
-{
- init();
- loadBatchCfg(batchCfg);
-}
-
-
-BatchDialog::BatchDialog(wxWindow* window, const wxString& filename) :
- BatchDlgGenerated(window)
-{
- init();
- loadBatchFile(filename);
-}
-
-
-BatchDialog::~BatchDialog() {} //non-inline destructor for std::auto_ptr to work with forward declaration
-
-
-void BatchDialog::init()
-{
- wxWindowUpdateLocker dummy(this); //avoid display distortion
-
- m_bpButtonHelp->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("help")));
-
- //init handling of first folder pair
- firstFolderPair.reset(new FirstBatchFolderPairCfg(*this));
-
-
- //prepare drag & drop for loading of *.ffs_batch files
- SetDropTarget(new BatchFileDropEvent(*this));
- dragDropOnLogfileDir.reset(new DragDropOnDlg(m_panelLogging, m_dirPickerLogfileDir, m_textCtrlLogfileDir));
-
- //support for drag and drop: user-defined deletion directory
- dragDropCustomDelFolder.reset(new DragDropOnDlg(m_panelCustomDeletionDir, m_dirPickerCustomDelFolder, m_textCtrlCustomDelFolder));
-
-
- //set icons for this dialog
- m_bpButtonAddPair->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("addFolderPair")));
- m_bitmapLeftOnly->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("leftOnly")));
- m_bitmapRightOnly->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("rightOnly")));
- m_bitmapLeftNewer->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("leftNewer")));
- m_bitmapRightNewer->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("rightNewer")));
- m_bitmapDifferent->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("different")));
- m_bitmapConflict->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("conflictGrey")));
- m_bitmap8->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("include")));
- m_bitmap9->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("exclude")));
- m_bitmap27->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("batch")));
-
- m_buttonSave->SetFocus();
-}
-
-//------------------- error handling --------------------------
-
-xmlAccess::OnError BatchDialog::getSelectionHandleError() const
-{
- switch (m_choiceHandleError->GetSelection())
- {
- case 0:
- return xmlAccess::ON_ERROR_POPUP;
- case 1:
- return xmlAccess::ON_ERROR_IGNORE;
- case 2:
- return xmlAccess::ON_ERROR_EXIT;
- default:
- assert(false);
- return xmlAccess::ON_ERROR_POPUP;
- }
-}
-
-
-void BatchDialog::updateToolTipErrorHandling(const xmlAccess::OnError value)
-{
- switch (value)
- {
- case xmlAccess::ON_ERROR_POPUP:
- m_choiceHandleError->SetToolTip(_("Show popup on errors or warnings"));
- break;
- case xmlAccess::ON_ERROR_IGNORE:
- m_choiceHandleError->SetToolTip(_("Hide all error and warning messages"));
- break;
- case xmlAccess::ON_ERROR_EXIT:
- m_choiceHandleError->SetToolTip(_("Abort synchronization immediately"));
- break;
- }
-}
-
-
-void BatchDialog::setSelectionHandleError(const xmlAccess::OnError value)
-{
- m_choiceHandleError->Clear();
- m_choiceHandleError->Append(_("Show popup"));
- m_choiceHandleError->Append(_("Ignore errors"));
- if (m_checkBoxSilent->GetValue()) //this option shall be available for silent mode only!
- m_choiceHandleError->Append(_("Exit instantly"));
-
- //default
- m_choiceHandleError->SetSelection(0);
-
- switch (value)
- {
- case xmlAccess::ON_ERROR_POPUP:
- m_choiceHandleError->SetSelection(0);
- break;
- case xmlAccess::ON_ERROR_IGNORE:
- m_choiceHandleError->SetSelection(1);
- break;
- case xmlAccess::ON_ERROR_EXIT:
- if (m_checkBoxSilent->GetValue()) //this option shall be available for silent mode only!
- m_choiceHandleError->SetSelection(2);
- break;
- }
-
- updateToolTipErrorHandling(getSelectionHandleError());
-}
-
-
-void BatchDialog::OnChangeErrorHandling(wxCommandEvent& event)
-{
- updateToolTipErrorHandling(getSelectionHandleError());
-}
-
-
-void BatchDialog::OnExLeftSideOnly(wxCommandEvent& event)
-{
- toggleSyncDirection(localSyncConfiguration.exLeftSideOnly);
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
-}
-
-
-//------------------- deletion handling --------------------------
-
-FreeFileSync::DeletionPolicy BatchDialog::getDeletionHandling() const
-{
- switch (m_choiceHandleDeletion->GetSelection())
- {
- case 0:
- return FreeFileSync::DELETE_PERMANENTLY;
- case 1:
- return FreeFileSync::MOVE_TO_RECYCLE_BIN;
- case 2:
- return FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY;
- default:
- assert(false);
- return FreeFileSync::MOVE_TO_RECYCLE_BIN;
- }
-}
-
-
-void BatchDialog::setDeletionHandling(FreeFileSync::DeletionPolicy newValue)
-{
- m_choiceHandleDeletion->Clear();
- m_choiceHandleDeletion->Append(_("Delete permanently"));
- m_choiceHandleDeletion->Append(_("Use Recycle Bin"));
- m_choiceHandleDeletion->Append(_("User-defined directory"));
-
- switch (newValue)
- {
- case FreeFileSync::DELETE_PERMANENTLY:
- m_choiceHandleDeletion->SetSelection(0);
- break;
- case FreeFileSync::MOVE_TO_RECYCLE_BIN:
- m_choiceHandleDeletion->SetSelection(1);
- break;
- case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY:
- m_choiceHandleDeletion->SetSelection(2);
- break;
- }
-
- updateToolTipDeletionHandling(m_choiceHandleDeletion, m_panelCustomDeletionDir, newValue);
-}
-
-
-void BatchDialog::OnChangeDeletionHandling(wxCommandEvent& event)
-{
- updateToolTipDeletionHandling(m_choiceHandleDeletion, m_panelCustomDeletionDir, getDeletionHandling());
-}
-
-
-
-void BatchDialog::OnExRightSideOnly(wxCommandEvent& event)
-{
- toggleSyncDirection(localSyncConfiguration.exRightSideOnly);
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
-}
-
-
-void BatchDialog::OnLeftNewer(wxCommandEvent& event)
-{
- toggleSyncDirection(localSyncConfiguration.leftNewer);
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
-}
-
-
-void BatchDialog::OnRightNewer(wxCommandEvent& event)
-{
- toggleSyncDirection(localSyncConfiguration.rightNewer);
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
-}
-
-
-void BatchDialog::OnDifferent(wxCommandEvent& event)
-{
- toggleSyncDirection(localSyncConfiguration.different);
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
-}
-
-
-void BatchDialog::OnConflict(wxCommandEvent& event)
-{
- toggleSyncDirection(localSyncConfiguration.conflict);
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
-}
-
-
-void BatchDialog::OnHelp(wxCommandEvent& event)
-{
-#ifdef FFS_WIN
- FreeFileSync::displayHelpEntry(wxT("html\\advanced\\ScheduleBatch.html"));
-#elif defined FFS_LINUX
- FreeFileSync::displayHelpEntry(wxT("html/advanced/ScheduleBatch.html"));
-#endif
-}
-
-
-void BatchDialog::OnCheckFilter(wxCommandEvent& event)
-{
- updateVisibleTabs();
-
- //update main local filter
- firstFolderPair->refreshButtons();
-
- //update folder pairs
- for (std::vector<BatchFolderPairPanel*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
- {
- BatchFolderPairPanel* dirPair = *i;
- dirPair->refreshButtons();
- }
-}
-
-
-void BatchDialog::OnCheckAutomatic(wxCommandEvent& event)
-{
- wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
-
- //toggle automatic setting
- localSyncConfiguration.automatic = !localSyncConfiguration.automatic;
-
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
- Fit();
-}
-
-
-void BatchDialog::OnCheckSilent(wxCommandEvent& event)
-{
- updateVisibleTabs();
-
- //reset error handling depending on "m_checkBoxSilent"
- setSelectionHandleError(getSelectionHandleError());
-}
-
-
-void BatchDialog::updateVisibleTabs()
-{
- showNotebookpage(m_panelFilter, _("Filter"), m_checkBoxFilter->GetValue());
- showNotebookpage(m_panelLogging, _("Logging"), m_checkBoxSilent->GetValue());
-}
-
-
-void BatchDialog::showNotebookpage(wxWindow* page, const wxString& pageName, bool show)
-{
- int windowPosition = -1;
- for (size_t i = 0; i < m_notebookSettings->GetPageCount(); ++i)
- if (m_notebookSettings->GetPage(i) == page)
- {
- windowPosition = static_cast<int>(i);
- break;
- }
-
- if (show)
- {
- if (windowPosition == -1)
- m_notebookSettings->AddPage(page, pageName, false);
- }
- else
- {
- if (windowPosition != -1)
- {
- //do not delete currently selected tab!!
- if (m_notebookSettings->GetCurrentPage() == m_notebookSettings->GetPage(windowPosition))
- m_notebookSettings->ChangeSelection(0);
-
- m_notebookSettings->RemovePage(windowPosition);
- }
- }
-}
-
-
-CompareVariant BatchDialog::getCurrentCompareVar() const
-{
- if (m_radioBtnSizeDate->GetValue())
- return CMP_BY_TIME_SIZE;
- else if (m_radioBtnContent->GetValue())
- return CMP_BY_CONTENT;
- else
- {
- assert(false);
- return CMP_BY_TIME_SIZE;
- }
-}
-
-
-void BatchDialog::updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig)
-{
- wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
-
- SyncCfgDialog::updateConfigIcons(cmpVar,
- syncConfig,
- m_bpButtonLeftOnly,
- m_bpButtonRightOnly,
- m_bpButtonLeftNewer,
- m_bpButtonRightNewer,
- m_bpButtonDifferent,
- m_bpButtonConflict,
- m_bitmapLeftOnly,
- m_bitmapRightOnly,
- m_bitmapLeftNewer,
- m_bitmapRightNewer,
- m_bitmapDifferent,
- m_bitmapConflict,
- sbSizerSyncDirections);
-
- //parameter ownership lies within localSyncConfiguration, NOT m_checkBoxAutomatic!!!
- m_checkBoxAutomatic->SetValue(localSyncConfiguration.automatic);
-
- m_panelOverview->Layout(); //needed
-}
-
-
-void BatchDialog::OnChangeCompareVar(wxCommandEvent& event)
-{
- wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
- updateConfigIcons(getCurrentCompareVar(), localSyncConfiguration);
-
- Fit();
-}
-
-
-void BatchDialog::OnClose(wxCloseEvent& event)
-{
- EndModal(0);
-}
-
-
-void BatchDialog::OnCancel(wxCommandEvent& event)
-{
- EndModal(0);
-}
-
-
-void BatchDialog::OnSaveBatchJob(wxCommandEvent& event)
-{
- //get a filename
- const wxString defaultFileName = proposedBatchFileName.empty() ? wxT("SyncJob.ffs_batch") : proposedBatchFileName;
-
- wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, defaultFileName, wxString(_("FreeFileSync batch file")) + wxT(" (*.ffs_batch)|*.ffs_batch"), wxFD_SAVE);
- if (filePicker->ShowModal() == wxID_OK)
- {
- const wxString newFileName = filePicker->GetPath();
- if (FreeFileSync::fileExists(wxToZ(newFileName)))
- {
- QuestionDlg* messageDlg = new QuestionDlg(this,
- QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_CANCEL,
- wxString(_("File already exists. Overwrite?")) + wxT(" \"") + newFileName + wxT("\""));
-
- if (messageDlg->ShowModal() != QuestionDlg::BUTTON_YES)
- {
- OnSaveBatchJob(event); //retry
- return;
- }
- }
-
- //create batch file
- if (saveBatchFile(newFileName))
- EndModal(BATCH_FILE_SAVED);
- }
-}
-
-
-void BatchDialog::OnLoadBatchJob(wxCommandEvent& event)
-{
- wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, wxEmptyString, wxString(_("FreeFileSync batch file")) + wxT(" (*.ffs_batch)|*.ffs_batch"), wxFD_OPEN);;
- if (filePicker->ShowModal() == wxID_OK)
- loadBatchFile(filePicker->GetPath());
-}
-
-
-
-inline
-FolderPairEnh getEnahncedPair(const BatchFolderPairPanel* panel)
-{
- return FolderPairEnh(panel->getLeftDir(),
- panel->getRightDir(),
- panel->getAltSyncConfig(),
- panel->getAltFilterConfig());
-}
-
-
-xmlAccess::XmlBatchConfig BatchDialog::getCurrentConfiguration() const
-{
- xmlAccess::XmlBatchConfig batchCfg;
-
- //load structure with basic settings "mainCfg"
- batchCfg.mainCfg.compareVar = getCurrentCompareVar();
- batchCfg.mainCfg.syncConfiguration = localSyncConfiguration;
- batchCfg.mainCfg.filterIsActive = m_checkBoxFilter->GetValue();
- batchCfg.mainCfg.includeFilter = wxToZ(m_textCtrlInclude->GetValue());
- batchCfg.mainCfg.excludeFilter = wxToZ(m_textCtrlExclude->GetValue());
- batchCfg.mainCfg.handleDeletion = getDeletionHandling();
- batchCfg.mainCfg.customDeletionDirectory = m_textCtrlCustomDelFolder->GetValue();
-
- //first folder pair
- batchCfg.mainCfg.firstPair = FolderPairEnh(firstFolderPair->getLeftDir(),
- firstFolderPair->getRightDir(),
- firstFolderPair->getAltSyncConfig(),
- firstFolderPair->getAltFilterConfig());
-
- //add additional pairs
- batchCfg.mainCfg.additionalPairs.clear();
- std::transform(additionalFolderPairs.begin(), additionalFolderPairs.end(),
- std::back_inserter(batchCfg.mainCfg.additionalPairs), getEnahncedPair);
-
-
- //load structure with batch settings "batchCfg"
- batchCfg.silent = m_checkBoxSilent->GetValue();
- batchCfg.handleError = getSelectionHandleError();
- batchCfg.logFileDirectory = m_textCtrlLogfileDir->GetValue();
-
- return batchCfg;
-}
-
-
-bool BatchDialog::saveBatchFile(const wxString& filename)
-{
- const xmlAccess::XmlBatchConfig batchCfg = getCurrentConfiguration();
-
- //write config to XML
- try
- {
- xmlAccess::writeBatchConfig(batchCfg, filename);
- }
- catch (const xmlAccess::XmlError& error)
- {
- wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR);
- return false;
- }
-
- SetTitle(wxString(_("Create a batch job")) + wxT(" - ") + filename);
- proposedBatchFileName = filename; //may be used on next save
-
- return true;
-}
-
-
-void BatchDialog::loadBatchFile(const wxString& filename)
-{
- //load XML settings
- xmlAccess::XmlBatchConfig batchCfg; //structure to receive gui settings
- try
- {
- xmlAccess::readBatchConfig(filename, batchCfg);
- }
- catch (const xmlAccess::XmlError& error)
- {
- if (error.getSeverity() == xmlAccess::XmlError::WARNING)
- wxMessageBox(error.show(), _("Warning"), wxOK | wxICON_WARNING);
- else
- {
- wxMessageBox(error.show(), _("Error"), wxOK | wxICON_ERROR);
- return;
- }
- }
-
- SetTitle(wxString(_("Create a batch job")) + wxT(" - ") + filename);
- proposedBatchFileName = filename; //may be used on next save
- this->loadBatchCfg(batchCfg);
-}
-
-
-void BatchDialog::loadBatchCfg(const xmlAccess::XmlBatchConfig& batchCfg)
-{
- wxWindowUpdateLocker dummy(this); //avoid display distortion
-
- //make working copy of mainDialog.cfg.syncConfiguration and recycler setting
- localSyncConfiguration = batchCfg.mainCfg.syncConfiguration;
-
- setDeletionHandling(batchCfg.mainCfg.handleDeletion);
- m_textCtrlCustomDelFolder->SetValue(batchCfg.mainCfg.customDeletionDirectory);
-
- switch (batchCfg.mainCfg.compareVar)
- {
- case CMP_BY_TIME_SIZE:
- m_radioBtnSizeDate->SetValue(true);
- break;
- case CMP_BY_CONTENT:
- m_radioBtnContent->SetValue(true);
- break;
- }
-
- updateConfigIcons(batchCfg.mainCfg.compareVar, batchCfg.mainCfg.syncConfiguration);
-
- m_checkBoxFilter->SetValue(batchCfg.mainCfg.filterIsActive);
- m_textCtrlInclude->SetValue(zToWx(batchCfg.mainCfg.includeFilter));
- m_textCtrlExclude->SetValue(zToWx(batchCfg.mainCfg.excludeFilter));
-
- m_checkBoxSilent->SetValue(batchCfg.silent);
- m_textCtrlLogfileDir->SetValue(batchCfg.logFileDirectory);
- //error handling is dependent from m_checkBoxSilent! /|\ \|/
- setSelectionHandleError(batchCfg.handleError);
-
- //set first folder pair
- firstFolderPair->setValues(batchCfg.mainCfg.firstPair.leftDirectory,
- batchCfg.mainCfg.firstPair.rightDirectory,
- batchCfg.mainCfg.firstPair.altSyncConfig,
- batchCfg.mainCfg.firstPair.localFilter);
-
- //remove existing additional folder pairs
- clearAddFolderPairs();
-
- //set additional pairs
- addFolderPair(batchCfg.mainCfg.additionalPairs);
-
- updateVisibleTabs();
-
- Fit(); //needed
- Refresh(); //needed
- Centre();
-}
-
-
-void BatchDialog::OnAddFolderPair(wxCommandEvent& event)
-{
- wxWindowUpdateLocker dummy(this); //avoid display distortion
-
- std::vector<FolderPairEnh> newPairs;
- newPairs.push_back(getCurrentConfiguration().mainCfg.firstPair);
-
- addFolderPair(newPairs, true); //add pair in front of additonal pairs
-
- //clear first pair
- const FolderPairEnh cfgEmpty;
- firstFolderPair->setValues(cfgEmpty.leftDirectory,
- cfgEmpty.rightDirectory,
- cfgEmpty.altSyncConfig,
- cfgEmpty.localFilter);
-}
-
-
-void BatchDialog::OnRemoveFolderPair(wxCommandEvent& event)
-{
- //find folder pair originating the event
- const wxObject* const eventObj = event.GetEventObject();
- for (std::vector<BatchFolderPairPanel*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
- {
- if (eventObj == static_cast<wxObject*>((*i)->m_bpButtonRemovePair))
- {
- removeAddFolderPair(i - additionalFolderPairs.begin());
- return;
- }
- }
-}
-
-
-void BatchDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
-{
- if (additionalFolderPairs.size() > 0)
- {
- //get settings from second folder pair
- const FolderPairEnh cfgSecond = getEnahncedPair(additionalFolderPairs[0]);
-
- //reset first pair
- firstFolderPair->setValues(cfgSecond.leftDirectory,
- cfgSecond.rightDirectory,
- cfgSecond.altSyncConfig,
- cfgSecond.localFilter);
-
- removeAddFolderPair(0); //remove second folder pair (first of additional folder pairs)
- }
-}
-
-
-const size_t MAX_FOLDER_PAIRS = 3;
-
-
-void BatchDialog::updateGuiForFolderPair()
-{
- //adapt delete top folder pair button
- if (additionalFolderPairs.size() == 0)
- m_bpButtonRemovePair->Hide();
- else
- m_bpButtonRemovePair->Show();
-
- //adapt local filter and sync cfg for first folder pair
- if ( additionalFolderPairs.size() == 0 &&
- firstFolderPair->getAltSyncConfig().get() == NULL &&
- NameFilter(firstFolderPair->getAltFilterConfig().includeFilter,
- firstFolderPair->getAltFilterConfig().excludeFilter).isNull())
- {
- m_bpButtonLocalFilter->Hide();
- m_bpButtonAltSyncCfg->Hide();
- }
- else
- {
- m_bpButtonLocalFilter->Show();
- m_bpButtonAltSyncCfg->Show();
- }
-
- m_scrolledWindow6->Fit(); //adjust scrolled window size
- m_panelOverview->Layout(); //adjust stuff inside scrolled window
-}
-
-
-void BatchDialog::addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront)
-{
- wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
-
- if (!newPairs.empty())
- {
- //add folder pairs
- int pairHeight = 0;
- for (std::vector<FreeFileSync::FolderPairEnh>::const_iterator i = newPairs.begin(); i != newPairs.end(); ++i)
- {
- BatchFolderPairPanel* newPair = new BatchFolderPairPanel(m_scrolledWindow6, *this);
-
- if (addFront)
- {
- bSizerAddFolderPairs->Insert(0, newPair, 0, wxEXPAND, 5);
- additionalFolderPairs.insert(additionalFolderPairs.begin(), newPair);
- }
- else
- {
- bSizerAddFolderPairs->Add(newPair, 0, wxEXPAND, 5);
- additionalFolderPairs.push_back(newPair);
- }
-
- //get size of scrolled window
- pairHeight = newPair->GetSize().GetHeight();
-
- //register events
- newPair->m_bpButtonRemovePair->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BatchDialog::OnRemoveFolderPair), NULL, this );
-
- //set alternate configuration
- newPair->setValues(i->leftDirectory,
- i->rightDirectory,
- i->altSyncConfig,
- i->localFilter);
- }
- //set size of scrolled window
- const size_t visiblePairs = std::min(additionalFolderPairs.size() + 1, MAX_FOLDER_PAIRS); //up to MAX_FOLDER_PAIRS pairs shall be shown
- m_scrolledWindow6->SetMinSize(wxSize( -1, pairHeight * static_cast<int>(visiblePairs)));
-
- //update controls
- m_scrolledWindow6->Fit(); //adjust scrolled window size
- m_panelOverview->Layout(); //adjust stuff inside scrolled window
- Fit(); //adapt dialog size
-
- //after changing folder pairs window focus is lost: results in scrolled window scrolling to top each time window is shown: we don't want this
- m_bpButtonLeftOnly->SetFocus();
- }
-
- updateGuiForFolderPair();
-}
-
-
-void BatchDialog::removeAddFolderPair(const int pos)
-{
- wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
-
- if (0 <= pos && pos < static_cast<int>(additionalFolderPairs.size()))
- {
- //remove folder pairs from window
- BatchFolderPairPanel* pairToDelete = additionalFolderPairs[pos];
- const int pairHeight = pairToDelete->GetSize().GetHeight();
-
- bSizerAddFolderPairs->Detach(pairToDelete); //Remove() does not work on Window*, so do it manually
- pairToDelete->Destroy(); //
- additionalFolderPairs.erase(additionalFolderPairs.begin() + pos); //remove last element in vector
-
- //set size of scrolled window
- const size_t visiblePairs = std::min(additionalFolderPairs.size() + 1, MAX_FOLDER_PAIRS); //up to MAX_FOLDER_PAIRS pairs shall be shown
- m_scrolledWindow6->SetMinSize(wxSize(-1, pairHeight * static_cast<int>(visiblePairs)));
-
- //update controls
- m_scrolledWindow6->Fit(); //adjust scrolled window size
- m_panelOverview->Layout(); //adjust stuff inside scrolled window
-
- m_panelOverview->InvalidateBestSize(); //needed for Fit() to work correctly!
- Fit(); //adapt dialog size
-
- //after changing folder pairs window focus is lost: results in scrolled window scrolling to top each time window is shown: we don't want this
- m_bpButtonLeftOnly->SetFocus();
- }
-
- updateGuiForFolderPair();
-}
-
-
-void BatchDialog::clearAddFolderPairs()
-{
- wxWindowUpdateLocker dummy(m_panelOverview); //avoid display distortion
-
- additionalFolderPairs.clear();
- bSizerAddFolderPairs->Clear(true);
-
- m_scrolledWindow6->SetMinSize(wxSize(-1, sbSizerMainPair->GetSize().GetHeight())); //respect height of main pair
-}
-
-
-/*
-#ifdef FFS_WIN
-#include <wx/msw/wrapwin.h> //includes "windows.h"
-#include <shlobj.h>
-#endif // FFS_WIN
-
-template <typename T>
-struct CleanUp
-{
- CleanUp(T* element) : m_element(element) {}
-
- ~CleanUp()
- {
- m_element->Release();
- }
-
- T* m_element;
-};
-
-
-bool BatchDialog::createBatchFile(const wxString& filename)
-{
- //create shell link (instead of batch file) for full Unicode support
- HRESULT hResult = E_FAIL;
- IShellLink* pShellLink = NULL;
-
- if (FAILED(CoCreateInstance(CLSID_ShellLink, //class identifier
- NULL, //object isn't part of an aggregate
- CLSCTX_INPROC_SERVER, //context for running executable code
- IID_IShellLink, //interface identifier
- (void**)&pShellLink))) //pointer to storage of interface pointer
- return false;
- CleanUp<IShellLink> cleanOnExit(pShellLink);
-
- wxString freeFileSyncExe = wxStandardPaths::Get().GetExecutablePath();
- if (FAILED(pShellLink->SetPath(freeFileSyncExe.c_str())))
- return false;
-
- if (FAILED(pShellLink->SetArguments(getCommandlineArguments().c_str())))
- return false;
-
- if (FAILED(pShellLink->SetIconLocation(freeFileSyncExe.c_str(), 1))) //second icon from executable file is used
- return false;
-
- if (FAILED(pShellLink->SetDescription(_("FreeFileSync Batch Job"))))
- return false;
-
- IPersistFile* pPersistFile = NULL;
- if (FAILED(pShellLink->QueryInterface(IID_IPersistFile, (void**)&pPersistFile)))
- return false;
- CleanUp<IPersistFile> cleanOnExit2(pPersistFile);
-
- //pPersistFile->Save accepts unicode input only
-#ifdef _UNICODE
- hResult = pPersistFile->Save(filename.c_str(), TRUE);
-#else
- WCHAR wszTemp [MAX_PATH];
- if (MultiByteToWideChar(CP_ACP, 0, filename.c_str(), -1, wszTemp, MAX_PATH) == 0)
- return false;
-
- hResult = pPersistFile->Save(wszTemp, TRUE);
-#endif
- if (FAILED(hResult))
- return false;
-
- return true;
-}
-*/
diff --git a/ui/switchToGui.cpp b/ui/switchToGui.cpp
new file mode 100644
index 00000000..ed678dd1
--- /dev/null
+++ b/ui/switchToGui.cpp
@@ -0,0 +1,27 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#include "switchToGui.h"
+#include "mainDialog.h"
+
+using FreeFileSync::SwitchToGui;
+
+
+SwitchToGui::SwitchToGui(const xmlAccess::XmlBatchConfig& batchCfg,
+ xmlAccess::XmlGlobalSettings& globalSettings) : //prepare
+ globalSettings_(globalSettings),
+ guiCfg(xmlAccess::convertBatchToGui(batchCfg)) {}
+
+
+void SwitchToGui::execute() const //throw()
+{
+ try
+ {
+ MainDialog* frame = new MainDialog(guiCfg, globalSettings_, true);
+ frame->Show();
+ }
+ catch(...) {}
+}
diff --git a/ui/switchToGui.h b/ui/switchToGui.h
new file mode 100644
index 00000000..7970534a
--- /dev/null
+++ b/ui/switchToGui.h
@@ -0,0 +1,29 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef SWITCHTOGUI_H_INCLUDED
+#define SWITCHTOGUI_H_INCLUDED
+
+#include "../library/processXml.h"
+
+
+namespace FreeFileSync
+{
+
+//switch from FreeFileSync Batch to GUI modus: opens a new FreeFileSync GUI session asynchronously
+class SwitchToGui
+{
+public:
+ SwitchToGui(const xmlAccess::XmlBatchConfig& batchCfg, xmlAccess::XmlGlobalSettings& globalSettings); //prepare
+ void execute() const; //throw()
+
+private:
+ xmlAccess::XmlGlobalSettings& globalSettings_;
+ const xmlAccess::XmlGuiConfig guiCfg;
+};
+}
+
+#endif // SWITCHTOGUI_H_INCLUDED
diff --git a/ui/syncConfig.cpp b/ui/syncConfig.cpp
new file mode 100644
index 00000000..a2d821ff
--- /dev/null
+++ b/ui/syncConfig.cpp
@@ -0,0 +1,477 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#include "syncConfig.h"
+
+#include "../library/resources.h"
+#include "../shared/dragAndDrop.h"
+#include <wx/wupdlock.h>
+
+using namespace FreeFileSync;
+
+
+SyncCfgDialog::SyncCfgDialog(wxWindow* window,
+ const CompareVariant compareVar,
+ SyncConfiguration& syncConfiguration,
+ DeletionPolicy& handleDeletion,
+ wxString& customDeletionDirectory,
+ bool* ignoreErrors) :
+ SyncCfgDlgGenerated(window),
+ cmpVariant(compareVar),
+ currentSyncConfig(syncConfiguration), //make working copy of syncConfiguration
+ refSyncConfiguration(syncConfiguration),
+ refHandleDeletion(handleDeletion),
+ refCustomDeletionDirectory(customDeletionDirectory),
+ refIgnoreErrors(ignoreErrors),
+ dragDropCustomDelFolder(new DragDropOnDlg(m_panelCustomDeletionDir, m_dirPickerCustomDelFolder, m_textCtrlCustomDelFolder))
+{
+ setDeletionHandling(handleDeletion);
+ m_textCtrlCustomDelFolder->SetValue(customDeletionDirectory);
+
+ //error handling
+ if (ignoreErrors)
+ setErrorHandling(*ignoreErrors);
+ else
+ {
+ sbSizerErrorHandling->Show(false);
+ Layout();
+ }
+
+ //set sync config icons
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+
+ //set icons for this dialog
+ m_bitmapLeftOnly->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("leftOnly")));
+ m_bitmapRightOnly->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("rightOnly")));
+ m_bitmapLeftNewer->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("leftNewer")));
+ m_bitmapRightNewer->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("rightNewer")));
+ m_bitmapDifferent->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("different")));
+ m_bitmapConflict->SetBitmap(GlobalResources::getInstance().getImageByName(wxT("conflictGrey")));
+
+ bSizer201->Layout(); //wxButtonWithImage size might have changed
+
+ m_buttonOK->SetFocus();
+
+ Fit();
+}
+
+//#################################################################################################################
+
+SyncCfgDialog::~SyncCfgDialog() {} //non-inline destructor for std::auto_ptr to work with forward declaration
+
+
+void SyncCfgDialog::updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig)
+{
+ //wxWindowUpdateLocker dummy(this); //avoid display distortion
+ wxWindowUpdateLocker dummy2(m_panelCustomDeletionDir); //avoid display distortion
+ wxWindowUpdateLocker dummy3(m_bpButtonLeftOnly);
+ wxWindowUpdateLocker dummy4(m_bpButtonRightOnly);
+ wxWindowUpdateLocker dummy5(m_bpButtonLeftNewer);
+ wxWindowUpdateLocker dummy6(m_bpButtonRightNewer);
+ wxWindowUpdateLocker dummy7(m_bpButtonDifferent);
+ wxWindowUpdateLocker dummy8(m_bpButtonConflict);
+
+
+ updateConfigIcons(cmpVar,
+ syncConfig,
+ m_bpButtonLeftOnly,
+ m_bpButtonRightOnly,
+ m_bpButtonLeftNewer,
+ m_bpButtonRightNewer,
+ m_bpButtonDifferent,
+ m_bpButtonConflict,
+ m_bitmapLeftOnly,
+ m_bitmapRightOnly,
+ m_bitmapLeftNewer,
+ m_bitmapRightNewer,
+ m_bitmapDifferent,
+ m_bitmapConflict,
+ sbSizerSyncDirections);
+
+ //set radiobuttons -> have no parameter-ownership at all!
+ switch (FreeFileSync::getVariant(currentSyncConfig))
+ {
+ case SyncConfiguration::AUTOMATIC:
+ m_radioBtnAutomatic->SetValue(true); //automatic mode
+ break;
+ case SyncConfiguration::MIRROR:
+ m_radioBtnMirror->SetValue(true); //one way ->
+ break;
+ case SyncConfiguration::UPDATE:
+ m_radioBtnUpdate->SetValue(true); //Update ->
+ break;
+ case SyncConfiguration::CUSTOM:
+ m_radioBtnCustom->SetValue(true); //custom
+ break;
+ }
+
+ GetSizer()->SetSizeHints(this); //this works like a charm for GTK2 with window resizing problems!!! (includes call to Fit())
+}
+
+
+void SyncCfgDialog::updateConfigIcons(const CompareVariant compareVar,
+ const SyncConfiguration& syncConfig,
+ wxBitmapButton* buttonLeftOnly,
+ wxBitmapButton* buttonRightOnly,
+ wxBitmapButton* buttonLeftNewer,
+ wxBitmapButton* buttonRightNewer,
+ wxBitmapButton* buttonDifferent,
+ wxBitmapButton* buttonConflict,
+ wxStaticBitmap* bitmapLeftOnly,
+ wxStaticBitmap* bitmapRightOnly,
+ wxStaticBitmap* bitmapLeftNewer,
+ wxStaticBitmap* bitmapRightNewer,
+ wxStaticBitmap* bitmapDifferent,
+ wxStaticBitmap* bitmapConflict,
+ wxSizer* syncDirections) //sizer containing all sync-directions
+{
+ //display only relevant sync options
+ syncDirections->Show(true);
+
+ buttonLeftOnly ->Show(); //
+ buttonRightOnly ->Show(); //
+ buttonLeftNewer ->Show(); //
+ buttonRightNewer->Show(); // enable everything by default
+ buttonDifferent ->Show(); //
+ buttonConflict ->Show(); //
+
+ bitmapLeftOnly ->Show(); //
+ bitmapRightOnly ->Show(); //
+ bitmapLeftNewer ->Show(); //
+ bitmapRightNewer->Show(); //
+ bitmapDifferent ->Show(); //
+ bitmapConflict ->Show(); //
+
+ switch (compareVar)
+ {
+ case CMP_BY_TIME_SIZE:
+ buttonDifferent ->Hide();
+
+ bitmapDifferent ->Hide();
+ break;
+
+ case CMP_BY_CONTENT:
+ buttonLeftNewer ->Hide();
+ buttonRightNewer->Hide();
+
+ bitmapLeftNewer ->Hide();
+ bitmapRightNewer->Hide();
+ break;
+ }
+
+ if (syncConfig.automatic) //automatic mode needs no sync-directions
+ syncDirections->Show(false);
+
+ switch (syncConfig.exLeftSideOnly)
+ {
+ case SYNC_DIR_RIGHT:
+ buttonLeftOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRightCr")));
+ buttonLeftOnly->SetToolTip(getDescription(SO_CREATE_NEW_RIGHT));
+ break;
+ case SYNC_DIR_LEFT:
+ buttonLeftOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("deleteLeft")));
+ buttonLeftOnly->SetToolTip(getDescription(SO_DELETE_LEFT));
+ break;
+ case SYNC_DIR_NONE:
+ buttonLeftOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
+ buttonLeftOnly->SetToolTip(getDescription(SO_DO_NOTHING));
+ break;
+ }
+
+ switch (syncConfig.exRightSideOnly)
+ {
+ case SYNC_DIR_RIGHT:
+ buttonRightOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("deleteRight")));
+ buttonRightOnly->SetToolTip(getDescription(SO_DELETE_RIGHT));
+ break;
+ case SYNC_DIR_LEFT:
+ buttonRightOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeftCr")));
+ buttonRightOnly->SetToolTip(getDescription(SO_CREATE_NEW_LEFT));
+ break;
+ case SYNC_DIR_NONE:
+ buttonRightOnly->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
+ buttonRightOnly->SetToolTip(getDescription(SO_DO_NOTHING));
+ break;
+ }
+
+ switch (syncConfig.leftNewer)
+ {
+ case SYNC_DIR_RIGHT:
+ buttonLeftNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
+ buttonLeftNewer->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
+ break;
+ case SYNC_DIR_LEFT:
+ buttonLeftNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
+ buttonLeftNewer->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
+ break;
+ case SYNC_DIR_NONE:
+ buttonLeftNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
+ buttonLeftNewer->SetToolTip(getDescription(SO_DO_NOTHING));
+ break;
+ }
+
+ switch (syncConfig.rightNewer)
+ {
+ case SYNC_DIR_RIGHT:
+ buttonRightNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
+ buttonRightNewer->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
+ break;
+ case SYNC_DIR_LEFT:
+ buttonRightNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
+ buttonRightNewer->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
+ break;
+ case SYNC_DIR_NONE:
+ buttonRightNewer->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
+ buttonRightNewer->SetToolTip(getDescription(SO_DO_NOTHING));
+ break;
+ }
+
+ switch (syncConfig.different)
+ {
+ case SYNC_DIR_RIGHT:
+ buttonDifferent->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
+ buttonDifferent->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
+ break;
+ case SYNC_DIR_LEFT:
+ buttonDifferent->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
+ buttonDifferent->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
+ break;
+ case SYNC_DIR_NONE:
+ buttonDifferent->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowNone")));
+ buttonDifferent->SetToolTip(getDescription(SO_DO_NOTHING));
+ break;
+ }
+
+ switch (syncConfig.conflict)
+ {
+ case SYNC_DIR_RIGHT:
+ buttonConflict->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowRight")));
+ buttonConflict->SetToolTip(getDescription(SO_OVERWRITE_RIGHT));
+ break;
+ case SYNC_DIR_LEFT:
+ buttonConflict->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("arrowLeft")));
+ buttonConflict->SetToolTip(getDescription(SO_OVERWRITE_LEFT));
+ break;
+ case SYNC_DIR_NONE:
+ buttonConflict->SetBitmapLabel(GlobalResources::getInstance().getImageByName(wxT("conflict")));
+ buttonConflict->SetToolTip(_("Leave as unresolved conflict"));
+ break;
+ }
+}
+
+
+void SyncCfgDialog::OnClose(wxCloseEvent& event)
+{
+ EndModal(0);
+}
+
+
+void SyncCfgDialog::OnCancel(wxCommandEvent& event)
+{
+ EndModal(0);
+}
+
+
+void SyncCfgDialog::OnApply(wxCommandEvent& event)
+{
+ //write configuration to main dialog
+ refSyncConfiguration = currentSyncConfig;
+ refHandleDeletion = getDeletionHandling();
+ refCustomDeletionDirectory = m_textCtrlCustomDelFolder->GetValue();
+ if (refIgnoreErrors)
+ *refIgnoreErrors = getErrorHandling();
+
+ EndModal(BUTTON_APPLY);
+}
+
+
+void SyncCfgDialog::updateToolTipErrorHandling(bool ignoreErrors)
+{
+ if (ignoreErrors)
+ m_choiceHandleError->SetToolTip(_("Hide all error and warning messages"));
+ else
+ m_choiceHandleError->SetToolTip(_("Show popup on errors or warnings"));
+}
+
+
+bool SyncCfgDialog::getErrorHandling()
+{
+ if (m_choiceHandleError->GetSelection() == 1) //Ignore errors
+ return true;
+ else
+ return false; // Show popup
+}
+
+
+void SyncCfgDialog::setErrorHandling(bool ignoreErrors)
+{
+ m_choiceHandleError->Clear();
+ m_choiceHandleError->Append(_("Show popup"));
+ m_choiceHandleError->Append(_("Ignore errors"));
+
+ if (ignoreErrors)
+ m_choiceHandleError->SetSelection(1);
+ else
+ m_choiceHandleError->SetSelection(0);
+
+ updateToolTipErrorHandling(ignoreErrors);
+}
+
+
+void SyncCfgDialog::OnChangeErrorHandling(wxCommandEvent& event)
+{
+ updateToolTipErrorHandling(getErrorHandling());
+}
+
+//-------------------
+
+void updateToolTipDeletionHandling(wxChoice* choiceHandleError, wxPanel* customDir, const FreeFileSync::DeletionPolicy value)
+{
+ customDir->Disable();
+
+ switch (value)
+ {
+ case FreeFileSync::DELETE_PERMANENTLY:
+ choiceHandleError->SetToolTip(_("Delete or overwrite files permanently"));
+ break;
+
+ case FreeFileSync::MOVE_TO_RECYCLE_BIN:
+ choiceHandleError->SetToolTip(_("Use Recycle Bin when deleting or overwriting files"));
+ break;
+
+ case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY:
+ choiceHandleError->SetToolTip(_("Move files into a time-stamped subdirectory"));
+ customDir->Enable();
+ break;
+ }
+}
+
+
+FreeFileSync::DeletionPolicy SyncCfgDialog::getDeletionHandling()
+{
+ switch (m_choiceHandleDeletion->GetSelection())
+ {
+ case 0:
+ return FreeFileSync::DELETE_PERMANENTLY;
+ case 1:
+ return FreeFileSync::MOVE_TO_RECYCLE_BIN;
+ case 2:
+ return FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY;
+ default:
+ assert(false);
+ return FreeFileSync::MOVE_TO_RECYCLE_BIN;
+ }
+}
+
+
+void SyncCfgDialog::setDeletionHandling(FreeFileSync::DeletionPolicy newValue)
+{
+ m_choiceHandleDeletion->Clear();
+ m_choiceHandleDeletion->Append(_("Delete permanently"));
+ m_choiceHandleDeletion->Append(_("Use Recycle Bin"));
+ m_choiceHandleDeletion->Append(_("User-defined directory"));
+
+ switch (newValue)
+ {
+ case FreeFileSync::DELETE_PERMANENTLY:
+ m_choiceHandleDeletion->SetSelection(0);
+ break;
+ case FreeFileSync::MOVE_TO_RECYCLE_BIN:
+ m_choiceHandleDeletion->SetSelection(1);
+ break;
+ case FreeFileSync::MOVE_TO_CUSTOM_DIRECTORY:
+ m_choiceHandleDeletion->SetSelection(2);
+ break;
+ }
+
+ updateToolTipDeletionHandling(m_choiceHandleDeletion, m_panelCustomDeletionDir, newValue);
+}
+
+
+void SyncCfgDialog::OnChangeDeletionHandling(wxCommandEvent& event)
+{
+ updateToolTipDeletionHandling(m_choiceHandleDeletion, m_panelCustomDeletionDir, getDeletionHandling());
+}
+
+
+void SyncCfgDialog::OnSyncAutomatic(wxCommandEvent& event)
+{
+ FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::AUTOMATIC);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void SyncCfgDialog::OnSyncLeftToRight(wxCommandEvent& event)
+{
+ FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::MIRROR);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void SyncCfgDialog::OnSyncUpdate(wxCommandEvent& event)
+{
+ FreeFileSync::setVariant(currentSyncConfig, SyncConfiguration::UPDATE);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void toggleSyncDirection(SyncDirection& current)
+{
+ switch (current)
+ {
+ case SYNC_DIR_RIGHT:
+ current = SYNC_DIR_LEFT;
+ break;
+ case SYNC_DIR_LEFT:
+ current = SYNC_DIR_NONE;
+ break;
+ case SYNC_DIR_NONE:
+ current = SYNC_DIR_RIGHT;
+ break;
+ }
+}
+
+
+void SyncCfgDialog::OnExLeftSideOnly(wxCommandEvent& event )
+{
+ toggleSyncDirection(currentSyncConfig.exLeftSideOnly);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void SyncCfgDialog::OnExRightSideOnly(wxCommandEvent& event )
+{
+ toggleSyncDirection(currentSyncConfig.exRightSideOnly);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void SyncCfgDialog::OnLeftNewer(wxCommandEvent& event )
+{
+ toggleSyncDirection(currentSyncConfig.leftNewer);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void SyncCfgDialog::OnRightNewer(wxCommandEvent& event )
+{
+ toggleSyncDirection(currentSyncConfig.rightNewer);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void SyncCfgDialog::OnDifferent(wxCommandEvent& event )
+{
+ toggleSyncDirection(currentSyncConfig.different);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
+
+
+void SyncCfgDialog::OnConflict(wxCommandEvent& event)
+{
+ toggleSyncDirection(currentSyncConfig.conflict);
+ updateConfigIcons(cmpVariant, currentSyncConfig);
+}
diff --git a/ui/settingsDialog.h b/ui/syncConfig.h
index 5a36b1c4..dc76325c 100644
--- a/ui/settingsDialog.h
+++ b/ui/syncConfig.h
@@ -4,17 +4,13 @@
// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
-#ifndef SYNCDIALOG_H_INCLUDED
-#define SYNCDIALOG_H_INCLUDED
+#ifndef SYNCCONFIG_H_INCLUDED
+#define SYNCCONFIG_H_INCLUDED
-#include "guiGenerated.h"
-#include "../library/processXml.h"
#include <memory>
+#include "guiGenerated.h"
+#include "../structures.h"
-class BatchFileDropEvent;
-class BatchFolderPairPanel;
-class FirstBatchFolderPairCfg;
-class wxHelpController;
namespace FreeFileSync
{
@@ -100,90 +96,4 @@ private:
std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropCustomDelFolder;
};
-
-class BatchDialog: public BatchDlgGenerated
-{
- friend class BatchFileDropEvent;
- template <class GuiPanel>
- friend class FolderPairCallback;
-
-public:
- BatchDialog(wxWindow* window, const xmlAccess::XmlBatchConfig& batchCfg);
- BatchDialog(wxWindow* window, const wxString& filename);
- ~BatchDialog();
-
- enum
- {
- BATCH_FILE_SAVED = 15
- };
-
-private:
- void init();
-
- virtual void OnExLeftSideOnly( wxCommandEvent& event);
- virtual void OnExRightSideOnly( wxCommandEvent& event);
- virtual void OnLeftNewer( wxCommandEvent& event);
- virtual void OnRightNewer( wxCommandEvent& event);
- virtual void OnDifferent( wxCommandEvent& event);
- virtual void OnConflict( wxCommandEvent& event);
- virtual void OnHelp( wxCommandEvent& event);
-
- virtual void OnCheckAutomatic( wxCommandEvent& event);
- virtual void OnCheckFilter( wxCommandEvent& event);
- virtual void OnCheckSilent( wxCommandEvent& event);
- virtual void OnChangeCompareVar( wxCommandEvent& event);
- virtual void OnClose( wxCloseEvent& event);
- virtual void OnCancel( wxCommandEvent& event);
- virtual void OnSaveBatchJob( wxCommandEvent& event);
- virtual void OnLoadBatchJob( wxCommandEvent& event);
- virtual void OnAddFolderPair( wxCommandEvent& event);
- virtual void OnRemoveFolderPair( wxCommandEvent& event);
- virtual void OnRemoveTopFolderPair(wxCommandEvent& event);
-
- void addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront = false);
- void removeAddFolderPair(const int pos);
- void clearAddFolderPairs();
-
- void updateGuiForFolderPair();
-
- FreeFileSync::CompareVariant getCurrentCompareVar() const;
-
- void updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig);
-
- void updateVisibleTabs();
- void showNotebookpage(wxWindow* page, const wxString& pageName, bool show);
-
- //error handling
- xmlAccess::OnError getSelectionHandleError() const;
- void setSelectionHandleError(const xmlAccess::OnError value);
- void OnChangeErrorHandling(wxCommandEvent& event);
-
- //set tooltip
- void updateToolTipErrorHandling(const xmlAccess::OnError value);
-
- //deletion handling
- FreeFileSync::DeletionPolicy getDeletionHandling() const;
- void setDeletionHandling(FreeFileSync::DeletionPolicy newValue);
- void OnChangeDeletionHandling(wxCommandEvent& event);
-
-
- bool saveBatchFile(const wxString& filename);
- void loadBatchFile(const wxString& filename);
- void loadBatchCfg(const xmlAccess::XmlBatchConfig& batchCfg);
-
- xmlAccess::XmlBatchConfig getCurrentConfiguration() const;
-
- FreeFileSync::SyncConfiguration localSyncConfiguration;
-
- boost::shared_ptr<FirstBatchFolderPairCfg> firstFolderPair; //always bound!!!
- std::vector<BatchFolderPairPanel*> additionalFolderPairs;
-
- //used when saving batch file
- wxString proposedBatchFileName;
-
- //add drag & drop support when selecting logfile directory
- std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnLogfileDir;
- std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropCustomDelFolder;
-};
-
-#endif // SYNCDIALOG_H_INCLUDED
+#endif // SYNCCONFIG_H_INCLUDED
diff --git a/version/version.h b/version/version.h
index 051e98f3..85d6e74b 100644
--- a/version/version.h
+++ b/version/version.h
@@ -2,5 +2,5 @@
namespace FreeFileSync
{
- static const wxString currentVersion = wxT("3.5"); //internal linkage!
+ static const wxString currentVersion = wxT("3.7"); //internal linkage!
}
bgstack15