Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4b5248c9
Commit
4b5248c9
authored
Nov 02, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add support for the Unicode version of the global UI handler.
parent
1c7c406b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
media.c
dlls/msi/media.c
+8
-6
msi.c
dlls/msi/msi.c
+4
-2
package.c
dlls/msi/package.c
+11
-10
No files found.
dlls/msi/media.c
View file @
4b5248c9
...
...
@@ -70,7 +70,6 @@ static BOOL source_matches_volume(MSIMEDIAINFO *mi, LPCWSTR source_root)
static
UINT
msi_change_media
(
MSIPACKAGE
*
package
,
MSIMEDIAINFO
*
mi
)
{
LPSTR
msg
;
LPWSTR
error
,
error_dialog
;
LPWSTR
source_dir
;
UINT
r
=
ERROR_SUCCESS
;
...
...
@@ -78,21 +77,24 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
static
const
WCHAR
error_prop
[]
=
{
'E'
,
'r'
,
'r'
,
'o'
,
'r'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
0
};
if
((
msi_get_property_int
(
package
,
szUILevel
,
0
)
&
INSTALLUILEVEL_MASK
)
==
INSTALLUILEVEL_NONE
&&
!
gUIHandlerA
)
INSTALLUILEVEL_NONE
&&
!
gUIHandlerA
&&
!
gUIHandlerW
)
return
ERROR_SUCCESS
;
error
=
generate_error_string
(
package
,
1302
,
1
,
mi
->
disk_prompt
);
error_dialog
=
msi_dup_property
(
package
,
error_prop
);
source_dir
=
msi_dup_property
(
package
,
cszSourceDir
);
while
(
r
==
ERROR_SUCCESS
&&
!
source_matches_volume
(
mi
,
source_dir
))
while
(
r
==
ERROR_SUCCESS
&&
!
source_matches_volume
(
mi
,
source_dir
))
{
r
=
msi_spawn_error_dialog
(
package
,
error_dialog
,
error
);
if
(
gUIHandler
A
)
if
(
gUIHandler
W
)
{
msg
=
strdupWtoA
(
error
);
gUIHandlerW
(
gUIContext
,
MB_RETRYCANCEL
|
INSTALLMESSAGE_ERROR
,
error
);
}
else
if
(
gUIHandlerA
)
{
char
*
msg
=
strdupWtoA
(
error
);
gUIHandlerA
(
gUIContext
,
MB_RETRYCANCEL
|
INSTALLMESSAGE_ERROR
,
msg
);
msi_free
(
msg
);
}
...
...
dlls/msi/msi.c
View file @
4b5248c9
...
...
@@ -1902,7 +1902,8 @@ INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
{
INSTALLUI_HANDLERA
prev
=
gUIHandlerA
;
TRACE
(
"%p %x %p
\n
"
,
puiHandler
,
dwMessageFilter
,
pvContext
);
TRACE
(
"%p %08x %p
\n
"
,
puiHandler
,
dwMessageFilter
,
pvContext
);
gUIHandlerA
=
puiHandler
;
gUIFilter
=
dwMessageFilter
;
gUIContext
=
pvContext
;
...
...
@@ -1915,7 +1916,8 @@ INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
{
INSTALLUI_HANDLERW
prev
=
gUIHandlerW
;
TRACE
(
"%p %x %p
\n
"
,
puiHandler
,
dwMessageFilter
,
pvContext
);
TRACE
(
"%p %08x %p
\n
"
,
puiHandler
,
dwMessageFilter
,
pvContext
);
gUIHandlerW
=
puiHandler
;
gUIFilter
=
dwMessageFilter
;
gUIContext
=
pvContext
;
...
...
dlls/msi/package.c
View file @
4b5248c9
...
...
@@ -1203,19 +1203,21 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
}
}
TRACE
(
"
(%p %x %x %s)
\n
"
,
gUIHandlerA
,
gUIFilter
,
log_type
,
debugstr_w
(
message
));
TRACE
(
"
%p %p %x %x %s
\n
"
,
gUIHandlerA
,
gUIHandlerW
,
gUIFilter
,
log_type
,
debugstr_w
(
message
));
/* convert it to ASCII */
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
message
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
message
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
msg
=
msi_alloc
(
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
message
,
-
1
,
msg
,
len
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
message
,
-
1
,
msg
,
len
,
NULL
,
NULL
);
if
(
gUIHandler
A
&&
(
gUIFilter
&
log_type
))
if
(
gUIHandler
W
&&
(
gUIFilter
&
log_type
))
{
rc
=
gUIHandlerA
(
gUIContext
,
eMessageType
,
msg
);
rc
=
gUIHandlerW
(
gUIContext
,
eMessageType
,
message
);
}
else
if
(
gUIHandlerA
&&
(
gUIFilter
&
log_type
))
{
rc
=
gUIHandlerA
(
gUIContext
,
eMessageType
,
msg
);
}
if
((
!
rc
)
&&
(
gszLogFile
[
0
])
&&
!
((
eMessageType
&
0xff000000
)
==
...
...
@@ -1234,8 +1236,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
}
}
msi_free
(
msg
);
msi_free
(
message
);
msi_free
(
message
);
switch
(
eMessageType
&
0xff000000
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment