Change fetchupd update information output, fix some minor bugs

This commit is contained in:
mkuba50 2018-03-17 17:29:59 +01:00
parent 48cd2c20f2
commit 9b861d4492
6 changed files with 28 additions and 19 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* /*
Copyright 2017 UUP dump API authors Copyright 2018 UUP dump API authors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -64,7 +64,7 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build
$out = sendWuPostRequest('https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx', $postData); $out = sendWuPostRequest('https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx', $postData);
$out = html_entity_decode($out); $out = html_entity_decode($out);
consoleLogger('Information was successfully fetched.'); consoleLogger('Information has been successfully fetched.');
consoleLogger('Checking build information...'); consoleLogger('Checking build information...');
preg_match_all('/<UpdateInfo>.*?<\/UpdateInfo>/', $out, $updateInfos); preg_match_all('/<UpdateInfo>.*?<\/UpdateInfo>/', $out, $updateInfos);
@ -128,13 +128,19 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build
$updateRev = preg_replace('/RevisionNumber="|"$/', '', $updateRev[0]); $updateRev = preg_replace('/RevisionNumber="|"$/', '', $updateRev[0]);
consoleLogger('Successfully checked build information.'); consoleLogger('Successfully checked build information.');
consoleLogger('BUILD: '.$updateTitle.' '.$arch);
$updateString = $updateId; $updateString = $updateId;
if($updateRev != 1) { if($updateRev != 1) {
$updateString = $updateId.'_rev.'.$updateRev; $updateString = $updateId.'_rev.'.$updateRev;
} }
consoleLogger("--- UPDATE INFORMATION ---");
consoleLogger("Title: ".$updateTitle);
consoleLogger("Architecture: ".$arch);
consoleLogger("Build number: ".$foundBuild);
consoleLogger("Update ID: ".$updateString);
consoleLogger("--- UPDATE INFORMATION ---");
$fileWrite = 'NO_SAVE'; $fileWrite = 'NO_SAVE';
if(!file_exists('fileinfo/'.$updateString.'.json')) { if(!file_exists('fileinfo/'.$updateString.'.json')) {
consoleLogger('WARNING: This build is NOT in the database. It will be saved now.'); consoleLogger('WARNING: This build is NOT in the database. It will be saved now.');

View File

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

View File

@ -59,6 +59,7 @@ function uupGetPacks($build = 15063) {
$allEditions = array( $allEditions = array(
'ANALOGONECORE', 'ANALOGONECORE',
'ANDROMEDA',
'CLOUD', 'CLOUD',
'CLOUDN', 'CLOUDN',
'CORE', 'CORE',
@ -84,6 +85,7 @@ function uupGetPacks($build = 15063) {
'ENTERPRISESNEVAL', 'ENTERPRISESNEVAL',
'IOTUAP', 'IOTUAP',
'MOBILECORE', 'MOBILECORE',
'ONECOREUPDATEOS',
'PPIPRO', 'PPIPRO',
'PROFESSIONAL', 'PROFESSIONAL',
'PROFESSIONALCOUNTRYSPECIFIC', 'PROFESSIONALCOUNTRYSPECIFIC',
@ -146,12 +148,12 @@ function uupGetPacks($build = 15063) {
if($build < 17063) { if($build < 17063) {
require dirname(__FILE__).'/packs/legacy.php'; require dirname(__FILE__).'/packs/legacy.php';
} elseif ($build >= 17063 && $build < 17093) {
require dirname(__FILE__).'/packs/17063.php';
} elseif ($build >= 17093 && $build < 17623) {
require dirname(__FILE__).'/packs/17093.php';
} elseif ($build >= 17623) { } elseif ($build >= 17623) {
require dirname(__FILE__).'/packs/17623.php'; require dirname(__FILE__).'/packs/17623.php';
} elseif ($build >= 17093) {
require dirname(__FILE__).'/packs/17093.php';
} elseif ($build >= 17063) {
require dirname(__FILE__).'/packs/17063.php';
} }
return array( return array(

View File

@ -1,6 +1,6 @@
<?php <?php
/* /*
Copyright 2017 UUP dump API authors Copyright 2018 UUP dump API authors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -177,10 +177,10 @@ $editionPacks = array(
); );
$fancyEditionNames = array( $fancyEditionNames = array(
'CORE' => 'Windows 10 Home / Home Single Language', 'CORE' => 'Windows 10 Home',
'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China', 'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China',
'COREN' => 'Windows 10 Home N', 'COREN' => 'Windows 10 Home N',
'PROFESSIONAL' => 'Windows 10 Pro / Enterprise / Education / S', 'PROFESSIONAL' => 'Windows 10 Pro',
'PROFESSIONALN' => 'Windows 10 Pro N / Enterprise N / Education N / S N', 'PROFESSIONALN' => 'Windows 10 Pro N',
); );
?> ?>

View File

@ -1,6 +1,6 @@
<?php <?php
/* /*
Copyright 2017 UUP dump API authors Copyright 2018 UUP dump API authors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -178,10 +178,10 @@ $editionPacks = array(
); );
$fancyEditionNames = array( $fancyEditionNames = array(
'CORE' => 'Windows 10 Home / Home Single Language', 'CORE' => 'Windows 10 Home',
'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China', 'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China',
'COREN' => 'Windows 10 Home N', 'COREN' => 'Windows 10 Home N',
'PROFESSIONAL' => 'Windows 10 Pro / Enterprise / Education', 'PROFESSIONAL' => 'Windows 10 Pro',
'PROFESSIONALN' => 'Windows 10 Pro N / Enterprise N / Education N', 'PROFESSIONALN' => 'Windows 10 Pro N',
); );
?> ?>

View File

@ -27,6 +27,7 @@ $packs = array(
'Microsoft-Windows-ContactSupport-Package', 'Microsoft-Windows-ContactSupport-Package',
'Microsoft-Windows-Not-Supported-On-LTSB-Package', 'Microsoft-Windows-Not-Supported-On-LTSB-Package',
'Microsoft-Windows-Not-Supported-On-LTSB-WOW64-Package', 'Microsoft-Windows-Not-Supported-On-LTSB-WOW64-Package',
'Microsoft-Windows-Not-Supported-On-LTSB-arm64arm-Package',
'Microsoft-Windows-RegulatedPackages-Package', 'Microsoft-Windows-RegulatedPackages-Package',
'Microsoft-Windows-RegulatedPackages-WOW64-Package', 'Microsoft-Windows-RegulatedPackages-WOW64-Package',
'Microsoft-Windows-RegulatedPackages-arm64arm-Package', 'Microsoft-Windows-RegulatedPackages-arm64arm-Package',
@ -181,10 +182,10 @@ $editionPacks = array(
); );
$fancyEditionNames = array( $fancyEditionNames = array(
'CORE' => 'Windows 10 Home / Home Single Language', 'CORE' => 'Windows 10 Home',
'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China', 'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China',
'COREN' => 'Windows 10 Home N', 'COREN' => 'Windows 10 Home N',
'PROFESSIONAL' => 'Windows 10 Pro / Enterprise / Education', 'PROFESSIONAL' => 'Windows 10 Pro',
'PROFESSIONALN' => 'Windows 10 Pro N / Enterprise N / Education N', 'PROFESSIONALN' => 'Windows 10 Pro N',
); );
?> ?>