17063 specific fix

With build 17063 Microsoft has removed all UUP editions except CORE and PROFESSIONAL.
This fix maps removed editions to their substitutes that were not removed, modifies the base pack to use some Enterprise edition files for Professional due to new dependencies and removes no longer existing editions from packs array.
This commit is contained in:
mkuba50 2017-12-19 21:03:19 +01:00
parent dd47de1172
commit 3a485ce33a
3 changed files with 84 additions and 1 deletions

15
get.php
View File

@ -78,6 +78,21 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
$info = json_decode($info, true);
}
if(isset($info['build'])) {
$build = explode('.', $info['build']);
$build = $build[0];
} else {
$build = 9841;
}
if($build >= 17063) {
$packs = $packs17063;
if(isset($editionMap[$desiredEdition])) {
$desiredEdition = $editionMap[$desiredEdition];
}
}
if($desiredEdition == 'UPDATEONLY') {
if(!isset($info['containsCU']) || !$info['containsCU']) {
return array('error' => 'NOT_CUMULATIVE_UPDATE');

View File

@ -16,7 +16,7 @@ limitations under the License.
*/
function uupApiVersion() {
return '1.6.3';
return '1.6.4';
}
function uupApiPrintBrand() {

View File

@ -307,4 +307,72 @@ $fancyLangNames = array(
'zh-cn' => 'Chinese (Simplified)',
'zh-tw' => 'Chinese (Traditional)',
);
// 17063 and newer builds specific fix
// Base pack
$packs17063 = array();
$packs17063[0]['editionNeutral'] = $packs[0]['editionNeutral'];
$packs17063[0]['CORE'] = array(
'Microsoft-Windows-EditionPack-Core-Package',
'Microsoft-Windows-EditionPack-Core-WOW64-Package',
'Microsoft-Windows-EditionPack-Core-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-Core-Package',
'Microsoft-Windows-EditionSpecific-Core-WOW64-Package',
'Microsoft-Windows-EditionSpecific-Core-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.core\.',
);
$packs17063[0]['PROFESSIONAL'] = array(
'Microsoft-Windows-EditionPack-Enterprise-Package',
'Microsoft-Windows-EditionPack-Enterprise-WOW64-Package',
'Microsoft-Windows-EditionPack-Enterprise-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-Enterprise-Package',
'Microsoft-Windows-EditionSpecific-Enterprise-WOW64-Package',
'Microsoft-Windows-EditionSpecific-Enterprise-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.professional',
);
// European "N" Editions
$packs17063[1]['COREN'] = array(
'Microsoft-Windows-EditionPack-Core-Package',
'Microsoft-Windows-EditionPack-Core-WOW64-Package',
'Microsoft-Windows-EditionPack-Core-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-CoreN-Package',
'Microsoft-Windows-EditionSpecific-CoreN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-CoreN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
);
$packs17063[1]['PROFESSIONALN'] = array(
'Microsoft-Windows-EditionPack-Enterprise-Package',
'Microsoft-Windows-EditionPack-Enterprise-WOW64-Package',
'Microsoft-Windows-EditionPack-Enterprise-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-EnterpriseN-Package',
'Microsoft-Windows-EditionSpecific-EnterpriseN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-EnterpriseN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
);
// Other packs mirrored from pre-17063 packs
$packs17063[2] = array();
$packs17063[3] = $packs[3];
$packs17063[4] = $packs[4];
$packs17063[5] = $packs[5];
$packs17063[6] = $packs[6];
$packs17063[7] = $packs[7];
// Edition map to avoid larger changes in API
$editionMap = array(
'CLOUD' => 'PROFESSIONAL',
'CLOUDN' => 'PROFESSIONALN',
'CORE' => 'CORE',
'COREN' => 'COREN',
'CORESINGLELANGUAGE' => 'CORE',
'EDUCATION' => 'PROFESSIONAL',
'EDUCATIONN' => 'PROFESSIONALN',
'ENTERPRISE' => 'PROFESSIONAL',
'ENTERPRISEN' => 'PROFESSIONALN',
'PROFESSIONAL' => 'PROFESSIONAL',
'PROFESSIONALN' => 'PROFESSIONALN',
);
?>