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
598c5426
Commit
598c5426
authored
Feb 16, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Get rid of ACTION_VerifyComponentForAction.
parent
54391a11
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
64 deletions
+35
-64
action.c
dlls/msi/action.c
+25
-36
files.c
dlls/msi/files.c
+6
-10
font.c
dlls/msi/font.c
+4
-6
helpers.c
dlls/msi/helpers.c
+0
-11
msipriv.h
dlls/msi/msipriv.h
+0
-1
No files found.
dlls/msi/action.c
View file @
598c5426
...
...
@@ -951,7 +951,7 @@ UINT msi_create_component_directories( MSIPACKAGE *package )
/* create all the folders required by the components are going to install */
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
continue
;
msi_create_directory
(
package
,
comp
->
Directory
);
}
...
...
@@ -2231,16 +2231,12 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
{
TRACE
(
"Skipping write due to disabled component %s
\n
"
,
debugstr_w
(
component
));
TRACE
(
"Component not scheduled for installation: %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
comp
->
Action
=
INSTALLSTATE_LOCAL
;
name
=
MSI_RecordGetString
(
row
,
4
);
...
...
@@ -2704,8 +2700,8 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
debugstr_w
(
comp
->
FullKeypath
),
comp
->
RefCount
);
if
(
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
||
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_SOURCE
)
)
if
(
comp
->
ActionRequest
==
INSTALLSTATE_LOCAL
||
comp
->
ActionRequest
==
INSTALLSTATE_SOURCE
)
{
if
(
!
comp
->
FullKeypath
)
continue
;
...
...
@@ -2771,7 +2767,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
}
RegCloseKey
(
hkey
);
}
else
if
(
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_ABSENT
)
)
else
if
(
comp
->
ActionRequest
==
INSTALLSTATE_ABSENT
)
{
if
(
package
->
Context
==
MSIINSTALLCONTEXT_MACHINE
)
MSIREG_DeleteUserDataComponentKey
(
comp
->
ComponentId
,
szLocalSid
);
...
...
@@ -2867,15 +2863,12 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
{
TRACE
(
"Skipping typelib reg due to disabled component
\n
"
);
TRACE
(
"Component not scheduled for installation: %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
comp
->
Action
=
INSTALLSTATE_LOCAL
;
file
=
get_loaded_file
(
package
,
comp
->
KeyPath
);
...
...
@@ -2979,10 +2972,9 @@ static UINT ITERATE_UnregisterTypeLibraries( MSIRECORD *row, LPVOID param )
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_ABSENT
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_ABSENT
)
{
TRACE
(
"Skipping, component is not scheduled for uninstall
\n
"
);
TRACE
(
"Component not scheduled for removal %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
...
...
@@ -3071,10 +3063,9 @@ static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param)
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
{
TRACE
(
"Skipping shortcut creation due to disabled component
\n
"
);
TRACE
(
"Component not scheduled for installation %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
...
...
@@ -3208,10 +3199,9 @@ static UINT ITERATE_RemoveShortcuts( MSIRECORD *row, LPVOID param )
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_ABSENT
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_ABSENT
)
{
TRACE
(
"Skipping, component not scheduled for uninstall
\n
"
);
TRACE
(
"Component not scheduled for removal %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
...
...
@@ -3626,17 +3616,15 @@ static UINT ITERATE_WriteIniValues(MSIRECORD *row, LPVOID param)
component
=
MSI_RecordGetString
(
row
,
8
);
comp
=
get_loaded_component
(
package
,
component
);
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
{
TRACE
(
"Skipping ini file due to disabled component %s
\n
"
,
debugstr_w
(
component
));
TRACE
(
"Component not scheduled for installation %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
comp
->
Action
=
INSTALLSTATE_LOCAL
;
identifier
=
MSI_RecordGetString
(
row
,
1
);
...
...
@@ -4490,14 +4478,15 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
component
=
MSI_RecordGetString
(
rec
,
3
);
comp
=
get_loaded_component
(
package
,
component
);
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
&&
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_SOURCE
)
&&
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_ADVERTISED
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
&&
comp
->
ActionRequest
!=
INSTALLSTATE_SOURCE
&&
comp
->
ActionRequest
!=
INSTALLSTATE_ADVERTISED
)
{
TRACE
(
"Skipping: Component %s not scheduled for install
\n
"
,
debugstr_w
(
component
));
TRACE
(
"Component not scheduled for installation %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/files.c
View file @
598c5426
...
...
@@ -108,7 +108,7 @@ static void schedule_install_files(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
{
if
(
!
ACTION_VerifyComponentForAction
(
file
->
Component
,
INSTALLSTATE_LOCAL
)
)
if
(
file
->
Component
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
{
TRACE
(
"File %s is not scheduled for install
\n
"
,
debugstr_w
(
file
->
File
));
...
...
@@ -358,19 +358,15 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
component
=
MSI_RecordGetString
(
row
,
2
);
comp
=
get_loaded_component
(
package
,
component
);
if
(
!
comp
)
return
ERROR_SUCCESS
;
if
(
!
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_LOCAL
)
)
if
(
comp
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
{
TRACE
(
"Skipping copy due to disabled component %s
\n
"
,
debugstr_w
(
component
));
/* the action taken was the same as the current install state */
if
(
comp
)
comp
->
Action
=
comp
->
Installed
;
TRACE
(
"Component not scheduled for installation %s
\n
"
,
debugstr_w
(
component
));
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
comp
->
Action
=
INSTALLSTATE_LOCAL
;
file_key
=
MSI_RecordGetString
(
row
,
3
);
...
...
dlls/msi/font.c
View file @
598c5426
...
...
@@ -201,10 +201,9 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
return
ERROR_SUCCESS
;
}
/* check to make sure that component is installed */
if
(
!
ACTION_VerifyComponentForAction
(
file
->
Component
,
INSTALLSTATE_LOCAL
))
if
(
file
->
Component
->
ActionRequest
!=
INSTALLSTATE_LOCAL
)
{
TRACE
(
"
Skipping: Component not scheduled for install
\n
"
);
TRACE
(
"
Component not scheduled for installation
\n
"
);
return
ERROR_SUCCESS
;
}
...
...
@@ -280,10 +279,9 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param )
return
ERROR_SUCCESS
;
}
/* check to make sure that component is uninstalled */
if
(
!
ACTION_VerifyComponentForAction
(
file
->
Component
,
INSTALLSTATE_ABSENT
))
if
(
file
->
Component
->
ActionRequest
!=
INSTALLSTATE_ABSENT
)
{
TRACE
(
"
Skipping: Component not scheduled for uninstal
l
\n
"
);
TRACE
(
"
Component not scheduled for remova
l
\n
"
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/helpers.c
View file @
598c5426
...
...
@@ -604,17 +604,6 @@ void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record)
msiobj_release
(
&
row
->
hdr
);
}
BOOL
ACTION_VerifyComponentForAction
(
const
MSICOMPONENT
*
comp
,
INSTALLSTATE
check
)
{
if
(
!
comp
)
return
FALSE
;
if
(
comp
->
ActionRequest
==
check
)
return
TRUE
;
else
return
FALSE
;
}
BOOL
ACTION_VerifyFeatureForAction
(
const
MSIFEATURE
*
feature
,
INSTALLSTATE
check
)
{
if
(
!
feature
)
...
...
dlls/msi/msipriv.h
View file @
598c5426
...
...
@@ -982,7 +982,6 @@ extern void msi_free_action_script(MSIPACKAGE *package, UINT script);
extern
LPWSTR
build_icon_path
(
MSIPACKAGE
*
,
LPCWSTR
);
extern
LPWSTR
build_directory_name
(
DWORD
,
...);
extern
BOOL
create_full_pathW
(
const
WCHAR
*
path
);
extern
BOOL
ACTION_VerifyComponentForAction
(
const
MSICOMPONENT
*
,
INSTALLSTATE
);
extern
BOOL
ACTION_VerifyFeatureForAction
(
const
MSIFEATURE
*
,
INSTALLSTATE
);
extern
void
reduce_to_longfilename
(
WCHAR
*
);
extern
LPWSTR
create_component_advertise_string
(
MSIPACKAGE
*
,
MSICOMPONENT
*
,
LPCWSTR
);
...
...
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