From 9ee86228fb287d93b79c83bd684614eb988cd8f2 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 7 Jun 2022 15:38:20 -0400 Subject: ffs: major rewrite of spec for el8 and fc --- freefilesync/00_allow_parallel_ops.patch | 57 +++ freefilesync/01_no_check_updates.patch | 273 ++++++++++++++ freefilesync/02_no_wx311.patch | 138 +++++++ freefilesync/03_sftp.patch | 25 ++ .../04_revert_zenju_aggressive_upstreamisms.patch | 338 +++++++++++++++++ freefilesync/05_traditional_view.patch | 318 ++++++++++++++++ freefilesync/06_icon_loader.patch | 21 ++ freefilesync/07_libssh2.patch | 25 ++ freefilesync/ffs_allow_parallel_ops.patch | 57 --- freefilesync/ffs_bit.patch | 26 -- freefilesync/ffs_curl.patch | 62 ---- freefilesync/ffs_distro_el6_el7.patch | 137 +++++++ freefilesync/ffs_distro_fedora.patch | 108 ++++++ freefilesync/ffs_el.patch | 137 ------- freefilesync/ffs_el6_el7_bit.patch | 26 ++ freefilesync/ffs_el6_el7_no_eraseif.patch | 405 +++++++++++++++++++++ freefilesync/ffs_fedora.patch | 108 ------ freefilesync/ffs_icon_loader.patch | 21 -- freefilesync/ffs_libcurl_7.61.1.patch | 79 ++++ freefilesync/ffs_libcurl_7.71.1.patch | 62 ++++ freefilesync/ffs_libssh2.patch | 25 -- freefilesync/ffs_no_check_updates.patch | 273 -------------- freefilesync/ffs_no_eraseif.patch | 405 --------------------- freefilesync/ffs_no_gcc12.patch | 2 + freefilesync/ffs_no_wx311.patch | 138 ------- freefilesync/ffs_openssl.patch | 4 +- freefilesync/ffs_sftp.patch | 25 -- freefilesync/ffs_traditional_view.patch | 318 ---------------- freefilesync/freefilesync.spec | 140 ++++--- .../revert_zenju_aggressive_upstreamisms.patch | 338 ----------------- 30 files changed, 2103 insertions(+), 1988 deletions(-) create mode 100644 freefilesync/00_allow_parallel_ops.patch create mode 100644 freefilesync/01_no_check_updates.patch create mode 100644 freefilesync/02_no_wx311.patch create mode 100644 freefilesync/03_sftp.patch create mode 100644 freefilesync/04_revert_zenju_aggressive_upstreamisms.patch create mode 100644 freefilesync/05_traditional_view.patch create mode 100644 freefilesync/06_icon_loader.patch create mode 100644 freefilesync/07_libssh2.patch delete mode 100644 freefilesync/ffs_allow_parallel_ops.patch delete mode 100644 freefilesync/ffs_bit.patch delete mode 100644 freefilesync/ffs_curl.patch create mode 100644 freefilesync/ffs_distro_el6_el7.patch create mode 100644 freefilesync/ffs_distro_fedora.patch delete mode 100644 freefilesync/ffs_el.patch create mode 100644 freefilesync/ffs_el6_el7_bit.patch create mode 100644 freefilesync/ffs_el6_el7_no_eraseif.patch delete mode 100644 freefilesync/ffs_fedora.patch delete mode 100644 freefilesync/ffs_icon_loader.patch create mode 100644 freefilesync/ffs_libcurl_7.61.1.patch create mode 100644 freefilesync/ffs_libcurl_7.71.1.patch delete mode 100644 freefilesync/ffs_libssh2.patch delete mode 100644 freefilesync/ffs_no_check_updates.patch delete mode 100644 freefilesync/ffs_no_eraseif.patch delete mode 100644 freefilesync/ffs_no_wx311.patch delete mode 100644 freefilesync/ffs_sftp.patch delete mode 100644 freefilesync/ffs_traditional_view.patch delete mode 100644 freefilesync/revert_zenju_aggressive_upstreamisms.patch (limited to 'freefilesync') diff --git a/freefilesync/00_allow_parallel_ops.patch b/freefilesync/00_allow_parallel_ops.patch new file mode 100644 index 0000000..473ae46 --- /dev/null +++ b/freefilesync/00_allow_parallel_ops.patch @@ -0,0 +1,57 @@ +Last version tested: 11.13 +The source release appears not to actually include the logic that performs operations in parallel, so this patch doesn't actually do anything. +diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-0/FreeFileSync/Source/ui/folder_selector.cpp 11.4-1/FreeFileSync/Source/ui/folder_selector.cpp +--- 11.4-0/FreeFileSync/Source/ui/folder_selector.cpp 2020-12-08 08:15:29.428156465 -0500 ++++ 11.4-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-12-08 19:12:09.205183330 -0500 +@@ -256,7 +256,7 @@ + void FolderSelector::onSelectAltFolder(wxCommandEvent& event) + { + Zstring folderPathPhrase = getPath(); +- size_t parallelOps = getDeviceParallelOps_ ? getDeviceParallelOps_(folderPathPhrase) : 1; ++ size_t parallelOps = getDeviceParallelOps_ ? getDeviceParallelOps_(folderPathPhrase) : 5; + + if (showCloudSetupDialog(parent_, folderPathPhrase, sftpKeyFileLastSelected_, parallelOps, static_cast(setDeviceParallelOps_)) != ConfirmationButton::accept) + return; +diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 08:15:29.432156507 -0500 ++++ 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 19:07:22.970153675 -0500 +@@ -370,11 +370,14 @@ + + m_spinCtrlConnectionCount->SetValue(parallelOps); + +- m_spinCtrlConnectionCount->Disable(); +- m_staticTextConnectionCountDescr->Hide(); ++ if (!canChangeParallelOp) ++ { ++ m_spinCtrlConnectionCount->Disable(); ++ m_staticTextConnectionCountDescr->Hide(); + +- m_spinCtrlChannelCountSftp->Disable(); +- m_buttonChannelCountSftp ->Disable(); ++ m_spinCtrlChannelCountSftp->Disable(); ++ m_buttonChannelCountSftp ->Disable(); ++ } + //--------------------------------------------------------- + + //set up default view for dialog size calculation +@@ -807,7 +810,7 @@ + + targetFolder = std::make_unique(this, *this, *m_buttonSelectTargetFolder, *m_bpButtonSelectAltTargetFolder, *m_targetFolderPath, + targetFolderLastSelected, sftpKeyFileLastSelected, nullptr /*staticText*/, nullptr /*wxWindow*/, nullptr /*droppedPathsFilter*/, +- [](const Zstring& folderPathPhrase) { return 1; } /*getDeviceParallelOps*/, nullptr /*setDeviceParallelOps*/); ++ [](const Zstring& folderPathPhrase) { return 5; } /*getDeviceParallelOps*/, nullptr /*setDeviceParallelOps*/); + + m_targetFolderPath->setHistory(std::make_shared(folderHistory, folderHistoryMax)); + +diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-0/FreeFileSync/Source/ui/sync_cfg.cpp 11.4-1/FreeFileSync/Source/ui/sync_cfg.cpp +--- 11.13-0/FreeFileSync/Source/ui/sync_cfg.cpp 2021-08-17 19:18:02.039992429 -0400 ++++ 11.13-1/FreeFileSync/Source/ui/sync_cfg.cpp 2021-08-17 19:33:01.693071327 -0400 +@@ -348,7 +348,7 @@ + commandHistoryOut_(commandHistory), + globalPairCfg_(globalPairCfg), + localPairCfg_(localPairCfg), +- enableExtraFeatures_(false), ++ enableExtraFeatures_(true), + showMultipleCfgs_(showMultipleCfgs) + { + setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonOkay).setCancel(m_buttonCancel)); diff --git a/freefilesync/01_no_check_updates.patch b/freefilesync/01_no_check_updates.patch new file mode 100644 index 0000000..eececed --- /dev/null +++ b/freefilesync/01_no_check_updates.patch @@ -0,0 +1,273 @@ +Version: 11.20 +Date: 2022-04-18 +Author: bgstack15 +Message: This is a major rewrite of the ffs_no_check_updates patch from before 11.10 which disabled only a few technical www interactions. This current version completely deletes all logic associated with checking the version of the program. +diff -aur 11.18-0/FreeFileSync/Source/ui/gui_generated.cpp 11.18-1/FreeFileSync/Source/ui/gui_generated.cpp +--- 11.21-0/FreeFileSync/Source/ui/gui_generated.cpp 2022-05-22 17:09:32.246809650 -0400 ++++ 11.21-1/FreeFileSync/Source/ui/gui_generated.cpp 2022-05-22 17:43:22.568148782 -0400 +@@ -110,15 +110,6 @@ + + m_menuHelp->AppendSeparator(); + +- m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ), wxEmptyString, wxITEM_NORMAL ); +- m_menuHelp->Append( m_menuItemCheckVersionNow ); +- +- m_menuItemCheckVersionAuto = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("Check &automatically once a week") ), wxEmptyString, wxITEM_CHECK ); +- m_menuHelp->Append( m_menuItemCheckVersionAuto ); +- m_menuItemCheckVersionAuto->Check( true ); +- +- m_menuHelp->AppendSeparator(); +- + m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemAbout ); + +@@ -1131,8 +1122,6 @@ + m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuExportFileList ), this, m_menuItemExportList->GetId()); + m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuResetLayout ), this, m_menuItemResetLayout->GetId()); + m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onShowHelp ), this, m_menuItemHelp->GetId()); +- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersion ), this, m_menuItemCheckVersionNow->GetId()); +- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersionAutomatically ), this, m_menuItemCheckVersionAuto->GetId()); + m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuAbout ), this, m_menuItemAbout->GetId()); + m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCmpSettings ), NULL, this ); + m_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); +diff -aur 11.18-0/FreeFileSync/Source/ui/gui_generated.h 11.18-1/FreeFileSync/Source/ui/gui_generated.h +--- 11.21-0/FreeFileSync/Source/ui/gui_generated.h 2022-05-22 17:09:32.246809650 -0400 ++++ 11.21-1/FreeFileSync/Source/ui/gui_generated.h 2022-05-22 17:41:42.058897375 -0400 +@@ -96,8 +96,6 @@ + wxMenuItem* m_menuItemShowOverview; + wxMenu* m_menuHelp; + wxMenuItem* m_menuItemHelp; +- wxMenuItem* m_menuItemCheckVersionNow; +- wxMenuItem* m_menuItemCheckVersionAuto; + wxMenuItem* m_menuItemAbout; + wxBoxSizer* bSizerPanelHolder; + wxPanel* m_panelTopButtons; +@@ -232,8 +230,6 @@ + virtual void onMenuExportFileList( wxCommandEvent& event ) { event.Skip(); } + virtual void onMenuResetLayout( wxCommandEvent& event ) { event.Skip(); } + virtual void onShowHelp( wxCommandEvent& event ) { event.Skip(); } +- virtual void onMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); } +- virtual void onMenuCheckVersionAutomatically( wxCommandEvent& event ) { event.Skip(); } + virtual void onMenuAbout( wxCommandEvent& event ) { event.Skip(); } + virtual void onCompSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); } + virtual void onCompSettingsContext( wxCommandEvent& event ) { event.Skip(); } +diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Source/ui/main_dlg.cpp +--- 11.16-0/FreeFileSync/Source/ui/main_dlg.cpp 2022-01-04 08:52:19.811432573 -0500 ++++ 11.16-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-01-04 08:57:14.506728896 -0500 +@@ -744,7 +744,6 @@ + + setImage(*m_menuItemHelp, loadImage("help_sicon")); + setImage(*m_menuItemAbout, loadImage("about_sicon")); +- setImage(*m_menuItemCheckVersionNow, loadImage("update_check_sicon")); + + fixMenuIcons(*m_menuFile); + fixMenuIcons(*m_menuActions); +@@ -854,9 +853,6 @@ + //mainly to update row label sizes... + updateGui(); + +- //register regular check for update on next idle event +- Bind(wxEVT_IDLE, &MainDialog::onStartupUpdateCheck, this); +- + //asynchronous call to wxWindow::Layout(): fix superfluous frame on right and bottom when FFS is started in fullscreen mode + Bind(wxEVT_IDLE, &MainDialog::onLayoutWindowAsync, this); + wxCommandEvent evtDummy; //call once before onLayoutWindowAsync() +@@ -1108,8 +1104,6 @@ + auiMgr_.GetPane(m_panelSearch).Hide(); //no need to show it on startup + auiMgr_.GetPane(m_panelLog ).Hide(); // + +- m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.lastUpdateCheck)); +- + auiMgr_.Update(); + } + +@@ -5706,72 +5700,6 @@ + } + } + +- +-void MainDialog::onMenuCheckVersion(wxCommandEvent& event) +-{ +- checkForUpdateNow(*this, globalCfg_.lastOnlineVersion); +-} +- +- +-void MainDialog::onMenuCheckVersionAutomatically(wxCommandEvent& event) +-{ +- if (updateCheckActive(globalCfg_.lastUpdateCheck)) +- disableUpdateCheck(globalCfg_.lastUpdateCheck); +- else +- globalCfg_.lastUpdateCheck = 0; //reset to GlobalSettings.xml default value! +- +- m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.lastUpdateCheck)); +- +- if (shouldRunAutomaticUpdateCheck(globalCfg_.lastUpdateCheck)) +- { +- flashStatusInfo(_("Searching for program updates...")); +- //synchronous update check is sufficient here: +- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, +- automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get()); +- } +-} +- +- +-void MainDialog::onStartupUpdateCheck(wxIdleEvent& event) +-{ +- //execute just once per startup! +- [[maybe_unused]] bool ubOk = Unbind(wxEVT_IDLE, &MainDialog::onStartupUpdateCheck, this); +- assert(ubOk); +- +- auto showNewVersionReminder = [this] +- { +- if (!globalCfg_.lastOnlineVersion.empty() && haveNewerVersionOnline(globalCfg_.lastOnlineVersion)) +- { +- auto menu = new wxMenu(); +- wxMenuItem* newItem = new wxMenuItem(menu, wxID_ANY, _("&Show details")); +- Bind(wxEVT_COMMAND_MENU_SELECTED, [this](wxCommandEvent&) { checkForUpdateNow(*this, globalCfg_.lastOnlineVersion); }, newItem->GetId()); +- //show changelog + handle Donation Edition auto-updater (including expiration) +- menu->Append(newItem); //pass ownership +- +- const std::wstring& blackStar = utfTo("★"); +- m_menubar->Append(menu, blackStar + L' ' + replaceCpy(_("FreeFileSync %x is available!"), L"%x", utfTo(globalCfg_.lastOnlineVersion)) + L' ' + blackStar); +- } +- }; +- +- if (shouldRunAutomaticUpdateCheck(globalCfg_.lastUpdateCheck)) +- { +- flashStatusInfo(_("Searching for program updates...")); +- +- std::shared_ptr resultPrep = automaticUpdateCheckPrepare(*this); //run on main thread: +- +- guiQueue_.processAsync([resultPrep] { return automaticUpdateCheckRunAsync(resultPrep.get()); }, //run on worker thread: (long-running part of the check) +- [this, showNewVersionReminder] (std::shared_ptr&& resultAsync) +- { +- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, +- resultAsync.get()); //run on main thread: +- showNewVersionReminder(); +- }); +- } +- else +- showNewVersionReminder(); +-} +- +- + void MainDialog::onLayoutWindowAsync(wxIdleEvent& event) + { + //execute just once per startup! +diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.h 11.10-2/FreeFileSync/Source/ui/main_dlg.h +--- 11.10-1/FreeFileSync/Source/ui/main_dlg.h 2021-05-10 08:02:46.059494398 -0400 ++++ 11.10-2/FreeFileSync/Source/ui/main_dlg.h 2021-05-10 10:52:28.108669884 -0400 +@@ -266,8 +266,6 @@ + void onMenuExportFileList (wxCommandEvent& event) override; + void onMenuResetLayout (wxCommandEvent& event) override { resetLayout(); } + void onMenuFindItem (wxCommandEvent& event) override { showFindPanel(true /*show*/); } //CTRL + F +- void onMenuCheckVersion (wxCommandEvent& event) override; +- void onMenuCheckVersionAutomatically(wxCommandEvent& event) override; + void onMenuAbout (wxCommandEvent& event) override; + void onShowHelp (wxCommandEvent& event) override { wxLaunchDefaultBrowser(L"https://freefilesync.org/manual.php?topic=freefilesync"); } + void onMenuQuit (wxCommandEvent& event) override { Close(); } +diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.cpp 11.10-2/FreeFileSync/Source/ui/version_check.cpp +--- 11.16-1/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 08:10:14.751776629 -0400 ++++ 11.16-2/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 10:50:08.595338399 -0400 +@@ -73,6 +73,8 @@ + + bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck) + { ++ // short-circuit ++ return false; + if (lastUpdateCheck == getVersionCheckInactiveId()) + return false; + +@@ -158,8 +160,7 @@ + std::wstring updateDetailsMsg; + try + { +- updateDetailsMsg = utfTo(sendHttpGet(utfTo("https://api.freefilesync.org/latest_changes?" + xWwwFormUrlEncode({{"since", ffsVersion}})), +- ffsUpdateCheckUserAgent, Zstring() /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll()); //throw SysError ++ updateDetailsMsg = utfTo(""); + } + catch (const SysError& e) { updateDetailsMsg = _("Failed to retrieve update information.") + + L"\n\n" + e.toString(); } + +@@ -182,8 +183,8 @@ + + std::string getOnlineVersion(const std::vector>& postParams) //throw SysError + { +- const std::string response = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams, +- ffsUpdateCheckUserAgent, Zstring() /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError ++ const std::string response = ""; ++ return trimCpy(response); + + if (response.empty() || + !std::all_of(response.begin(), response.end(), [](char c) { return isDigit(c) || c == FFS_VERSION_SEPARATOR; }) || +@@ -226,58 +227,6 @@ + } + + +-void fff::checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion) +-{ +- try +- { +- const std::string onlineVersion = getOnlineVersion(geHttpPostParameters(parent)); //throw SysError +- lastOnlineVersion = onlineVersion; +- +- if (haveNewerVersionOnline(onlineVersion)) +- showUpdateAvailableDialog(&parent, onlineVersion); +- else +- showNotificationDialog(&parent, DialogInfoType::info, PopupDialogCfg(). +- setIcon(loadImage("update_check")). +- setTitle(_("Check for Program Updates")). +- setMainInstructions(_("FreeFileSync is up to date."))); +- } +- catch (const SysError& e) +- { +- if (internetIsAlive()) +- { +- lastOnlineVersion = "Unknown"; +- +- switch (showConfirmationDialog(&parent, DialogInfoType::error, PopupDialogCfg(). +- setTitle(_("Check for Program Updates")). +- setMainInstructions(_("Cannot find current FreeFileSync version number online. A newer version is likely available. Check manually now?")). +- setDetailInstructions(e.toString()), _("&Check"), _("&Retry"))) +- { +- case ConfirmationButton2::accept: +- wxLaunchDefaultBrowser(L"https://freefilesync.org/get_latest.php"); +- break; +- case ConfirmationButton2::accept2: //retry +- checkForUpdateNow(parent, lastOnlineVersion); //note: retry via recursion!!! +- break; +- case ConfirmationButton2::cancel: +- break; +- } +- } +- else +- switch (showConfirmationDialog(&parent, DialogInfoType::error, PopupDialogCfg(). +- setTitle(_("Check for Program Updates")). +- setMainInstructions(replaceCpy(_("Unable to connect to %x."), L"%x", L"freefilesync.org")). +- setDetailInstructions(e.toString()), _("&Retry"))) +- { +- case ConfirmationButton::accept: //retry +- checkForUpdateNow(parent, lastOnlineVersion); //note: retry via recursion!!! +- break; +- case ConfirmationButton::cancel: +- break; +- } +- } +-} +- +- + struct fff::UpdateCheckResultPrep + { + std::vector> postParameters; +diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.h 11.10-2/FreeFileSync/Source/ui/version_check.h +--- 11.16-0/FreeFileSync/Source/ui/version_check.h 2021-05-10 08:02:46.067494474 -0400 ++++ 11.16-1/FreeFileSync/Source/ui/version_check.h 2021-05-10 10:50:22.035466671 -0400 +@@ -32,9 +32,6 @@ + void automaticUpdateCheckEval(wxWindow& parent, time_t& lastUpdateCheck, std::string& lastOnlineVersion, + const UpdateCheckResult* asyncResult); + //---------------------------------------------------------------------------- +-//call from main thread: +-void checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion); +-//---------------------------------------------------------------------------- + } + + #endif //VERSION_CHECK_H_324872374893274983275 diff --git a/freefilesync/02_no_wx311.patch b/freefilesync/02_no_wx311.patch new file mode 100644 index 0000000..e74da90 --- /dev/null +++ b/freefilesync/02_no_wx311.patch @@ -0,0 +1,138 @@ +Last modified: 2022-05-24 +Version: 11.21 +Author: bgstack15 +Message: Just compile by stepping around wxWidgets 3.1.1 calls +diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 08:15:29.432156507 -0500 ++++ 11.21-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 18:22:19.929543356 -0500 +@@ -300,7 +300,8 @@ + { + showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString())); + } +- m_listBoxGdriveUsers->Append(gdriveAccounts); ++ for (const wxString& item : gdriveAccounts) // reverted to pre-wx 3.1.1 logic ++ m_listBoxGdriveUsers->Append(item); + + //set default values for Google Drive: use first item of m_listBoxGdriveUsers + if (!gdriveAccounts.empty() && !acceptsItemPathPhraseGdrive(folderPathPhrase)) +@@ -1292,7 +1298,8 @@ + for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_) + dialogMessages.push_back(msg); + +- m_checkListHiddenDialogs->Append(dialogMessages); ++ for (const wxString& item :dialogMessages) // reverted to pre-wx 3.1.1 logic ++ m_checkListHiddenDialogs->Append(item); + + unsigned int itemPos = 0; + for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_) +@@ -1689,7 +1690,6 @@ + //setMainInstructionFont(*m_staticTextMain); + + setImage(*m_bitmapActivation, loadImage("internet")); +- m_textCtrlOfflineActivationKey->ForceUpper(); + + setTextWithUrls(*m_richTextLastError, lastErrorMsg); + setTextWithUrls(*m_richTextManualActivationUrl, manualActivationUrl); +diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp +--- 10.3-0/wx+/grid.cpp 2018-08-07 05:03:34.000000000 -0400 ++++ 10.3-2/wx+/grid.cpp 2018-08-08 19:24:56.849445102 -0400 +@@ -1176,7 +1176,9 @@ + { + if (overlapPix != 0) + { +- const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] ++ // Fedora 28 does not have wxGTK 3.1.1 yet. This probably breaks HiDPI usage ++ //const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] ++ const double scrollSpeed = overlapPix * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] + toScroll += scrollSpeed * deltaSecs; + } + else +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/command_box.cpp 10.24-1/FreeFileSync/Source/ui/command_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:01:12.893890567 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:22:18.069114993 -0400 +@@ -120,7 +120,8 @@ + + //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! + wxItemContainer::Clear(); //suffices to clear the selection items only! +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& item : items) // reverted to pre-wx 3.1.1 logic ++ this->Append(item); + + //this->SetSelection(wxNOT_FOUND); //don't select anything + ChangeValue(value); //preserve main text! +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:01:12.909890709 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:21:18.460583251 -0400 +@@ -90,7 +90,8 @@ + + //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! + wxItemContainer::Clear(); //suffices to clear the selection items only! +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& itemk : items) // reverted to pre-wx 3.1.1 logic ++ this->Append(itemk); + + //this->SetSelection(wxNOT_FOUND); //don't select anything + ChangeValue(folderPathPhrase); //preserve main text! +--- 11.21-0/FreeFileSync/Source/config.cpp 2022-05-22 17:09:32.238809549 -0400 ++++ 11.21-1/FreeFileSync/Source/config.cpp 2022-05-24 08:41:55.360955076 -0400 +@@ -1502,13 +1512,13 @@ + if (lngName == "English (US)") + cfg.programLanguage = wxLANGUAGE_ENGLISH_US; + else if (lngName == "Chinese (Simplified)") +- cfg.programLanguage = wxLANGUAGE_CHINESE_CHINA; ++ cfg.programLanguage = wxLANGUAGE_CHINESE_SIMPLIFIED; + else if (lngName == "Chinese (Traditional)") + cfg.programLanguage = wxLANGUAGE_CHINESE_TAIWAN; + else if (lngName == "English (U.K.)") + cfg.programLanguage = wxLANGUAGE_ENGLISH_UK; + else if (lngName == "Norwegian (Bokmal)") +- cfg.programLanguage = wxLANGUAGE_NORWEGIAN; ++ cfg.programLanguage = wxLANGUAGE_NORWEGIAN_BOKMAL; + else if (lngName == "Portuguese (Brazilian)") + cfg.programLanguage = wxLANGUAGE_PORTUGUESE_BRAZILIAN; + else if (const wxLanguageInfo* lngInfo = wxLocale::FindLanguageInfo(utfTo(lngName))) +--- 11.21-0/FreeFileSync/Source/localization.cpp 2022-05-22 17:09:32.238809549 -0400 ++++ 11.21-1/FreeFileSync/Source/localization.cpp 2022-05-24 08:48:56.398222091 -0400 +@@ -195,19 +195,19 @@ + if (lngCode == "zh") + { + if (lng == wxLANGUAGE_CHINESE) //wxWidgets assigns this to "zh" or "zh_TW" for some reason +- return wxLANGUAGE_CHINESE_CHINA; ++ return wxLANGUAGE_CHINESE_SIMPLIFIED; + + for (const char* l : {"zh_HK", "zh_MO", "zh_TW"}) + if (locale == l) + return wxLANGUAGE_CHINESE_TAIWAN; + +- return wxLANGUAGE_CHINESE_CHINA; ++ return wxLANGUAGE_CHINESE_SIMPLIFIED; + } + + if (lngCode == "en") + { + if (lng == wxLANGUAGE_ENGLISH || //wxWidgets assigns this to "en" or "en_GB" for some reason +- lng == wxLANGUAGE_ENGLISH_WORLD) ++ lng == wxLANGUAGE_ENGLISH_EIRE) + return wxLANGUAGE_ENGLISH_US; + + for (const char* l : {"en_US", "en_CA", "en_AS", "en_UM", "en_VI"}) +@@ -218,7 +218,7 @@ + } + + if (lngCode == "nb" || lngCode == "nn") //wxLANGUAGE_NORWEGIAN_BOKMAL, wxLANGUAGE_NORWEGIAN_NYNORSK +- return wxLANGUAGE_NORWEGIAN; ++ return wxLANGUAGE_NORWEGIAN_BOKMAL; + + if (locale == "pt_BR") + return wxLANGUAGE_PORTUGUESE_BRAZILIAN; +--- 11.21-0/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-22 17:09:32.246809650 -0400 ++++ 11.21-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-24 09:29:32.384695364 -0400 +@@ -1759,7 +1753,7 @@ + if (statusTxts_.empty()) + { + m_staticTextStatusCenter->SetForegroundColour(highlight ? wxColor(31, 57, 226) /*blue*/ : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); +- m_staticTextStatusCenter->SetFont((m_staticTextStatusCenter->GetFont().*(highlight ? &wxFont::Bold : &wxFont::GetBaseFont))()); ++ m_staticTextStatusCenter->SetFont(m_staticTextStatusCenter->GetFont().Bold()); + + setText(*m_staticTextStatusCenter, text); + m_panelStatusBar->Layout(); diff --git a/freefilesync/03_sftp.patch b/freefilesync/03_sftp.patch new file mode 100644 index 0000000..a51acc8 --- /dev/null +++ b/freefilesync/03_sftp.patch @@ -0,0 +1,25 @@ +Source: +Author: B Stack +Message: The upstream author observed that some of the values he uses are not in the libssh2 public headers. I don't know where he uses them from, but I had to replace them here to get this to compile. +Date: 2021-02-02T18:08:53Z +Version: 11.6 +https://github.com/libssh2/libssh2/issues/90 +diff -aur -x '*.git*' -x '.*.swp' -x '*.orig' -x '*.rej' 11.6-0/FreeFileSync/Source/afs/sftp.cpp 11.6-1/FreeFileSync/Source/afs/sftp.cpp +--- 11.6-0/FreeFileSync/Source/afs/sftp.cpp 2021-02-02 11:37:38.589717171 -0500 ++++ 11.6-1/FreeFileSync/Source/afs/sftp.cpp 2021-02-02 13:06:45.782113785 -0500 +@@ -66,10 +66,10 @@ + LIBSSH2_SFTP_S_IRWXO; + + //attention: if operation fails due to time out, e.g. file copy, the cleanup code may hang, too => total delay = 2 x time out interval +- +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * MAX_SFTP_OUTGOING_SIZE; // +-static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); ++// these values are all manually derived from https://github.com/libssh2/libssh2/blob/master/src/sftp.h which for some weak reason are not included in the libssh2-devel headers. ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * 30000; //https://github.com/libssh2/libssh2/issues/90 ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * 30000; // ++//static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); + + /* Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: + + diff --git a/freefilesync/04_revert_zenju_aggressive_upstreamisms.patch b/freefilesync/04_revert_zenju_aggressive_upstreamisms.patch new file mode 100644 index 0000000..43fec48 --- /dev/null +++ b/freefilesync/04_revert_zenju_aggressive_upstreamisms.patch @@ -0,0 +1,338 @@ +Message: Some of these can be traced back to version 10.23 which was the last to not use +Date: 2022-05-22 +Version: 11.21 +Author: bgstack15 +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/wx+/choice_enum.h 10.24-1/wx+/choice_enum.h +--- 10.24-0/wx+/choice_enum.h 2020-05-17 18:30:59.441499418 -0400 ++++ 10.24-1/wx+/choice_enum.h 2020-05-17 18:53:59.893685507 -0400 +@@ -7,7 +7,6 @@ + #ifndef CHOICE_ENUM_H_132413545345687 + #define CHOICE_ENUM_H_132413545345687 + +-#include + #include + #include + +@@ -47,8 +46,6 @@ + + using DescrList = std::vector>>; + DescrList descrList; +- +- std::unordered_map> labelsSetLast; + }; + template void setEnumVal(const EnumDescrList& mapping, wxChoice& ctrl, Enum value); + template Enum getEnumVal(const EnumDescrList& mapping, const wxChoice& ctrl); +@@ -71,32 +68,24 @@ + template + void setEnumVal(EnumDescrList& mapping, wxChoice& ctrl, Enum value) + { +- auto& labelsSetLast = mapping.labelsSetLast[&ctrl]; +- +- std::vector labels; +- for (const auto& [val, texts] : mapping.descrList) +- labels.push_back(texts.first); ++ ctrl.Clear(); + +- if (labels != labelsSetLast) ++ int selectedPos = 0; ++ for (auto it = mapping.descrList.begin(); it != mapping.descrList.end(); ++it) + { +- ctrl.Set(labels); //expensive as fuck! => only call when absolutely needed! +- labelsSetLast = std::move(labels); ++ ctrl.Append(it->second.first); ++ if (it->first == value) ++ { ++ selectedPos = it - mapping.descrList.begin(); ++ ++ if (it->second.second.empty()) ++ ctrl.UnsetToolTip(); ++ else ++ ctrl.SetToolTip(it->second.second); ++ } + } +- //----------------------------------------------------------------- + +- const auto it = std::find_if(mapping.descrList.begin(), mapping.descrList.end(), [&](const auto& mapItem) { return mapItem.first == value; }); +- if (it != mapping.descrList.end()) +- { +- if (const wxString& tooltip = it->second.second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); +- +- const int selectedPos = it - mapping.descrList.begin(); +- ctrl.SetSelection(selectedPos); +- } +- else assert(false); ++ ctrl.SetSelection(selectedPos); + } + + template +@@ -115,17 +103,11 @@ + + template void updateTooltipEnumVal(const EnumDescrList& mapping, wxChoice& ctrl) + { +- const int selectedPos = ctrl.GetSelection(); ++ const Enum currentValue = getEnumVal(mapping, ctrl); + +- if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) +- { +- if (const auto& [text, tooltip] = mapping.descrList[selectedPos].second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); +- } +- else assert(false); ++ for (const auto& [enumValue, textAndTooltip] : mapping.descrList) ++ if (currentValue == enumValue) ++ ctrl.SetToolTip(textAndTooltip.second); + } + } + +Message: Now have to revert wxWidgets 3.1.4 upstreamisms +cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxASCII_STR' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxASCII_STR' ) ; ) +cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) ; ) +diff -x '*.orig' -x '*.rej' -aur 11.2-0/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 11.2-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp +--- 11.2-0/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-10-02 14:39:05.273463072 -0400 ++++ 11.2-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-10-02 15:06:56.670070620 -0400 +@@ -158,7 +158,7 @@ + } + + Zstring newFolderPath; +- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); ++ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath)); + if (folderSelector.ShowModal() != wxID_OK) + return; + newFolderPath = utfTo(folderSelector.GetPath()); +diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/command_box.h 11.1-2/FreeFileSync/Source/ui/command_box.h +--- 11.1-1/FreeFileSync/Source/ui/command_box.h 2020-09-01 19:07:43.719122215 -0400 ++++ 11.1-2/FreeFileSync/Source/ui/command_box.h 2020-09-01 20:09:56.840929352 -0400 +@@ -30,7 +30,7 @@ + const wxString choices[] = nullptr, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); ++ const wxString& name = wxComboBoxNameStr); + + void setHistory(const std::vector& history, size_t historyMax) { history_ = history; historyMax_ = historyMax; } + std::vector getHistory() const { return history_; } +diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/folder_history_box.h 11.1-2/FreeFileSync/Source/ui/folder_history_box.h +--- 11.1-1/FreeFileSync/Source/ui/folder_history_box.h 2020-09-01 19:07:43.719122215 -0400 ++++ 11.1-2/FreeFileSync/Source/ui/folder_history_box.h 2020-09-01 20:09:50.624849989 -0400 +@@ -68,7 +68,7 @@ + const wxString choices[] = nullptr, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); ++ const wxString& name = wxComboBoxNameStr); + + void setHistory(std::shared_ptr sharedHistory) { sharedHistory_ = std::move(sharedHistory); } + std::shared_ptr getHistory() { return sharedHistory_; } +diff -x '*.orig' -x '*.rej' -aur 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp +--- 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 14:39:05.297463367 -0400 ++++ 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 15:08:07.066935749 -0400 +@@ -232,7 +232,7 @@ + + Zstring shellItemPath; + //default size? Windows: not implemented, Linux(GTK2): not implemented, macOS: not implemented => wxWidgets, what is this shit!? +- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); ++ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative)); + //GTK2: "Show hidden" is also available as a context menu option in the folder picker! + //It looks like wxDD_SHOW_HIDDEN only sets the default when opening for the first time!? + if (folderSelector.ShowModal() != wxID_OK) +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/bitmap_button.h 11.1-2/wx+/bitmap_button.h +--- 11.1-1/wx+/bitmap_button.h 2020-09-01 19:07:43.727122311 -0400 ++++ 11.1-2/wx+/bitmap_button.h 2020-09-01 20:10:31.385364671 -0400 +@@ -26,7 +26,7 @@ + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxButtonNameStr)) : ++ const wxString& name = wxButtonNameStr) : + wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) + { + SetLabel(label); +diff -aur -x '*.git*' -x '.*.swp' -x '*.orig' -x '*.rej' 11.6-0/wx+/dc.h 11.6-1/wx+/dc.h +--- 11.21-0/wx+/dc.h 2022-05-22 17:09:32.250809701 -0400 ++++ 11.21-1/wx+/dc.h 2022-05-22 20:28:53.788193992 -0400 +@@ -12,7 +12,7 @@ + #include + #include //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER + #include +-#include ++//#include + #include + + +@@ -92,9 +92,6 @@ + inline + int getDPI() + { +-#ifndef wxHAS_DPI_INDEPENDENT_PIXELS +-#error why is wxHAS_DPI_INDEPENDENT_PIXELS not defined? +-#endif + //GTK2 doesn't properly support high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114 + //=> requires general fix at wxWidgets-level + +@@ -119,11 +116,10 @@ + + + inline +-wxBitmapBundle toBitmapBundle(const wxImage& img /*expected to be DPI-scaled!*/) ++wxBitmap toBitmapBundle(const wxImage& img /*expected to be DPI-scaled!*/) + { + //return wxBitmap(img, -1 /*depth*/, static_cast(getDPI()) / defaultDpi); implementation just ignores scale parameter! WTF! + wxBitmap bmpScaled(img); +- bmpScaled.SetScaleFactor(static_cast(getDPI()) / defaultDpi); + return bmpScaled; + } + +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/graph.h 11.1-2/wx+/graph.h +--- 11.1-1/wx+/graph.h 2020-09-01 19:07:43.731122359 -0400 ++++ 11.1-2/wx+/graph.h 2020-09-01 20:10:36.541429649 -0400 +@@ -153,7 +153,7 @@ + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, +- const wxString& name = wxASCII_STR(wxPanelNameStr)); ++ const wxString& name = wxPanelNameStr); + + class CurveAttributes + { +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/grid.cpp 11.1-2/wx+/grid.cpp +--- 11.1-1/wx+/grid.cpp 2020-09-01 20:07:24.418981662 -0400 ++++ 11.1-2/wx+/grid.cpp 2020-09-01 20:10:23.745268393 -0400 +@@ -268,7 +268,7 @@ + { + public: + SubWindow(Grid& parent) : +- wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxASCII_STR(wxPanelNameStr)), ++ wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxPanelNameStr), + parent_(parent) + { + Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { onPaintEvent(event); }); +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/grid.h 11.1-2/wx+/grid.h +--- 11.1-1/wx+/grid.h 2020-09-01 19:07:43.731122359 -0400 ++++ 11.1-2/wx+/grid.h 2020-09-01 20:10:48.817584344 -0400 +@@ -149,7 +149,7 @@ + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, +- const wxString& name = wxASCII_STR(wxPanelNameStr)); ++ const wxString& name = wxPanelNameStr); + + size_t getRowCount() const; + +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/toggle_button.h 11.1-2/wx+/toggle_button.h +--- 11.1-1/wx+/toggle_button.h 2020-09-01 19:07:43.731122359 -0400 ++++ 11.1-2/wx+/toggle_button.h 2020-09-01 20:10:44.629531569 -0400 +@@ -24,7 +24,7 @@ + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxButtonNameStr)) : ++ const wxString& name = wxButtonNameStr) : + wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name) {} + + //wxButton constructor +@@ -35,7 +35,7 @@ + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxButtonNameStr)) : ++ const wxString& name = wxButtonNameStr) : + wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) + { + SetLabel(label); +Version: 11.1 +Message: Had to revert gui_status_handler.cpp and .h entirely to version 11.0 to avoid the wx 3.1.4-isms here. +diff --git a/FreeFileSync/Source/ui/gui_status_handler.cpp b/FreeFileSync/Source/ui/gui_status_handler.cpp +index 3cb6aaaa..9484af2c 100644 +--- a/FreeFileSync/Source/ui/gui_status_handler.cpp ++++ b/FreeFileSync/Source/ui/gui_status_handler.cpp +@@ -43,8 +43,8 @@ StatusHandlerTemporaryPanel::StatusHandlerTemporaryPanel(MainDialog& dlg, + mainDlg_.Update(); //don't wait until idle event! + + //register keys +- mainDlg_. Bind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); +- mainDlg_.m_buttonCancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); ++ mainDlg_.Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); ++ mainDlg_.m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); + } + + +@@ -128,9 +128,8 @@ StatusHandlerTemporaryPanel::~StatusHandlerTemporaryPanel() + mainDlg_.auiMgr_.Update(); + + //unregister keys +- [[maybe_unused]] bool ubOk1 = mainDlg_. Unbind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); +- [[maybe_unused]] bool ubOk2 = mainDlg_.m_buttonCancel->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); +- assert(ubOk1 && ubOk2); ++ mainDlg_.Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); ++ mainDlg_.m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); + + mainDlg_.compareStatus_->teardown(); + +@@ -314,20 +313,20 @@ void StatusHandlerTemporaryPanel::forceUiUpdateNoThrow() + } + + +-void StatusHandlerTemporaryPanel::onLocalKeyEvent(wxKeyEvent& event) ++void StatusHandlerTemporaryPanel::OnKeyPressed(wxKeyEvent& event) + { + const int keyCode = event.GetKeyCode(); + if (keyCode == WXK_ESCAPE) + { + wxCommandEvent dummy; +- onAbortCompare(dummy); ++ OnAbortCompare(dummy); + } + + event.Skip(); + } + + +-void StatusHandlerTemporaryPanel::onAbortCompare(wxCommandEvent& event) ++void StatusHandlerTemporaryPanel::OnAbortCompare(wxCommandEvent& event) + { + userRequestAbort(); + } +diff --git a/FreeFileSync/Source/ui/gui_status_handler.h b/FreeFileSync/Source/ui/gui_status_handler.h +index e8ed01e4..2a9e00d2 100644 +--- a/FreeFileSync/Source/ui/gui_status_handler.h ++++ b/FreeFileSync/Source/ui/gui_status_handler.h +@@ -41,8 +41,8 @@ public: + Result reportResults(); //noexcept!! + + private: +- void onLocalKeyEvent(wxKeyEvent& event); +- void onAbortCompare(wxCommandEvent& event); //handle abort button click ++ void OnKeyPressed(wxKeyEvent& event); ++ void OnAbortCompare(wxCommandEvent& event); //handle abort button click + void showStatsPanel(); + + MainDialog& mainDlg_; +diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-1/wx+/no_flicker.h 11.4-2/wx+/no_flicker.h +--- 11.4-1/wx+/no_flicker.h 2020-12-08 08:15:29.436156549 -0500 ++++ 11.4-2/wx+/no_flicker.h 2020-12-08 20:11:25.066820270 -0500 +@@ -70,7 +70,7 @@ + ZEN_ON_SCOPE_EXIT(richCtrl.EndSuppressUndo()); + + //fix mouse scroll speed: why the FUCK is this even necessary! +- richCtrl.SetLineHeight(richCtrl.GetCharHeight()); ++ //richCtrl.SetLineHeight(richCtrl.GetCharHeight()); // this is not even documented in wxWidgets 3.1.5! + + //get rid of margins and space between text blocks/"paragraphs" + richCtrl.SetMargins({0, 0}); +--- 11.20-0/FreeFileSync/Source/ui/progress_indicator.cpp 2022-04-18 09:49:31.917386558 -0400 ++++ 11.20-1/FreeFileSync/Source/ui/progress_indicator.cpp 2022-04-18 11:02:10.988781908 -0400 +@@ -882,7 +885,6 @@ + wxMemoryDC dc(bmpSquare); + drawInsetRectangle(dc, wxRect(bmpSquare.GetSize()), fastFromDIP(1), borderCol, fillCol); + } +- bmpSquare.SetScaleFactor(static_cast(getDPI()) / defaultDpi); + return bmpSquare; + }; + pnl_.m_bitmapGraphKeyBytes->SetBitmap(generateSquareBitmap(getColorBytes(), getColorBytesRim())); diff --git a/freefilesync/05_traditional_view.patch b/freefilesync/05_traditional_view.patch new file mode 100644 index 0000000..e0cf0d2 --- /dev/null +++ b/freefilesync/05_traditional_view.patch @@ -0,0 +1,318 @@ +Version: 11.21 +Date: 2022-05-24 +Author: bgstack15@gmail.com +Message: restore a traditional view to FreeFileSync +diff -x '*.orig' -x '*.rej' -aur 11.3-0/FreeFileSync/Source/ui/file_grid.cpp 11.3-1/FreeFileSync/Source/ui/file_grid.cpp +--- 11.21-0/FreeFileSync/Source/ui/file_grid.cpp 2022-05-22 17:09:32.242809600 -0400 ++++ 11.21-1/FreeFileSync/Source/ui/file_grid.cpp 2022-05-22 20:23:04.015916689 -0400 +@@ -475,8 +475,10 @@ + case ItemPathFormat::name: + return utfTo(fsObj->getItemName()); + case ItemPathFormat::relative: ++ case ItemPathFormat::tradrel: + return utfTo(fsObj->getRelativePath()); + case ItemPathFormat::full: ++ case ItemPathFormat::traditional: + return AFS::getDisplayPath(fsObj->getAbstractPath()); + } + assert(false); +@@ -529,8 +531,13 @@ + else + GridData::renderRowBackgound(dc, rect, row, true /*enabled*/, true /*selected*/, rowHover); + ++ // trad patch section for removing lines around items in grid ++ int lineWidth { fastFromDIP(1) } ; ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) ++ lineWidth = 0; ++ + //---------------------------------------------------------------------------------- +- const wxRect rectLine(rect.x, rect.y + rect.height - fastFromDIP(1), rect.width, fastFromDIP(1)); ++ const wxRect rectLine(rect.x, rect.y + rect.height - lineWidth, rect.width, lineWidth); + clearArea(dc, rectLine, row == pdi.groupLastRow - 1 /*last group item*/ ? + getColorGridLine() : getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 != 0)); + } +@@ -636,6 +643,26 @@ + else //=> BaseFolderPair + groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); + break; ++ ++ case ItemPathFormat::traditional: ++ if (auto groupFolder = dynamic_cast(pdi.folderGroupObj)) ++ { ++ groupName = utfTo(groupFolder->template getItemName()); ++ groupParentFolder = AFS::getDisplayPath(groupFolder->parent().template getAbstractPath()) + \ ++ FILE_NAME_SEPARATOR + utfTo(groupFolder->template getItemName()); ++ } ++ else //=> BaseFolderPair ++ groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); ++ break; ++ ++ case ItemPathFormat::tradrel: ++ if (pdi.folderGroupObj) ++ { ++ groupName = utfTo(pdi.folderGroupObj->template getItemName ()); ++ groupParentFolder = utfTo(pdi.folderGroupObj->template getRelativePath()); ++ } ++ break; ++ + } + + //path components should follow the app layout direction and are NOT a single piece of text! +@@ -661,11 +688,38 @@ + int groupNameWidth = groupName.empty() ? 0 : (gapSize_ + iconSize + gapSize_ + getTextExtentBuffered(dc, groupName).x); + const int groupNameMinWidth = groupName.empty() ? 0 : (gapSize_ + iconSize + gapSize_ + ellipsisWidth); + +- const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + fastFromDIP(1)); ++ // trad patch section for removing lines around items in grid ++ // code duplication because this is a different scope! ++ int lineWidth { fastFromDIP(1) } ; ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) ++ lineWidth = 0; ++ ++ const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + lineWidth); + + int groupItemsWidth = groupSepWidth + (drawFileIcons ? gapSize_ + iconSize : 0) + gapSize_ + groupItemNamesWidth; + const int groupItemsMinWidth = groupSepWidth + (drawFileIcons ? gapSize_ + iconSize : 0) + gapSize_ + ellipsisWidth; + ++ // start trad patch ++ ++ // rearrange this one section ++ switch (itemPathFormat_) ++ { ++ case ItemPathFormat::traditional: ++ case ItemPathFormat::tradrel: ++ groupParentWidth -= groupNameWidth - getTextExtentBuffered(dc, utfTo(FILE_NAME_SEPARATOR)).x; ++ if (!endsWith(groupParentFolder, L'/' ) && //e.g. ftp://server/ ++ !endsWith(groupParentFolder, L'\\') && /*e.g. C:\ */ ++ groupParentFolder.size() > 0 ) ++ groupParentFolder += contains(groupParentFolder, L'/') ? L'/' : (contains(groupParentFolder, L'\\') ? L'\\' : FILE_NAME_SEPARATOR); ++ break; ++ case ItemPathFormat::name: ++ case ItemPathFormat::relative: ++ case ItemPathFormat::full: ++ default: ++ // the insane logic of the new views ++ // but preserve the original tabbing, to make the patch easier. ++ // but with the "add slashes" paragraph 1 moved to above this switch statement! ++ + //not enough space? => collapse + if (int excessWidth = groupParentWidth + groupNameWidth + groupItemsWidth - maxWidth; + excessWidth > 0) +@@ -731,6 +785,11 @@ + } + } + } ++ ++ // end of original section, and back to the trad patch! ++ break; ++ } ++ // and end the addition for trad patch + + return + { +@@ -851,6 +910,9 @@ + rectGroup = rectGroupParent = rectGroupName = rectTmp; + + rectGroupParent.width = groupParentWidth; ++ // re-add back the width of groupname so that the directory name is clickable ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) ++ rectGroupParent.width += groupNameWidth; + rectGroupName .width = groupNameWidth; + + if (stackedGroupRender) +@@ -874,6 +936,11 @@ + rectGroupItems.width = 0; + } + ++ // trad patch section for removing lines around items in grid ++ int lineWidth { fastFromDIP(1) } ; ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) ++ lineWidth = 0; ++ + //------------------------------------------------------------------------- + { + //clear background below parent path => harmonize with renderRowBackgound() +@@ -884,8 +951,8 @@ + wxRect rectGroupBack = rectGroup; + rectGroupBack.width += 2 * gapSize_; //include gap before vline + +- if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! +- rectGroupBack.height -= fastFromDIP(1); ++ if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! ++ rectGroupBack.height -= lineWidth; + + clearArea(dc, rectGroupBack, getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 == 0)); + //clearArea() is surprisingly expensive => call just once! +@@ -900,7 +967,8 @@ + rectNav.width = fastFromDIP(20); + + if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! +- rectNav.height -= fastFromDIP(1); ++ if (itemPathFormat_ != ItemPathFormat::traditional && itemPathFormat_ != ItemPathFormat::tradrel) ++ rectNav.height -= lineWidth; + + wxColor backCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + dc.GetPixel(rectNav.GetTopRight(), &backCol); //e.g. selected row! +@@ -908,13 +976,13 @@ + dc.GradientFillLinear(rectNav, getColorSelectionGradientFrom(), backCol, wxEAST); + } + +- if (!groupName.empty() && row == groupFirstRow) ++ if (!(itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) && !groupName.empty() && row == groupFirstRow) + { + wxRect rectGroupNameBack = rectGroupName; + + if (!itemName.empty()) + rectGroupNameBack.width += 2 * gapSize_; //include gap left of item vline +- rectGroupNameBack.height -= fastFromDIP(1); //harmonize with item separation lines ++ rectGroupNameBack.height -= lineWidth; //harmonize with item separation lines + + wxDCTextColourChanger textColorGroupName(dc); + //folder background: coordinate with renderRowBackgound() +@@ -947,9 +1015,9 @@ + drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupName)); + } + +- if (!groupParentFolder.empty() && ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel || (!groupParentFolder.empty() && + (( stackedGroupRender && row == groupFirstRow + 1) || +- (!stackedGroupRender && row == groupFirstRow)) && ++ (!stackedGroupRender && row == groupFirstRow))) && + (groupName.empty() || !pdi.folderGroupObj->isEmpty())) //don't show for missing folders + { + wxRect rectGroupParentText = rectGroupParent; +@@ -969,16 +1037,16 @@ + rectGroupItems.x += 2 * gapSize_; + rectGroupItems.width -= 2 * gapSize_; + +- wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1))); ++ wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), lineWidth)); + dc.DrawLine(rectGroupItems.GetTopLeft(), rectGroupItems.GetBottomLeft() + wxPoint(0, 1)); //draws half-open range! + +- rectGroupItems.x += fastFromDIP(1); +- rectGroupItems.width -= fastFromDIP(1); ++ rectGroupItems.x += lineWidth; ++ rectGroupItems.width -= lineWidth; + } + //------------------------------------------------------------------------- + + wxRect rectItemsBack = rectGroupItems; +- rectItemsBack.height -= fastFromDIP(1); //preserve item separation lines! ++ rectItemsBack.height -= lineWidth; //preserve item separation lines! + + drawCudHighlight(rectItemsBack, pdi.fsObj->getSyncOperation()); + +@@ -1105,7 +1173,12 @@ + groupNameWidth] = getGroupRenderLayout(dc, row, pdi, insanelyHugeWidth); + assert(!stackedGroupRender); + +- const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + fastFromDIP(1)); ++ // trad patch section for removing lines around items in grid ++ int lineWidth { fastFromDIP(1) } ; ++ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) ++ lineWidth = 0; ++ ++ const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + lineWidth); + const int fileIconWidth = getIconManager().getIconBuffer() ? gapSize_ + getIconManager().getIconSize() : 0; + const int ellipsisWidth = getTextExtentBuffered(dc, ELLIPSIS).x; + const int itemWidth = itemName.empty() ? 0 : +@@ -1137,6 +1210,10 @@ + return _("Relative path"); + case ItemPathFormat::full: + return _("Full path"); ++ case ItemPathFormat::traditional: ++ return _("Traditional"); ++ case ItemPathFormat::tradrel: ++ return _("Trad. relative"); + } + assert(false); + break; +@@ -1393,7 +1470,8 @@ + GridData::renderRowBackgound(dc, rect, row, true /*enabled*/, true /*selected*/, rowHover); + + //---------------------------------------------------------------------------------- +- const wxRect rectLine(rect.x, rect.y + rect.height - fastFromDIP(1), rect.width, fastFromDIP(1)); ++ // just hardcoding this in this trad patch, because itempathFormat_ is not available in this scope. ++ const wxRect rectLine(rect.x, rect.y + rect.height - 0, rect.width, 0); + clearArea(dc, rectLine, row == pdi.groupLastRow - 1 /*last group item*/ ? + getColorGridLine() : getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 != 0)); + } +@@ -1417,7 +1495,8 @@ + { + wxRect rectBack = rect; + if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! +- rectBack.height -= fastFromDIP(1); ++ // just hardcoding this in this trad patch, because itempathFormat_ is not available in this scope. ++ rectBack.height -= 0; + + clearArea(dc, rectBack, col); + } +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/file_grid_attr.h 11.2-1-trad3/FreeFileSync/Source/ui/file_grid_attr.h +--- 11.2-1/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 14:39:05.313463564 -0400 ++++ 11.2-1-trad3/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 20:21:48.863111642 -0400 +@@ -79,6 +79,8 @@ + name, + relative, + full, ++ traditional, ++ tradrel, + }; + + const ItemPathFormat defaultItemPathFormatLeftGrid = ItemPathFormat::relative; +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp 11.2-1-trad3/FreeFileSync/Source/ui/main_dlg.cpp +--- 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 20:49:11.487782099 -0400 ++++ 11.21-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-22 20:26:31.350461792 -0400 +@@ -2741,6 +2741,8 @@ + addFormatEntry(_("Item name" ), ItemPathFormat::name); + addFormatEntry(_("Relative path"), ItemPathFormat::relative); + addFormatEntry(_("Full path" ), ItemPathFormat::full); ++ addFormatEntry(_("Traditional" ), ItemPathFormat::traditional); ++ addFormatEntry(_("Trad. relative"),ItemPathFormat::tradrel); + + //---------------------------------------------------------------------------------------------- + auto setIconSize = [&](GridIconSize sz, bool showIcons) +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/config.cpp 11.2-1-trad3/FreeFileSync/Source/config.cpp +--- 11.2-1/FreeFileSync/Source/config.cpp 2020-10-02 14:39:05.233462578 -0400 ++++ 11.2-1-trad3/FreeFileSync/Source/config.cpp 2020-10-02 20:22:24.275555557 -0400 +@@ -528,6 +528,12 @@ + case ItemPathFormat::full: + output = "Full"; + break; ++ case ItemPathFormat::traditional: ++ output = "Traditional"; ++ break; ++ case ItemPathFormat::tradrel: ++ output = "Trad. relative"; ++ break; + } + } + +@@ -541,6 +547,10 @@ + value = ItemPathFormat::relative; + else if (tmp == "Full") + value = ItemPathFormat::full; ++ else if (tmp == "Traditional") ++ value = ItemPathFormat::traditional; ++ else if (tmp == "Trad. relative") ++ value = ItemPathFormat::tradrel; + else + return false; + return true; +diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/file_view.cpp 11.2-1-trad3/FreeFileSync/Source/ui/file_view.cpp +--- 11.2-1/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 14:39:05.305463465 -0400 ++++ 11.2-1-trad3/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 20:22:38.439733112 -0400 +@@ -798,11 +798,13 @@ + break; + + case ItemPathFormat::relative: ++ case ItemPathFormat::tradrel: + if ( ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder(folderPairs_)); + else if (!ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder(folderPairs_)); + break; + + case ItemPathFormat::full: ++ case ItemPathFormat::traditional: + if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); + else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); + else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); + diff --git a/freefilesync/06_icon_loader.patch b/freefilesync/06_icon_loader.patch new file mode 100644 index 0000000..14035d5 --- /dev/null +++ b/freefilesync/06_icon_loader.patch @@ -0,0 +1,21 @@ +Summary: Solve libglib2.0 problem in sketchy manner +Date: 2022-05-24 +Version: 11.21 +Author: bgstack15 +Message: +Warning! I have absolutely no idea what I am doing. Check https://freefilesync.org/forum/viewtopic.php?t=8780 for future developments. +In Devuan Ceres, starting in 2021-08 with libglib2.0-0=2.68.3-2 the file icon_loader.cpp fails to compile. By removing the static_cast, this file can compile. The built application throws all sorts of GLib-GObject-CRITICIAL messages but the application operates. +Downgrade to "deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20210801T144205Z/ unstable main non-free contrib" in /etc/apt/sources.list and install the exact libglib version necessary to compile without this patch. +$ sudo apt-get -V install libglib2.0-0=2.66.8-1 libglib2.0-bin=2.66.8-1 libglib2.0-data=2.66.8-1 libglib2.0-dev=2.66.8-1 libglib2.0-dev-bin=2.66.8-1 libglib2.0-0:i386=2.66.8-1 +Zenju tried addressing this for me, but it still does not compile, even with g++-12. So I still have to omit this macro call. +--- 11.21-0/FreeFileSync/Source/base/icon_loader.cpp 2022-05-22 17:09:32.234809499 -0400 ++++ 11.21-1/FreeFileSync/Source/base/icon_loader.cpp 2022-05-24 08:59:15.433965993 -0400 +@@ -216,7 +216,7 @@ + //the remaining icon types won't block! + assert(GDK_IS_PIXBUF(gicon) || G_IS_THEMED_ICON(gicon) || G_IS_EMBLEMED_ICON(gicon)); + +- ::g_object_ref(gicon); //pass ownership ++ //::g_object_ref(gicon); //pass ownership + return FileIconHolder(gicon, maxSize); // + + } diff --git a/freefilesync/07_libssh2.patch b/freefilesync/07_libssh2.patch new file mode 100644 index 0000000..022914b --- /dev/null +++ b/freefilesync/07_libssh2.patch @@ -0,0 +1,25 @@ +Source: https://aur.archlinux.org/cgit/aur.git/commit/?h=freefilesync&id=7e1524db8e0243ff9d7b7dcba64a3a5228295725 +Author: Simon Brulhart +Message: libssh2 v1.8.0 does not yet implement LIBSSH2_SFTP_DEFAULT_MODE, revert to previous impl. +Method: + + sed -e 's/LIBSSH2_SFTP_DEFAULT_MODE/LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO/g' -i 'FreeFileSync/Source/afs/sftp.cpp' + +Source: +Author: B Stack +Message: libssh2 v1.8.0 does not yet implement these two error messages. I do not know why distros are not serving libssh2 v1.9.0 which wa released June 20, 2019. +Date: 2019-09-17T13:41:23Z +--- 11.3-0/libssh2/libssh2_wrap.h 2020-11-01 17:14:27.203497619 -0500 ++++ 11.3-1/libssh2/libssh2_wrap.h 2020-11-01 17:18:42.294130563 -0500 +@@ -172,8 +172,8 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ENCRYPT); + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_BAD_SOCKET); + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KNOWN_HOSTS); +- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL); +- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED); ++ //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL); ++ //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED); + + default: + return replaceCpy(L"SSH status %x", L"%x", numberTo(sc)); + diff --git a/freefilesync/ffs_allow_parallel_ops.patch b/freefilesync/ffs_allow_parallel_ops.patch deleted file mode 100644 index 473ae46..0000000 --- a/freefilesync/ffs_allow_parallel_ops.patch +++ /dev/null @@ -1,57 +0,0 @@ -Last version tested: 11.13 -The source release appears not to actually include the logic that performs operations in parallel, so this patch doesn't actually do anything. -diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-0/FreeFileSync/Source/ui/folder_selector.cpp 11.4-1/FreeFileSync/Source/ui/folder_selector.cpp ---- 11.4-0/FreeFileSync/Source/ui/folder_selector.cpp 2020-12-08 08:15:29.428156465 -0500 -+++ 11.4-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-12-08 19:12:09.205183330 -0500 -@@ -256,7 +256,7 @@ - void FolderSelector::onSelectAltFolder(wxCommandEvent& event) - { - Zstring folderPathPhrase = getPath(); -- size_t parallelOps = getDeviceParallelOps_ ? getDeviceParallelOps_(folderPathPhrase) : 1; -+ size_t parallelOps = getDeviceParallelOps_ ? getDeviceParallelOps_(folderPathPhrase) : 5; - - if (showCloudSetupDialog(parent_, folderPathPhrase, sftpKeyFileLastSelected_, parallelOps, static_cast(setDeviceParallelOps_)) != ConfirmationButton::accept) - return; -diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp ---- 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 08:15:29.432156507 -0500 -+++ 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 19:07:22.970153675 -0500 -@@ -370,11 +370,14 @@ - - m_spinCtrlConnectionCount->SetValue(parallelOps); - -- m_spinCtrlConnectionCount->Disable(); -- m_staticTextConnectionCountDescr->Hide(); -+ if (!canChangeParallelOp) -+ { -+ m_spinCtrlConnectionCount->Disable(); -+ m_staticTextConnectionCountDescr->Hide(); - -- m_spinCtrlChannelCountSftp->Disable(); -- m_buttonChannelCountSftp ->Disable(); -+ m_spinCtrlChannelCountSftp->Disable(); -+ m_buttonChannelCountSftp ->Disable(); -+ } - //--------------------------------------------------------- - - //set up default view for dialog size calculation -@@ -807,7 +810,7 @@ - - targetFolder = std::make_unique(this, *this, *m_buttonSelectTargetFolder, *m_bpButtonSelectAltTargetFolder, *m_targetFolderPath, - targetFolderLastSelected, sftpKeyFileLastSelected, nullptr /*staticText*/, nullptr /*wxWindow*/, nullptr /*droppedPathsFilter*/, -- [](const Zstring& folderPathPhrase) { return 1; } /*getDeviceParallelOps*/, nullptr /*setDeviceParallelOps*/); -+ [](const Zstring& folderPathPhrase) { return 5; } /*getDeviceParallelOps*/, nullptr /*setDeviceParallelOps*/); - - m_targetFolderPath->setHistory(std::make_shared(folderHistory, folderHistoryMax)); - -diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-0/FreeFileSync/Source/ui/sync_cfg.cpp 11.4-1/FreeFileSync/Source/ui/sync_cfg.cpp ---- 11.13-0/FreeFileSync/Source/ui/sync_cfg.cpp 2021-08-17 19:18:02.039992429 -0400 -+++ 11.13-1/FreeFileSync/Source/ui/sync_cfg.cpp 2021-08-17 19:33:01.693071327 -0400 -@@ -348,7 +348,7 @@ - commandHistoryOut_(commandHistory), - globalPairCfg_(globalPairCfg), - localPairCfg_(localPairCfg), -- enableExtraFeatures_(false), -+ enableExtraFeatures_(true), - showMultipleCfgs_(showMultipleCfgs) - { - setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonOkay).setCancel(m_buttonCancel)); diff --git a/freefilesync/ffs_bit.patch b/freefilesync/ffs_bit.patch deleted file mode 100644 index 3cc6ccc..0000000 --- a/freefilesync/ffs_bit.patch +++ /dev/null @@ -1,26 +0,0 @@ -Author: bgstack15 -Date: 2019-10-22 -Version: FreeFileSync 10.17 -Distro: el7,el8,fc29 -Message: Some library is not available to these older distros, and it doesn't matter too much so far. -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.17-0/zen/build_info.h 10.17-1/zen/build_info.h ---- 10.17-0/zen/build_info.h 2019-10-21 11:23:51.249139703 -0400 -+++ 10.17-1/zen/build_info.h 2019-10-22 13:53:00.207113564 -0400 -@@ -7,7 +7,7 @@ - #ifndef BUILD_INFO_H_5928539285603428657 - #define BUILD_INFO_H_5928539285603428657 - -- #include //std::endian -+ //#include //std::endian - - #define ZEN_ARCH_32BIT 32 - #define ZEN_ARCH_64BIT 64 -@@ -24,7 +24,7 @@ - - constexpr bool usingLittleEndian() - { -- return std::endian::native == std::endian::little; -+ return true; - } - - #endif //BUILD_INFO_H_5928539285603428657 diff --git a/freefilesync/ffs_curl.patch b/freefilesync/ffs_curl.patch deleted file mode 100644 index bd0354a..0000000 --- a/freefilesync/ffs_curl.patch +++ /dev/null @@ -1,62 +0,0 @@ -Author: Brulhart, bgstack15 -Date: 2022-03-09 -Message: remove assertion for libcurl version >1.71 -Version: FreeFileSync 11.18 -Message: We have to omit checking for certain definitions. -Distro: Fedora 34. File ffs_curl.patch is different between fc34 and devuan! -On Devuan Ceres file /usr/include/x86_64-linux-gnu/curl/curl.h from libcurl 4-openssl-dev stops with CURLE_PROXY 97 -For Devuan Ceres libcurl4-openssl-dev 7.74.0-1.3+b1 uses CURLE_TELNET_OPTION_SYNTAX and not CURLE_SETOPT_OPTION_SYNTAX which replaced the first at version 7.78.0 per https://github.com/curl/curl/blob/master/docs/libcurl/symbols-in-versions -diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/afs/ftp.cpp ---- 10.21-0/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 08:56:08.608066350 -0400 -+++ 10.21-1/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 09:23:46.882110499 -0400 -@@ -635,7 +635,7 @@ - curlRelPath += compFmt; - } - -- static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67)); -+ static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 71 )); - /* 1. CURLFTPMETHOD_NOCWD requires absolute paths to unconditionally skip CWDs: https://github.com/curl/curl/pull/4382 - 2. CURLFTPMETHOD_SINGLECWD requires absolute paths to skip one needless "CWD entry path": https://github.com/curl/curl/pull/4332 - => https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an -diff -aur 11.18-{0,1}/libcurl/curl_wrap.cpp ---- 11.18-0/libcurl/curl_wrap.cpp 2022-03-09 10:19:42.961942416 -0500 -+++ 11.18-1/libcurl/curl_wrap.cpp 2022-03-09 10:37:44.702421086 -0500 -@@ -330,7 +330,7 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE46); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_MANY_REDIRECTS); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SETOPT_OPTION_SYNTAX); -+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING); -@@ -343,7 +343,7 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CIPHER); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_CONTENT_ENCODING); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE62); -+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_INVALID_URL); // < libcurl 7.82.0 - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FILESIZE_EXCEEDED); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_USE_SSL_FAILED); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SEND_FAIL_REWIND); -@@ -357,7 +357,7 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_EXISTS); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TFTP_NOSUCHUSER); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_FAILED); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE76); -+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_REQD); // < libcurl 7.82.0 - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CACERT_BADFILE); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_NOT_FOUND); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSH); -@@ -378,11 +378,8 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT); - ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); - } -- static_assert(CURL_LAST == CURLE_SSL_CLIENTCERT + 1); - - return replaceCpy(L"Curl status %x", L"%x", numberTo(static_cast(sc))); - } diff --git a/freefilesync/ffs_distro_el6_el7.patch b/freefilesync/ffs_distro_el6_el7.patch new file mode 100644 index 0000000..ad9ae15 --- /dev/null +++ b/freefilesync/ffs_distro_el6_el7.patch @@ -0,0 +1,137 @@ +# 2020-07-22 starting at FreeFileSync 10.25 in 2020-06, we need g++-10 to compile but all EL targets (6, 7, and 8) do not have gcc 10 so this patch is not usable as is. But it should get the gtk3 fix if any CentOS targets get gcc-10. +The cstddef discovery is from https://stackoverflow.com/questions/52567517/freefilesync-c-error-byte-is-not-a-member-of-std +Some changes just make the application work better in an installed setting (e.g., the hard-coded resouce path). +Tricking the wxWidgets ABI version comes from https://stackoverflow.com/questions/45123664/wxwidgets-runtime-error-mismatch-version/47822976#47822976 +FreeFileSync 10.11 updated the default compile flags to -std=c++2a, but this fails on gcc 4.8.5 on el7. Reverting to -std=c++17 allows the application to compile. +diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp +--- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 ++++ 10.13-1/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:36:28.178274292 -0400 +@@ -55,7 +55,8 @@ + + Zstring fff::getResourceDirPf() + { +- return getProcessParentFolderPath() + FILE_NAME_SEPARATOR + Zstr("Resources") + FILE_NAME_SEPARATOR; ++ // For Fedora, EL and Devuan, install to /usr/share/freefilesync specificly ++ return Zstr("/usr/share/freefilesync/"); + } + + +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Makefile +--- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 07:59:45.042147902 -0400 ++++ 10.18-1/FreeFileSync/Source/Makefile 2019-11-21 20:59:25.548277619 -0500 +@@ -1,10 +1,10 @@ +-exeName = FreeFileSync_$(shell arch) ++exeName = FreeFileSync + +-cxxFlags = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ ++cxxFlags = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ +- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread ++ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread + +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -no-pie `wx-config --version=3.0 --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread + + + cxxFlags += `pkg-config --cflags openssl` +@@ -17,6 +17,7 @@ + linkFlags += `pkg-config --libs libssh2` + + cxxFlags += `pkg-config --cflags gtk+-2.0` ++linkFlags += `pkg-config --libs gtk+-2.0` + #treat as system headers so that warnings are hidden: + cxxFlags += -isystem/usr/include/gtk-2.0 + +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTimeSync/application.h 10.11-1/FreeFileSync/Source/RealTimeSync/application.h +--- 10.11-0/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 07:59:45.035147580 -0400 ++++ 10.11-1/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 10:19:57.227913415 -0400 +@@ -7,6 +7,8 @@ + #ifndef APPLICATION_H_18506781708176342677 + #define APPLICATION_H_18506781708176342677 + ++#define __GXX_ABI_VERSION 1002 ++ + #include + + +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 10.11-1/FreeFileSync/Source/RealTimeSync/Makefile +--- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 07:59:45.008146336 -0400 ++++ 10.18-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-11-22 10:14:04.326175203 -0500 +@@ -1,13 +1,14 @@ +-exeName = RealTimeSync_$(shell arch) ++exeName = RealTimeSync + +-cxxFlags = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ ++cxxFlags = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ +- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread ++ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread + +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -no-pie `wx-config --version=3.0 --cxxflags --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread + + #Gtk - support "no button border" + cxxFlags += `pkg-config --cflags gtk+-2.0` ++linkFlags += `pkg-config --libs gtk+-2.0` + #treat as system headers so that warnings are hidden: + cxxFlags += -isystem/usr/include/gtk-2.0 + +diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-12-27 07:56:06.714625467 -0500 ++++ 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp 2021-07-15 09:03:57.753183052 -0400 +@@ -93,6 +93,8 @@ + build += LTR_MARK; //fix Arabic + build += utfTo(cpuArchName); + ++ build += L" for CentOS"; ++ + build += SPACED_BULLET; + build += utfTo(formatTime(formatDateTag, getCompileTime())); + +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/wx+/app_main.h 10.11-1/wx+/app_main.h +--- 10.11-0/wx+/app_main.h 2019-04-12 07:59:44.936143019 -0400 ++++ 10.11-1/wx+/app_main.h 2019-04-12 10:19:57.228913439 -0400 +@@ -7,6 +7,8 @@ + #ifndef APP_MAIN_H_08215601837818347575856 + #define APP_MAIN_H_08215601837818347575856 + ++#define __GXX_ABI_VERSION 1002 ++ + #include + #include + +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/ring_buffer.h 10.11-1/zen/ring_buffer.h +--- 10.11-0/zen/ring_buffer.h 2019-04-12 07:59:46.098196548 -0400 ++++ 10.11-1/zen/ring_buffer.h 2019-04-12 10:19:57.228913439 -0400 +@@ -9,6 +9,7 @@ + + #include + #include "scope_guard.h" ++#include + + + namespace zen +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/serialize.h 10.19-1/zen/serialize.h +--- 10.11-0/zen/serialize.h 2019-04-12 07:59:46.080195719 -0400 ++++ 10.19-1/zen/serialize.h 2019-12-27 11:35:50.379901321 -0500 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include "string_base.h" + //keep header clean from specific stream implementations! (e.g.file_io.h)! used by abstract.h! + +Message: For -std=c++17 we do not get to use charconv. It appears it is not actually in use, because the application compiles with this patch. +diff -Naur -x '*.orig' -x '.git*' -x '*.swp' -x '*.rej' 10.18-0/zen/legacy_compiler.cpp 10.18-1/zen/legacy_compiler.cpp +--- 10.18-0/zen/legacy_compiler.cpp 2019-11-21 20:59:02.633016149 -0500 ++++ 10.18-1/zen/legacy_compiler.cpp 2019-11-21 20:59:31.042340308 -0500 +@@ -5,7 +5,7 @@ + // ***************************************************************************** + + #include "legacy_compiler.h" +-#include ++//#include + //1. including this one in string_tools.h blows up VC++: + // "An internal error has occurred in the compiler. (compiler file 'd:\agent\_work\1\s\src\vctools\Compiler\Utc\src\p2\p2symtab.c', line 2618)" + //2. using inside PCH: "fatal error C1076: compiler limit: internal heap limit reached" diff --git a/freefilesync/ffs_distro_fedora.patch b/freefilesync/ffs_distro_fedora.patch new file mode 100644 index 0000000..d54110b --- /dev/null +++ b/freefilesync/ffs_distro_fedora.patch @@ -0,0 +1,108 @@ +Author: bgstack15 +Source: Original research +Last-Modified: 2022-05-22 +Message: Main patch to compile on Fedora +History: ffs_fedora 2020-07-22 now uses gtk3 +diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp +--- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 ++++ 11.21-1/FreeFileSync/Source/ffs_paths.cpp 2019-11-21 09:41:42.287474472 -0500 +@@ -49,7 +49,7 @@ + + Zstring fff::getResourceDirPath() + { +- return appendPath(getProcessParentFolderPath(), Zstr("Resources")); ++ return Zstr("/usr/share/freefilesync/"); + } + + +diff -Naur -x '*.rej' -x '*.orig' -x '*.git*' 11.4-0/FreeFileSync/Source/Makefile 11.4-1/FreeFileSync/Source/Makefile +--- 11.4-0/FreeFileSync/Source/Makefile 2020-12-08 20:49:38.675976861 -0500 ++++ 11.4-1/FreeFileSync/Source/Makefile 2020-12-08 21:01:57.174590803 -0500 +@@ -1,10 +1,10 @@ +-exeName = FreeFileSync_$(shell arch) ++exeName = FreeFileSync + +-cxxFlags = -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ ++cxxFlags += -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ + -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread + +-linkFlags = -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread ++linkFlags += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -lz -pthread + + + cxxFlags += `pkg-config --cflags openssl` +@@ -16,9 +16,10 @@ + cxxFlags += `pkg-config --cflags libssh2` + linkFlags += `pkg-config --libs libssh2` + +-cxxFlags += `pkg-config --cflags gtk+-2.0` ++cxxFlags += `pkg-config --cflags gtk+-3.0` ++linkFlags += `pkg-config --libs gtk+-3.0` + #treat as system headers so that warnings are hidden: +-cxxFlags += -isystem/usr/include/gtk-2.0 ++cxxFlags += -isystem/usr/include/gtk-3.0 + + #support for SELinux (optional) + SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES) +diff -Naur -x '*.rej' -x '*.orig' -x '*.git*' 11.4-0/FreeFileSync/Source/RealTimeSync/Makefile 11.4-1/FreeFileSync/Source/RealTimeSync/Makefile +--- 11.4-0/FreeFileSync/Source/RealTimeSync/Makefile 2020-12-08 20:49:38.675976861 -0500 ++++ 11.4-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-12-08 21:01:19.720188711 -0500 +@@ -1,15 +1,16 @@ +-exeName = RealTimeSync_$(shell arch) ++exeName = RealTimeSync + +-cxxFlags = -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ ++cxxFlags += -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ + -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ + -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread + +-linkFlags = -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread ++linkFlags += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -lz -pthread + + #Gtk - support "no button border" +-cxxFlags += `pkg-config --cflags gtk+-2.0` ++cxxFlags += `pkg-config --cflags gtk+-3.0` ++linkFlags += `pkg-config --libs gtk+-3.0` + #treat as system headers so that warnings are hidden: +-cxxFlags += -isystem/usr/include/gtk-2.0 ++cxxFlags += -isystem/usr/include/gtk-3.0 + + cppFiles= + cppFiles+=application.cpp +diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-12-27 07:56:06.714625467 -0500 ++++ 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp 2021-07-15 09:03:57.753183052 -0400 +@@ -93,6 +93,8 @@ + build += LTR_MARK; //fix Arabic + build += utfTo(cpuArchName); + ++ build += L" for Fedora"; ++ + build += SPACED_BULLET; + build += utfTo(formatTime(formatDateTag, getCompileTime())); + +Message: Fix some sloppiness by Zenju. +diff -Naur -x '*.orig' -x '*.rej' -x .git 11.21-0/FreeFileSync/Source/application.cpp 11.21-1/FreeFileSync/Source/application.cpp +--- 11.21-0/FreeFileSync/Source/application.cpp 2022-05-22 17:09:32.234809499 -0400 ++++ 11.21-1/FreeFileSync/Source/application.cpp 2022-05-24 08:36:51.949159500 -0400 +@@ -92,7 +92,7 @@ + ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error)); + + ::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider, +- (getResourceDirPf() + fileName).c_str(), //const gchar* path, ++ (getResourceDirPath() + fileName).c_str(), //const gchar* path, + &error); //GError** error + if (error) + throw SysError(formatGlibError("gtk_css_provider_load_from_path", error)); +--- 11.21-0/FreeFileSync/Source/RealTimeSync/application.cpp 2022-05-22 17:09:32.226809398 -0400 ++++ 11.21-1/FreeFileSync/Source/RealTimeSync/application.cpp 2022-05-25 09:15:00.262617987 -0400 +@@ -68,7 +68,7 @@ + ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error)); + + ::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider, +- (fff::getResourceDirPf() + fileName).c_str(), //const gchar* path, ++ (fff::getResourceDirPath() + fileName).c_str(), //const gchar* path, + &error); //GError** error + if (error) + throw SysError(formatGlibError("gtk_css_provider_load_from_path", error)); diff --git a/freefilesync/ffs_el.patch b/freefilesync/ffs_el.patch deleted file mode 100644 index ad9ae15..0000000 --- a/freefilesync/ffs_el.patch +++ /dev/null @@ -1,137 +0,0 @@ -# 2020-07-22 starting at FreeFileSync 10.25 in 2020-06, we need g++-10 to compile but all EL targets (6, 7, and 8) do not have gcc 10 so this patch is not usable as is. But it should get the gtk3 fix if any CentOS targets get gcc-10. -The cstddef discovery is from https://stackoverflow.com/questions/52567517/freefilesync-c-error-byte-is-not-a-member-of-std -Some changes just make the application work better in an installed setting (e.g., the hard-coded resouce path). -Tricking the wxWidgets ABI version comes from https://stackoverflow.com/questions/45123664/wxwidgets-runtime-error-mismatch-version/47822976#47822976 -FreeFileSync 10.11 updated the default compile flags to -std=c++2a, but this fails on gcc 4.8.5 on el7. Reverting to -std=c++17 allows the application to compile. -diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp ---- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 -+++ 10.13-1/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:36:28.178274292 -0400 -@@ -55,7 +55,8 @@ - - Zstring fff::getResourceDirPf() - { -- return getProcessParentFolderPath() + FILE_NAME_SEPARATOR + Zstr("Resources") + FILE_NAME_SEPARATOR; -+ // For Fedora, EL and Devuan, install to /usr/share/freefilesync specificly -+ return Zstr("/usr/share/freefilesync/"); - } - - -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Makefile ---- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 07:59:45.042147902 -0400 -+++ 10.18-1/FreeFileSync/Source/Makefile 2019-11-21 20:59:25.548277619 -0500 -@@ -1,10 +1,10 @@ --exeName = FreeFileSync_$(shell arch) -+exeName = FreeFileSync - --cxxFlags = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ -+cxxFlags = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ -- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread -+ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread - --linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -no-pie `wx-config --version=3.0 --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread - - - cxxFlags += `pkg-config --cflags openssl` -@@ -17,6 +17,7 @@ - linkFlags += `pkg-config --libs libssh2` - - cxxFlags += `pkg-config --cflags gtk+-2.0` -+linkFlags += `pkg-config --libs gtk+-2.0` - #treat as system headers so that warnings are hidden: - cxxFlags += -isystem/usr/include/gtk-2.0 - -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTimeSync/application.h 10.11-1/FreeFileSync/Source/RealTimeSync/application.h ---- 10.11-0/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 07:59:45.035147580 -0400 -+++ 10.11-1/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 10:19:57.227913415 -0400 -@@ -7,6 +7,8 @@ - #ifndef APPLICATION_H_18506781708176342677 - #define APPLICATION_H_18506781708176342677 - -+#define __GXX_ABI_VERSION 1002 -+ - #include - - -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 10.11-1/FreeFileSync/Source/RealTimeSync/Makefile ---- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 07:59:45.008146336 -0400 -+++ 10.18-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-11-22 10:14:04.326175203 -0500 -@@ -1,13 +1,14 @@ --exeName = RealTimeSync_$(shell arch) -+exeName = RealTimeSync - --cxxFlags = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ -+cxxFlags = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ -- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread -+ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread - --linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -no-pie `wx-config --version=3.0 --cxxflags --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread - - #Gtk - support "no button border" - cxxFlags += `pkg-config --cflags gtk+-2.0` -+linkFlags += `pkg-config --libs gtk+-2.0` - #treat as system headers so that warnings are hidden: - cxxFlags += -isystem/usr/include/gtk-2.0 - -diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp ---- 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-12-27 07:56:06.714625467 -0500 -+++ 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp 2021-07-15 09:03:57.753183052 -0400 -@@ -93,6 +93,8 @@ - build += LTR_MARK; //fix Arabic - build += utfTo(cpuArchName); - -+ build += L" for CentOS"; -+ - build += SPACED_BULLET; - build += utfTo(formatTime(formatDateTag, getCompileTime())); - -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/wx+/app_main.h 10.11-1/wx+/app_main.h ---- 10.11-0/wx+/app_main.h 2019-04-12 07:59:44.936143019 -0400 -+++ 10.11-1/wx+/app_main.h 2019-04-12 10:19:57.228913439 -0400 -@@ -7,6 +7,8 @@ - #ifndef APP_MAIN_H_08215601837818347575856 - #define APP_MAIN_H_08215601837818347575856 - -+#define __GXX_ABI_VERSION 1002 -+ - #include - #include - -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/ring_buffer.h 10.11-1/zen/ring_buffer.h ---- 10.11-0/zen/ring_buffer.h 2019-04-12 07:59:46.098196548 -0400 -+++ 10.11-1/zen/ring_buffer.h 2019-04-12 10:19:57.228913439 -0400 -@@ -9,6 +9,7 @@ - - #include - #include "scope_guard.h" -+#include - - - namespace zen -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/serialize.h 10.19-1/zen/serialize.h ---- 10.11-0/zen/serialize.h 2019-04-12 07:59:46.080195719 -0400 -+++ 10.19-1/zen/serialize.h 2019-12-27 11:35:50.379901321 -0500 -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - #include "string_base.h" - //keep header clean from specific stream implementations! (e.g.file_io.h)! used by abstract.h! - -Message: For -std=c++17 we do not get to use charconv. It appears it is not actually in use, because the application compiles with this patch. -diff -Naur -x '*.orig' -x '.git*' -x '*.swp' -x '*.rej' 10.18-0/zen/legacy_compiler.cpp 10.18-1/zen/legacy_compiler.cpp ---- 10.18-0/zen/legacy_compiler.cpp 2019-11-21 20:59:02.633016149 -0500 -+++ 10.18-1/zen/legacy_compiler.cpp 2019-11-21 20:59:31.042340308 -0500 -@@ -5,7 +5,7 @@ - // ***************************************************************************** - - #include "legacy_compiler.h" --#include -+//#include - //1. including this one in string_tools.h blows up VC++: - // "An internal error has occurred in the compiler. (compiler file 'd:\agent\_work\1\s\src\vctools\Compiler\Utc\src\p2\p2symtab.c', line 2618)" - //2. using inside PCH: "fatal error C1076: compiler limit: internal heap limit reached" diff --git a/freefilesync/ffs_el6_el7_bit.patch b/freefilesync/ffs_el6_el7_bit.patch new file mode 100644 index 0000000..3cc6ccc --- /dev/null +++ b/freefilesync/ffs_el6_el7_bit.patch @@ -0,0 +1,26 @@ +Author: bgstack15 +Date: 2019-10-22 +Version: FreeFileSync 10.17 +Distro: el7,el8,fc29 +Message: Some library is not available to these older distros, and it doesn't matter too much so far. +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.17-0/zen/build_info.h 10.17-1/zen/build_info.h +--- 10.17-0/zen/build_info.h 2019-10-21 11:23:51.249139703 -0400 ++++ 10.17-1/zen/build_info.h 2019-10-22 13:53:00.207113564 -0400 +@@ -7,7 +7,7 @@ + #ifndef BUILD_INFO_H_5928539285603428657 + #define BUILD_INFO_H_5928539285603428657 + +- #include //std::endian ++ //#include //std::endian + + #define ZEN_ARCH_32BIT 32 + #define ZEN_ARCH_64BIT 64 +@@ -24,7 +24,7 @@ + + constexpr bool usingLittleEndian() + { +- return std::endian::native == std::endian::little; ++ return true; + } + + #endif //BUILD_INFO_H_5928539285603428657 diff --git a/freefilesync/ffs_el6_el7_no_eraseif.patch b/freefilesync/ffs_el6_el7_no_eraseif.patch new file mode 100644 index 0000000..71239e4 --- /dev/null +++ b/freefilesync/ffs_el6_el7_no_eraseif.patch @@ -0,0 +1,405 @@ +Message: generated with roughly sed -i -r -e 's/std::erase_if/eraseIf/g' $( grep -l -riIE 'std::erase_if\(' ) +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 10.18-2/FreeFileSync/Source/afs/abstract_impl.h +--- 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 16:15:55.823668066 -0500 ++++ 10.18-2/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 17:57:30.555558350 -0500 +@@ -255,7 +255,7 @@ + pathLocks_.access([&](std::map>& pathLocks) + { + //remove obsolete entries +- std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); }); ++ zen::eraseIf(pathLocks, [](const auto& v) { return !v.second.lock(); }); + + //get or create mutex + std::weak_ptr& weakPtr = pathLocks[nativePath]; +diff -Naur 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 10.25-1/FreeFileSync/Source/afs/gdrive.cpp +--- 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 2020-06-19 16:17:15.000000000 -0400 ++++ 10.25-1/FreeFileSync/Source/afs/gdrive.cpp 2020-06-20 20:54:52.438669026 -0400 +@@ -1930,7 +1930,7 @@ + if (auto it = itemDetails_.find(itemId); it != itemDetails_.end()) + { + GdriveItemDetails detailsNew = it->second; +- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); ++ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); + notifyItemUpdated(stateDelta, itemId, &detailsNew); + } + else //conflict!!! +@@ -1944,7 +1944,7 @@ + GdriveItemDetails detailsNew = it->second; + detailsNew.itemName = newName; + +- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // ++ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // + detailsNew.parentIds.push_back(parentIdTo); //not a duplicate + + notifyItemUpdated(stateDelta, itemId, &detailsNew); +@@ -2095,7 +2095,7 @@ + return; //=> avoid misleading changeLog_ entries after Google Drive sync!!! + + //update change logs (and clean up obsolete entries) +- std::erase_if(changeLog_, [&](std::weak_ptr& weakPtr) ++ eraseIf(changeLog_, [&](std::weak_ptr& weakPtr) + { + if (std::shared_ptr iid = weakPtr.lock()) + { +@@ -2116,15 +2116,15 @@ + + std::vector parentIdsNew = details->parentIds; + std::vector parentIdsRemoved = it->second.parentIds; +- std::erase_if(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); +- std::erase_if(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); ++ eraseIf(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); ++ eraseIf(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); + + for (const std::string& parentId : parentIdsNew) + folderContents_[parentId].childItems.push_back(it); //new insert => no need for duplicate check + + for (const std::string& parentId : parentIdsRemoved) + if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) +- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); ++ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); + //if all parents are removed, Google Drive will (recursively) delete the item => don't prematurely do this now: wait for change notifications! + //OR: item without parents located in "Shared with me", but referenced via Shortcut => don't remove!!! + +@@ -2144,7 +2144,7 @@ + { + for (const std::string& parentId : it->second.parentIds) //1. delete from parent folders + if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) +- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); ++ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); + + itemDetails_.erase(it); + } +@@ -2153,7 +2153,7 @@ + itP != folderContents_.end()) + { + for (auto itChild : itP->second.childItems) //2. delete as parent from child items (don't wait for change notifications of children) +- std::erase_if(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); ++ eraseIf(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); + folderContents_.erase(itP); + } + } +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/sftp.cpp 10.18-2/FreeFileSync/Source/afs/sftp.cpp +--- 10.18-1/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:54:23.078438037 -0500 ++++ 10.18-2/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:57:30.557558372 -0500 +@@ -946,7 +946,7 @@ + std::this_thread::yield(); + return; //don't hold lock for too long: delete only one session at a time, then yield... + } +- std::erase_if(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer ++ eraseIf(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer + done = true; + }); + } +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/algorithm.cpp 10.18-2/FreeFileSync/Source/base/algorithm.cpp +--- 10.18-1/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 16:15:55.832668168 -0500 ++++ 10.18-2/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 17:57:30.558558384 -0500 +@@ -1372,8 +1372,8 @@ + { + std::vector itemSelectionLeft (rowsToCopyOnLeft .begin(), rowsToCopyOnLeft .end()); + std::vector itemSelectionRight(rowsToCopyOnRight.begin(), rowsToCopyOnRight.end()); +- std::erase_if(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! +- std::erase_if(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); // ++ eraseIf(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! ++ eraseIf(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); // + + const int itemTotal = static_cast(itemSelectionLeft.size() + itemSelectionRight.size()); + int64_t bytesTotal = 0; +@@ -1548,8 +1548,8 @@ + std::vector deleteLeft = rowsToDeleteOnLeft; + std::vector deleteRight = rowsToDeleteOnRight; + +- std::erase_if(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? +- std::erase_if(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); //yes, for correct stats: ++ eraseIf(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? ++ eraseIf(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); //yes, for correct stats: + + const int itemCount = static_cast(deleteLeft.size() + deleteRight.size()); + callback.initNewPhase(itemCount, 0, ProcessPhase::none); //throw X +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/db_file.cpp 10.18-2/FreeFileSync/Source/base/db_file.cpp +--- 10.18-1/FreeFileSync/Source/base/db_file.cpp 2019-11-20 16:15:55.836668213 -0500 ++++ 10.18-2/FreeFileSync/Source/base/db_file.cpp 2019-11-20 17:57:30.559558395 -0500 +@@ -591,7 +591,7 @@ + } + + //delete removed items (= "in-sync") from database +- std::erase_if(dbFiles, [&](const InSyncFolder::FileList::value_type& v) ++ eraseIf(dbFiles, [&](const InSyncFolder::FileList::value_type& v) + { + if (contains(toPreserve, v.first)) + return false; +@@ -628,7 +628,7 @@ + } + + //delete removed items (= "in-sync") from database +- std::erase_if(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) ++ eraseIf(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) + { + if (contains(toPreserve, v.first)) + return false; +@@ -663,7 +663,7 @@ + } + + //delete removed items (= "in-sync") from database +- std::erase_if(dbFolders, [&](InSyncFolder::FolderList::value_type& v) ++ eraseIf(dbFolders, [&](InSyncFolder::FolderList::value_type& v) + { + if (auto it = toPreserve.find(v.first); it != toPreserve.end()) + { +@@ -687,10 +687,10 @@ + //delete all entries for removed folder (= "in-sync") from database + void dbSetEmptyState(InSyncFolder& dbFolder, const Zstring& parentRelPathPf) + { +- std::erase_if(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); +- std::erase_if(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); ++ eraseIf(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); ++ eraseIf(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); + +- std::erase_if(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) ++ eraseIf(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) + { + const Zstring& itemRelPath = parentRelPathPf + v.first; + +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 10.18-2/FreeFileSync/Source/base/dir_lock.cpp +--- 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 16:15:55.836668213 -0500 ++++ 10.18-2/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 17:57:30.559558395 -0500 +@@ -502,8 +502,8 @@ + + void tidyUp() //remove obsolete entries + { +- std::erase_if(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); +- std::erase_if(guidByPath_, [&](const auto& v) { return !contains(locksByGuid_, v.second); }); ++ eraseIf(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); ++ eraseIf(guidByPath_, [&](const auto& v) { return locksByGuid_.find(v.second) == locksByGuid_.end(); }); + } + + std::map guidByPath_; //lockFilePath |-> GUID; n:1; locks can be referenced by a lockFilePath or alternatively a GUID +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp +--- 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 16:15:55.820668033 -0500 ++++ 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 17:57:30.559558395 -0500 +@@ -155,7 +155,7 @@ + checkXmlMappingErrors(in, filePath); //throw FileError + //--------------------------------------------------------------------------------------- + +- std::erase_if(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); ++ eraseIf(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); + cfg.directories.assign(uniqueFolders.begin(), uniqueFolders.end()); + cfg.commandline = Zstr('"') + fff::getFreeFileSyncLauncherPath() + Zstr("\" \"") + filePath + Zstr('"'); + } +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp +--- 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 08:03:55.508842092 -0400 ++++ 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 09:10:54.765302811 -0400 +@@ -152,7 +152,7 @@ + if (change.type == DirWatcher::ChangeType::baseFolderUnavailable) + return change; + +- std::erase_if(changes, [](const DirWatcher::Change& e) ++ eraseIf(changes, [](const DirWatcher::Change& e) + { + return + endsWith(e.itemPath, Zstr(".ffs_tmp")) || //sync.8ea2.ffs_tmp +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp +--- 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 16:15:55.822668055 -0500 ++++ 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 17:57:30.560558406 -0500 +@@ -247,7 +247,7 @@ + rts::AbortReason rts::runFolderMonitor(const XmlRealConfig& config, const wxString& jobname) + { + std::vector dirNamesNonFmt = config.directories; +- std::erase_if(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! ++ eraseIf(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! + + if (dirNamesNonFmt.empty()) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp +--- 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 16:15:55.847668337 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 17:57:30.561558418 -0500 +@@ -113,7 +113,7 @@ + { + const std::set pathsSorted(filePaths.begin(), filePaths.end()); + +- std::erase_if(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); ++ eraseIf(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); + + for (const Zstring& filePath : filePaths) + cfgList_.erase(filePath); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/command_box.cpp 10.18-2/FreeFileSync/Source/ui/command_box.cpp +--- 10.18-1/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:54:14.861345102 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:57:30.561558418 -0500 +@@ -75,7 +75,7 @@ + equalNoCase(newCommand, cmd)) + return; + +- std::erase_if(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); ++ eraseIf(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); + + history_.insert(history_.begin(), newCommand); + +@@ -194,7 +194,7 @@ + //this->SetSelection(wxNOT_FOUND); + + //delete selected row +- std::erase_if(history_, [&](const Zstring& item) { return item == selValue; }); ++ eraseIf(history_, [&](const Zstring& item) { return item == selValue; }); + + SetString(pos, wxString()); //in contrast to Delete(), this one does not kill the drop-down list and gives a nice visual feedback! + //Delete(pos); +diff -Naur 10.25-0/FreeFileSync/Source/ui/file_view.cpp 10.25-1/FreeFileSync/Source/ui/file_view.cpp +--- 10.25-0/FreeFileSync/Source/ui/file_view.cpp 2020-06-19 16:17:15.000000000 -0400 ++++ 10.25-1/FreeFileSync/Source/ui/file_view.cpp 2020-06-20 20:55:25.978009894 -0400 +@@ -321,7 +321,7 @@ + void FileView::removeInvalidRows() + { + //remove rows that have been deleted meanwhile +- std::erase_if(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); ++ eraseIf(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); + + viewRef_ .clear(); + rowPositions_ .clear(); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 10.18-2/FreeFileSync/Source/ui/folder_history_box.h +--- 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 16:15:55.849668360 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 17:57:30.562558429 -0500 +@@ -35,13 +35,13 @@ + const Zstring nameTmp = zen::trimCpy(folderPathPhrase); + + //insert new folder or put it to the front if already existing +- std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); ++ zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); + + folderPathPhrases_.insert(folderPathPhrases_.begin(), nameTmp); + truncate(); + } + +- void delItem(const Zstring& folderPathPhrase) { std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } ++ void delItem(const Zstring& folderPathPhrase) { zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } + + private: + void truncate() +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 10.18-2/FreeFileSync/Source/ui/log_panel.cpp +--- 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 16:15:55.852668394 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 17:57:30.562558429 -0500 +@@ -545,7 +545,7 @@ + if (auto prov = m_gridMessages->getDataProvider()) + { + std::vector colAttr = m_gridMessages->getColumnConfig(); +- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + if (!colAttr.empty()) + for (size_t row : m_gridMessages->getSelectedRows()) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp +--- 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:54:16.135359512 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:57:30.564558452 -0500 +@@ -1240,7 +1240,7 @@ + if (auto prov = grid->getDataProvider()) + { + std::vector colAttr = grid->getColumnConfig(); +- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + if (!colAttr.empty()) + for (size_t row : grid->getSelectedRows()) + { +@@ -5372,9 +5372,9 @@ + auto colAttrCenter = m_gridMainC->getColumnConfig(); + auto colAttrRight = m_gridMainR->getColumnConfig(); + +- std::erase_if(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); +- std::erase_if(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast(ca.type) == ColumnTypeCenter::CHECKBOX; }); +- std::erase_if(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast(ca.type) == ColumnTypeCenter::CHECKBOX; }); ++ eraseIf(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + + if (provLeft && provCenter && provRight) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 10.18-2/FreeFileSync/Source/ui/search_grid.cpp +--- 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 16:15:55.855668428 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 17:57:30.564558452 -0500 +@@ -69,7 +69,7 @@ + if (auto prov = grid.getDataProvider()) + { + std::vector colAttr = grid.getColumnConfig(); +- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + if (!colAttr.empty()) + { + const MatchFound matchFound(searchString); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp +--- 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 16:15:55.858668462 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 17:57:30.565558463 -0500 +@@ -601,7 +601,7 @@ + folderCmp_ = newData; + + //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderCmp" +- std::erase_if(folderCmp_, [](const std::shared_ptr& baseObj) ++ eraseIf(folderCmp_, [](const std::shared_ptr& baseObj) + { + return AFS::isNullPath(baseObj->getAbstractPath< LEFT_SIDE>()) && + AFS::isNullPath(baseObj->getAbstractPath()); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/wx+/async_task.h 10.18-2/wx+/async_task.h +--- 10.18-1/wx+/async_task.h 2019-11-20 16:15:55.860668484 -0500 ++++ 10.18-2/wx+/async_task.h 2019-11-20 17:57:30.565558463 -0500 +@@ -85,7 +85,7 @@ + + std::vector> readyTasks; //Reentrancy; access to AsyncTasks::add is not protected! => evaluate outside eraseIf + +- std::erase_if(tasks_, [&](std::unique_ptr& task) ++ eraseIf(tasks_, [&](std::unique_ptr& task) + { + if (task->resultReady()) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/zen/stl_tools.h 10.18-2/zen/stl_tools.h +--- 10.18-1/zen/stl_tools.h 2019-11-20 16:15:55.875668653 -0500 ++++ 10.18-2/zen/stl_tools.h 2019-11-20 17:58:20.801126674 -0500 +@@ -20,6 +20,16 @@ + //enhancements for + namespace zen + { ++//erase selected elements from any container: ++template ++void eraseIf(std::vector& v, Predicate p); ++ ++template ++void eraseIf(std::set& s, Predicate p); ++ ++template ++void eraseIf(std::map& m, Predicate p); ++ + //append STL containers + template + void append(std::vector& v, const C& c); +@@ -115,6 +125,36 @@ + + + //######################## implementation ######################## ++ ++template inline ++void eraseIf(std::vector& v, Predicate p) ++{ ++ v.erase(std::remove_if(v.begin(), v.end(), p), v.end()); ++} ++ ++ ++namespace impl ++{ ++template inline ++void setOrMapEraseIf(S& s, Predicate p) ++{ ++ for (auto it = s.begin(); it != s.end();) ++ if (p(*it)) ++ s.erase(it++); ++ else ++ ++it; ++} ++} ++ ++ ++template inline ++void eraseIf(std::set& s, Predicate p) { impl::setOrMapEraseIf(s, p); } //don't make this any more generic! e.g. must not compile for std::vector!!! ++ ++ ++template inline ++void eraseIf(std::map& m, Predicate p) { impl::setOrMapEraseIf(m, p); } ++ ++ + template inline + void append(std::vector& v, const C& c) { v.insert(v.end(), c.begin(), c.end()); } + diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch deleted file mode 100644 index d54110b..0000000 --- a/freefilesync/ffs_fedora.patch +++ /dev/null @@ -1,108 +0,0 @@ -Author: bgstack15 -Source: Original research -Last-Modified: 2022-05-22 -Message: Main patch to compile on Fedora -History: ffs_fedora 2020-07-22 now uses gtk3 -diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp ---- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 -+++ 11.21-1/FreeFileSync/Source/ffs_paths.cpp 2019-11-21 09:41:42.287474472 -0500 -@@ -49,7 +49,7 @@ - - Zstring fff::getResourceDirPath() - { -- return appendPath(getProcessParentFolderPath(), Zstr("Resources")); -+ return Zstr("/usr/share/freefilesync/"); - } - - -diff -Naur -x '*.rej' -x '*.orig' -x '*.git*' 11.4-0/FreeFileSync/Source/Makefile 11.4-1/FreeFileSync/Source/Makefile ---- 11.4-0/FreeFileSync/Source/Makefile 2020-12-08 20:49:38.675976861 -0500 -+++ 11.4-1/FreeFileSync/Source/Makefile 2020-12-08 21:01:57.174590803 -0500 -@@ -1,10 +1,10 @@ --exeName = FreeFileSync_$(shell arch) -+exeName = FreeFileSync - --cxxFlags = -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ -+cxxFlags += -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ - -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread - --linkFlags = -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread -+linkFlags += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -lz -pthread - - - cxxFlags += `pkg-config --cflags openssl` -@@ -16,9 +16,10 @@ - cxxFlags += `pkg-config --cflags libssh2` - linkFlags += `pkg-config --libs libssh2` - --cxxFlags += `pkg-config --cflags gtk+-2.0` -+cxxFlags += `pkg-config --cflags gtk+-3.0` -+linkFlags += `pkg-config --libs gtk+-3.0` - #treat as system headers so that warnings are hidden: --cxxFlags += -isystem/usr/include/gtk-2.0 -+cxxFlags += -isystem/usr/include/gtk-3.0 - - #support for SELinux (optional) - SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES) -diff -Naur -x '*.rej' -x '*.orig' -x '*.git*' 11.4-0/FreeFileSync/Source/RealTimeSync/Makefile 11.4-1/FreeFileSync/Source/RealTimeSync/Makefile ---- 11.4-0/FreeFileSync/Source/RealTimeSync/Makefile 2020-12-08 20:49:38.675976861 -0500 -+++ 11.4-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-12-08 21:01:19.720188711 -0500 -@@ -1,15 +1,16 @@ --exeName = RealTimeSync_$(shell arch) -+exeName = RealTimeSync - --cxxFlags = -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ -+cxxFlags += -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ - -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ - -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread - --linkFlags = -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread -+linkFlags += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -lz -pthread - - #Gtk - support "no button border" --cxxFlags += `pkg-config --cflags gtk+-2.0` -+cxxFlags += `pkg-config --cflags gtk+-3.0` -+linkFlags += `pkg-config --libs gtk+-3.0` - #treat as system headers so that warnings are hidden: --cxxFlags += -isystem/usr/include/gtk-2.0 -+cxxFlags += -isystem/usr/include/gtk-3.0 - - cppFiles= - cppFiles+=application.cpp -diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp ---- 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-12-27 07:56:06.714625467 -0500 -+++ 11.12-1/FreeFileSync/Source/ui/small_dlgs.cpp 2021-07-15 09:03:57.753183052 -0400 -@@ -93,6 +93,8 @@ - build += LTR_MARK; //fix Arabic - build += utfTo(cpuArchName); - -+ build += L" for Fedora"; -+ - build += SPACED_BULLET; - build += utfTo(formatTime(formatDateTag, getCompileTime())); - -Message: Fix some sloppiness by Zenju. -diff -Naur -x '*.orig' -x '*.rej' -x .git 11.21-0/FreeFileSync/Source/application.cpp 11.21-1/FreeFileSync/Source/application.cpp ---- 11.21-0/FreeFileSync/Source/application.cpp 2022-05-22 17:09:32.234809499 -0400 -+++ 11.21-1/FreeFileSync/Source/application.cpp 2022-05-24 08:36:51.949159500 -0400 -@@ -92,7 +92,7 @@ - ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error)); - - ::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider, -- (getResourceDirPf() + fileName).c_str(), //const gchar* path, -+ (getResourceDirPath() + fileName).c_str(), //const gchar* path, - &error); //GError** error - if (error) - throw SysError(formatGlibError("gtk_css_provider_load_from_path", error)); ---- 11.21-0/FreeFileSync/Source/RealTimeSync/application.cpp 2022-05-22 17:09:32.226809398 -0400 -+++ 11.21-1/FreeFileSync/Source/RealTimeSync/application.cpp 2022-05-25 09:15:00.262617987 -0400 -@@ -68,7 +68,7 @@ - ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error)); - - ::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider, -- (fff::getResourceDirPf() + fileName).c_str(), //const gchar* path, -+ (fff::getResourceDirPath() + fileName).c_str(), //const gchar* path, - &error); //GError** error - if (error) - throw SysError(formatGlibError("gtk_css_provider_load_from_path", error)); diff --git a/freefilesync/ffs_icon_loader.patch b/freefilesync/ffs_icon_loader.patch deleted file mode 100644 index 14035d5..0000000 --- a/freefilesync/ffs_icon_loader.patch +++ /dev/null @@ -1,21 +0,0 @@ -Summary: Solve libglib2.0 problem in sketchy manner -Date: 2022-05-24 -Version: 11.21 -Author: bgstack15 -Message: -Warning! I have absolutely no idea what I am doing. Check https://freefilesync.org/forum/viewtopic.php?t=8780 for future developments. -In Devuan Ceres, starting in 2021-08 with libglib2.0-0=2.68.3-2 the file icon_loader.cpp fails to compile. By removing the static_cast, this file can compile. The built application throws all sorts of GLib-GObject-CRITICIAL messages but the application operates. -Downgrade to "deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20210801T144205Z/ unstable main non-free contrib" in /etc/apt/sources.list and install the exact libglib version necessary to compile without this patch. -$ sudo apt-get -V install libglib2.0-0=2.66.8-1 libglib2.0-bin=2.66.8-1 libglib2.0-data=2.66.8-1 libglib2.0-dev=2.66.8-1 libglib2.0-dev-bin=2.66.8-1 libglib2.0-0:i386=2.66.8-1 -Zenju tried addressing this for me, but it still does not compile, even with g++-12. So I still have to omit this macro call. ---- 11.21-0/FreeFileSync/Source/base/icon_loader.cpp 2022-05-22 17:09:32.234809499 -0400 -+++ 11.21-1/FreeFileSync/Source/base/icon_loader.cpp 2022-05-24 08:59:15.433965993 -0400 -@@ -216,7 +216,7 @@ - //the remaining icon types won't block! - assert(GDK_IS_PIXBUF(gicon) || G_IS_THEMED_ICON(gicon) || G_IS_EMBLEMED_ICON(gicon)); - -- ::g_object_ref(gicon); //pass ownership -+ //::g_object_ref(gicon); //pass ownership - return FileIconHolder(gicon, maxSize); // - - } diff --git a/freefilesync/ffs_libcurl_7.61.1.patch b/freefilesync/ffs_libcurl_7.61.1.patch new file mode 100644 index 0000000..a6b8532 --- /dev/null +++ b/freefilesync/ffs_libcurl_7.61.1.patch @@ -0,0 +1,79 @@ +Author: Brulhart, bgstack15 +Date: 2022-06-07 +Message: remove assertion for libcurl version >1.61 for EL8 +Version: FreeFileSync 11.21 +Message: We have to omit checking for certain definitions. +Distro: AlmaLinux 8. File ffs_curl.patch is different between all distros! +diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/afs/ftp.cpp +--- 10.21-0/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 08:56:08.608066350 -0400 ++++ 10.21-1/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 09:23:46.882110499 -0400 +@@ -635,7 +635,7 @@ + curlRelPath += compFmt; + } + +- static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67)); ++ static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 61 )); + /* 1. CURLFTPMETHOD_NOCWD requires absolute paths to unconditionally skip CWDs: https://github.com/curl/curl/pull/4382 + 2. CURLFTPMETHOD_SINGLECWD requires absolute paths to skip one needless "CWD entry path": https://github.com/curl/curl/pull/4332 + => https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an +diff -aur 11.21-{0,1}/libcurl/curl_wrap.h +--- FreeFileSync-11.21-0/libcurl/curl_wrap.h 2022-05-22 17:09:26.000000000 -0400 ++++ FreeFileSync-11.21-1/libcurl/curl_wrap.h 2022-06-07 13:27:43.530380754 -0400 +@@ -17,10 +17,6 @@ + #include + //------------------------------------------------- + +-#ifndef CURLINC_CURL_H +- #error curl.h header guard changed +-#endif +- + namespace zen + { + void libcurlInit(); +diff -aur 11.21-{0,1}/libcurl/curl_wrap.cpp +--- FreeFileSync-11.21/libcurl/curl_wrap.cpp 2022-05-22 17:09:26.000000000 -0400 ++++ FreeFileSync-11.21-2/libcurl/curl_wrap.cpp 2022-06-07 13:34:11.216294490 -0400 +@@ -331,9 +331,8 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE46); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_MANY_REDIRECTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SETOPT_OPTION_SYNTAX); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_SETFAILED); +@@ -344,7 +343,7 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CIPHER); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_CONTENT_ENCODING); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE62); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_INVALID_URL); // < libcurl 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FILESIZE_EXCEEDED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_USE_SSL_FAILED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SEND_FAIL_REWIND); +@@ -358,7 +357,7 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_EXISTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TFTP_NOSUCHUSER); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_FAILED); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE76); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_REQD); // < libcurl 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CACERT_BADFILE); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_NOT_FOUND); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSH); +@@ -376,14 +375,8 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_INVALIDCERTSTATUS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP2_STREAM); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_RECURSIVE_API_CALL); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT); + ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); + } +- static_assert(CURL_LAST == CURLE_SSL_CLIENTCERT + 1); + + return replaceCpy(L"Curl status %x", L"%x", numberTo(static_cast(sc))); + } diff --git a/freefilesync/ffs_libcurl_7.71.1.patch b/freefilesync/ffs_libcurl_7.71.1.patch new file mode 100644 index 0000000..bd0354a --- /dev/null +++ b/freefilesync/ffs_libcurl_7.71.1.patch @@ -0,0 +1,62 @@ +Author: Brulhart, bgstack15 +Date: 2022-03-09 +Message: remove assertion for libcurl version >1.71 +Version: FreeFileSync 11.18 +Message: We have to omit checking for certain definitions. +Distro: Fedora 34. File ffs_curl.patch is different between fc34 and devuan! +On Devuan Ceres file /usr/include/x86_64-linux-gnu/curl/curl.h from libcurl 4-openssl-dev stops with CURLE_PROXY 97 +For Devuan Ceres libcurl4-openssl-dev 7.74.0-1.3+b1 uses CURLE_TELNET_OPTION_SYNTAX and not CURLE_SETOPT_OPTION_SYNTAX which replaced the first at version 7.78.0 per https://github.com/curl/curl/blob/master/docs/libcurl/symbols-in-versions +diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/afs/ftp.cpp +--- 10.21-0/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 08:56:08.608066350 -0400 ++++ 10.21-1/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 09:23:46.882110499 -0400 +@@ -635,7 +635,7 @@ + curlRelPath += compFmt; + } + +- static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67)); ++ static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 71 )); + /* 1. CURLFTPMETHOD_NOCWD requires absolute paths to unconditionally skip CWDs: https://github.com/curl/curl/pull/4382 + 2. CURLFTPMETHOD_SINGLECWD requires absolute paths to skip one needless "CWD entry path": https://github.com/curl/curl/pull/4332 + => https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an +diff -aur 11.18-{0,1}/libcurl/curl_wrap.cpp +--- 11.18-0/libcurl/curl_wrap.cpp 2022-03-09 10:19:42.961942416 -0500 ++++ 11.18-1/libcurl/curl_wrap.cpp 2022-03-09 10:37:44.702421086 -0500 +@@ -330,7 +330,7 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE46); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_MANY_REDIRECTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SETOPT_OPTION_SYNTAX); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING); +@@ -343,7 +343,7 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CIPHER); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_CONTENT_ENCODING); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE62); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_INVALID_URL); // < libcurl 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FILESIZE_EXCEEDED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_USE_SSL_FAILED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SEND_FAIL_REWIND); +@@ -357,7 +357,7 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_EXISTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TFTP_NOSUCHUSER); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_FAILED); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE76); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_REQD); // < libcurl 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CACERT_BADFILE); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_NOT_FOUND); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSH); +@@ -378,11 +378,8 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT); + ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); + } +- static_assert(CURL_LAST == CURLE_SSL_CLIENTCERT + 1); + + return replaceCpy(L"Curl status %x", L"%x", numberTo(static_cast(sc))); + } diff --git a/freefilesync/ffs_libssh2.patch b/freefilesync/ffs_libssh2.patch deleted file mode 100644 index 022914b..0000000 --- a/freefilesync/ffs_libssh2.patch +++ /dev/null @@ -1,25 +0,0 @@ -Source: https://aur.archlinux.org/cgit/aur.git/commit/?h=freefilesync&id=7e1524db8e0243ff9d7b7dcba64a3a5228295725 -Author: Simon Brulhart -Message: libssh2 v1.8.0 does not yet implement LIBSSH2_SFTP_DEFAULT_MODE, revert to previous impl. -Method: - - sed -e 's/LIBSSH2_SFTP_DEFAULT_MODE/LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO/g' -i 'FreeFileSync/Source/afs/sftp.cpp' - -Source: -Author: B Stack -Message: libssh2 v1.8.0 does not yet implement these two error messages. I do not know why distros are not serving libssh2 v1.9.0 which wa released June 20, 2019. -Date: 2019-09-17T13:41:23Z ---- 11.3-0/libssh2/libssh2_wrap.h 2020-11-01 17:14:27.203497619 -0500 -+++ 11.3-1/libssh2/libssh2_wrap.h 2020-11-01 17:18:42.294130563 -0500 -@@ -172,8 +172,8 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ENCRYPT); - ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_BAD_SOCKET); - ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KNOWN_HOSTS); -- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL); -- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED); -+ //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL); -+ //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED); - - default: - return replaceCpy(L"SSH status %x", L"%x", numberTo(sc)); - diff --git a/freefilesync/ffs_no_check_updates.patch b/freefilesync/ffs_no_check_updates.patch deleted file mode 100644 index eececed..0000000 --- a/freefilesync/ffs_no_check_updates.patch +++ /dev/null @@ -1,273 +0,0 @@ -Version: 11.20 -Date: 2022-04-18 -Author: bgstack15 -Message: This is a major rewrite of the ffs_no_check_updates patch from before 11.10 which disabled only a few technical www interactions. This current version completely deletes all logic associated with checking the version of the program. -diff -aur 11.18-0/FreeFileSync/Source/ui/gui_generated.cpp 11.18-1/FreeFileSync/Source/ui/gui_generated.cpp ---- 11.21-0/FreeFileSync/Source/ui/gui_generated.cpp 2022-05-22 17:09:32.246809650 -0400 -+++ 11.21-1/FreeFileSync/Source/ui/gui_generated.cpp 2022-05-22 17:43:22.568148782 -0400 -@@ -110,15 +110,6 @@ - - m_menuHelp->AppendSeparator(); - -- m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ), wxEmptyString, wxITEM_NORMAL ); -- m_menuHelp->Append( m_menuItemCheckVersionNow ); -- -- m_menuItemCheckVersionAuto = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("Check &automatically once a week") ), wxEmptyString, wxITEM_CHECK ); -- m_menuHelp->Append( m_menuItemCheckVersionAuto ); -- m_menuItemCheckVersionAuto->Check( true ); -- -- m_menuHelp->AppendSeparator(); -- - m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemAbout ); - -@@ -1131,8 +1122,6 @@ - m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuExportFileList ), this, m_menuItemExportList->GetId()); - m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuResetLayout ), this, m_menuItemResetLayout->GetId()); - m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onShowHelp ), this, m_menuItemHelp->GetId()); -- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersion ), this, m_menuItemCheckVersionNow->GetId()); -- m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersionAutomatically ), this, m_menuItemCheckVersionAuto->GetId()); - m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuAbout ), this, m_menuItemAbout->GetId()); - m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCmpSettings ), NULL, this ); - m_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); -diff -aur 11.18-0/FreeFileSync/Source/ui/gui_generated.h 11.18-1/FreeFileSync/Source/ui/gui_generated.h ---- 11.21-0/FreeFileSync/Source/ui/gui_generated.h 2022-05-22 17:09:32.246809650 -0400 -+++ 11.21-1/FreeFileSync/Source/ui/gui_generated.h 2022-05-22 17:41:42.058897375 -0400 -@@ -96,8 +96,6 @@ - wxMenuItem* m_menuItemShowOverview; - wxMenu* m_menuHelp; - wxMenuItem* m_menuItemHelp; -- wxMenuItem* m_menuItemCheckVersionNow; -- wxMenuItem* m_menuItemCheckVersionAuto; - wxMenuItem* m_menuItemAbout; - wxBoxSizer* bSizerPanelHolder; - wxPanel* m_panelTopButtons; -@@ -232,8 +230,6 @@ - virtual void onMenuExportFileList( wxCommandEvent& event ) { event.Skip(); } - virtual void onMenuResetLayout( wxCommandEvent& event ) { event.Skip(); } - virtual void onShowHelp( wxCommandEvent& event ) { event.Skip(); } -- virtual void onMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); } -- virtual void onMenuCheckVersionAutomatically( wxCommandEvent& event ) { event.Skip(); } - virtual void onMenuAbout( wxCommandEvent& event ) { event.Skip(); } - virtual void onCompSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); } - virtual void onCompSettingsContext( wxCommandEvent& event ) { event.Skip(); } -diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.cpp 11.10-2/FreeFileSync/Source/ui/main_dlg.cpp ---- 11.16-0/FreeFileSync/Source/ui/main_dlg.cpp 2022-01-04 08:52:19.811432573 -0500 -+++ 11.16-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-01-04 08:57:14.506728896 -0500 -@@ -744,7 +744,6 @@ - - setImage(*m_menuItemHelp, loadImage("help_sicon")); - setImage(*m_menuItemAbout, loadImage("about_sicon")); -- setImage(*m_menuItemCheckVersionNow, loadImage("update_check_sicon")); - - fixMenuIcons(*m_menuFile); - fixMenuIcons(*m_menuActions); -@@ -854,9 +853,6 @@ - //mainly to update row label sizes... - updateGui(); - -- //register regular check for update on next idle event -- Bind(wxEVT_IDLE, &MainDialog::onStartupUpdateCheck, this); -- - //asynchronous call to wxWindow::Layout(): fix superfluous frame on right and bottom when FFS is started in fullscreen mode - Bind(wxEVT_IDLE, &MainDialog::onLayoutWindowAsync, this); - wxCommandEvent evtDummy; //call once before onLayoutWindowAsync() -@@ -1108,8 +1104,6 @@ - auiMgr_.GetPane(m_panelSearch).Hide(); //no need to show it on startup - auiMgr_.GetPane(m_panelLog ).Hide(); // - -- m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.lastUpdateCheck)); -- - auiMgr_.Update(); - } - -@@ -5706,72 +5700,6 @@ - } - } - -- --void MainDialog::onMenuCheckVersion(wxCommandEvent& event) --{ -- checkForUpdateNow(*this, globalCfg_.lastOnlineVersion); --} -- -- --void MainDialog::onMenuCheckVersionAutomatically(wxCommandEvent& event) --{ -- if (updateCheckActive(globalCfg_.lastUpdateCheck)) -- disableUpdateCheck(globalCfg_.lastUpdateCheck); -- else -- globalCfg_.lastUpdateCheck = 0; //reset to GlobalSettings.xml default value! -- -- m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.lastUpdateCheck)); -- -- if (shouldRunAutomaticUpdateCheck(globalCfg_.lastUpdateCheck)) -- { -- flashStatusInfo(_("Searching for program updates...")); -- //synchronous update check is sufficient here: -- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, -- automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get()); -- } --} -- -- --void MainDialog::onStartupUpdateCheck(wxIdleEvent& event) --{ -- //execute just once per startup! -- [[maybe_unused]] bool ubOk = Unbind(wxEVT_IDLE, &MainDialog::onStartupUpdateCheck, this); -- assert(ubOk); -- -- auto showNewVersionReminder = [this] -- { -- if (!globalCfg_.lastOnlineVersion.empty() && haveNewerVersionOnline(globalCfg_.lastOnlineVersion)) -- { -- auto menu = new wxMenu(); -- wxMenuItem* newItem = new wxMenuItem(menu, wxID_ANY, _("&Show details")); -- Bind(wxEVT_COMMAND_MENU_SELECTED, [this](wxCommandEvent&) { checkForUpdateNow(*this, globalCfg_.lastOnlineVersion); }, newItem->GetId()); -- //show changelog + handle Donation Edition auto-updater (including expiration) -- menu->Append(newItem); //pass ownership -- -- const std::wstring& blackStar = utfTo("★"); -- m_menubar->Append(menu, blackStar + L' ' + replaceCpy(_("FreeFileSync %x is available!"), L"%x", utfTo(globalCfg_.lastOnlineVersion)) + L' ' + blackStar); -- } -- }; -- -- if (shouldRunAutomaticUpdateCheck(globalCfg_.lastUpdateCheck)) -- { -- flashStatusInfo(_("Searching for program updates...")); -- -- std::shared_ptr resultPrep = automaticUpdateCheckPrepare(*this); //run on main thread: -- -- guiQueue_.processAsync([resultPrep] { return automaticUpdateCheckRunAsync(resultPrep.get()); }, //run on worker thread: (long-running part of the check) -- [this, showNewVersionReminder] (std::shared_ptr&& resultAsync) -- { -- automaticUpdateCheckEval(*this, globalCfg_.lastUpdateCheck, globalCfg_.lastOnlineVersion, -- resultAsync.get()); //run on main thread: -- showNewVersionReminder(); -- }); -- } -- else -- showNewVersionReminder(); --} -- -- - void MainDialog::onLayoutWindowAsync(wxIdleEvent& event) - { - //execute just once per startup! -diff -aur 11.10-1/FreeFileSync/Source/ui/main_dlg.h 11.10-2/FreeFileSync/Source/ui/main_dlg.h ---- 11.10-1/FreeFileSync/Source/ui/main_dlg.h 2021-05-10 08:02:46.059494398 -0400 -+++ 11.10-2/FreeFileSync/Source/ui/main_dlg.h 2021-05-10 10:52:28.108669884 -0400 -@@ -266,8 +266,6 @@ - void onMenuExportFileList (wxCommandEvent& event) override; - void onMenuResetLayout (wxCommandEvent& event) override { resetLayout(); } - void onMenuFindItem (wxCommandEvent& event) override { showFindPanel(true /*show*/); } //CTRL + F -- void onMenuCheckVersion (wxCommandEvent& event) override; -- void onMenuCheckVersionAutomatically(wxCommandEvent& event) override; - void onMenuAbout (wxCommandEvent& event) override; - void onShowHelp (wxCommandEvent& event) override { wxLaunchDefaultBrowser(L"https://freefilesync.org/manual.php?topic=freefilesync"); } - void onMenuQuit (wxCommandEvent& event) override { Close(); } -diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.cpp 11.10-2/FreeFileSync/Source/ui/version_check.cpp ---- 11.16-1/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 08:10:14.751776629 -0400 -+++ 11.16-2/FreeFileSync/Source/ui/version_check.cpp 2021-05-10 10:50:08.595338399 -0400 -@@ -73,6 +73,8 @@ - - bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck) - { -+ // short-circuit -+ return false; - if (lastUpdateCheck == getVersionCheckInactiveId()) - return false; - -@@ -158,8 +160,7 @@ - std::wstring updateDetailsMsg; - try - { -- updateDetailsMsg = utfTo(sendHttpGet(utfTo("https://api.freefilesync.org/latest_changes?" + xWwwFormUrlEncode({{"since", ffsVersion}})), -- ffsUpdateCheckUserAgent, Zstring() /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll()); //throw SysError -+ updateDetailsMsg = utfTo(""); - } - catch (const SysError& e) { updateDetailsMsg = _("Failed to retrieve update information.") + + L"\n\n" + e.toString(); } - -@@ -182,8 +183,8 @@ - - std::string getOnlineVersion(const std::vector>& postParams) //throw SysError - { -- const std::string response = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams, -- ffsUpdateCheckUserAgent, Zstring() /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError -+ const std::string response = ""; -+ return trimCpy(response); - - if (response.empty() || - !std::all_of(response.begin(), response.end(), [](char c) { return isDigit(c) || c == FFS_VERSION_SEPARATOR; }) || -@@ -226,58 +227,6 @@ - } - - --void fff::checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion) --{ -- try -- { -- const std::string onlineVersion = getOnlineVersion(geHttpPostParameters(parent)); //throw SysError -- lastOnlineVersion = onlineVersion; -- -- if (haveNewerVersionOnline(onlineVersion)) -- showUpdateAvailableDialog(&parent, onlineVersion); -- else -- showNotificationDialog(&parent, DialogInfoType::info, PopupDialogCfg(). -- setIcon(loadImage("update_check")). -- setTitle(_("Check for Program Updates")). -- setMainInstructions(_("FreeFileSync is up to date."))); -- } -- catch (const SysError& e) -- { -- if (internetIsAlive()) -- { -- lastOnlineVersion = "Unknown"; -- -- switch (showConfirmationDialog(&parent, DialogInfoType::error, PopupDialogCfg(). -- setTitle(_("Check for Program Updates")). -- setMainInstructions(_("Cannot find current FreeFileSync version number online. A newer version is likely available. Check manually now?")). -- setDetailInstructions(e.toString()), _("&Check"), _("&Retry"))) -- { -- case ConfirmationButton2::accept: -- wxLaunchDefaultBrowser(L"https://freefilesync.org/get_latest.php"); -- break; -- case ConfirmationButton2::accept2: //retry -- checkForUpdateNow(parent, lastOnlineVersion); //note: retry via recursion!!! -- break; -- case ConfirmationButton2::cancel: -- break; -- } -- } -- else -- switch (showConfirmationDialog(&parent, DialogInfoType::error, PopupDialogCfg(). -- setTitle(_("Check for Program Updates")). -- setMainInstructions(replaceCpy(_("Unable to connect to %x."), L"%x", L"freefilesync.org")). -- setDetailInstructions(e.toString()), _("&Retry"))) -- { -- case ConfirmationButton::accept: //retry -- checkForUpdateNow(parent, lastOnlineVersion); //note: retry via recursion!!! -- break; -- case ConfirmationButton::cancel: -- break; -- } -- } --} -- -- - struct fff::UpdateCheckResultPrep - { - std::vector> postParameters; -diff -aur 11.10-1/FreeFileSync/Source/ui/version_check.h 11.10-2/FreeFileSync/Source/ui/version_check.h ---- 11.16-0/FreeFileSync/Source/ui/version_check.h 2021-05-10 08:02:46.067494474 -0400 -+++ 11.16-1/FreeFileSync/Source/ui/version_check.h 2021-05-10 10:50:22.035466671 -0400 -@@ -32,9 +32,6 @@ - void automaticUpdateCheckEval(wxWindow& parent, time_t& lastUpdateCheck, std::string& lastOnlineVersion, - const UpdateCheckResult* asyncResult); - //---------------------------------------------------------------------------- --//call from main thread: --void checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion); --//---------------------------------------------------------------------------- - } - - #endif //VERSION_CHECK_H_324872374893274983275 diff --git a/freefilesync/ffs_no_eraseif.patch b/freefilesync/ffs_no_eraseif.patch deleted file mode 100644 index 71239e4..0000000 --- a/freefilesync/ffs_no_eraseif.patch +++ /dev/null @@ -1,405 +0,0 @@ -Message: generated with roughly sed -i -r -e 's/std::erase_if/eraseIf/g' $( grep -l -riIE 'std::erase_if\(' ) -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 10.18-2/FreeFileSync/Source/afs/abstract_impl.h ---- 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 16:15:55.823668066 -0500 -+++ 10.18-2/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 17:57:30.555558350 -0500 -@@ -255,7 +255,7 @@ - pathLocks_.access([&](std::map>& pathLocks) - { - //remove obsolete entries -- std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); }); -+ zen::eraseIf(pathLocks, [](const auto& v) { return !v.second.lock(); }); - - //get or create mutex - std::weak_ptr& weakPtr = pathLocks[nativePath]; -diff -Naur 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 10.25-1/FreeFileSync/Source/afs/gdrive.cpp ---- 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 2020-06-19 16:17:15.000000000 -0400 -+++ 10.25-1/FreeFileSync/Source/afs/gdrive.cpp 2020-06-20 20:54:52.438669026 -0400 -@@ -1930,7 +1930,7 @@ - if (auto it = itemDetails_.find(itemId); it != itemDetails_.end()) - { - GdriveItemDetails detailsNew = it->second; -- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); -+ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); - notifyItemUpdated(stateDelta, itemId, &detailsNew); - } - else //conflict!!! -@@ -1944,7 +1944,7 @@ - GdriveItemDetails detailsNew = it->second; - detailsNew.itemName = newName; - -- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // -+ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // - detailsNew.parentIds.push_back(parentIdTo); //not a duplicate - - notifyItemUpdated(stateDelta, itemId, &detailsNew); -@@ -2095,7 +2095,7 @@ - return; //=> avoid misleading changeLog_ entries after Google Drive sync!!! - - //update change logs (and clean up obsolete entries) -- std::erase_if(changeLog_, [&](std::weak_ptr& weakPtr) -+ eraseIf(changeLog_, [&](std::weak_ptr& weakPtr) - { - if (std::shared_ptr iid = weakPtr.lock()) - { -@@ -2116,15 +2116,15 @@ - - std::vector parentIdsNew = details->parentIds; - std::vector parentIdsRemoved = it->second.parentIds; -- std::erase_if(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); -- std::erase_if(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); -+ eraseIf(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); -+ eraseIf(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); - - for (const std::string& parentId : parentIdsNew) - folderContents_[parentId].childItems.push_back(it); //new insert => no need for duplicate check - - for (const std::string& parentId : parentIdsRemoved) - if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) -- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); -+ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); - //if all parents are removed, Google Drive will (recursively) delete the item => don't prematurely do this now: wait for change notifications! - //OR: item without parents located in "Shared with me", but referenced via Shortcut => don't remove!!! - -@@ -2144,7 +2144,7 @@ - { - for (const std::string& parentId : it->second.parentIds) //1. delete from parent folders - if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) -- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); -+ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); - - itemDetails_.erase(it); - } -@@ -2153,7 +2153,7 @@ - itP != folderContents_.end()) - { - for (auto itChild : itP->second.childItems) //2. delete as parent from child items (don't wait for change notifications of children) -- std::erase_if(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); -+ eraseIf(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); - folderContents_.erase(itP); - } - } -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/sftp.cpp 10.18-2/FreeFileSync/Source/afs/sftp.cpp ---- 10.18-1/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:54:23.078438037 -0500 -+++ 10.18-2/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:57:30.557558372 -0500 -@@ -946,7 +946,7 @@ - std::this_thread::yield(); - return; //don't hold lock for too long: delete only one session at a time, then yield... - } -- std::erase_if(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer -+ eraseIf(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer - done = true; - }); - } -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/algorithm.cpp 10.18-2/FreeFileSync/Source/base/algorithm.cpp ---- 10.18-1/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 16:15:55.832668168 -0500 -+++ 10.18-2/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 17:57:30.558558384 -0500 -@@ -1372,8 +1372,8 @@ - { - std::vector itemSelectionLeft (rowsToCopyOnLeft .begin(), rowsToCopyOnLeft .end()); - std::vector itemSelectionRight(rowsToCopyOnRight.begin(), rowsToCopyOnRight.end()); -- std::erase_if(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! -- std::erase_if(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); // -+ eraseIf(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! -+ eraseIf(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); // - - const int itemTotal = static_cast(itemSelectionLeft.size() + itemSelectionRight.size()); - int64_t bytesTotal = 0; -@@ -1548,8 +1548,8 @@ - std::vector deleteLeft = rowsToDeleteOnLeft; - std::vector deleteRight = rowsToDeleteOnRight; - -- std::erase_if(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? -- std::erase_if(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); //yes, for correct stats: -+ eraseIf(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? -+ eraseIf(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty(); }); //yes, for correct stats: - - const int itemCount = static_cast(deleteLeft.size() + deleteRight.size()); - callback.initNewPhase(itemCount, 0, ProcessPhase::none); //throw X -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/db_file.cpp 10.18-2/FreeFileSync/Source/base/db_file.cpp ---- 10.18-1/FreeFileSync/Source/base/db_file.cpp 2019-11-20 16:15:55.836668213 -0500 -+++ 10.18-2/FreeFileSync/Source/base/db_file.cpp 2019-11-20 17:57:30.559558395 -0500 -@@ -591,7 +591,7 @@ - } - - //delete removed items (= "in-sync") from database -- std::erase_if(dbFiles, [&](const InSyncFolder::FileList::value_type& v) -+ eraseIf(dbFiles, [&](const InSyncFolder::FileList::value_type& v) - { - if (contains(toPreserve, v.first)) - return false; -@@ -628,7 +628,7 @@ - } - - //delete removed items (= "in-sync") from database -- std::erase_if(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) -+ eraseIf(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) - { - if (contains(toPreserve, v.first)) - return false; -@@ -663,7 +663,7 @@ - } - - //delete removed items (= "in-sync") from database -- std::erase_if(dbFolders, [&](InSyncFolder::FolderList::value_type& v) -+ eraseIf(dbFolders, [&](InSyncFolder::FolderList::value_type& v) - { - if (auto it = toPreserve.find(v.first); it != toPreserve.end()) - { -@@ -687,10 +687,10 @@ - //delete all entries for removed folder (= "in-sync") from database - void dbSetEmptyState(InSyncFolder& dbFolder, const Zstring& parentRelPathPf) - { -- std::erase_if(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); -- std::erase_if(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); -+ eraseIf(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); -+ eraseIf(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); - -- std::erase_if(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) -+ eraseIf(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) - { - const Zstring& itemRelPath = parentRelPathPf + v.first; - -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 10.18-2/FreeFileSync/Source/base/dir_lock.cpp ---- 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 16:15:55.836668213 -0500 -+++ 10.18-2/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 17:57:30.559558395 -0500 -@@ -502,8 +502,8 @@ - - void tidyUp() //remove obsolete entries - { -- std::erase_if(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); -- std::erase_if(guidByPath_, [&](const auto& v) { return !contains(locksByGuid_, v.second); }); -+ eraseIf(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); -+ eraseIf(guidByPath_, [&](const auto& v) { return locksByGuid_.find(v.second) == locksByGuid_.end(); }); - } - - std::map guidByPath_; //lockFilePath |-> GUID; n:1; locks can be referenced by a lockFilePath or alternatively a GUID -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp ---- 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 16:15:55.820668033 -0500 -+++ 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 17:57:30.559558395 -0500 -@@ -155,7 +155,7 @@ - checkXmlMappingErrors(in, filePath); //throw FileError - //--------------------------------------------------------------------------------------- - -- std::erase_if(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); -+ eraseIf(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); - cfg.directories.assign(uniqueFolders.begin(), uniqueFolders.end()); - cfg.commandline = Zstr('"') + fff::getFreeFileSyncLauncherPath() + Zstr("\" \"") + filePath + Zstr('"'); - } -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp ---- 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 08:03:55.508842092 -0400 -+++ 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 09:10:54.765302811 -0400 -@@ -152,7 +152,7 @@ - if (change.type == DirWatcher::ChangeType::baseFolderUnavailable) - return change; - -- std::erase_if(changes, [](const DirWatcher::Change& e) -+ eraseIf(changes, [](const DirWatcher::Change& e) - { - return - endsWith(e.itemPath, Zstr(".ffs_tmp")) || //sync.8ea2.ffs_tmp -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp ---- 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 16:15:55.822668055 -0500 -+++ 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 17:57:30.560558406 -0500 -@@ -247,7 +247,7 @@ - rts::AbortReason rts::runFolderMonitor(const XmlRealConfig& config, const wxString& jobname) - { - std::vector dirNamesNonFmt = config.directories; -- std::erase_if(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! -+ eraseIf(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! - - if (dirNamesNonFmt.empty()) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp ---- 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 16:15:55.847668337 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 17:57:30.561558418 -0500 -@@ -113,7 +113,7 @@ - { - const std::set pathsSorted(filePaths.begin(), filePaths.end()); - -- std::erase_if(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); -+ eraseIf(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); - - for (const Zstring& filePath : filePaths) - cfgList_.erase(filePath); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/command_box.cpp 10.18-2/FreeFileSync/Source/ui/command_box.cpp ---- 10.18-1/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:54:14.861345102 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:57:30.561558418 -0500 -@@ -75,7 +75,7 @@ - equalNoCase(newCommand, cmd)) - return; - -- std::erase_if(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); -+ eraseIf(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); - - history_.insert(history_.begin(), newCommand); - -@@ -194,7 +194,7 @@ - //this->SetSelection(wxNOT_FOUND); - - //delete selected row -- std::erase_if(history_, [&](const Zstring& item) { return item == selValue; }); -+ eraseIf(history_, [&](const Zstring& item) { return item == selValue; }); - - SetString(pos, wxString()); //in contrast to Delete(), this one does not kill the drop-down list and gives a nice visual feedback! - //Delete(pos); -diff -Naur 10.25-0/FreeFileSync/Source/ui/file_view.cpp 10.25-1/FreeFileSync/Source/ui/file_view.cpp ---- 10.25-0/FreeFileSync/Source/ui/file_view.cpp 2020-06-19 16:17:15.000000000 -0400 -+++ 10.25-1/FreeFileSync/Source/ui/file_view.cpp 2020-06-20 20:55:25.978009894 -0400 -@@ -321,7 +321,7 @@ - void FileView::removeInvalidRows() - { - //remove rows that have been deleted meanwhile -- std::erase_if(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); -+ eraseIf(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); - - viewRef_ .clear(); - rowPositions_ .clear(); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 10.18-2/FreeFileSync/Source/ui/folder_history_box.h ---- 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 16:15:55.849668360 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 17:57:30.562558429 -0500 -@@ -35,13 +35,13 @@ - const Zstring nameTmp = zen::trimCpy(folderPathPhrase); - - //insert new folder or put it to the front if already existing -- std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); -+ zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); - - folderPathPhrases_.insert(folderPathPhrases_.begin(), nameTmp); - truncate(); - } - -- void delItem(const Zstring& folderPathPhrase) { std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } -+ void delItem(const Zstring& folderPathPhrase) { zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } - - private: - void truncate() -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 10.18-2/FreeFileSync/Source/ui/log_panel.cpp ---- 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 16:15:55.852668394 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 17:57:30.562558429 -0500 -@@ -545,7 +545,7 @@ - if (auto prov = m_gridMessages->getDataProvider()) - { - std::vector colAttr = m_gridMessages->getColumnConfig(); -- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - for (size_t row : m_gridMessages->getSelectedRows()) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp ---- 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:54:16.135359512 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:57:30.564558452 -0500 -@@ -1240,7 +1240,7 @@ - if (auto prov = grid->getDataProvider()) - { - std::vector colAttr = grid->getColumnConfig(); -- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - for (size_t row : grid->getSelectedRows()) - { -@@ -5372,9 +5372,9 @@ - auto colAttrCenter = m_gridMainC->getColumnConfig(); - auto colAttrRight = m_gridMainR->getColumnConfig(); - -- std::erase_if(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -- std::erase_if(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast(ca.type) == ColumnTypeCenter::CHECKBOX; }); -- std::erase_if(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast(ca.type) == ColumnTypeCenter::CHECKBOX; }); -+ eraseIf(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - - if (provLeft && provCenter && provRight) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 10.18-2/FreeFileSync/Source/ui/search_grid.cpp ---- 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 16:15:55.855668428 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 17:57:30.564558452 -0500 -@@ -69,7 +69,7 @@ - if (auto prov = grid.getDataProvider()) - { - std::vector colAttr = grid.getColumnConfig(); -- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - { - const MatchFound matchFound(searchString); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp ---- 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 16:15:55.858668462 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 17:57:30.565558463 -0500 -@@ -601,7 +601,7 @@ - folderCmp_ = newData; - - //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderCmp" -- std::erase_if(folderCmp_, [](const std::shared_ptr& baseObj) -+ eraseIf(folderCmp_, [](const std::shared_ptr& baseObj) - { - return AFS::isNullPath(baseObj->getAbstractPath< LEFT_SIDE>()) && - AFS::isNullPath(baseObj->getAbstractPath()); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/wx+/async_task.h 10.18-2/wx+/async_task.h ---- 10.18-1/wx+/async_task.h 2019-11-20 16:15:55.860668484 -0500 -+++ 10.18-2/wx+/async_task.h 2019-11-20 17:57:30.565558463 -0500 -@@ -85,7 +85,7 @@ - - std::vector> readyTasks; //Reentrancy; access to AsyncTasks::add is not protected! => evaluate outside eraseIf - -- std::erase_if(tasks_, [&](std::unique_ptr& task) -+ eraseIf(tasks_, [&](std::unique_ptr& task) - { - if (task->resultReady()) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/zen/stl_tools.h 10.18-2/zen/stl_tools.h ---- 10.18-1/zen/stl_tools.h 2019-11-20 16:15:55.875668653 -0500 -+++ 10.18-2/zen/stl_tools.h 2019-11-20 17:58:20.801126674 -0500 -@@ -20,6 +20,16 @@ - //enhancements for - namespace zen - { -+//erase selected elements from any container: -+template -+void eraseIf(std::vector& v, Predicate p); -+ -+template -+void eraseIf(std::set& s, Predicate p); -+ -+template -+void eraseIf(std::map& m, Predicate p); -+ - //append STL containers - template - void append(std::vector& v, const C& c); -@@ -115,6 +125,36 @@ - - - //######################## implementation ######################## -+ -+template inline -+void eraseIf(std::vector& v, Predicate p) -+{ -+ v.erase(std::remove_if(v.begin(), v.end(), p), v.end()); -+} -+ -+ -+namespace impl -+{ -+template inline -+void setOrMapEraseIf(S& s, Predicate p) -+{ -+ for (auto it = s.begin(); it != s.end();) -+ if (p(*it)) -+ s.erase(it++); -+ else -+ ++it; -+} -+} -+ -+ -+template inline -+void eraseIf(std::set& s, Predicate p) { impl::setOrMapEraseIf(s, p); } //don't make this any more generic! e.g. must not compile for std::vector!!! -+ -+ -+template inline -+void eraseIf(std::map& m, Predicate p) { impl::setOrMapEraseIf(m, p); } -+ -+ - template inline - void append(std::vector& v, const C& c) { v.insert(v.end(), c.begin(), c.end()); } - diff --git a/freefilesync/ffs_no_gcc12.patch b/freefilesync/ffs_no_gcc12.patch index 88b0d27..666036d 100644 --- a/freefilesync/ffs_no_gcc12.patch +++ b/freefilesync/ffs_no_gcc12.patch @@ -2,6 +2,8 @@ Message: Because we do not use gcc 12, we have an error with unordered_map and s Author: zensubz Date-Modified: 2022-05-24 Version: 11.21 +Source: https://freefilesync.org/forum/viewtopic.php?t=9376&p=34044#p34044 +Distro: any distro with g++ < 12 --- a/FreeFileSync/Source/base/db_file.cpp +++ b/FreeFileSync/Source/base/db_file.cpp @@ -642,7 +642,7 @@ diff --git a/freefilesync/ffs_no_wx311.patch b/freefilesync/ffs_no_wx311.patch deleted file mode 100644 index e74da90..0000000 --- a/freefilesync/ffs_no_wx311.patch +++ /dev/null @@ -1,138 +0,0 @@ -Last modified: 2022-05-24 -Version: 11.21 -Author: bgstack15 -Message: Just compile by stepping around wxWidgets 3.1.1 calls -diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp ---- 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 08:15:29.432156507 -0500 -+++ 11.21-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 18:22:19.929543356 -0500 -@@ -300,7 +300,8 @@ - { - showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString())); - } -- m_listBoxGdriveUsers->Append(gdriveAccounts); -+ for (const wxString& item : gdriveAccounts) // reverted to pre-wx 3.1.1 logic -+ m_listBoxGdriveUsers->Append(item); - - //set default values for Google Drive: use first item of m_listBoxGdriveUsers - if (!gdriveAccounts.empty() && !acceptsItemPathPhraseGdrive(folderPathPhrase)) -@@ -1292,7 +1298,8 @@ - for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_) - dialogMessages.push_back(msg); - -- m_checkListHiddenDialogs->Append(dialogMessages); -+ for (const wxString& item :dialogMessages) // reverted to pre-wx 3.1.1 logic -+ m_checkListHiddenDialogs->Append(item); - - unsigned int itemPos = 0; - for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_) -@@ -1689,7 +1690,6 @@ - //setMainInstructionFont(*m_staticTextMain); - - setImage(*m_bitmapActivation, loadImage("internet")); -- m_textCtrlOfflineActivationKey->ForceUpper(); - - setTextWithUrls(*m_richTextLastError, lastErrorMsg); - setTextWithUrls(*m_richTextManualActivationUrl, manualActivationUrl); -diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp ---- 10.3-0/wx+/grid.cpp 2018-08-07 05:03:34.000000000 -0400 -+++ 10.3-2/wx+/grid.cpp 2018-08-08 19:24:56.849445102 -0400 -@@ -1176,7 +1176,9 @@ - { - if (overlapPix != 0) - { -- const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] -+ // Fedora 28 does not have wxGTK 3.1.1 yet. This probably breaks HiDPI usage -+ //const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] -+ const double scrollSpeed = overlapPix * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] - toScroll += scrollSpeed * deltaSecs; - } - else -diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/command_box.cpp 10.24-1/FreeFileSync/Source/ui/command_box.cpp ---- 10.24-0/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:01:12.893890567 -0400 -+++ 10.24-1/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:22:18.069114993 -0400 -@@ -120,7 +120,8 @@ - - //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! - wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(items); //expensive as fuck! => only call when absolutely needed! -+ for (const wxString& item : items) // reverted to pre-wx 3.1.1 logic -+ this->Append(item); - - //this->SetSelection(wxNOT_FOUND); //don't select anything - ChangeValue(value); //preserve main text! -diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp ---- 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:01:12.909890709 -0400 -+++ 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:21:18.460583251 -0400 -@@ -90,7 +90,8 @@ - - //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! - wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(items); //expensive as fuck! => only call when absolutely needed! -+ for (const wxString& itemk : items) // reverted to pre-wx 3.1.1 logic -+ this->Append(itemk); - - //this->SetSelection(wxNOT_FOUND); //don't select anything - ChangeValue(folderPathPhrase); //preserve main text! ---- 11.21-0/FreeFileSync/Source/config.cpp 2022-05-22 17:09:32.238809549 -0400 -+++ 11.21-1/FreeFileSync/Source/config.cpp 2022-05-24 08:41:55.360955076 -0400 -@@ -1502,13 +1512,13 @@ - if (lngName == "English (US)") - cfg.programLanguage = wxLANGUAGE_ENGLISH_US; - else if (lngName == "Chinese (Simplified)") -- cfg.programLanguage = wxLANGUAGE_CHINESE_CHINA; -+ cfg.programLanguage = wxLANGUAGE_CHINESE_SIMPLIFIED; - else if (lngName == "Chinese (Traditional)") - cfg.programLanguage = wxLANGUAGE_CHINESE_TAIWAN; - else if (lngName == "English (U.K.)") - cfg.programLanguage = wxLANGUAGE_ENGLISH_UK; - else if (lngName == "Norwegian (Bokmal)") -- cfg.programLanguage = wxLANGUAGE_NORWEGIAN; -+ cfg.programLanguage = wxLANGUAGE_NORWEGIAN_BOKMAL; - else if (lngName == "Portuguese (Brazilian)") - cfg.programLanguage = wxLANGUAGE_PORTUGUESE_BRAZILIAN; - else if (const wxLanguageInfo* lngInfo = wxLocale::FindLanguageInfo(utfTo(lngName))) ---- 11.21-0/FreeFileSync/Source/localization.cpp 2022-05-22 17:09:32.238809549 -0400 -+++ 11.21-1/FreeFileSync/Source/localization.cpp 2022-05-24 08:48:56.398222091 -0400 -@@ -195,19 +195,19 @@ - if (lngCode == "zh") - { - if (lng == wxLANGUAGE_CHINESE) //wxWidgets assigns this to "zh" or "zh_TW" for some reason -- return wxLANGUAGE_CHINESE_CHINA; -+ return wxLANGUAGE_CHINESE_SIMPLIFIED; - - for (const char* l : {"zh_HK", "zh_MO", "zh_TW"}) - if (locale == l) - return wxLANGUAGE_CHINESE_TAIWAN; - -- return wxLANGUAGE_CHINESE_CHINA; -+ return wxLANGUAGE_CHINESE_SIMPLIFIED; - } - - if (lngCode == "en") - { - if (lng == wxLANGUAGE_ENGLISH || //wxWidgets assigns this to "en" or "en_GB" for some reason -- lng == wxLANGUAGE_ENGLISH_WORLD) -+ lng == wxLANGUAGE_ENGLISH_EIRE) - return wxLANGUAGE_ENGLISH_US; - - for (const char* l : {"en_US", "en_CA", "en_AS", "en_UM", "en_VI"}) -@@ -218,7 +218,7 @@ - } - - if (lngCode == "nb" || lngCode == "nn") //wxLANGUAGE_NORWEGIAN_BOKMAL, wxLANGUAGE_NORWEGIAN_NYNORSK -- return wxLANGUAGE_NORWEGIAN; -+ return wxLANGUAGE_NORWEGIAN_BOKMAL; - - if (locale == "pt_BR") - return wxLANGUAGE_PORTUGUESE_BRAZILIAN; ---- 11.21-0/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-22 17:09:32.246809650 -0400 -+++ 11.21-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-24 09:29:32.384695364 -0400 -@@ -1759,7 +1753,7 @@ - if (statusTxts_.empty()) - { - m_staticTextStatusCenter->SetForegroundColour(highlight ? wxColor(31, 57, 226) /*blue*/ : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); -- m_staticTextStatusCenter->SetFont((m_staticTextStatusCenter->GetFont().*(highlight ? &wxFont::Bold : &wxFont::GetBaseFont))()); -+ m_staticTextStatusCenter->SetFont(m_staticTextStatusCenter->GetFont().Bold()); - - setText(*m_staticTextStatusCenter, text); - m_panelStatusBar->Layout(); diff --git a/freefilesync/ffs_openssl.patch b/freefilesync/ffs_openssl.patch index 7097d33..b77d8ac 100644 --- a/freefilesync/ffs_openssl.patch +++ b/freefilesync/ffs_openssl.patch @@ -1,8 +1,8 @@ Summary: Compile for libss-dev 1.1.1m Author: bgstack15 -Date: 2022-01-04 +Date: 2022-06-07 Version: 11.16 -Message: Compile on Devuan Ceres with libssl-dev_1.1.1m-1 +Message: Compile on any distro with openssl < 3.0.0 diff -aur 11.13/zen/open_ssl.cpp 11.14/zen/open_ssl.cpp --- 11.16-0/zen/open_ssl.cpp 2022-01-04 10:04:34.135914294 -0500 +++ 11.16-1/zen/open_ssl.cpp 2022-01-04 10:29:12.544451067 -0500 diff --git a/freefilesync/ffs_sftp.patch b/freefilesync/ffs_sftp.patch deleted file mode 100644 index a51acc8..0000000 --- a/freefilesync/ffs_sftp.patch +++ /dev/null @@ -1,25 +0,0 @@ -Source: -Author: B Stack -Message: The upstream author observed that some of the values he uses are not in the libssh2 public headers. I don't know where he uses them from, but I had to replace them here to get this to compile. -Date: 2021-02-02T18:08:53Z -Version: 11.6 -https://github.com/libssh2/libssh2/issues/90 -diff -aur -x '*.git*' -x '.*.swp' -x '*.orig' -x '*.rej' 11.6-0/FreeFileSync/Source/afs/sftp.cpp 11.6-1/FreeFileSync/Source/afs/sftp.cpp ---- 11.6-0/FreeFileSync/Source/afs/sftp.cpp 2021-02-02 11:37:38.589717171 -0500 -+++ 11.6-1/FreeFileSync/Source/afs/sftp.cpp 2021-02-02 13:06:45.782113785 -0500 -@@ -66,10 +66,10 @@ - LIBSSH2_SFTP_S_IRWXO; - - //attention: if operation fails due to time out, e.g. file copy, the cleanup code may hang, too => total delay = 2 x time out interval -- --const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 --const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * MAX_SFTP_OUTGOING_SIZE; // --static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); -+// these values are all manually derived from https://github.com/libssh2/libssh2/blob/master/src/sftp.h which for some weak reason are not included in the libssh2-devel headers. -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * 30000; //https://github.com/libssh2/libssh2/issues/90 -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * 30000; // -+//static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); - - /* Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: - - diff --git a/freefilesync/ffs_traditional_view.patch b/freefilesync/ffs_traditional_view.patch deleted file mode 100644 index e0cf0d2..0000000 --- a/freefilesync/ffs_traditional_view.patch +++ /dev/null @@ -1,318 +0,0 @@ -Version: 11.21 -Date: 2022-05-24 -Author: bgstack15@gmail.com -Message: restore a traditional view to FreeFileSync -diff -x '*.orig' -x '*.rej' -aur 11.3-0/FreeFileSync/Source/ui/file_grid.cpp 11.3-1/FreeFileSync/Source/ui/file_grid.cpp ---- 11.21-0/FreeFileSync/Source/ui/file_grid.cpp 2022-05-22 17:09:32.242809600 -0400 -+++ 11.21-1/FreeFileSync/Source/ui/file_grid.cpp 2022-05-22 20:23:04.015916689 -0400 -@@ -475,8 +475,10 @@ - case ItemPathFormat::name: - return utfTo(fsObj->getItemName()); - case ItemPathFormat::relative: -+ case ItemPathFormat::tradrel: - return utfTo(fsObj->getRelativePath()); - case ItemPathFormat::full: -+ case ItemPathFormat::traditional: - return AFS::getDisplayPath(fsObj->getAbstractPath()); - } - assert(false); -@@ -529,8 +531,13 @@ - else - GridData::renderRowBackgound(dc, rect, row, true /*enabled*/, true /*selected*/, rowHover); - -+ // trad patch section for removing lines around items in grid -+ int lineWidth { fastFromDIP(1) } ; -+ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) -+ lineWidth = 0; -+ - //---------------------------------------------------------------------------------- -- const wxRect rectLine(rect.x, rect.y + rect.height - fastFromDIP(1), rect.width, fastFromDIP(1)); -+ const wxRect rectLine(rect.x, rect.y + rect.height - lineWidth, rect.width, lineWidth); - clearArea(dc, rectLine, row == pdi.groupLastRow - 1 /*last group item*/ ? - getColorGridLine() : getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 != 0)); - } -@@ -636,6 +643,26 @@ - else //=> BaseFolderPair - groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); - break; -+ -+ case ItemPathFormat::traditional: -+ if (auto groupFolder = dynamic_cast(pdi.folderGroupObj)) -+ { -+ groupName = utfTo(groupFolder->template getItemName()); -+ groupParentFolder = AFS::getDisplayPath(groupFolder->parent().template getAbstractPath()) + \ -+ FILE_NAME_SEPARATOR + utfTo(groupFolder->template getItemName()); -+ } -+ else //=> BaseFolderPair -+ groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath()); -+ break; -+ -+ case ItemPathFormat::tradrel: -+ if (pdi.folderGroupObj) -+ { -+ groupName = utfTo(pdi.folderGroupObj->template getItemName ()); -+ groupParentFolder = utfTo(pdi.folderGroupObj->template getRelativePath()); -+ } -+ break; -+ - } - - //path components should follow the app layout direction and are NOT a single piece of text! -@@ -661,11 +688,38 @@ - int groupNameWidth = groupName.empty() ? 0 : (gapSize_ + iconSize + gapSize_ + getTextExtentBuffered(dc, groupName).x); - const int groupNameMinWidth = groupName.empty() ? 0 : (gapSize_ + iconSize + gapSize_ + ellipsisWidth); - -- const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + fastFromDIP(1)); -+ // trad patch section for removing lines around items in grid -+ // code duplication because this is a different scope! -+ int lineWidth { fastFromDIP(1) } ; -+ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) -+ lineWidth = 0; -+ -+ const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + lineWidth); - - int groupItemsWidth = groupSepWidth + (drawFileIcons ? gapSize_ + iconSize : 0) + gapSize_ + groupItemNamesWidth; - const int groupItemsMinWidth = groupSepWidth + (drawFileIcons ? gapSize_ + iconSize : 0) + gapSize_ + ellipsisWidth; - -+ // start trad patch -+ -+ // rearrange this one section -+ switch (itemPathFormat_) -+ { -+ case ItemPathFormat::traditional: -+ case ItemPathFormat::tradrel: -+ groupParentWidth -= groupNameWidth - getTextExtentBuffered(dc, utfTo(FILE_NAME_SEPARATOR)).x; -+ if (!endsWith(groupParentFolder, L'/' ) && //e.g. ftp://server/ -+ !endsWith(groupParentFolder, L'\\') && /*e.g. C:\ */ -+ groupParentFolder.size() > 0 ) -+ groupParentFolder += contains(groupParentFolder, L'/') ? L'/' : (contains(groupParentFolder, L'\\') ? L'\\' : FILE_NAME_SEPARATOR); -+ break; -+ case ItemPathFormat::name: -+ case ItemPathFormat::relative: -+ case ItemPathFormat::full: -+ default: -+ // the insane logic of the new views -+ // but preserve the original tabbing, to make the patch easier. -+ // but with the "add slashes" paragraph 1 moved to above this switch statement! -+ - //not enough space? => collapse - if (int excessWidth = groupParentWidth + groupNameWidth + groupItemsWidth - maxWidth; - excessWidth > 0) -@@ -731,6 +785,11 @@ - } - } - } -+ -+ // end of original section, and back to the trad patch! -+ break; -+ } -+ // and end the addition for trad patch - - return - { -@@ -851,6 +910,9 @@ - rectGroup = rectGroupParent = rectGroupName = rectTmp; - - rectGroupParent.width = groupParentWidth; -+ // re-add back the width of groupname so that the directory name is clickable -+ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) -+ rectGroupParent.width += groupNameWidth; - rectGroupName .width = groupNameWidth; - - if (stackedGroupRender) -@@ -874,6 +936,11 @@ - rectGroupItems.width = 0; - } - -+ // trad patch section for removing lines around items in grid -+ int lineWidth { fastFromDIP(1) } ; -+ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) -+ lineWidth = 0; -+ - //------------------------------------------------------------------------- - { - //clear background below parent path => harmonize with renderRowBackgound() -@@ -884,8 +951,8 @@ - wxRect rectGroupBack = rectGroup; - rectGroupBack.width += 2 * gapSize_; //include gap before vline - -- if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! -- rectGroupBack.height -= fastFromDIP(1); -+ if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! -+ rectGroupBack.height -= lineWidth; - - clearArea(dc, rectGroupBack, getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 == 0)); - //clearArea() is surprisingly expensive => call just once! -@@ -900,7 +967,8 @@ - rectNav.width = fastFromDIP(20); - - if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! -- rectNav.height -= fastFromDIP(1); -+ if (itemPathFormat_ != ItemPathFormat::traditional && itemPathFormat_ != ItemPathFormat::tradrel) -+ rectNav.height -= lineWidth; - - wxColor backCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - dc.GetPixel(rectNav.GetTopRight(), &backCol); //e.g. selected row! -@@ -908,13 +976,13 @@ - dc.GradientFillLinear(rectNav, getColorSelectionGradientFrom(), backCol, wxEAST); - } - -- if (!groupName.empty() && row == groupFirstRow) -+ if (!(itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) && !groupName.empty() && row == groupFirstRow) - { - wxRect rectGroupNameBack = rectGroupName; - - if (!itemName.empty()) - rectGroupNameBack.width += 2 * gapSize_; //include gap left of item vline -- rectGroupNameBack.height -= fastFromDIP(1); //harmonize with item separation lines -+ rectGroupNameBack.height -= lineWidth; //harmonize with item separation lines - - wxDCTextColourChanger textColorGroupName(dc); - //folder background: coordinate with renderRowBackgound() -@@ -947,9 +1015,9 @@ - drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupName)); - } - -- if (!groupParentFolder.empty() && -+ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel || (!groupParentFolder.empty() && - (( stackedGroupRender && row == groupFirstRow + 1) || -- (!stackedGroupRender && row == groupFirstRow)) && -+ (!stackedGroupRender && row == groupFirstRow))) && - (groupName.empty() || !pdi.folderGroupObj->isEmpty())) //don't show for missing folders - { - wxRect rectGroupParentText = rectGroupParent; -@@ -969,16 +1037,16 @@ - rectGroupItems.x += 2 * gapSize_; - rectGroupItems.width -= 2 * gapSize_; - -- wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), fastFromDIP(1))); -+ wxDCPenChanger dummy(dc, wxPen(getColorGridLine(), lineWidth)); - dc.DrawLine(rectGroupItems.GetTopLeft(), rectGroupItems.GetBottomLeft() + wxPoint(0, 1)); //draws half-open range! - -- rectGroupItems.x += fastFromDIP(1); -- rectGroupItems.width -= fastFromDIP(1); -+ rectGroupItems.x += lineWidth; -+ rectGroupItems.width -= lineWidth; - } - //------------------------------------------------------------------------- - - wxRect rectItemsBack = rectGroupItems; -- rectItemsBack.height -= fastFromDIP(1); //preserve item separation lines! -+ rectItemsBack.height -= lineWidth; //preserve item separation lines! - - drawCudHighlight(rectItemsBack, pdi.fsObj->getSyncOperation()); - -@@ -1105,7 +1173,12 @@ - groupNameWidth] = getGroupRenderLayout(dc, row, pdi, insanelyHugeWidth); - assert(!stackedGroupRender); - -- const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + fastFromDIP(1)); -+ // trad patch section for removing lines around items in grid -+ int lineWidth { fastFromDIP(1) } ; -+ if (itemPathFormat_ == ItemPathFormat::traditional || itemPathFormat_ == ItemPathFormat::tradrel) -+ lineWidth = 0; -+ -+ const int groupSepWidth = (groupParentFolder.empty() && groupName.empty()) ? 0 : (2 * gapSize_ + lineWidth); - const int fileIconWidth = getIconManager().getIconBuffer() ? gapSize_ + getIconManager().getIconSize() : 0; - const int ellipsisWidth = getTextExtentBuffered(dc, ELLIPSIS).x; - const int itemWidth = itemName.empty() ? 0 : -@@ -1137,6 +1210,10 @@ - return _("Relative path"); - case ItemPathFormat::full: - return _("Full path"); -+ case ItemPathFormat::traditional: -+ return _("Traditional"); -+ case ItemPathFormat::tradrel: -+ return _("Trad. relative"); - } - assert(false); - break; -@@ -1393,7 +1470,8 @@ - GridData::renderRowBackgound(dc, rect, row, true /*enabled*/, true /*selected*/, rowHover); - - //---------------------------------------------------------------------------------- -- const wxRect rectLine(rect.x, rect.y + rect.height - fastFromDIP(1), rect.width, fastFromDIP(1)); -+ // just hardcoding this in this trad patch, because itempathFormat_ is not available in this scope. -+ const wxRect rectLine(rect.x, rect.y + rect.height - 0, rect.width, 0); - clearArea(dc, rectLine, row == pdi.groupLastRow - 1 /*last group item*/ ? - getColorGridLine() : getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 != 0)); - } -@@ -1417,7 +1495,8 @@ - { - wxRect rectBack = rect; - if (row == pdi.groupLastRow - 1 /*last group item*/) //preserve the group separation line! -- rectBack.height -= fastFromDIP(1); -+ // just hardcoding this in this trad patch, because itempathFormat_ is not available in this scope. -+ rectBack.height -= 0; - - clearArea(dc, rectBack, col); - } -diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/file_grid_attr.h 11.2-1-trad3/FreeFileSync/Source/ui/file_grid_attr.h ---- 11.2-1/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 14:39:05.313463564 -0400 -+++ 11.2-1-trad3/FreeFileSync/Source/ui/file_grid_attr.h 2020-10-02 20:21:48.863111642 -0400 -@@ -79,6 +79,8 @@ - name, - relative, - full, -+ traditional, -+ tradrel, - }; - - const ItemPathFormat defaultItemPathFormatLeftGrid = ItemPathFormat::relative; -diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp 11.2-1-trad3/FreeFileSync/Source/ui/main_dlg.cpp ---- 11.2-1/FreeFileSync/Source/ui/main_dlg.cpp 2020-10-02 20:49:11.487782099 -0400 -+++ 11.21-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-22 20:26:31.350461792 -0400 -@@ -2741,6 +2741,8 @@ - addFormatEntry(_("Item name" ), ItemPathFormat::name); - addFormatEntry(_("Relative path"), ItemPathFormat::relative); - addFormatEntry(_("Full path" ), ItemPathFormat::full); -+ addFormatEntry(_("Traditional" ), ItemPathFormat::traditional); -+ addFormatEntry(_("Trad. relative"),ItemPathFormat::tradrel); - - //---------------------------------------------------------------------------------------------- - auto setIconSize = [&](GridIconSize sz, bool showIcons) -diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/config.cpp 11.2-1-trad3/FreeFileSync/Source/config.cpp ---- 11.2-1/FreeFileSync/Source/config.cpp 2020-10-02 14:39:05.233462578 -0400 -+++ 11.2-1-trad3/FreeFileSync/Source/config.cpp 2020-10-02 20:22:24.275555557 -0400 -@@ -528,6 +528,12 @@ - case ItemPathFormat::full: - output = "Full"; - break; -+ case ItemPathFormat::traditional: -+ output = "Traditional"; -+ break; -+ case ItemPathFormat::tradrel: -+ output = "Trad. relative"; -+ break; - } - } - -@@ -541,6 +547,10 @@ - value = ItemPathFormat::relative; - else if (tmp == "Full") - value = ItemPathFormat::full; -+ else if (tmp == "Traditional") -+ value = ItemPathFormat::traditional; -+ else if (tmp == "Trad. relative") -+ value = ItemPathFormat::tradrel; - else - return false; - return true; -diff -x '.git*' -x '*.orig' -x '*.rej' -aur 11.2-1/FreeFileSync/Source/ui/file_view.cpp 11.2-1-trad3/FreeFileSync/Source/ui/file_view.cpp ---- 11.2-1/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 14:39:05.305463465 -0400 -+++ 11.2-1-trad3/FreeFileSync/Source/ui/file_view.cpp 2020-10-02 20:22:38.439733112 -0400 -@@ -798,11 +798,13 @@ - break; - - case ItemPathFormat::relative: -+ case ItemPathFormat::tradrel: - if ( ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder(folderPairs_)); - else if (!ascending) std::sort(sortedRef_.begin(), sortedRef_.end(), LessRelativeFolder(folderPairs_)); - break; - - case ItemPathFormat::full: -+ case ItemPathFormat::traditional: - if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); - else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); - else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath(folderPairs_)); - diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 76d9c4b..8fa7e2e 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -10,14 +10,18 @@ %if 0%{?el6}%{?el7} %define scl_env devtoolset-7 %define scl_buildreq devtoolset-7-toolchain - %define min_libcurl >= 7.64.0 + %define min_libcurl >= 7.61.0 %define min_libssh2 >= 1.8.0 %define min_openssl >= 1.1.1c %endif -%define libssh2_name libssh2 -%if 0%{?rhel} >= 8 -%define libssh2_name libssh2-%{name} +%if 0%{?el8} + %define scl_env gcc-toolset-11 + %define scl_buildreq gcc-toolset-11-gcc-c++, gcc-toolset-11-annobin-plugin-gcc + %define min_libcurl >= 7.61.0 + %define min_libssh2 >= 1.9.0 + %define min_openssl >= 1.1.1k %endif +%define libssh2_name libssh2 %if 0%{?fedora} >= 36 # https://www.spinics.net/lists/fedora-devel/msg296646.html # https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects @@ -37,22 +41,28 @@ Source0: https://gitlab.com/opensource-tracking/%{pkgname}/-/archive/%{versio Source1: %{pkgname}.desktop Source2: %{prog2name}.desktop Source3: %{name}.xml -Patch0: ffs_allow_parallel_ops.patch -Patch1: ffs_no_check_updates.patch -Patch2: ffs_no_wx311.patch -Patch3: ffs_sftp.patch -Patch4: ffs_fedora.patch -Patch5: ffs_el.patch -Patch6: ffs_libssh2.patch -Patch7: ffs_curl.patch -Patch8: ffs_bit.patch -Patch9: ffs_no_eraseif.patch -Patch10: revert_zenju_aggressive_upstreamisms.patch -Patch11: ffs_traditional_view.patch -Patch12: ffs_desktop_notifications.patch -Patch13: ffs_openssl.patch -Patch14: ffs_icon_loader.patch -Patch15: ffs_no_gcc12.patch +# all rpm distros use these +Patch0: 00_allow_parallel_ops.patch +Patch1: 01_no_check_updates.patch +Patch2: 02_no_wx311.patch +Patch3: 03_sftp.patch +Patch4: 04_revert_zenju_aggressive_upstreamisms.patch +Patch5: 05_traditional_view.patch +Patch6: 06_icon_loader.patch +Patch7: 07_libssh2.patch +# distro specific patches +## Fedora and EL8 +Patch20: ffs_distro_fedora.patch +## EL6 and EL7 +Patch30: ffs_distro_el6_el7.patch +Patch31: ffs_el6_el7_bit.patch +Patch32: ffs_el6_el7_no_eraseif.patch +# dependency specific +Patch40: ffs_openssl.patch +Patch41: ffs_no_gcc12.patch +Patch60: ffs_desktop_notifications.patch +Patch70: ffs_libcurl_7.61.1.patch +Patch71: ffs_libcurl_7.71.1.patch Packager: B. Stack BuildRequires: brotli-devel @@ -60,8 +70,16 @@ BuildRequires: wxGTK3-devel BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: ImageMagick +%if "%{?min_libcurl}" != "" BuildRequires: libcurl-devel %{min_libcurl} +%else +BuildRequires: libcurl-devel +%endif +%if "%{?min_libssh2}" != "" BuildRequires: %{libssh2_name}-devel %{min_libssh2} +%else +BuildRequires: %{libssh2_name}-devel +%endif BuildRequires: patch BuildRequires: pkgconfig(giomm-2.4) BuildRequires: pkgconfig(gtk+-2.0) @@ -69,10 +87,14 @@ BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(zlib) %if 0%{?el6}%{?el7} BuildRequires: %{scl_buildreq} +%if "%{?min_openssl}" != "" BuildRequires: openssl-%{name}-devel %{min_openssl} -Requires: libcurl %{min_libcurl} -Requires: %{libssh2_name} %{min_libssh2} -Requires: openssl-%{name}-libs %{min_openssl} +%else +BuildRequires: openssl-%{name}-devel +%endif +#Requires: libcurl %%{?min_libcurl} +#Requires: %%{libssh2_name} %%{?min_libssh2} +#Requires: openssl-%%{name}-libs %%{?min_openssl} %else BuildRequires: openssl-devel %endif @@ -90,37 +112,57 @@ having nice visual feedback along the way. %prep %setup -n %{pkgname}-%{version} - # fix text file line endings and permissions to unix find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ -exec %{__sed} -i -r -e 's/\r$//' {} + - %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %if 0%{?el6}%{?el7} # use the el patch -%patch5 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 %else # use the fedora patch, even for el8 -%patch4 -p1 +%patch20 -p1 %endif -%patch6 -p1 -%patch7 -p1 -%if 0%{?el6}%{?el7}%{?el8}%{?fc29} -%patch8 -p1 -%patch9 -p1 +# Determine if openssl < 3.0.0 +%define opensslver %( openssl version | awk '{if($2>=3){print "3"}else{print"1"}}' ) +%if 0%{opensslver} < 3 +%patch40 -p1 %endif -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%if 0%{?fedora} < 36 -# Patch13 openssl is only for openssl < 3.0.0 -%patch13 -p1 +# Determine if g++ < 12 +%if "%{?scl_env}" != "" + g__version="$( scl enable %{scl_env} /bin/bash <<'EOFSCL' | awk 'NR==1{if($2>=12){print "12"}else{print"11"}}' + %endif + g++ --version + %if "%{?scl_env}" != "" +EOFSCL %endif -%patch14 -p1 -%patch15 -p1 +)" +echo "G__version=${g_version}" +if test ${g__version} -lt 12 ; +then +%patch41 -p1 +fi +# desktop notifications merely has to happen after distro patch +%patch60 -p1 +# Determine version of libcurl +%define libcurl_ver %( rpm -q libcurl-devel --queryformat '%%{version}' ) +case "%{libcurl_ver}" in + 7.61.1) +%patch70 -p1 + ;; + *) +%patch71 -p1 + ;; +esac # custom build parameters for packaging application in rpm # fedora provides build_cxxflags, which is really just optflags @@ -144,7 +186,7 @@ EOFSCL %install %if !%{dummy_package} -# removed by upstream! +# removed by upstream around version 11 #%%make_install -C %%{pkgname}/Source #%%make_install -C %%{pkgname}/Source/%%{prog2name} pushd %{pkgname}/Build @@ -162,12 +204,6 @@ mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE1} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE2} -# application start script -# none - -# man pages -# none - # mimetypes install -d %{buildroot}%{_datadir}/mime/packages install -Dm 0644 -t %{buildroot}%{_datadir}/mime/packages %{SOURCE3} @@ -195,12 +231,6 @@ done %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : -%preun -# is it a final removal? -#if test "$1" = "0" ; -#then -#fi - %postun if test "$1" = "0" ; then @@ -224,6 +254,10 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & : %ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml %changelog +* Tue Jun 07 2022 B. Stack - 11.21-2 +- rewrite spec for easier cross-distro support +- fix builds for el8 + * Wed May 25 2022 B. Stack - 11.21-1 - version bump - add ffs_no_gcc12 patch diff --git a/freefilesync/revert_zenju_aggressive_upstreamisms.patch b/freefilesync/revert_zenju_aggressive_upstreamisms.patch deleted file mode 100644 index 43fec48..0000000 --- a/freefilesync/revert_zenju_aggressive_upstreamisms.patch +++ /dev/null @@ -1,338 +0,0 @@ -Message: Some of these can be traced back to version 10.23 which was the last to not use -Date: 2022-05-22 -Version: 11.21 -Author: bgstack15 -diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/wx+/choice_enum.h 10.24-1/wx+/choice_enum.h ---- 10.24-0/wx+/choice_enum.h 2020-05-17 18:30:59.441499418 -0400 -+++ 10.24-1/wx+/choice_enum.h 2020-05-17 18:53:59.893685507 -0400 -@@ -7,7 +7,6 @@ - #ifndef CHOICE_ENUM_H_132413545345687 - #define CHOICE_ENUM_H_132413545345687 - --#include - #include - #include - -@@ -47,8 +46,6 @@ - - using DescrList = std::vector>>; - DescrList descrList; -- -- std::unordered_map> labelsSetLast; - }; - template void setEnumVal(const EnumDescrList& mapping, wxChoice& ctrl, Enum value); - template Enum getEnumVal(const EnumDescrList& mapping, const wxChoice& ctrl); -@@ -71,32 +68,24 @@ - template - void setEnumVal(EnumDescrList& mapping, wxChoice& ctrl, Enum value) - { -- auto& labelsSetLast = mapping.labelsSetLast[&ctrl]; -- -- std::vector labels; -- for (const auto& [val, texts] : mapping.descrList) -- labels.push_back(texts.first); -+ ctrl.Clear(); - -- if (labels != labelsSetLast) -+ int selectedPos = 0; -+ for (auto it = mapping.descrList.begin(); it != mapping.descrList.end(); ++it) - { -- ctrl.Set(labels); //expensive as fuck! => only call when absolutely needed! -- labelsSetLast = std::move(labels); -+ ctrl.Append(it->second.first); -+ if (it->first == value) -+ { -+ selectedPos = it - mapping.descrList.begin(); -+ -+ if (it->second.second.empty()) -+ ctrl.UnsetToolTip(); -+ else -+ ctrl.SetToolTip(it->second.second); -+ } - } -- //----------------------------------------------------------------- - -- const auto it = std::find_if(mapping.descrList.begin(), mapping.descrList.end(), [&](const auto& mapItem) { return mapItem.first == value; }); -- if (it != mapping.descrList.end()) -- { -- if (const wxString& tooltip = it->second.second; -- !tooltip.empty()) -- ctrl.SetToolTip(tooltip); -- else -- ctrl.UnsetToolTip(); -- -- const int selectedPos = it - mapping.descrList.begin(); -- ctrl.SetSelection(selectedPos); -- } -- else assert(false); -+ ctrl.SetSelection(selectedPos); - } - - template -@@ -115,17 +103,11 @@ - - template void updateTooltipEnumVal(const EnumDescrList& mapping, wxChoice& ctrl) - { -- const int selectedPos = ctrl.GetSelection(); -+ const Enum currentValue = getEnumVal(mapping, ctrl); - -- if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) -- { -- if (const auto& [text, tooltip] = mapping.descrList[selectedPos].second; -- !tooltip.empty()) -- ctrl.SetToolTip(tooltip); -- else -- ctrl.UnsetToolTip(); -- } -- else assert(false); -+ for (const auto& [enumValue, textAndTooltip] : mapping.descrList) -+ if (currentValue == enumValue) -+ ctrl.SetToolTip(textAndTooltip.second); - } - } - -Message: Now have to revert wxWidgets 3.1.4 upstreamisms -cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxASCII_STR' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxASCII_STR' ) ; ) -cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) ; ) -diff -x '*.orig' -x '*.rej' -aur 11.2-0/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 11.2-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp ---- 11.2-0/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-10-02 14:39:05.273463072 -0400 -+++ 11.2-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-10-02 15:06:56.670070620 -0400 -@@ -158,7 +158,7 @@ - } - - Zstring newFolderPath; -- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); -+ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath)); - if (folderSelector.ShowModal() != wxID_OK) - return; - newFolderPath = utfTo(folderSelector.GetPath()); -diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/command_box.h 11.1-2/FreeFileSync/Source/ui/command_box.h ---- 11.1-1/FreeFileSync/Source/ui/command_box.h 2020-09-01 19:07:43.719122215 -0400 -+++ 11.1-2/FreeFileSync/Source/ui/command_box.h 2020-09-01 20:09:56.840929352 -0400 -@@ -30,7 +30,7 @@ - const wxString choices[] = nullptr, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); -+ const wxString& name = wxComboBoxNameStr); - - void setHistory(const std::vector& history, size_t historyMax) { history_ = history; historyMax_ = historyMax; } - std::vector getHistory() const { return history_; } -diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/folder_history_box.h 11.1-2/FreeFileSync/Source/ui/folder_history_box.h ---- 11.1-1/FreeFileSync/Source/ui/folder_history_box.h 2020-09-01 19:07:43.719122215 -0400 -+++ 11.1-2/FreeFileSync/Source/ui/folder_history_box.h 2020-09-01 20:09:50.624849989 -0400 -@@ -68,7 +68,7 @@ - const wxString choices[] = nullptr, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); -+ const wxString& name = wxComboBoxNameStr); - - void setHistory(std::shared_ptr sharedHistory) { sharedHistory_ = std::move(sharedHistory); } - std::shared_ptr getHistory() { return sharedHistory_; } -diff -x '*.orig' -x '*.rej' -aur 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp ---- 11.2-0/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 14:39:05.297463367 -0400 -+++ 11.2-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-10-02 15:08:07.066935749 -0400 -@@ -232,7 +232,7 @@ - - Zstring shellItemPath; - //default size? Windows: not implemented, Linux(GTK2): not implemented, macOS: not implemented => wxWidgets, what is this shit!? -- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); -+ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative)); - //GTK2: "Show hidden" is also available as a context menu option in the folder picker! - //It looks like wxDD_SHOW_HIDDEN only sets the default when opening for the first time!? - if (folderSelector.ShowModal() != wxID_OK) -diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/bitmap_button.h 11.1-2/wx+/bitmap_button.h ---- 11.1-1/wx+/bitmap_button.h 2020-09-01 19:07:43.727122311 -0400 -+++ 11.1-2/wx+/bitmap_button.h 2020-09-01 20:10:31.385364671 -0400 -@@ -26,7 +26,7 @@ - const wxSize& size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxButtonNameStr)) : -+ const wxString& name = wxButtonNameStr) : - wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) - { - SetLabel(label); -diff -aur -x '*.git*' -x '.*.swp' -x '*.orig' -x '*.rej' 11.6-0/wx+/dc.h 11.6-1/wx+/dc.h ---- 11.21-0/wx+/dc.h 2022-05-22 17:09:32.250809701 -0400 -+++ 11.21-1/wx+/dc.h 2022-05-22 20:28:53.788193992 -0400 -@@ -12,7 +12,7 @@ - #include - #include //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER - #include --#include -+//#include - #include - - -@@ -92,9 +92,6 @@ - inline - int getDPI() - { --#ifndef wxHAS_DPI_INDEPENDENT_PIXELS --#error why is wxHAS_DPI_INDEPENDENT_PIXELS not defined? --#endif - //GTK2 doesn't properly support high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114 - //=> requires general fix at wxWidgets-level - -@@ -119,11 +116,10 @@ - - - inline --wxBitmapBundle toBitmapBundle(const wxImage& img /*expected to be DPI-scaled!*/) -+wxBitmap toBitmapBundle(const wxImage& img /*expected to be DPI-scaled!*/) - { - //return wxBitmap(img, -1 /*depth*/, static_cast(getDPI()) / defaultDpi); implementation just ignores scale parameter! WTF! - wxBitmap bmpScaled(img); -- bmpScaled.SetScaleFactor(static_cast(getDPI()) / defaultDpi); - return bmpScaled; - } - -diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/graph.h 11.1-2/wx+/graph.h ---- 11.1-1/wx+/graph.h 2020-09-01 19:07:43.731122359 -0400 -+++ 11.1-2/wx+/graph.h 2020-09-01 20:10:36.541429649 -0400 -@@ -153,7 +153,7 @@ - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER, -- const wxString& name = wxASCII_STR(wxPanelNameStr)); -+ const wxString& name = wxPanelNameStr); - - class CurveAttributes - { -diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/grid.cpp 11.1-2/wx+/grid.cpp ---- 11.1-1/wx+/grid.cpp 2020-09-01 20:07:24.418981662 -0400 -+++ 11.1-2/wx+/grid.cpp 2020-09-01 20:10:23.745268393 -0400 -@@ -268,7 +268,7 @@ - { - public: - SubWindow(Grid& parent) : -- wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxASCII_STR(wxPanelNameStr)), -+ wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxPanelNameStr), - parent_(parent) - { - Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { onPaintEvent(event); }); -diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/grid.h 11.1-2/wx+/grid.h ---- 11.1-1/wx+/grid.h 2020-09-01 19:07:43.731122359 -0400 -+++ 11.1-2/wx+/grid.h 2020-09-01 20:10:48.817584344 -0400 -@@ -149,7 +149,7 @@ - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER, -- const wxString& name = wxASCII_STR(wxPanelNameStr)); -+ const wxString& name = wxPanelNameStr); - - size_t getRowCount() const; - -diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/toggle_button.h 11.1-2/wx+/toggle_button.h ---- 11.1-1/wx+/toggle_button.h 2020-09-01 19:07:43.731122359 -0400 -+++ 11.1-2/wx+/toggle_button.h 2020-09-01 20:10:44.629531569 -0400 -@@ -24,7 +24,7 @@ - const wxSize& size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxButtonNameStr)) : -+ const wxString& name = wxButtonNameStr) : - wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name) {} - - //wxButton constructor -@@ -35,7 +35,7 @@ - const wxSize& size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxButtonNameStr)) : -+ const wxString& name = wxButtonNameStr) : - wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) - { - SetLabel(label); -Version: 11.1 -Message: Had to revert gui_status_handler.cpp and .h entirely to version 11.0 to avoid the wx 3.1.4-isms here. -diff --git a/FreeFileSync/Source/ui/gui_status_handler.cpp b/FreeFileSync/Source/ui/gui_status_handler.cpp -index 3cb6aaaa..9484af2c 100644 ---- a/FreeFileSync/Source/ui/gui_status_handler.cpp -+++ b/FreeFileSync/Source/ui/gui_status_handler.cpp -@@ -43,8 +43,8 @@ StatusHandlerTemporaryPanel::StatusHandlerTemporaryPanel(MainDialog& dlg, - mainDlg_.Update(); //don't wait until idle event! - - //register keys -- mainDlg_. Bind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); -- mainDlg_.m_buttonCancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); -+ mainDlg_.Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); -+ mainDlg_.m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); - } - - -@@ -128,9 +128,8 @@ StatusHandlerTemporaryPanel::~StatusHandlerTemporaryPanel() - mainDlg_.auiMgr_.Update(); - - //unregister keys -- [[maybe_unused]] bool ubOk1 = mainDlg_. Unbind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); -- [[maybe_unused]] bool ubOk2 = mainDlg_.m_buttonCancel->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); -- assert(ubOk1 && ubOk2); -+ mainDlg_.Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); -+ mainDlg_.m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); - - mainDlg_.compareStatus_->teardown(); - -@@ -314,20 +313,20 @@ void StatusHandlerTemporaryPanel::forceUiUpdateNoThrow() - } - - --void StatusHandlerTemporaryPanel::onLocalKeyEvent(wxKeyEvent& event) -+void StatusHandlerTemporaryPanel::OnKeyPressed(wxKeyEvent& event) - { - const int keyCode = event.GetKeyCode(); - if (keyCode == WXK_ESCAPE) - { - wxCommandEvent dummy; -- onAbortCompare(dummy); -+ OnAbortCompare(dummy); - } - - event.Skip(); - } - - --void StatusHandlerTemporaryPanel::onAbortCompare(wxCommandEvent& event) -+void StatusHandlerTemporaryPanel::OnAbortCompare(wxCommandEvent& event) - { - userRequestAbort(); - } -diff --git a/FreeFileSync/Source/ui/gui_status_handler.h b/FreeFileSync/Source/ui/gui_status_handler.h -index e8ed01e4..2a9e00d2 100644 ---- a/FreeFileSync/Source/ui/gui_status_handler.h -+++ b/FreeFileSync/Source/ui/gui_status_handler.h -@@ -41,8 +41,8 @@ public: - Result reportResults(); //noexcept!! - - private: -- void onLocalKeyEvent(wxKeyEvent& event); -- void onAbortCompare(wxCommandEvent& event); //handle abort button click -+ void OnKeyPressed(wxKeyEvent& event); -+ void OnAbortCompare(wxCommandEvent& event); //handle abort button click - void showStatsPanel(); - - MainDialog& mainDlg_; -diff -Naur -x '*.orig' -x '*.rej' -x '*.git*' 11.4-1/wx+/no_flicker.h 11.4-2/wx+/no_flicker.h ---- 11.4-1/wx+/no_flicker.h 2020-12-08 08:15:29.436156549 -0500 -+++ 11.4-2/wx+/no_flicker.h 2020-12-08 20:11:25.066820270 -0500 -@@ -70,7 +70,7 @@ - ZEN_ON_SCOPE_EXIT(richCtrl.EndSuppressUndo()); - - //fix mouse scroll speed: why the FUCK is this even necessary! -- richCtrl.SetLineHeight(richCtrl.GetCharHeight()); -+ //richCtrl.SetLineHeight(richCtrl.GetCharHeight()); // this is not even documented in wxWidgets 3.1.5! - - //get rid of margins and space between text blocks/"paragraphs" - richCtrl.SetMargins({0, 0}); ---- 11.20-0/FreeFileSync/Source/ui/progress_indicator.cpp 2022-04-18 09:49:31.917386558 -0400 -+++ 11.20-1/FreeFileSync/Source/ui/progress_indicator.cpp 2022-04-18 11:02:10.988781908 -0400 -@@ -882,7 +885,6 @@ - wxMemoryDC dc(bmpSquare); - drawInsetRectangle(dc, wxRect(bmpSquare.GetSize()), fastFromDIP(1), borderCol, fillCol); - } -- bmpSquare.SetScaleFactor(static_cast(getDPI()) / defaultDpi); - return bmpSquare; - }; - pnl_.m_bitmapGraphKeyBytes->SetBitmap(generateSquareBitmap(getColorBytes(), getColorBytesRim())); -- cgit