- sync msiexec to Wine 1.0-rc1
authorMarc Piulachs <marc.piulachs@live.com>
Wed, 14 May 2008 17:25:57 +0000 (17:25 +0000)
committerMarc Piulachs <marc.piulachs@live.com>
Wed, 14 May 2008 17:25:57 +0000 (17:25 +0000)
- change module type to win32cui inset of win32gui

svn path=/trunk/; revision=33518

reactos/base/system/msiexec/msiexec.c
reactos/base/system/msiexec/msiexec.rbuild

index 5e9afd9..6577c78 100644 (file)
@@ -139,7 +139,7 @@ static LPWSTR build_properties(struct string_list *property_list)
        for(list = property_list; list; list = list->next)
                len += lstrlenW(list->str) + 3;
 
-       ret = (WCHAR*) HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
+       ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
 
        /* add a space before each string, and quote the value */
        p = ret;
@@ -183,7 +183,7 @@ static LPWSTR build_transforms(struct string_list *transform_list)
        for(list = transform_list; list; list = list->next)
                len += lstrlenW(list->str) + 1;
 
-       ret = (WCHAR*) HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
+       ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
 
        /* add all the transforms with a semicolon between each one */
        p = ret;
@@ -215,7 +215,7 @@ static DWORD msi_atou(LPCWSTR str)
 static LPWSTR msi_strdup(LPCWSTR str)
 {
        DWORD len = lstrlenW(str)+1;
-       LPWSTR ret = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
+       LPWSTR ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
        lstrcpyW(ret, str);
        return ret;
 }
@@ -231,7 +231,7 @@ static BOOL msi_strequal(LPCWSTR str1, LPCSTR str2)
                return FALSE;
        if( lstrlenW(str1) != (len-1) )
                return FALSE;
-       strW = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
+       strW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
        MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
        ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len, strW, len);
        HeapFree(GetProcessHeap(), 0, strW);
@@ -259,7 +259,7 @@ static BOOL msi_strprefix(LPCWSTR str1, LPCSTR str2)
                return FALSE;
        if( lstrlenW(str1) < (len-1) )
                return FALSE;
-       strW = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
+       strW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
        MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
        ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len-1, strW, len-1);
        HeapFree(GetProcessHeap(), 0, strW);
@@ -454,7 +454,7 @@ static void process_args( WCHAR *cmdline, int *pargc, WCHAR ***pargv )
        int i, n;
 
        n = chomp( p );
-       argv = (WCHAR**) HeapAlloc(GetProcessHeap(), 0, sizeof (WCHAR*)*(n+1));
+       argv = HeapAlloc(GetProcessHeap(), 0, sizeof (WCHAR*)*(n+1));
        for( i=0; i<n; i++ )
        {
                argv[i] = p;
@@ -480,7 +480,7 @@ static BOOL process_args_from_reg( LPWSTR ident, int *pargc, WCHAR ***pargv )
        r = RegQueryValueExW(hkey, ident, 0, &type, 0, &sz);
        if(r == ERROR_SUCCESS && type == REG_SZ)
        {
-               buf = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sz);
+               buf = HeapAlloc(GetProcessHeap(), 0, sz);
                r = RegQueryValueExW(hkey, ident, 0, &type, (LPBYTE)buf, &sz);
                if( r == ERROR_SUCCESS )
                {
@@ -663,10 +663,10 @@ int main(int argc, char **argv)
                        PackageName = argvW[i]+2;
                        if (!PackageName[0])
                        {
-                       i++;
-                       if(i >= argc)
-                               ShowUsage(1);
-                       PackageName = argvW[i];
+                               i++;
+                               if (i >= argc)
+                                       ShowUsage(1);
+                               PackageName = argvW[i];
                        }
                        WINE_TRACE("PackageName = %s\n", wine_dbgstr_w(PackageName));
                        StringListAppend(&property_list, RemoveAll);
@@ -821,7 +821,7 @@ int main(int argc, char **argv)
                        LogFileName = argvW[i];
                        if(MsiEnableLogW(LogMode, LogFileName, LogAttributes) != ERROR_SUCCESS)
                        {
-                               fprintf(stderr, "Logging in %s (0x%08lx, %lu) failed\n",
+                               fprintf(stderr, "Logging in %s (0x%08x, %u) failed\n",
                                         wine_dbgstr_w(LogFileName), LogMode, LogAttributes);
                                ExitProcess(1);
                        }
@@ -852,23 +852,23 @@ int main(int argc, char **argv)
                        }
                        else if(msi_strequal(argvW[i]+2, "f"))
                        {
-                               InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_FULL|INSTALLUILEVEL_ENDDIALOG);
+                               InstallUILevel = INSTALLUILEVEL_FULL|INSTALLUILEVEL_ENDDIALOG;
                        }
                        else if(msi_strequal(argvW[i]+2, "n+"))
                        {
-                               InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_NONE|INSTALLUILEVEL_ENDDIALOG);
+                               InstallUILevel = INSTALLUILEVEL_NONE|INSTALLUILEVEL_ENDDIALOG;
                        }
                        else if(msi_strequal(argvW[i]+2, "b+"))
                        {
-                               InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG);
+                               InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
                        }
                        else if(msi_strequal(argvW[i]+2, "b-"))
                        {
-                               InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY);
+                               InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY;
                        }
                        else if(msi_strequal(argvW[i]+2, "b+!"))
                        {
-                               InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG);
+                               InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
                                WINE_FIXME("Unknown modifier: !\n");
                        }
                        else
index a214140..bbc2494 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="msiexec" type="win32gui" installbase="system32" installname="msiexec.exe" allowwarnings="true">
+<module name="msiexec" type="win32cui" installbase="system32" installname="msiexec.exe" allowwarnings="true">
        <include base="msiexec">.</include>
        <include base="ReactOS">include/wine</include>
        <define name="_WIN32_IE">0x501</define>