Module: wine Branch: master Commit: 09eb7f1eb7f7cbc8dfe4a05f6e502856e486cea4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=09eb7f1eb7f7cbc8dfe4a05f6e...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Nov 30 15:18:17 2010 +0100
msi: Look for transform files relative to the package directory.
---
dlls/msi/action.c | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 6200d9b..db7455b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -764,7 +764,27 @@ static UINT msi_apply_transforms( MSIPACKAGE *package ) if (xforms[i][0] == ':') r = msi_apply_substorage_transform( package, package->db, xforms[i] ); else - r = MSI_DatabaseApplyTransformW( package->db, xforms[i], 0 ); + { + WCHAR *transform; + + if (!PathIsRelativeW( xforms[i] )) transform = xforms[i]; + else + { + WCHAR *p = strrchrW( package->PackagePath, '\' ); + DWORD len = p - package->PackagePath + 1; + + if (!(transform = msi_alloc( (len + strlenW( xforms[i] ) + 1) * sizeof(WCHAR)) )) + { + msi_free( xforms ); + msi_free( xform_list ); + return ERROR_OUTOFMEMORY; + } + memcpy( transform, package->PackagePath, len * sizeof(WCHAR) ); + memcpy( transform + len, xforms[i], (strlenW( xforms[i] ) + 1) * sizeof(WCHAR) ); + } + r = MSI_DatabaseApplyTransformW( package->db, transform, 0 ); + if (transform != xforms[i]) msi_free( transform ); + } }
msi_free( xforms );