This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


---
 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]