msi: Fix installing from administrative image with compressed source files.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49352 Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
84d25135b3
commit
15c8e5dee6
|
@ -1223,10 +1223,9 @@ static UINT load_file(MSIRECORD *row, LPVOID param)
|
|||
*/
|
||||
if (package->WordCount & msidbSumInfoSourceTypeAdminImage)
|
||||
{
|
||||
file->IsCompressed = FALSE;
|
||||
file->IsCompressed = package->WordCount & msidbSumInfoSourceTypeCompressed;
|
||||
}
|
||||
else if (file->Attributes &
|
||||
(msidbFileAttributesCompressed | msidbFileAttributesPatchAdded))
|
||||
else if (file->Attributes & (msidbFileAttributesCompressed | msidbFileAttributesPatchAdded))
|
||||
{
|
||||
file->IsCompressed = TRUE;
|
||||
}
|
||||
|
@ -1234,10 +1233,7 @@ static UINT load_file(MSIRECORD *row, LPVOID param)
|
|||
{
|
||||
file->IsCompressed = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
file->IsCompressed = package->WordCount & msidbSumInfoSourceTypeCompressed;
|
||||
}
|
||||
else file->IsCompressed = package->WordCount & msidbSumInfoSourceTypeCompressed;
|
||||
|
||||
load_file_hash(package, file);
|
||||
load_file_disk_id(package, file);
|
||||
|
|
|
@ -1392,6 +1392,34 @@ static const CHAR sr_custom_action_dat[] =
|
|||
"sourcedir_unset\t19\t\tSourceDir should not be set\n"
|
||||
"sourcedir_set\t19\t\tSourceDir should be set\n";
|
||||
|
||||
static const CHAR ai2_file_dat[] =
|
||||
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
|
||||
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
|
||||
"File\tFile\n"
|
||||
"five.txt\tFive\tfive.txt\t1000\t\t\t0\t5\n"
|
||||
"four.txt\tFour\tfour.txt\t1000\t\t\t0\t4\n";
|
||||
|
||||
static const CHAR ai2_component_dat[] =
|
||||
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
|
||||
"s72\tS38\ts72\ti2\tS255\tS72\n"
|
||||
"Component\tComponent\n"
|
||||
"Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
|
||||
"Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n";
|
||||
|
||||
static const CHAR ai2_feature_dat[] =
|
||||
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
|
||||
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
|
||||
"Feature\tFeature\n"
|
||||
"Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
|
||||
"Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n";
|
||||
|
||||
static const CHAR ai2_feature_comp_dat[] =
|
||||
"Feature_\tComponent_\n"
|
||||
"s38\ts72\n"
|
||||
"FeatureComponents\tFeature_\tComponent_\n"
|
||||
"Five\tFive\n"
|
||||
"Four\tFour\n";
|
||||
|
||||
static const msi_table tables[] =
|
||||
{
|
||||
ADD_TABLE(component),
|
||||
|
@ -1821,6 +1849,18 @@ static const msi_table ai_tables[] =
|
|||
ADD_TABLE(property)
|
||||
};
|
||||
|
||||
static const msi_table ai2_tables[] =
|
||||
{
|
||||
ADD_TABLE(ai2_component),
|
||||
ADD_TABLE(directory),
|
||||
ADD_TABLE(ai2_feature),
|
||||
ADD_TABLE(ai2_feature_comp),
|
||||
ADD_TABLE(ai2_file),
|
||||
ADD_TABLE(install_exec_seq),
|
||||
ADD_TABLE(media),
|
||||
ADD_TABLE(property)
|
||||
};
|
||||
|
||||
static const msi_table pc_tables[] =
|
||||
{
|
||||
ADD_TABLE(ca51_component),
|
||||
|
@ -4865,6 +4905,24 @@ static void test_adminimage(void)
|
|||
|
||||
delete_pf_files();
|
||||
|
||||
create_file("four.txt", 100);
|
||||
create_file("five.txt", 100);
|
||||
create_cab_file("msitest.cab", MEDIA_SIZE, "four.txt\0five.txt\0");
|
||||
create_database_wordcount(msifile, ai2_tables, ARRAY_SIZE(ai2_tables),
|
||||
100, msidbSumInfoSourceTypeAdminImage|msidbSumInfoSourceTypeCompressed,
|
||||
";1033", "{004757CA-5092-49C2-AD20-28E1CE0DF5F2}");
|
||||
|
||||
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
|
||||
|
||||
r = MsiInstallProductA(msifile, NULL);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
||||
|
||||
ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
|
||||
ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
|
||||
ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
|
||||
ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
|
||||
ok(delete_pf("msitest", FALSE), "Directory not created\n");
|
||||
|
||||
error:
|
||||
DeleteFileA("msifile");
|
||||
DeleteFileA("msitest\\cabout\\new\\five.txt");
|
||||
|
|
Loading…
Reference in New Issue