From 0665adf5f640d34dc9997c4d728735c900708711 Mon Sep 17 00:00:00 2001 From: abbodi1406 Date: Wed, 1 Dec 2021 02:35:43 +0300 Subject: [PATCH] Include W11 LCU MSU reqs --- get.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/get.php b/get.php index e19693c..dc37b40 100644 --- a/get.php +++ b/get.php @@ -174,7 +174,7 @@ function uupGetFiles( $psf = preg_grep('/\.psf$/i', $psf); $psfk = preg_grep('/Windows10\.0-KB.*/i', $psf); - $psfk = preg_grep('/.*-EXPRESS|.*-baseless/i', $psfk, PREG_GREP_INVERT); + $psfk = preg_grep('/.*-EXPRESS/i', $psfk, PREG_GREP_INVERT); if($build > 21380) foreach($psfk as $key => $val) { if(isset($psf[$key])) unset($psf[$key]); } @@ -208,7 +208,7 @@ function uupGetFiles( switch($fileListSource) { case 'UPDATEONLY': $skipPackBuild = 1; - $removeFiles = preg_grep('/Windows10\.0-KB.*-EXPRESS|Windows10\.0-KB.*-baseless|SSU-\d*?\.\d*?-.{3,5}-EXPRESS/i', $filesInfoKeys); + $removeFiles = preg_grep('/Windows10\.0-KB.*-EXPRESS|Windows10\.0-KB.*-baseless|SSU-.*-.{3,5}-EXPRESS/i', $filesInfoKeys); foreach($removeFiles as $val) { if(isset($filesInfoList[$val])) unset($filesInfoList[$val]); @@ -216,11 +216,15 @@ function uupGetFiles( unset($removeFiles); $filesInfoKeys = array_keys($filesInfoList); + $temp = preg_grep('/.*?AggregatedMetadata.*?\.cab|.*?DesktopDeployment.*?\.cab/i', $filesInfoKeys); - $filesInfoKeys = preg_grep('/Windows10\.0-KB|SSU-\d*?\.\d*?-.*?\.cab/i', $filesInfoKeys); + $filesInfoKeys = preg_grep('/Windows10\.0-KB|SSU-.*?\.cab/i', $filesInfoKeys); if(count($filesInfoKeys) == 0) { return array('error' => 'NOT_CUMULATIVE_UPDATE'); } + + if($build > 21380) $filesInfoKeys = array_merge($filesInfoKeys, $temp); + unset($temp); break; case 'WUBFILE': @@ -234,8 +238,12 @@ function uupGetFiles( if($updateSku == 135) $uupCleanFunc = 'uupCleanHolo'; if($fileListSource == 'GENERATEDPACKS') { - $temp = preg_grep('/Windows10\.0-KB.*-EXPRESS|Windows10\.0-KB.*-baseless|SSU-\d*?\.\d*?-.{3,5}-EXPRESS/i', $filesInfoKeys, PREG_GREP_INVERT); - $temp = preg_grep('/Windows10\.0-KB|SSU-\d*?\.\d*?-.*?\.cab/i', $temp); + $temp = preg_grep('/Windows10\.0-KB.*-EXPRESS|Windows10\.0-KB.*-baseless|SSU-.*-.{3,5}-EXPRESS/i', $filesInfoKeys, PREG_GREP_INVERT); + if($build > 21380) { + $temp = preg_grep('/Windows10\.0-KB|SSU-.*?\.cab|.*?AggregatedMetadata.*?\.cab|.*?DesktopDeployment.*?\.cab/i', $temp); + } else { + $temp = preg_grep('/Windows10\.0-KB|SSU-.*?\.cab/i', $temp); + } $filesPacksList = array_merge($filesPacksList, $temp); $newFiles = array(); @@ -255,7 +263,7 @@ function uupGetFiles( $newFiles[$name] = $filesInfoList[$name]; } else { $failedFile = true; - consoleLogger("Missing file: $val"); + consoleLogger("Missing file: $val"); } } } else { @@ -267,7 +275,7 @@ function uupGetFiles( $newFiles[$name] = $filesInfoList[$name]; } else { $failedFile = true; - consoleLogger("Missing file: $name"); + consoleLogger("Missing file: $name"); } } }