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
9a8d2f3f
Commit
9a8d2f3f
authored
Aug 18, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Ignore a file that has a missing component.
parent
74239fcd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletion
+69
-1
action.c
dlls/msi/action.c
+6
-1
install.c
dlls/msi/tests/install.c
+63
-0
No files found.
dlls/msi/action.c
View file @
9a8d2f3f
...
...
@@ -1457,7 +1457,12 @@ static UINT load_file(MSIRECORD *row, LPVOID param)
file
->
Component
=
get_loaded_component
(
package
,
component
);
if
(
!
file
->
Component
)
ERR
(
"Unfound Component %s
\n
"
,
debugstr_w
(
component
));
{
WARN
(
"Component not found: %s
\n
"
,
debugstr_w
(
component
));
msi_free
(
file
->
File
);
msi_free
(
file
);
return
ERROR_SUCCESS
;
}
file
->
FileName
=
msi_dup_record_field
(
row
,
3
);
reduce_to_longfilename
(
file
->
FileName
);
...
...
dlls/msi/tests/install.c
View file @
9a8d2f3f
...
...
@@ -726,6 +726,14 @@ static const CHAR mcp_feature_comp_dat[] = "Feature_\tComponent_\n"
"heliox
\t
helium
\n
"
"lithia
\t
lithium"
;
static
const
CHAR
mcomp_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
"File
\t
File
\n
"
"hydrogen
\t
hydrogen
\t
hydrogen
\t
0
\t\t\t
8192
\t
1
\n
"
"helium
\t
helium
\t
helium
\t
0
\t\t\t
8192
\t
1
\n
"
"lithium
\t
lithium
\t
lithium
\t
0
\t\t\t
8192
\t
1
\n
"
"beryllium
\t
missingcomp
\t
beryllium
\t
0
\t\t\t
8192
\t
1"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -1100,6 +1108,18 @@ static const msi_table mcp_tables[] =
ADD_TABLE
(
property
),
};
static
const
msi_table
mcomp_tables
[]
=
{
ADD_TABLE
(
mcp_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
mcp_feature
),
ADD_TABLE
(
mcp_feature_comp
),
ADD_TABLE
(
mcomp_file
),
ADD_TABLE
(
rem_install_exec_seq
),
ADD_TABLE
(
rof_media
),
ADD_TABLE
(
property
),
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -4131,6 +4151,7 @@ static void test_removefiles(void)
create_file
(
"msitest
\\
hydrogen"
,
500
);
create_file
(
"msitest
\\
helium"
,
500
);
create_file
(
"msitest
\\
lithium"
,
500
);
create_file
(
"msitest
\\
beryllium"
,
500
);
create_database
(
msifile
,
rem_tables
,
sizeof
(
rem_tables
)
/
sizeof
(
msi_table
));
...
...
@@ -5250,6 +5271,47 @@ static void test_MsiConfigureProductEx(void)
RemoveDirectoryA
(
"msitest"
);
}
static
void
test_missingcomponent
(
void
)
{
UINT
r
;
CreateDirectoryA
(
"msitest"
,
NULL
);
create_file
(
"msitest
\\
hydrogen"
,
500
);
create_file
(
"msitest
\\
helium"
,
500
);
create_file
(
"msitest
\\
lithium"
,
500
);
create_file
(
"beryllium"
,
500
);
create_database
(
msifile
,
mcomp_tables
,
sizeof
(
mcomp_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
"INSTALLLEVEL=10 PROPVAR=42"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
hydrogen"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
helium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
lithium"
),
"File not installed
\n
"
);
ok
(
!
pf_exists
(
"msitest
\\
beryllium"
),
"File installed
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL INSTALLLEVEL=10 PROPVAR=42"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
!
pf_exists
(
"msitest
\\
beryllium"
),
"File installed
\n
"
);
todo_wine
{
ok
(
!
delete_pf
(
"msitest
\\
hydrogen"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
helium"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lithium"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File not removed
\n
"
);
}
DeleteFileA
(
msifile
);
DeleteFileA
(
"msitest
\\
hydrogen"
);
DeleteFileA
(
"msitest
\\
helium"
);
DeleteFileA
(
"msitest
\\
lithium"
);
DeleteFileA
(
"beryllium"
);
RemoveDirectoryA
(
"msitest"
);
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -5303,6 +5365,7 @@ START_TEST(install)
test_installstate
();
test_sourcepath
();
test_MsiConfigureProductEx
();
test_missingcomponent
();
SetCurrentDirectoryA
(
prev_path
);
}
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