Change handling of packs

The handling of packs has been changed to use different files for builds. This will allow easier implementation of changed packs in future.
This commit is contained in:
mkuba50 2017-12-20 17:35:14 +01:00
parent 3a485ce33a
commit f367afd64b
7 changed files with 569 additions and 391 deletions

53
get.php
View File

@ -17,9 +17,9 @@ limitations under the License.
require_once dirname(__FILE__).'/shared/main.php'; require_once dirname(__FILE__).'/shared/main.php';
require_once dirname(__FILE__).'/shared/requests.php'; require_once dirname(__FILE__).'/shared/requests.php';
require_once dirname(__FILE__).'/shared/packs.php';
function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePack = 0, $desiredEdition = 0) { function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePack = 0, $desiredEdition = 0) {
require dirname(__FILE__).'/shared/packs.php';
uupApiPrintBrand(); uupApiPrintBrand();
function packsByEdition($edition, $pack, $lang, $filesKeys) { function packsByEdition($edition, $pack, $lang, $filesKeys) {
@ -38,6 +38,30 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
return $filesTemp; return $filesTemp;
} }
$info = @file_get_contents('fileinfo/'.$updateId.'.json');
if(empty($info)) {
$info = array(
'ring' => 'WIF',
'flight' => 'Active',
'checkBuild' => '10.0.16251.0',
'files' => array(),
);
} else {
$info = json_decode($info, true);
}
if(isset($info['build'])) {
$build = explode('.', $info['build']);
$build = $build[0];
} else {
$build = 9841;
}
$packs = uupGetPacks($build);
$packsForLangs = $packs['packsForLangs'];
$editionPacks = $packs['editionPacks'];
$packs = $packs['packs'];
if($usePack) { if($usePack) {
$usePack = strtolower($usePack); $usePack = strtolower($usePack);
if(!isset($packsForLangs[$usePack])) { if(!isset($packsForLangs[$usePack])) {
@ -66,33 +90,6 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
unset($supported); unset($supported);
} }
$info = @file_get_contents('fileinfo/'.$updateId.'.json');
if(empty($info)) {
$info = array(
'ring' => 'WIF',
'flight' => 'Active',
'checkBuild' => '10.0.16251.0',
'files' => array(),
);
} else {
$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($desiredEdition == 'UPDATEONLY') {
if(!isset($info['containsCU']) || !$info['containsCU']) { if(!isset($info['containsCU']) || !$info['containsCU']) {
return array('error' => 'NOT_CUMULATIVE_UPDATE'); return array('error' => 'NOT_CUMULATIVE_UPDATE');

View File

@ -16,9 +16,24 @@ limitations under the License.
*/ */
require_once dirname(__FILE__).'/shared/main.php'; require_once dirname(__FILE__).'/shared/main.php';
require_once dirname(__FILE__).'/shared/packs.php';
function uupListEditions($lang = 'en-us') { function uupListEditions($lang = 'en-us', $updateId = 0) {
require dirname(__FILE__).'/shared/packs.php'; if($updateId) {
$info = uupUpdateInfo($updateId, 'build');
}
if(isset($info['info'])) {
$build = explode('.', $info['info']);
$build = $build[0];
} else {
$build = 9841;
}
$packs = uupGetPacks($build);
$packsForLangs = $packs['packsForLangs'];
$fancyEditionNames = $packs['fancyEditionNames'];
$packs = $packs['packs'];
if($lang) { if($lang) {
$lang = strtolower($lang); $lang = strtolower($lang);

View File

@ -16,9 +16,23 @@ limitations under the License.
*/ */
require_once dirname(__FILE__).'/shared/main.php'; require_once dirname(__FILE__).'/shared/main.php';
require_once dirname(__FILE__).'/shared/packs.php';
function uupListLangs() { function uupListLangs($updateId = 0) {
require dirname(__FILE__).'/shared/packs.php'; if($updateId) {
$info = uupUpdateInfo($updateId, 'build');
}
if(isset($info['info'])) {
$build = explode('.', $info['info']);
$build = $build[0];
} else {
$build = 9841;
}
$packs = uupGetPacks($build);
$packsForLangs = $packs['packsForLangs'];
$fancyLangNames = $packs['fancyLangNames'];
$langList = array(); $langList = array();
$langListFancy = array(); $langListFancy = array();

View File

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

View File

@ -15,364 +15,60 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
$packs = array( function uupGetPacks($build = 15063) {
// Base pack $fancyLangNames = array(
0 => array( 'ar-sa' => 'Arabic (Saudi Arabia)',
'editionNeutral' => array( 'bg-bg' => 'Bulgarian',
'Microsoft-Windows-Foundation-Package', 'cs-cz' => 'Czech',
'Microsoft-Windows-Client-Features-Package', 'da-dk' => 'Danish',
'Microsoft-Windows-Client-Features-WOW64-Package', 'de-de' => 'German',
'Microsoft-Windows-Client-Features-arm64arm-Package', 'el-gr' => 'Greek',
'Microsoft-Windows-WowPack-CoreARM-arm64arm-Package', 'en-gb' => 'English (United Kingdom)',
'Microsoft-Windows-ContactSupport-Package', 'en-us' => 'English (United States)',
'Microsoft-Windows-RegulatedPackages-Package', 'es-es' => 'Spanish (Spain)',
'Microsoft-Windows-RegulatedPackages-WOW64-Package', 'es-mx' => 'Spanish (Mexico)',
'Microsoft-Windows-RegulatedPackages-arm64arm-Package', 'et-ee' => 'Estonian',
'Microsoft-Windows-Holographic-Desktop-Merged-Package', 'fi-fi' => 'Finnish',
'Microsoft-Windows-Holographic-Desktop-Merged-WOW64-Package', 'fr-ca' => 'French (Canada)',
'Microsoft-Windows-Holographic-Desktop-Analog-Package', 'fr-fr' => 'French (France)',
'Microsoft-Windows-QuickAssist-Package', 'he-il' => 'Hebrew',
'Microsoft-Windows-InternetExplorer-Optional-Package', 'hr-hr' => 'Croatian',
'Microsoft-Windows-MediaPlayer-Package', 'hu-hu' => 'Hungarian',
'Microsoft-Windows-Hello-Face-Resource-.-Package', 'it-it' => 'Italian',
'Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package', 'ja-jp' => 'Japanese',
'Windows10\.0-KB', 'ko-kr' => 'Korean',
), 'lt-lt' => 'Lithuanian',
'CLOUD' => array( 'lv-lv' => 'Latvian',
'Microsoft-Windows-EditionPack-Professional-Package', 'nb-no' => 'Norwegian (Bokmal)',
'Microsoft-Windows-EditionPack-Professional-WOW64-Package', 'nl-nl' => 'Dutch',
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package', 'pl-pl' => 'Polish',
'Microsoft-Windows-EditionSpecific-Cloud-Package', 'pt-br' => 'Portuguese (Brazil)',
'Microsoft-Windows-EditionSpecific-Cloud-WOW64-Package', 'pt-pt' => 'Portuguese (Portugal)',
'Microsoft-Windows-EditionSpecific-Cloud-arm64arm-Package', 'ro-ro' => 'Romanian',
'Microsoft\.ModernApps\.Client\.All', 'ru-ru' => 'Russian',
'Microsoft\.ModernApps\.Client\.cloud', 'sk-sk' => 'Slovak',
), 'sl-si' => 'Slovenian',
'CORE' => array( 'sr-latn-rs' => 'Serbian (Latin)',
'Microsoft-Windows-EditionPack-Core-Package', 'sv-se' => 'Swedish',
'Microsoft-Windows-EditionPack-Core-WOW64-Package', 'th-th' => 'Thai',
'Microsoft-Windows-EditionPack-Core-arm64arm-Package', 'tr-tr' => 'Turkish',
'Microsoft-Windows-EditionSpecific-Core-Package', 'uk-ua' => 'Ukrainian',
'Microsoft-Windows-EditionSpecific-Core-WOW64-Package', 'zh-cn' => 'Chinese (Simplified)',
'Microsoft-Windows-EditionSpecific-Core-arm64arm-Package', 'zh-tw' => 'Chinese (Traditional)',
'Microsoft\.ModernApps\.Client\.All', );
'Microsoft\.ModernApps\.Client\.core',
),
'EDUCATION' => array(
'Microsoft-Windows-EditionPack-Enterprise-Package',
'Microsoft-Windows-EditionPack-Enterprise-WOW64-Package',
'Microsoft-Windows-EditionPack-Enterprise-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-Education-Package',
'Microsoft-Windows-EditionSpecific-Education-WOW64-Package',
'Microsoft-Windows-EditionSpecific-Education-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.education',
),
'ENTERPRISE' => 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\.enterprise\.',
),
'PROFESSIONAL' => array(
'Microsoft-Windows-EditionPack-Professional-Package',
'Microsoft-Windows-EditionPack-Professional-WOW64-Package',
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-Professional-Package',
'Microsoft-Windows-EditionSpecific-Professional-WOW64-Package',
'Microsoft-Windows-EditionSpecific-Professional-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.professional',
),
),
// European "N" Editions if($build < 17063) {
1 => array( require dirname(__FILE__).'/packs/legacy.php';
'CLOUDN' => array( } elseif ($build >= 17063) {
'Microsoft-Windows-EditionPack-Professional-Package', require dirname(__FILE__).'/packs/17063.php';
'Microsoft-Windows-EditionPack-Professional-WOW64-Package', }
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-CloudN-Package',
'Microsoft-Windows-EditionSpecific-CloudN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-CloudN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
),
'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',
),
'EDUCATIONN' => array(
'Microsoft-Windows-EditionPack-Enterprise-Package',
'Microsoft-Windows-EditionPack-Enterprise-WOW64-Package',
'Microsoft-Windows-EditionPack-Enterprise-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-EducationN-Package',
'Microsoft-Windows-EditionSpecific-EducationN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-EducationN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
),
'ENTERPRISEN' => 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',
),
'PROFESSIONALN' => array(
'Microsoft-Windows-EditionPack-Professional-Package',
'Microsoft-Windows-EditionPack-Professional-WOW64-Package',
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-ProfessionalN-Package',
'Microsoft-Windows-EditionSpecific-ProfessionalN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-ProfessionalN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
),
),
// CoreSingleLanguage return array(
2 => array( 'packs' => $packs,
'CORESINGLELANGUAGE' => array( 'packsForLangs' => $packsForLangs,
'Microsoft-Windows-EditionPack-Core-Package', 'editionPacks' => $editionPacks,
'Microsoft-Windows-EditionPack-Core-WOW64-Package', 'fancyEditionNames' => $fancyEditionNames,
'Microsoft-Windows-EditionPack-Core-arm64arm-Package', 'fancyLangNames' => $fancyLangNames,
'Microsoft-Windows-EditionSpecific-CoreSingleLanguage-Package', );
'Microsoft-Windows-EditionSpecific-CoreSingleLanguage-WOW64-Package', }
'Microsoft-Windows-EditionSpecific-CoreSingleLanguage-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.coresinglelanguage',
),
),
// China specific editions
3 => array(
'CORECOUNTRYSPECIFIC' => array(
'Microsoft-Windows-EditionPack-Core-Package',
'Microsoft-Windows-EditionPack-Core-WOW64-Package',
'Microsoft-Windows-EditionPack-Core-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-WOW64-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
),
),
// Additional packages for some languages
4 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Basic-en-us-Package',
'Microsoft-Windows-LanguageFeatures-OCR-en-us-Package',
),
),
// Additional packages for ar-sa language
5 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-TextToSpeech-ar-eg-Package',
),
),
// Additional packages for fr-ca language
6 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Basic-fr-fr-Package',
'Microsoft-Windows-LanguageFeatures-Handwriting-fr-fr-Package',
),
),
// Additional packages for zh-tw language
7 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Speech-zh-hk-Package',
'Microsoft-Windows-LanguageFeatures-TextToSpeech-zh-hk-Package',
),
),
);
$packsForLangs = array(
'ar-sa' => array(0, 2, 4, 5),
'bg-bg' => array(0, 1, 4),
'cs-cz' => array(0, 1),
'da-dk' => array(0, 1, 4),
'de-de' => array(0, 1),
'el-gr' => array(0, 1, 4),
'en-gb' => array(0, 1, 2),
'en-us' => array(0, 1, 2),
'es-es' => array(0, 1, 2),
'es-mx' => array(0, 2),
'et-ee' => array(0, 1),
'fi-fi' => array(0, 1),
'fr-ca' => array(0, 4, 6),
'fr-fr' => array(0, 1, 2),
'he-il' => array(0, 4),
'hr-hr' => array(0, 1),
'hu-hu' => array(0, 1),
'it-it' => array(0, 1),
'ja-jp' => array(0),
'ko-kr' => array(0, 1),
'lt-lt' => array(0, 1),
'lv-lv' => array(0, 1),
'nb-no' => array(0, 1),
'nl-nl' => array(0, 1),
'pl-pl' => array(0, 1),
'pt-br' => array(0, 2),
'pt-pt' => array(0, 1, 2),
'ro-ro' => array(0, 1),
'ru-ru' => array(0, 2, 4),
'sk-sk' => array(0, 1),
'sl-si' => array(0, 1),
'sv-se' => array(0, 1),
'th-th' => array(0, 2, 4),
'tr-tr' => array(0, 2),
'uk-ua' => array(0, 2, 4),
'zh-cn' => array(0, 2, 3),
'zh-tw' => array(0, 7),
);
$editionPacks = array(
'CLOUD' => 0,
'CLOUDN' => 1,
'CORE' => 0,
'CORECOUNTRYSPECIFIC' => 3,
'COREN' => 1,
'CORESINGLELANGUAGE' => 2,
'EDUCATION' => 0,
'EDUCATIONN' => 1,
'ENTERPRISE' => 0,
'ENTERPRISEN' => 1,
'PROFESSIONAL' => 0,
'PROFESSIONALN' => 1,
);
$fancyEditionNames = array(
'CLOUD' => 'Windows 10 S',
'CLOUDN' => 'Windows 10 S N',
'CORE' => 'Windows 10 Home',
'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China',
'COREN' => 'Windows 10 Home N',
'CORESINGLELANGUAGE' => 'Windows 10 Home Single Language',
'EDUCATION' => 'Windows 10 Education',
'EDUCATIONN' => 'Windows 10 Education N',
'ENTERPRISE' => 'Windows 10 Enterprise',
'ENTERPRISEN' => 'Windows 10 Enterprise N',
'PROFESSIONAL' => 'Windows 10 Pro',
'PROFESSIONALN' => 'Windows 10 Pro N',
);
$fancyLangNames = array(
'ar-sa' => 'Arabic (Saudi Arabia)',
'bg-bg' => 'Bulgarian',
'cs-cz' => 'Czech',
'da-dk' => 'Danish',
'de-de' => 'German',
'el-gr' => 'Greek',
'en-gb' => 'English (United Kingdom)',
'en-us' => 'English (United States)',
'es-es' => 'Spanish (Spain)',
'es-mx' => 'Spanish (Mexico)',
'et-ee' => 'Estonian',
'fi-fi' => 'Finnish',
'fr-ca' => 'French (Canada)',
'fr-fr' => 'French (France)',
'he-il' => 'Hebrew',
'hr-hr' => 'Croatian',
'hu-hu' => 'Hungarian',
'it-it' => 'Italian',
'ja-jp' => 'Japanese',
'ko-kr' => 'Korean',
'lt-lt' => 'Lithuanian',
'lv-lv' => 'Latvian',
'nb-no' => 'Norwegian (Bokmal)',
'nl-nl' => 'Dutch',
'pl-pl' => 'Polish',
'pt-br' => 'Portuguese (Brazil)',
'pt-pt' => 'Portuguese (Portugal)',
'ro-ro' => 'Romanian',
'ru-ru' => 'Russian',
'sk-sk' => 'Slovak',
'sl-si' => 'Slovenian',
'sv-se' => 'Swedish',
'th-th' => 'Thai',
'tr-tr' => 'Turkish',
'uk-ua' => 'Ukrainian',
'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',
);
?> ?>

186
shared/packs/17063.php Normal file
View File

@ -0,0 +1,186 @@
<?php
/*
Copyright 2017 UUP dump API authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
$packs = array(
// Base pack
0 => array(
'editionNeutral' => array(
'Microsoft-Windows-Foundation-Package',
'Microsoft-Windows-Client-Features-Package',
'Microsoft-Windows-Client-Features-WOW64-Package',
'Microsoft-Windows-Client-Features-arm64arm-Package',
'Microsoft-Windows-WowPack-CoreARM-arm64arm-Package',
'Microsoft-Windows-ContactSupport-Package',
'Microsoft-Windows-RegulatedPackages-Package',
'Microsoft-Windows-RegulatedPackages-WOW64-Package',
'Microsoft-Windows-RegulatedPackages-arm64arm-Package',
'Microsoft-Windows-Holographic-Desktop-Merged-Package',
'Microsoft-Windows-Holographic-Desktop-Merged-WOW64-Package',
'Microsoft-Windows-Holographic-Desktop-Analog-Package',
'Microsoft-Windows-QuickAssist-Package',
'Microsoft-Windows-InternetExplorer-Optional-Package',
'Microsoft-Windows-MediaPlayer-Package',
'Microsoft-Windows-Hello-Face-Resource-.-Package',
'Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package',
'Windows10\.0-KB',
),
'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',
),
'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
1 => array(
'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',
),
'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',
),
),
// China specific editions
2 => array(
'CORECOUNTRYSPECIFIC' => array(
'Microsoft-Windows-EditionPack-Core-Package',
'Microsoft-Windows-EditionPack-Core-WOW64-Package',
'Microsoft-Windows-EditionPack-Core-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-WOW64-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
),
),
// Additional packages for some languages
3 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Basic-en-us-Package',
'Microsoft-Windows-LanguageFeatures-OCR-en-us-Package',
),
),
// Additional packages for ar-sa language
4 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-TextToSpeech-ar-eg-Package',
),
),
// Additional packages for fr-ca language
5 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Basic-fr-fr-Package',
'Microsoft-Windows-LanguageFeatures-Handwriting-fr-fr-Package',
),
),
// Additional packages for zh-tw language
6 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Speech-zh-hk-Package',
'Microsoft-Windows-LanguageFeatures-TextToSpeech-zh-hk-Package',
),
),
);
$packsForLangs = array(
'ar-sa' => array(0, 3, 4),
'bg-bg' => array(0, 1, 3),
'cs-cz' => array(0, 1),
'da-dk' => array(0, 1, 3),
'de-de' => array(0, 1),
'el-gr' => array(0, 1, 3),
'en-gb' => array(0, 1),
'en-us' => array(0, 1),
'es-es' => array(0, 1),
'es-mx' => array(0),
'et-ee' => array(0, 1),
'fi-fi' => array(0, 1),
'fr-ca' => array(0, 3, 5),
'fr-fr' => array(0, 1),
'he-il' => array(0, 3),
'hr-hr' => array(0, 1),
'hu-hu' => array(0, 1),
'it-it' => array(0, 1),
'ja-jp' => array(0),
'ko-kr' => array(0, 1),
'lt-lt' => array(0, 1),
'lv-lv' => array(0, 1),
'nb-no' => array(0, 1),
'nl-nl' => array(0, 1),
'pl-pl' => array(0, 1),
'pt-br' => array(0),
'pt-pt' => array(0, 1),
'ro-ro' => array(0, 1),
'ru-ru' => array(0, 3),
'sk-sk' => array(0, 1),
'sl-si' => array(0, 1),
'sr-latn-rs' => array(0),
'sv-se' => array(0, 1),
'th-th' => array(0, 3),
'tr-tr' => array(0),
'uk-ua' => array(0, 3),
'zh-cn' => array(0, 2),
'zh-tw' => array(0, 6),
);
$editionPacks = array(
'CORE' => 0,
'CORECOUNTRYSPECIFIC' => 2,
'COREN' => 1,
'PROFESSIONAL' => 0,
'PROFESSIONALN' => 1,
);
$fancyEditionNames = array(
'CORE' => 'Windows 10 Home / Home Single Language',
'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China',
'COREN' => 'Windows 10 Home N',
'PROFESSIONAL' => 'Windows 10 Pro / Enterprise / Education / S',
'PROFESSIONALN' => 'Windows 10 Pro N / Enterprise N / Education N / S N',
);
?>

270
shared/packs/legacy.php Normal file
View File

@ -0,0 +1,270 @@
<?php
/*
Copyright 2017 UUP dump API authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
$packs = array(
// Base pack
0 => array(
'editionNeutral' => array(
'Microsoft-Windows-Foundation-Package',
'Microsoft-Windows-Client-Features-Package',
'Microsoft-Windows-Client-Features-WOW64-Package',
'Microsoft-Windows-Client-Features-arm64arm-Package',
'Microsoft-Windows-WowPack-CoreARM-arm64arm-Package',
'Microsoft-Windows-ContactSupport-Package',
'Microsoft-Windows-RegulatedPackages-Package',
'Microsoft-Windows-RegulatedPackages-WOW64-Package',
'Microsoft-Windows-RegulatedPackages-arm64arm-Package',
'Microsoft-Windows-Holographic-Desktop-Merged-Package',
'Microsoft-Windows-Holographic-Desktop-Merged-WOW64-Package',
'Microsoft-Windows-Holographic-Desktop-Analog-Package',
'Microsoft-Windows-QuickAssist-Package',
'Microsoft-Windows-InternetExplorer-Optional-Package',
'Microsoft-Windows-MediaPlayer-Package',
'Microsoft-Windows-Hello-Face-Resource-.-Package',
'Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package',
'Windows10\.0-KB',
),
'CLOUD' => array(
'Microsoft-Windows-EditionPack-Professional-Package',
'Microsoft-Windows-EditionPack-Professional-WOW64-Package',
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-Cloud-Package',
'Microsoft-Windows-EditionSpecific-Cloud-WOW64-Package',
'Microsoft-Windows-EditionSpecific-Cloud-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.cloud',
),
'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',
),
'EDUCATION' => array(
'Microsoft-Windows-EditionPack-Enterprise-Package',
'Microsoft-Windows-EditionPack-Enterprise-WOW64-Package',
'Microsoft-Windows-EditionPack-Enterprise-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-Education-Package',
'Microsoft-Windows-EditionSpecific-Education-WOW64-Package',
'Microsoft-Windows-EditionSpecific-Education-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.education',
),
'ENTERPRISE' => 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\.enterprise\.',
),
'PROFESSIONAL' => array(
'Microsoft-Windows-EditionPack-Professional-Package',
'Microsoft-Windows-EditionPack-Professional-WOW64-Package',
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-Professional-Package',
'Microsoft-Windows-EditionSpecific-Professional-WOW64-Package',
'Microsoft-Windows-EditionSpecific-Professional-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.professional',
),
),
// European "N" Editions
1 => array(
'CLOUDN' => array(
'Microsoft-Windows-EditionPack-Professional-Package',
'Microsoft-Windows-EditionPack-Professional-WOW64-Package',
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-CloudN-Package',
'Microsoft-Windows-EditionSpecific-CloudN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-CloudN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
),
'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',
),
'EDUCATIONN' => array(
'Microsoft-Windows-EditionPack-Enterprise-Package',
'Microsoft-Windows-EditionPack-Enterprise-WOW64-Package',
'Microsoft-Windows-EditionPack-Enterprise-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-EducationN-Package',
'Microsoft-Windows-EditionSpecific-EducationN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-EducationN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
),
'ENTERPRISEN' => 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',
),
'PROFESSIONALN' => array(
'Microsoft-Windows-EditionPack-Professional-Package',
'Microsoft-Windows-EditionPack-Professional-WOW64-Package',
'Microsoft-Windows-EditionPack-Professional-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-ProfessionalN-Package',
'Microsoft-Windows-EditionSpecific-ProfessionalN-WOW64-Package',
'Microsoft-Windows-EditionSpecific-ProfessionalN-arm64arm-Package',
'Microsoft\.ModernApps\.ClientN\.All',
),
),
// CoreSingleLanguage
2 => array(
'CORESINGLELANGUAGE' => array(
'Microsoft-Windows-EditionPack-Core-Package',
'Microsoft-Windows-EditionPack-Core-WOW64-Package',
'Microsoft-Windows-EditionPack-Core-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-CoreSingleLanguage-Package',
'Microsoft-Windows-EditionSpecific-CoreSingleLanguage-WOW64-Package',
'Microsoft-Windows-EditionSpecific-CoreSingleLanguage-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
'Microsoft\.ModernApps\.Client\.coresinglelanguage',
),
),
// China specific editions
3 => array(
'CORECOUNTRYSPECIFIC' => array(
'Microsoft-Windows-EditionPack-Core-Package',
'Microsoft-Windows-EditionPack-Core-WOW64-Package',
'Microsoft-Windows-EditionPack-Core-arm64arm-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-WOW64-Package',
'Microsoft-Windows-EditionSpecific-CoreCountrySpecific-arm64arm-Package',
'Microsoft\.ModernApps\.Client\.All',
),
),
// Additional packages for some languages
4 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Basic-en-us-Package',
'Microsoft-Windows-LanguageFeatures-OCR-en-us-Package',
),
),
// Additional packages for ar-sa language
5 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-TextToSpeech-ar-eg-Package',
),
),
// Additional packages for fr-ca language
6 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Basic-fr-fr-Package',
'Microsoft-Windows-LanguageFeatures-Handwriting-fr-fr-Package',
),
),
// Additional packages for zh-tw language
7 => array(
'editionNeutral' => array(
'Microsoft-Windows-LanguageFeatures-Speech-zh-hk-Package',
'Microsoft-Windows-LanguageFeatures-TextToSpeech-zh-hk-Package',
),
),
);
$packsForLangs = array(
'ar-sa' => array(0, 2, 4, 5),
'bg-bg' => array(0, 1, 4),
'cs-cz' => array(0, 1),
'da-dk' => array(0, 1, 4),
'de-de' => array(0, 1),
'el-gr' => array(0, 1, 4),
'en-gb' => array(0, 1, 2),
'en-us' => array(0, 1, 2),
'es-es' => array(0, 1, 2),
'es-mx' => array(0, 2),
'et-ee' => array(0, 1),
'fi-fi' => array(0, 1),
'fr-ca' => array(0, 4, 6),
'fr-fr' => array(0, 1, 2),
'he-il' => array(0, 4),
'hr-hr' => array(0, 1),
'hu-hu' => array(0, 1),
'it-it' => array(0, 1),
'ja-jp' => array(0),
'ko-kr' => array(0, 1),
'lt-lt' => array(0, 1),
'lv-lv' => array(0, 1),
'nb-no' => array(0, 1),
'nl-nl' => array(0, 1),
'pl-pl' => array(0, 1),
'pt-br' => array(0, 2),
'pt-pt' => array(0, 1, 2),
'ro-ro' => array(0, 1),
'ru-ru' => array(0, 2, 4),
'sk-sk' => array(0, 1),
'sl-si' => array(0, 1),
'sv-se' => array(0, 1),
'th-th' => array(0, 2, 4),
'tr-tr' => array(0, 2),
'uk-ua' => array(0, 2, 4),
'zh-cn' => array(0, 2, 3),
'zh-tw' => array(0, 7),
);
$editionPacks = array(
'CLOUD' => 0,
'CLOUDN' => 1,
'CORE' => 0,
'CORECOUNTRYSPECIFIC' => 3,
'COREN' => 1,
'CORESINGLELANGUAGE' => 2,
'EDUCATION' => 0,
'EDUCATIONN' => 1,
'ENTERPRISE' => 0,
'ENTERPRISEN' => 1,
'PROFESSIONAL' => 0,
'PROFESSIONALN' => 1,
);
$fancyEditionNames = array(
'CLOUD' => 'Windows 10 S',
'CLOUDN' => 'Windows 10 S N',
'CORE' => 'Windows 10 Home',
'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China',
'COREN' => 'Windows 10 Home N',
'CORESINGLELANGUAGE' => 'Windows 10 Home Single Language',
'EDUCATION' => 'Windows 10 Education',
'EDUCATIONN' => 'Windows 10 Education N',
'ENTERPRISE' => 'Windows 10 Enterprise',
'ENTERPRISEN' => 'Windows 10 Enterprise N',
'PROFESSIONAL' => 'Windows 10 Pro',
'PROFESSIONALN' => 'Windows 10 Pro N',
);
?>