MSI: implement MsiVerifyPackage, cosmetic fixes (with the patch)
Mike McCormack
mike at codeweavers.com
Fri Jul 9 15:18:07 CDT 2004
Mike McCormack wrote:
>
> This is the last change required to sync up the CrossOver's current MSI
> implementation with WineHQs.
>
> Mike
>
>
> ChangeLog:
> * implement MsiVerifyPackage, cosmetic fixes
>
-------------- next part --------------
diff -ur dlls/msi/action.c /home/mike/codeweavers/office/wine/dlls/msi/action.c
--- dlls/msi/action.c 2004-07-09 14:07:57.000000000 -0500
+++ /home/mike/codeweavers/office/wine/dlls/msi/action.c 2004-06-28 15:01:36.000000000 -0500
@@ -3023,7 +3023,7 @@
}
/*
- * components FeatureState defaults to FALSE. the idea is we want to
+ * Components FeatureState defaults to FALSE. The idea is we want to
* enable the component is ANY feature that uses it is enabled to install
*/
for(i = 0; i < package->loaded_features; i++)
@@ -3050,7 +3050,7 @@
if (override != NULL)
HeapFree(GetProcessHeap(),0,override);
/*
- * so basically we ONLY want to install a component if its Enabled AND
+ * So basically we ONLY want to install a component if its Enabled AND
* FeatureState are both TRUE
*/
return ERROR_SUCCESS;
@@ -3303,10 +3303,10 @@
static UINT ACTION_RegisterTypeLibraries(MSIPACKAGE *package)
{
/*
- * ok this is a bit confusting.. I am given a _Component key and i believe
+ * OK this is a bit confusing.. I am given a _Component key and I believe
* that the file that is being registered as a type library is the "key file
- * of that component" which i interpert to mean "The file in the KeyPath of
- * that component"
+ * of that component" which I interpret to mean "The file in the KeyPath of
+ * that component".
*/
UINT rc;
MSIQUERY * view;
@@ -3388,8 +3388,8 @@
debugstr_w(package->files[index].TargetPath));
else
{
- /* yes the row has more fields than i need, but #1 is
- correct and the only one i need. why make a new row */
+ /* Yes the row has more fields than I need, but #1 is
+ correct and the only one I need. Why make a new row? */
ui_actiondata(package,szRegisterTypeLibraries,row);
@@ -3533,8 +3533,8 @@
static UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
{
/*
- * Again I am assuming the words, "Whose key file respesents" when refering
- * to a Component as to mean the Components KeyPath file
+ * Again I am assuming the words, "Whose key file represents" when refering
+ * to a Component as to meaning that Components KeyPath file
*
* Also there is a very strong connection between ClassInfo and ProgID
* that I am mostly glossing over.
@@ -3811,12 +3811,12 @@
static UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
{
/*
- * Sigh, here i am just brute force registering all progid
+ * Sigh, here I am just brute force registering all progids
* this needs to be linked to the Classes that have been registerd
* but the easiest way to do that is to load all these stuff into
* memory for easy checking.
*
- * gives me something to continue to work toward
+ * Gives me something to continue to work toward.
*/
UINT rc;
MSIQUERY * view;
diff -ur dlls/msi/cond.y /home/mike/codeweavers/office/wine/dlls/msi/cond.y
--- dlls/msi/cond.y 2004-07-09 13:34:00.000000000 -0500
+++ /home/mike/codeweavers/office/wine/dlls/msi/cond.y 2004-06-28 14:58:46.000000000 -0500
@@ -57,8 +57,6 @@
static LPWSTR COND_GetString( struct cond_str *str );
static int COND_lex( void *COND_lval, COND_input *info);
-UINT get_property(MSIHANDLE hPackage, const WCHAR* prop, WCHAR* value,
- DWORD* size);
typedef INT (*comp_int)(INT a, INT b);
typedef INT (*comp_str)(LPWSTR a, LPWSTR b, BOOL caseless);
diff -ur dlls/msi/package.c /home/mike/codeweavers/office/wine/dlls/msi/package.c
--- dlls/msi/package.c 2004-07-09 14:15:00.000000000 -0500
+++ /home/mike/codeweavers/office/wine/dlls/msi/package.c 2004-07-02 15:07:40.000000000 -0500
@@ -254,7 +254,7 @@
'D','e','s','k','t','o','p','\\',0};
/*
- * Other things i notice set
+ * Other things I notice set
*
ScreenY
ScreenX
--- dlls/msi/msi.c 2004-07-09 14:07:57.000000000 -0500
+++ /home/mike/codeweavers/office/wine/dlls/msi/msi.c 2004-06-28 15:06:37.000000000 -0500
@@ -1180,14 +1181,38 @@
UINT WINAPI MsiVerifyPackageA( LPCSTR szPackage )
{
- FIXME("%s\n", debugstr_a(szPackage) );
- return ERROR_CALL_NOT_IMPLEMENTED;
+ UINT r, len;
+ LPWSTR szPack = NULL;
+
+ TRACE("%s\n", debugstr_a(szPackage) );
+
+ if( szPackage )
+ {
+ len = MultiByteToWideChar( CP_ACP, 0, szPackage, -1, NULL, 0 );
+ szPack = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
+ if( !szPack )
+ return ERROR_OUTOFMEMORY;
+ MultiByteToWideChar( CP_ACP, 0, szPackage, -1, szPack, len );
+ }
+
+ r = MsiVerifyPackageW( szPack );
+
+ HeapFree( GetProcessHeap(), 0, szPack );
+
+ return r;
}
UINT WINAPI MsiVerifyPackageW( LPCWSTR szPackage )
{
- FIXME("%s\n", debugstr_w(szPackage) );
- return ERROR_CALL_NOT_IMPLEMENTED;
+ MSIHANDLE handle;
+ UINT r;
+
+ TRACE("%s\n", debugstr_w(szPackage) );
+
+ r = MsiOpenDatabaseW( szPackage, MSIDBOPEN_READONLY, &handle );
+ MsiCloseHandle( handle );
+
+ return r;
}
INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
More information about the wine-devel
mailing list