Hans Leidekker : msi: Add support for the ActionInfo progress message subtype.

Alexandre Julliard julliard at winehq.org
Tue May 15 12:55:58 CDT 2012


Module: wine
Branch: master
Commit: 4b32c093764ba9dd895b0959d14d7a67340ae404
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4b32c093764ba9dd895b0959d14d7a67340ae404

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue May 15 09:40:22 2012 +0200

msi: Add support for the ActionInfo progress message subtype.

---

 dlls/msi/action.c  |    1 +
 dlls/msi/dialog.c  |    4 +++-
 dlls/msi/msipriv.h |    1 +
 dlls/msi/package.c |   10 +++++++++-
 4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index c1d3b49..efdc79c 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -7340,6 +7340,7 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT scrip
 
     TRACE("Performing action (%s)\n", debugstr_w(action));
 
+    package->action_progress_increment = 0;
     handled = ACTION_HandleStandardAction(package, action, &rc);
 
     if (!handled)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index f4881fd..66d8786 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -664,7 +664,9 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
                 SendMessageW( ctrl->hwnd, PBM_SETPOS, 0, 0 );
             }
             break;
-        case 1: /* FIXME: not sure what this is supposed to do */
+        case 1: /* action data increment */
+            if (val2) dialog->package->action_progress_increment = val1;
+            else dialog->package->action_progress_increment = 0;
             break;
         case 2: /* move */
             if (ctrl->progress_backwards)
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 80f5414..bc9e596 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -369,6 +369,7 @@ typedef struct tagMSIPACKAGE
     struct list cabinet_streams;
     LPWSTR ActionFormat;
     LPWSTR LastAction;
+    UINT   action_progress_increment;
     HANDLE log_file;
     IAssemblyCache *cache_net[CLR_VERSION_MAX];
     IAssemblyCache *cache_sxs;
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 2077396..b1668d3 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -1905,8 +1905,16 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSIREC
         msi_free(deformated);
 
         ControlEvent_FireSubscribedEvent(package, szActionData, uirow);
-
         msiobj_release(&uirow->hdr);
+
+        if (package->action_progress_increment)
+        {
+            uirow = MSI_CreateRecord(2);
+            MSI_RecordSetInteger(uirow, 1, 2);
+            MSI_RecordSetInteger(uirow, 2, package->action_progress_increment);
+            ControlEvent_FireSubscribedEvent(package, szSetProgress, uirow);
+            msiobj_release(&uirow->hdr);
+        }
         break;
 
     case INSTALLMESSAGE_ACTIONSTART:




More information about the wine-cvs mailing list