mirror of
https://github.com/reactos/wine.git
synced 2025-01-24 21:10:50 +00:00
msi: Map neutral parts of package language ids to the system default language id.
This commit is contained in:
parent
8ad7d2e814
commit
23169289e6
@ -1402,7 +1402,17 @@ static UINT validate_package( MSIPACKAGE *package )
|
||||
}
|
||||
for (i = 0; i < package->num_langids; i++)
|
||||
{
|
||||
if (!package->langids[i] || IsValidLocale( package->langids[i], LCID_INSTALLED ))
|
||||
LANGID langid = package->langids[i];
|
||||
|
||||
if (PRIMARYLANGID( langid ) == LANG_NEUTRAL)
|
||||
{
|
||||
langid = MAKELANGID( PRIMARYLANGID( GetSystemDefaultLangID() ), SUBLANGID( langid ) );
|
||||
}
|
||||
if (SUBLANGID( langid ) == SUBLANG_NEUTRAL)
|
||||
{
|
||||
langid = MAKELANGID( PRIMARYLANGID( langid ), SUBLANGID( GetSystemDefaultLangID() ) );
|
||||
}
|
||||
if (IsValidLocale( langid, LCID_INSTALLED ))
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
return ERROR_INSTALL_LANGUAGE_UNSUPPORTED;
|
||||
|
@ -6057,6 +6057,23 @@ static void test_package_validation(void)
|
||||
ok(!delete_pf("msitest\\maximus", TRUE), "file exists\n");
|
||||
ok(!delete_pf("msitest", FALSE), "directory exists\n");
|
||||
|
||||
if (GetSystemDefaultLangID() == MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ))
|
||||
{
|
||||
DeleteFile(msifile);
|
||||
create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 100, "Intel;9");
|
||||
r = MsiInstallProductA(msifile, NULL);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
||||
ok(delete_pf("msitest\\maximus", TRUE), "file does not exist\n");
|
||||
ok(delete_pf("msitest", FALSE), "directory does not exist\n");
|
||||
|
||||
DeleteFile(msifile);
|
||||
create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 100, "Intel;1024");
|
||||
r = MsiInstallProductA(msifile, NULL);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
||||
ok(delete_pf("msitest\\maximus", TRUE), "file does not exist\n");
|
||||
ok(delete_pf("msitest", FALSE), "directory does not exist\n");
|
||||
}
|
||||
|
||||
DeleteFile(msifile);
|
||||
create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 100, "Intel32;0");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user