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
b956b1f4
Commit
b956b1f4
authored
Apr 19, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set patch property Uninstallable.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f3adb4a1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
action.c
dlls/msi/action.c
+10
-1
msipriv.h
dlls/msi/msipriv.h
+2
-0
patch.c
dlls/msi/patch.c
+33
-0
No files found.
dlls/msi/action.c
View file @
b956b1f4
...
...
@@ -4431,7 +4431,16 @@ static UINT msi_publish_patches( MSIPACKAGE *package )
if
(
res
!=
ERROR_SUCCESS
)
goto
done
;
res
=
RegSetValueExW
(
patch_key
,
szState
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
patch
->
state
,
sizeof
(
patch
->
state
)
);
res
=
RegSetValueExW
(
patch_key
,
szState
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
patch
->
state
,
sizeof
(
patch
->
state
)
);
if
(
res
!=
ERROR_SUCCESS
)
{
RegCloseKey
(
patch_key
);
goto
done
;
}
res
=
RegSetValueExW
(
patch_key
,
szUninstallable
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
patch
->
uninstallable
,
sizeof
(
patch
->
uninstallable
)
);
RegCloseKey
(
patch_key
);
if
(
res
!=
ERROR_SUCCESS
)
goto
done
;
...
...
dlls/msi/msipriv.h
View file @
b956b1f4
...
...
@@ -192,6 +192,7 @@ typedef struct tagMSIPATCHINFO
LPWSTR
filename
;
LPWSTR
localfile
;
MSIPATCHSTATE
state
;
DWORD
uninstallable
;
BOOL
delete_on_close
;
BOOL
registered
;
UINT
disk_id
;
...
...
@@ -1198,6 +1199,7 @@ static const WCHAR szData[] = {'D','a','t','a',0};
static
const
WCHAR
szLangResource
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'l'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szInstallLocation
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'L'
,
'o'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szProperty
[]
=
{
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
0
};
static
const
WCHAR
szUninstallable
[]
=
{
'U'
,
'n'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'a'
,
'b'
,
'l'
,
'e'
,
0
};
/* memory allocation macro functions */
static
void
*
msi_alloc
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
...
...
dlls/msi/patch.c
View file @
b956b1f4
...
...
@@ -836,6 +836,38 @@ done:
return
r
;
}
static
DWORD
is_uninstallable
(
MSIDATABASE
*
db
)
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'M'
,
's'
,
'i'
,
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
'M'
,
'e'
,
't'
,
'a'
,
'd'
,
'a'
,
't'
,
'a'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'p'
,
'a'
,
'n'
,
'y'
,
'`'
,
' '
,
'I'
,
'S'
,
' '
,
'N'
,
'U'
,
'L'
,
'L'
,
' '
,
'A'
,
'N'
,
'D'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
'='
,
'\''
,
'A'
,
'l'
,
'l'
,
'o'
,
'w'
,
'R'
,
'e'
,
'm'
,
'o'
,
'v'
,
'a'
,
'l'
,
'\''
,
0
};
MSIQUERY
*
view
;
MSIRECORD
*
rec
;
DWORD
ret
=
0
;
if
(
MSI_DatabaseOpenViewW
(
db
,
query
,
&
view
)
!=
ERROR_SUCCESS
)
return
0
;
if
(
MSI_ViewExecute
(
view
,
0
)
!=
ERROR_SUCCESS
)
{
msiobj_release
(
&
view
->
hdr
);
return
0
;
}
if
(
MSI_ViewFetch
(
view
,
&
rec
)
==
ERROR_SUCCESS
)
{
const
WCHAR
*
value
=
MSI_RecordGetString
(
rec
,
1
);
ret
=
atoiW
(
value
);
msiobj_release
(
&
rec
->
hdr
);
}
FIXME
(
"check other criteria
\n
"
);
msiobj_release
(
&
view
->
hdr
);
return
ret
;
}
static
UINT
msi_apply_patch_db
(
MSIPACKAGE
*
package
,
MSIDATABASE
*
patch_db
,
MSIPATCHINFO
*
patch
)
{
UINT
i
,
r
=
ERROR_SUCCESS
;
...
...
@@ -861,6 +893,7 @@ static UINT msi_apply_patch_db( MSIPACKAGE *package, MSIDATABASE *patch_db, MSIP
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
patch
->
uninstallable
=
is_uninstallable
(
patch_db
);
patch
->
state
=
MSIPATCHSTATE_APPLIED
;
list_add_tail
(
&
package
->
patches
,
&
patch
->
entry
);
return
ERROR_SUCCESS
;
...
...
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