diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:03:20 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:03:20 +0200 |
commit | 528635604eea1d8c679a3d038e2f00030ef72444 (patch) | |
tree | 9c3cbec29aa7d3e209939662e040b9342c9e7400 /RealtimeSync | |
parent | 3.1 (diff) | |
download | FreeFileSync-528635604eea1d8c679a3d038e2f00030ef72444.tar.gz FreeFileSync-528635604eea1d8c679a3d038e2f00030ef72444.tar.bz2 FreeFileSync-528635604eea1d8c679a3d038e2f00030ef72444.zip |
3.2
Diffstat (limited to 'RealtimeSync')
-rw-r--r-- | RealtimeSync/RealtimeSync.cbp | 4 | ||||
-rw-r--r-- | RealtimeSync/RealtimeSync.vcproj | 203 | ||||
-rw-r--r-- | RealtimeSync/application.cpp | 11 | ||||
-rw-r--r-- | RealtimeSync/application.h | 4 | ||||
-rw-r--r-- | RealtimeSync/functions.cpp | 1 | ||||
-rw-r--r-- | RealtimeSync/guiGenerated.cpp | 10 | ||||
-rw-r--r-- | RealtimeSync/guiGenerated.h | 1 | ||||
-rw-r--r-- | RealtimeSync/mainDialog.cpp | 19 | ||||
-rw-r--r-- | RealtimeSync/mainDialog.h | 5 | ||||
-rw-r--r-- | RealtimeSync/makefile | 2 | ||||
-rw-r--r-- | RealtimeSync/resources.cpp | 3 | ||||
-rw-r--r-- | RealtimeSync/xmlFreeFileSync.cpp | 15 |
12 files changed, 256 insertions, 22 deletions
diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp index 47afabf3..d15a5ab2 100644 --- a/RealtimeSync/RealtimeSync.cbp +++ b/RealtimeSync/RealtimeSync.cbp @@ -72,7 +72,7 @@ <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_40_0" /> + <Add directory="..\shared\boost_1_x" /> </Compiler> <ResourceCompiler> <Add directory="C:\Programme\C++\wxWidgets\include" /> @@ -123,6 +123,8 @@ <Unit filename="..\Shared\zstring.cpp" /> <Unit filename="..\Shared\zstring.h" /> <Unit filename="..\library\processXml.cpp" /> + <Unit filename="..\shared\dllLoader.cpp" /> + <Unit filename="..\shared\dllLoader.h" /> <Unit filename="..\shared\fileError.h" /> <Unit filename="..\shared\fileHandling.cpp" /> <Unit filename="..\shared\fileHandling.h" /> diff --git a/RealtimeSync/RealtimeSync.vcproj b/RealtimeSync/RealtimeSync.vcproj index 7aebda01..f3501a17 100644 --- a/RealtimeSync/RealtimeSync.vcproj +++ b/RealtimeSync/RealtimeSync.vcproj @@ -12,14 +12,17 @@ <Platform Name="Win32" /> + <Platform + Name="x64" + /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" - OutputDirectory="..\OBJ\$(ConfigurationName)_RTS_VCPP" - IntermediateDirectory="..\OBJ\$(ConfigurationName)_RTS_VCPP" + OutputDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" + IntermediateDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" ConfigurationType="1" CharacterSet="1" > @@ -42,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""C:\Programme\C++\wxWidgets\include";"C:\Programme\C++\wxWidgets\lib\vc_lib\mswud";..\shared\boost_1_40_0" + AdditionalIncludeDirectories=""C:\Programme\C++\wxWidgets\include";"C:\Programme\C++\wxWidgets\lib\vc_lib\mswud";..\shared\boost_1_x" PreprocessorDefinitions="wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -100,9 +103,93 @@ /> </Configuration> <Configuration + Name="Debug|x64" + OutputDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" + IntermediateDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + CommandLine="" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""D:\Programme\C++\wxWidgets-x64\include";"D:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud";..\shared\boost_1_x" + PreprocessorDefinitions="wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;ZSTRING_WIDE_CHAR" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + DisableSpecificWarnings="4804" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + Culture="0" + AdditionalIncludeDirectories="D:\Programme\C++\wxWidgets-x64\include;D:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="wxmsw28ud_adv.lib 
wxmsw28ud_core.lib 
wxbase28ud.lib 
wxpngd.lib
 wxzlibd.lib 
wxbase28ud_net.lib comctl32.lib ws2_32.lib Rpcrt4.lib" + OutputFile="..\BUILD\$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="D:\Programme\C++\wxWidgets-x64\lib\vc_lib" + GenerateManifest="true" + GenerateDebugInformation="true" + SubSystem="2" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + EmbedManifest="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="clean up" + CommandLine="" + /> + </Configuration> + <Configuration Name="Release|Win32" - OutputDirectory="..\OBJ\$(ConfigurationName)_RTS_VCPP" - IntermediateDirectory="..\OBJ\$(ConfigurationName)_RTS_VCPP" + OutputDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" + IntermediateDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" ConfigurationType="1" CharacterSet="1" WholeProgramOptimization="1" @@ -127,7 +214,7 @@ Optimization="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" - AdditionalIncludeDirectories=""C:\Programme\C++\wxWidgets\include";"C:\Programme\C++\wxWidgets\lib\vc_lib\mswu";..\shared\boost_1_40_0" + AdditionalIncludeDirectories=""C:\Programme\C++\wxWidgets\include";"C:\Programme\C++\wxWidgets\lib\vc_lib\mswu";..\shared\boost_1_x" PreprocessorDefinitions="wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -182,6 +269,90 @@ CommandLine="" /> </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" + IntermediateDirectory="OBJ\$(ProjectName)_$(ConfigurationName)_$(PlatformName)_VCPP" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + AdditionalIncludeDirectories=""D:\Programme\C++\wxWidgets-x64\include";"D:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu";..\shared\boost_1_x" + PreprocessorDefinitions="wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;ZSTRING_WIDE_CHAR" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + DisableSpecificWarnings="4804" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + Culture="1033" + AdditionalIncludeDirectories=""D:\Programme\C++\wxWidgets-x64\include";"D:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu"" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="wxmsw28u_adv.lib 
wxmsw28u_core.lib 
wxbase28u.lib 
wxpng.lib 
wxzlib.lib 
wxbase28u_net.lib comctl32.lib ws2_32.lib" + OutputFile="..\BUILD\$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="D:\Programme\C++\wxWidgets-x64\lib\vc_lib" + GenerateDebugInformation="false" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> </Configurations> <References> </References> @@ -200,6 +371,10 @@ > </File> <File + RelativePath="..\shared\dllLoader.cpp" + > + </File> + <File RelativePath="..\shared\dragAndDrop.cpp" > </File> @@ -313,6 +488,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_UNICODE;UNICODE;wxUSE_NO_MANIFEST" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -320,6 +503,14 @@ PreprocessorDefinitions="_UNICODE;UNICODE;wxUSE_NO_MANIFEST" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_UNICODE;UNICODE;wxUSE_NO_MANIFEST" + /> + </FileConfiguration> </File> </Filter> </Files> diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp index 827a54c6..b974fb89 100644 --- a/RealtimeSync/application.cpp +++ b/RealtimeSync/application.cpp @@ -43,6 +43,15 @@ void Application::OnStartApplication(wxIdleEvent& event) ::gtk_rc_parse("styles.rc"); //remove inner border from bitmap buttons #endif + //initialize help controller + helpController.reset(new wxHelpController); + helpController->Initialize(FreeFileSync::getInstallationDir() + +#ifdef FFS_WIN + wxT("FreeFileSync.chm")); +#elif defined FFS_LINUX + wxT("Help/FreeFileSync.hhp")); +#endif + //set program language FreeFileSync::CustomLocale::getInstance().setLanguage(RealtimeSync::getProgramLanguage()); @@ -67,7 +76,7 @@ void Application::OnStartApplication(wxIdleEvent& event) GlobalResources::getInstance().load(); //loads bitmap resources on program startup - MainDialog* frame = new MainDialog(NULL, cfgFilename); + MainDialog* frame = new MainDialog(NULL, cfgFilename, *helpController); frame->SetIcon(*GlobalResources::getInstance().programIcon); //set application icon frame->Show(); } diff --git a/RealtimeSync/application.h b/RealtimeSync/application.h index f6bfdd37..e7116156b 100644 --- a/RealtimeSync/application.h +++ b/RealtimeSync/application.h @@ -9,6 +9,8 @@ #define REALTIMESYNCAPP_H #include <wx/app.h> +#include <wx/help.h> +#include <memory> class Application : public wxApp { @@ -17,6 +19,8 @@ public: private: void OnStartApplication(wxIdleEvent& event); + + std::auto_ptr<wxHelpController> helpController; //global help controller }; #endif // REALTIMESYNCAPP_H diff --git a/RealtimeSync/functions.cpp b/RealtimeSync/functions.cpp index e5e3f5f5..93d075c0 100644 --- a/RealtimeSync/functions.cpp +++ b/RealtimeSync/functions.cpp @@ -1,7 +1,6 @@ #include "functions.h" #include <wx/textctrl.h> #include <wx/filepicker.h> -//#include "../shared/globalFunctions.h" #include "../shared/stringConv.h" #include "../shared/fileHandling.h" diff --git a/RealtimeSync/guiGenerated.cpp b/RealtimeSync/guiGenerated.cpp index 6954f01c..7e705927 100644 --- a/RealtimeSync/guiGenerated.cpp +++ b/RealtimeSync/guiGenerated.cpp @@ -34,7 +34,13 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_menubar1->Append( m_menuFile, _("&File") ); m_menuHelp = new wxMenu(); - m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + wxMenuItem* m_menuItemContent; + m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemContent ); + + m_menuHelp->AppendSeparator(); + + m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) , wxEmptyString, wxITEM_NORMAL ); m_menuHelp->Append( m_menuItemAbout ); m_menubar1->Append( m_menuHelp, _("&Help") ); @@ -156,6 +162,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) ); this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) ); this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) ); + this->Connect( m_menuItemContent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) ); m_bpButtonAddFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this ); m_bpButtonRemoveTopFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this ); @@ -170,6 +177,7 @@ MainDlgGenerated::~MainDlgGenerated() this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) ); m_bpButtonAddFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this ); m_bpButtonRemoveTopFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this ); diff --git a/RealtimeSync/guiGenerated.h b/RealtimeSync/guiGenerated.h index 17f28278..91669af8 100644 --- a/RealtimeSync/guiGenerated.h +++ b/RealtimeSync/guiGenerated.h @@ -70,6 +70,7 @@ class MainDlgGenerated : public wxFrame virtual void OnSaveConfig( wxCommandEvent& event ){ event.Skip(); } virtual void OnLoadConfig( wxCommandEvent& event ){ event.Skip(); } virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ){ event.Skip(); } virtual void OnMenuAbout( wxCommandEvent& event ){ event.Skip(); } virtual void OnAddFolder( wxCommandEvent& event ){ event.Skip(); } virtual void OnRemoveTopFolder( wxCommandEvent& event ){ event.Skip(); } diff --git a/RealtimeSync/mainDialog.cpp b/RealtimeSync/mainDialog.cpp index d849eee5..8d9c7d7a 100644 --- a/RealtimeSync/mainDialog.cpp +++ b/RealtimeSync/mainDialog.cpp @@ -17,8 +17,11 @@ using namespace FreeFileSync; -MainDialog::MainDialog(wxDialog *dlg, const wxString& cfgFilename) - : MainDlgGenerated(dlg) +MainDialog::MainDialog(wxDialog *dlg, + const wxString& cfgFilename, + wxHelpController& helpController) + : MainDlgGenerated(dlg), + helpController_(helpController) { wxWindowUpdateLocker dummy(this); //avoid display distortion @@ -93,7 +96,7 @@ MainDialog::~MainDialog() { writeRealConfig(currentCfg, lastConfigFileName()); } - catch (const FreeFileSync::FileError& error) + catch (const xmlAccess::XmlError& error) { wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR); } @@ -121,6 +124,16 @@ const wxString& MainDialog::lastConfigFileName() } +void MainDialog::OnShowHelp(wxCommandEvent& event) +{ + #ifdef FFS_WIN + helpController_.DisplaySection(wxT("html\\advanced\\RealtimeSync.html")); + #elif defined FFS_LINUX + helpController_.DisplaySection(wxT("html/advanced/RealtimeSync.html")); + #endif +} + + void MainDialog::OnMenuAbout(wxCommandEvent& event) { //build information diff --git a/RealtimeSync/mainDialog.h b/RealtimeSync/mainDialog.h index 9cf44a67..8447d269 100644 --- a/RealtimeSync/mainDialog.h +++ b/RealtimeSync/mainDialog.h @@ -12,6 +12,7 @@ #include <vector> #include <memory> #include "../shared/dragAndDrop.h" +#include <wx/help.h> namespace xmlAccess { @@ -36,7 +37,7 @@ private: class MainDialog: public MainDlgGenerated { public: - MainDialog(wxDialog *dlg, const wxString& cfgFilename); + MainDialog(wxDialog *dlg, const wxString& cfgFilename, wxHelpController& helpController); ~MainDialog(); void loadConfig(const wxString& filename); @@ -44,6 +45,7 @@ public: private: virtual void OnClose( wxCloseEvent& event); virtual void OnQuit( wxCommandEvent& event); + virtual void OnShowHelp( wxCommandEvent& event); virtual void OnMenuAbout( wxCommandEvent& event); virtual void OnAddFolder( wxCommandEvent& event); virtual void OnRemoveFolder( wxCommandEvent& event); @@ -68,6 +70,7 @@ private: //additional folders std::vector<FolderPanel*> additionalFolders; //additional pairs to the standard pair + wxHelpController& helpController_; //support for drag and drop on main folder std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnFolder; }; diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile index 054bd3c1..25dd373f 100644 --- a/RealtimeSync/makefile +++ b/RealtimeSync/makefile @@ -1,4 +1,4 @@ -CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -I../shared/boost_1_40_0 +CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -I../shared/boost_1_x LINKFLAGS=`wx-config --libs --debug=no --unicode=yes` -O3 -pthread FILE_LIST= #internal list of all *.cpp files needed for compilation diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp index 37a0bb43..fe2a5ced 100644 --- a/RealtimeSync/resources.cpp +++ b/RealtimeSync/resources.cpp @@ -4,7 +4,6 @@ #include <wx/image.h> #include <wx/icon.h> #include <memory> -#include "../shared/stringConv.h" #include "../shared/standardPaths.h" #include "../shared/systemConstants.h" @@ -42,7 +41,7 @@ GlobalResources::~GlobalResources() void GlobalResources::load() const { - wxFFileInputStream input(FreeFileSync::getInstallationDir() + zToWx(globalFunctions::FILE_NAME_SEPARATOR) + wxT("Resources.dat")); + wxFFileInputStream input(FreeFileSync::getInstallationDir() + wxT("Resources.dat")); if (input.IsOk()) //if not... we don't want to react too harsh here { //activate support for .png files diff --git a/RealtimeSync/xmlFreeFileSync.cpp b/RealtimeSync/xmlFreeFileSync.cpp index dc352135..d09e7a7a 100644 --- a/RealtimeSync/xmlFreeFileSync.cpp +++ b/RealtimeSync/xmlFreeFileSync.cpp @@ -34,8 +34,8 @@ xmlAccess::XmlRealConfig convertBatchToReal(const xmlAccess::XmlBatchConfig& bat #endif //add main folders - uniqueFolders.insert(zToWx(batchCfg.mainCfg.mainFolderPair.leftDirectory)); - uniqueFolders.insert(zToWx(batchCfg.mainCfg.mainFolderPair.rightDirectory)); + uniqueFolders.insert(zToWx(batchCfg.mainCfg.firstPair.leftDirectory)); + uniqueFolders.insert(zToWx(batchCfg.mainCfg.firstPair.rightDirectory)); //additional folders for (std::vector<FreeFileSync::FolderPairEnh>::const_iterator i = batchCfg.mainCfg.additionalPairs.begin(); @@ -47,8 +47,13 @@ xmlAccess::XmlRealConfig convertBatchToReal(const xmlAccess::XmlBatchConfig& bat output.directories.insert(output.directories.end(), uniqueFolders.begin(), uniqueFolders.end()); - output.commandline = FreeFileSync::getInstallationDir() + zToWx(globalFunctions::FILE_NAME_SEPARATOR) + wxT("FreeFileSync.exe ") + - wxT("\"") + filename + wxT("\""); + output.commandline = FreeFileSync::getInstallationDir() + +#ifdef FFS_WIN + wxT("FreeFileSync.exe") + +#elif defined FFS_LINUX + wxT("FreeFileSync") + +#endif + wxT(" \"") + filename + wxT("\""); return output; } @@ -76,7 +81,7 @@ void RealtimeSync::readRealOrBatchConfig(const wxString& filename, xmlAccess::Xm config = convertBatchToReal(batchCfg, filename); //do work despite parsing errors, then re-throw throw; // } - config = convertBatchToReal(batchCfg, filename); + config = convertBatchToReal(batchCfg, filename); } |