[MSI] Sync with Wine Staging 1.9.4. CORE-10912

svn path=/trunk/; revision=70891
This commit is contained in:
Amine Khaldi 2016-03-03 14:28:37 +00:00
parent 528c860782
commit 5b552508ae
6 changed files with 30 additions and 9 deletions

View file

@ -2987,7 +2987,11 @@ static void delete_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path )
{
*p = 0;
if (!p[1]) continue; /* trailing backslash */
#ifdef __REACTOS__ /* CORE-10587 */
hkey = open_key( comp, root, subkey, FALSE, access | READ_CONTROL );
#else
hkey = open_key( comp, root, subkey, FALSE, access );
#endif
if (!hkey) break;
res = RegDeleteKeyExW( hkey, p + 1, access, 0 );
RegCloseKey( hkey );
@ -4119,7 +4123,6 @@ static UINT ITERATE_PublishIcon(MSIRECORD *row, LPVOID param)
if (rc != ERROR_SUCCESS)
{
ERR("Failed to get stream\n");
CloseHandle(the_file);
DeleteFileW(FilePath);
break;
}

View file

@ -972,7 +972,7 @@ static UINT msi_export_stream( LPCWSTR folder, LPCWSTR table, MSIRECORD *row, UI
return r;
/* if the destination folder does not exist then create it (folder name = table name) */
snprintfW( stream_filename, sizeof(stream_filename), fmt_folder, folder, table );
snprintfW( stream_filename, sizeof(stream_filename)/sizeof(WCHAR), fmt_folder, folder, table );
if (GetFileAttributesW( stream_filename ) == INVALID_FILE_ATTRIBUTES)
{
if (!CreateDirectoryW( stream_filename, NULL ))
@ -980,7 +980,7 @@ static UINT msi_export_stream( LPCWSTR folder, LPCWSTR table, MSIRECORD *row, UI
}
/* actually create the file */
snprintfW( stream_filename, sizeof(stream_filename), fmt_file, folder, table, stream_name );
snprintfW( stream_filename, sizeof(stream_filename)/sizeof(WCHAR), fmt_file, folder, table, stream_name );
file = CreateFileW( stream_filename, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
if (file == INVALID_HANDLE_VALUE)

View file

@ -537,6 +537,17 @@ static void msi_dialog_update_controls( msi_dialog *dialog, LPCWSTR property )
}
}
static void msi_dialog_update_all_controls( msi_dialog *dialog )
{
msi_control *control;
LIST_FOR_EACH_ENTRY( control, &dialog->controls, msi_control, entry )
{
if ( control->property && control->update )
control->update( dialog, control );
}
}
static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
{
UINT r = msi_set_property( package->db, property, value, -1 );
@ -674,11 +685,13 @@ static void event_subscribe( msi_dialog *dialog, const WCHAR *event, const WCHAR
{
struct subscriber *sub;
TRACE("event %s control %s attribute %s\n", debugstr_w(event), debugstr_w(control), debugstr_w(attribute));
TRACE("dialog %s event %s control %s attribute %s\n", debugstr_w(dialog->name), debugstr_w(event),
debugstr_w(control), debugstr_w(attribute));
LIST_FOR_EACH_ENTRY( sub, &dialog->package->subscriptions, struct subscriber, entry )
{
if (!strcmpiW( sub->event, event ) &&
if (sub->dialog == dialog &&
!strcmpiW( sub->event, event ) &&
!strcmpiW( sub->control, control ) &&
!strcmpiW( sub->attribute, attribute ))
{
@ -2210,6 +2223,7 @@ static UINT msi_dialog_pathedit_control( msi_dialog *dialog, MSIRECORD *rec )
control->attributes = MSI_RecordGetInteger( rec, 8 );
prop = MSI_RecordGetString( rec, 9 );
control->property = msi_dialog_dup_property( dialog, prop, FALSE );
control->update = msi_dialog_update_pathedit;
info->dialog = dialog;
info->control = control;
@ -4369,7 +4383,11 @@ static UINT event_spawn_dialog( msi_dialog *dialog, const WCHAR *argument )
{
/* don't destroy a modeless dialogs that might be our parent */
event_do_dialog( dialog->package, argument, dialog, FALSE );
if (dialog->package->CurrentInstallState != ERROR_SUCCESS) msi_dialog_end_dialog( dialog );
if (dialog->package->CurrentInstallState != ERROR_SUCCESS)
msi_dialog_end_dialog( dialog );
else
msi_dialog_update_all_controls(dialog);
return ERROR_SUCCESS;
}

View file

@ -1305,7 +1305,7 @@ static UINT fetch_user_component( const WCHAR *usersid, DWORD ctx, DWORD index,
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
HKEY key_users, key_components;
if (ctx == MSIINSTALLCONTEXT_USERMANAGED) /* FIXME: were to find these? */
if (ctx == MSIINSTALLCONTEXT_USERMANAGED) /* FIXME: where to find these? */
return ERROR_NO_MORE_ITEMS;
if (RegOpenKeyExW( HKEY_LOCAL_MACHINE, userdataW, 0, access, &key_users ))

View file

@ -355,7 +355,7 @@ data_type_l:
data_type:
TK_CHAR
{
$$ = MSITYPE_STRING | 1;
$$ = MSITYPE_STRING | 0x400;
}
| TK_CHAR TK_LP data_count TK_RP
{

View file

@ -114,7 +114,7 @@ reactos/dll/win32/msg711.acm # Synced to WineStaging-1.7.55
reactos/dll/win32/msgsm32.acm # Synced to WineStaging-1.7.55
reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55
reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55
reactos/dll/win32/msi # Synced to WineStaging-1.7.55
reactos/dll/win32/msi # Synced to WineStaging-1.9.4
reactos/dll/win32/msimg32 # Synced to WineStaging-1.7.55
reactos/dll/win32/msimtf # Synced to WineStaging-1.7.55
reactos/dll/win32/msisip # Synced to WineStaging-1.7.55