Merge pull request #9 from abbodi1406/master

Add support for Windows Feature Experience Pack
This commit is contained in:
luzea 2021-01-26 23:03:04 +01:00 committed by GitHub
commit 2db4552cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 10 deletions

View File

@ -214,16 +214,19 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
} }
$isCumulativeUpdate = 0; $isCumulativeUpdate = 0;
if(preg_match('/\d{4}-\d{2}.+Update|Cumulative Update/i', $updateTitle)) { if(preg_match('/\d{4}-\d{2}.+Update|Cumulative Update|Microsoft Edge|Windows Feature Experience Pack/i', $updateTitle)) {
$isCumulativeUpdate = 1; $isCumulativeUpdate = 1;
$updateTitle = preg_replace('/ for .{3,5}-based systems| \(KB.*?\)/i', '', $updateTitle); $updateTitle = preg_replace('/ for .{3,5}-based systems| \(KB.*?\)/i', '', $updateTitle);
} }
$updateTitle = preg_replace("/ ?\d{4}-\d{2}\w* ?| ?$foundArch ?| ?x64 ?/i", '', $updateTitle); $updateTitle = preg_replace("/ ?\d{4}-\d{2}\D ?| ?$foundArch ?| ?x64 ?/i", '', $updateTitle);
if($foundType == 'server') if($foundType == 'server')
$updateTitle = str_replace('Windows 10', 'Windows Server', $updateTitle); $updateTitle = str_replace('Windows 10', 'Windows Server', $updateTitle);
if($foundType == 'sedimentpack')
$updateTitle = $updateTitle.' - KB4023057';
if(!preg_match("/$foundBuild/i", $updateTitle)) if(!preg_match("/$foundBuild/i", $updateTitle))
$updateTitle = $updateTitle.' ('.$foundBuild.')'; $updateTitle = $updateTitle.' ('.$foundBuild.')';
@ -292,13 +295,14 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
$shaArray = array(); $shaArray = array();
foreach($fileList[0] as $val) { foreach($fileList[0] as $val) {
preg_match('/FileName=".*?"/', $val, $name);
$name = preg_replace('/FileName="|"$/', '', $name[0]);
if(preg_match('/.*_Diffs_.*|.*_Forward_CompDB_.*|\.cbsu\.cab$/i', $name)) continue;
preg_match('/Digest=".*?"/', $val, $sha1); preg_match('/Digest=".*?"/', $val, $sha1);
$sha1 = preg_replace('/Digest="|"$/', '', $sha1[0]); $sha1 = preg_replace('/Digest="|"$/', '', $sha1[0]);
$sha1 = bin2hex(base64_decode($sha1)); $sha1 = bin2hex(base64_decode($sha1));
preg_match('/FileName=".*?"/', $val, $name);
$name = preg_replace('/FileName="|"$/', '', $name[0]);
preg_match('/Size=".*?"/', $val, $size); preg_match('/Size=".*?"/', $val, $size);
$size = preg_replace('/Size="|"$/', '', $size[0]); $size = preg_replace('/Size="|"$/', '', $size[0]);

View File

@ -152,7 +152,7 @@ function uupGetFiles(
if(isset($files[$val])) unset($files[$val]); if(isset($files[$val])) unset($files[$val]);
} }
$diffs = preg_grep('/.*_Diffs_.*/i', array_keys($files)); $diffs = preg_grep('/.*_Diffs_.*|.*_Forward_CompDB_.*|\.cbsu\.cab$/i', array_keys($files));
foreach($diffs as $val) { foreach($diffs as $val) {
if(isset($files[$val])) unset($files[$val]); if(isset($files[$val])) unset($files[$val]);
} }
@ -168,7 +168,7 @@ function uupGetFiles(
} }
unset($index, $name, $psf); unset($index, $name, $psf);
$temp = preg_grep('/'.$updateArch.'_.*|arm64.arm_.*/i', $removeFiles); $temp = preg_grep('/'.$updateArch.'_.*|arm64\.arm_.*|arm64\.x86_.*/i', $removeFiles);
foreach($temp as $key => $val) { foreach($temp as $key => $val) {
if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']); if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']);
unset($removeFiles[$key]); unset($removeFiles[$key]);

View File

@ -1,6 +1,6 @@
<?php <?php
/* /*
Copyright 2020 whatever127 Copyright 2021 whatever127
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.
@ -16,7 +16,7 @@ limitations under the License.
*/ */
function uupApiVersion() { function uupApiVersion() {
return '1.30.3'; return '1.30.4';
} }
require_once dirname(__FILE__).'/auths.php'; require_once dirname(__FILE__).'/auths.php';

View File

@ -180,6 +180,10 @@ function branchFromBuild($build) {
$branch = 'vb_release'; $branch = 'vb_release';
break; break;
case 19043: //19043 is a fake build based on 19041
$branch = 'vb_release';
break;
default: default:
$branch = 'rs_prerelease'; $branch = 'rs_prerelease';
break; break;
@ -287,7 +291,7 @@ function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build
$products[] = "PN=Windows.Appraiser.$currArch&Repairable=1&V=$build"; $products[] = "PN=Windows.Appraiser.$currArch&Repairable=1&V=$build";
$products[] = "PN=Windows.AppraiserData.$currArch&Repairable=1&V=$build"; $products[] = "PN=Windows.AppraiserData.$currArch&Repairable=1&V=$build";
$products[] = "PN=Windows.EmergencyUpdate.$currArch&Repairable=1&V=$build"; $products[] = "PN=Windows.EmergencyUpdate.$currArch&Repairable=1&V=$build";
$products[] = "PN=Windows.FeatureExperiencePack.$currArch&Repairable=1&V=$build"; $products[] = "PN=Windows.FeatureExperiencePack.$currArch&Repairable=1&V=0.0.0.0";
$products[] = "PN=Windows.ManagementOOBE.$currArch&IsWindowsManagementOOBE=1&Repairable=1&V=$build"; $products[] = "PN=Windows.ManagementOOBE.$currArch&IsWindowsManagementOOBE=1&Repairable=1&V=$build";
$products[] = "PN=Windows.OOBE.$currArch&IsWindowsOOBE=1&Repairable=1&V=$build"; $products[] = "PN=Windows.OOBE.$currArch&IsWindowsOOBE=1&Repairable=1&V=$build";
$products[] = "PN=Windows.UpdateStackPackage.$currArch&Name=Update Stack Package&Repairable=1&V=$build"; $products[] = "PN=Windows.UpdateStackPackage.$currArch&Name=Update Stack Package&Repairable=1&V=$build";