[MSIEXEC]
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 10 Oct 2014 11:41:31 +0000 (11:41 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 10 Oct 2014 11:41:31 +0000 (11:41 +0000)
* Sync with Wine 1.7.27.
CORE-8540

svn path=/trunk/; revision=64655

reactos/base/system/msiexec/msiexec.c
reactos/base/system/msiexec/service.c
reactos/media/doc/README.WINE

index 9ae87ce..d283b2d 100644 (file)
@@ -418,11 +418,12 @@ static int chomp( WCHAR *str )
 {
        enum chomp_state state = cs_token;
        WCHAR *p, *out;
-       int count = 1, ignore;
+        int count = 1;
+        BOOL ignore;
 
        for( p = str, out = str; *p; p++ )
        {
-               ignore = 1;
+                ignore = TRUE;
                switch( state )
                {
                case cs_whitespace:
@@ -436,7 +437,7 @@ static int chomp( WCHAR *str )
                                break;
                        default:
                                count++;
-                               ignore = 0;
+                                ignore = FALSE;
                                state = cs_token;
                        }
                        break;
@@ -452,7 +453,7 @@ static int chomp( WCHAR *str )
                                *out++ = 0;
                                break;
                        default:
-                               ignore = 0;
+                                ignore = FALSE;
                        }
                        break;
 
@@ -463,7 +464,7 @@ static int chomp( WCHAR *str )
                                state = cs_token;
                                break;
                        default:
-                               ignore = 0;
+                                ignore = FALSE;
                        }
                        break;
                }
@@ -626,6 +627,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
                        WINE_TRACE("argvW[%d] = %s\n", i, wine_dbgstr_w(argvW[i]));
                        PackageName = argvW[i];
                        StringListAppend(&property_list, ActionAdmin);
+                       WINE_FIXME("Administrative installs are not currently supported\n");
                }
                else if(msi_option_prefix(argvW[i], "f"))
                {
@@ -906,13 +908,18 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
                        }
                        else if(msi_strequal(argvW[i]+2, "b+!"))
                        {
-                               InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
-                               WINE_FIXME("Unknown modifier: !\n");
+                               WINE_FIXME("Unhandled modifier: !\n");
+                               InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG|INSTALLUILEVEL_HIDECANCEL;
+                       }
+                       else if(msi_strequal(argvW[i]+2, "b-!"))
+                       {
+                               WINE_FIXME("Unhandled modifier: !\n");
+                               InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY|INSTALLUILEVEL_HIDECANCEL;
                        }
                        else if(msi_strequal(argvW[i]+2, "b!"))
                        {
-                               InstallUILevel = INSTALLUILEVEL_BASIC;
-                               WINE_FIXME("Unknown modifier: !\n");
+                               WINE_FIXME("Unhandled modifier: !\n");
+                               InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_HIDECANCEL;
                        }
                        else
                        {
index 831a680..1ffead6 100644 (file)
@@ -73,6 +73,8 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
 
 static void WINAPI ServiceCtrlHandler(DWORD code)
 {
+    DWORD state = SERVICE_RUNNING;
+
     WINE_TRACE("%u\n", code);
 
     switch (code)
@@ -81,21 +83,19 @@ static void WINAPI ServiceCtrlHandler(DWORD code)
         case SERVICE_CONTROL_STOP:
             UpdateSCMStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
             KillService();
-            return;
+            state = SERVICE_STOPPED;
+            break;
         default:
             fprintf(stderr, "Unhandled service control code: %u\n", code);
             break;
     }
 
-    UpdateSCMStatus(SERVICE_RUNNING, NO_ERROR, 0);
+    UpdateSCMStatus(state, NO_ERROR, 0);
 }
 
 static DWORD WINAPI ServiceExecutionThread(LPVOID param)
 {
-    while (TRUE)
-    {
-        /* do nothing */
-    }
+    WaitForSingleObject(kill_event, INFINITE);
 
     return 0;
 }
@@ -130,12 +130,14 @@ static void WINAPI ServiceMain(DWORD argc, LPSTR *argv)
     {
         fprintf(stderr, "Failed to create event\n");
         KillService();
+        UpdateSCMStatus(SERVICE_STOPPED, NO_ERROR, 0);
         return;
     }
 
     if (!StartServiceThread())
     {
         KillService();
+        UpdateSCMStatus(SERVICE_STOPPED, NO_ERROR, 0);
         return;
     }
 
@@ -143,6 +145,8 @@ static void WINAPI ServiceMain(DWORD argc, LPSTR *argv)
 
     WaitForSingleObject(kill_event, INFINITE);
     KillService();
+
+    UpdateSCMStatus(SERVICE_STOPPED, NO_ERROR, 0);
 }
 
 DWORD DoService(void)
index e06342d..6f482f1 100644 (file)
@@ -246,7 +246,7 @@ reactos/base/applications/winhlp32          # Synced to Wine-1.7.27
 reactos/base/applications/wordpad           # Synced to Wine-1.7.9
 reactos/base/services/rpcss                 # Synced to Wine-1.7.27
 reactos/base/system/expand                  # Synced to Wine-1.7.1
-reactos/base/system/msiexec                 # Synced to Wine-1.7.1
+reactos/base/system/msiexec                 # Synced to Wine-1.7.27
 reactos/modules/rosapps/winfile             # Autosync
 
 In addition the following libs, dlls and source files are mostly based on code ported