[PATCH setup 15/15] Add some progress reporting during preremove and uninstall

Jon Turney jon.turney@dronecode.org.uk
Tue May 16 12:04:00 GMT 2017


---
 install.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/install.cc b/install.cc
index 6e59a80..3721047 100644
--- a/install.cc
+++ b/install.cc
@@ -812,15 +812,20 @@ do_install_thread (HINSTANCE h, HWND owner)
   }
 
   /* start with uninstalls - remove files that new packages may replace */
+  Progress.SetBar2(0);
   for (vector <packagemeta *>::iterator i = uninstall_q.begin ();
        i != uninstall_q.end (); ++i)
   {
     myInstaller.preremoveOne (**i);
+    Progress.SetBar2(std::distance(uninstall_q.begin(), i) + 1, uninstall_q.size());
   }
+
+  Progress.SetBar2(0);
   for (vector <packagemeta *>::iterator i = uninstall_q.begin ();
        i != uninstall_q.end (); ++i)
   {
     myInstaller.uninstallOne (**i);
+    Progress.SetBar2(std::distance(uninstall_q.begin(), i) + 1, uninstall_q.size());
   }
 
   for (vector <packagemeta *>::iterator i = install_q.begin ();
-- 
2.12.3



More information about the Cygwin-apps mailing list