APP_MOMENT support

This commit is contained in:
abbodi1406 2023-10-18 13:59:54 +03:00
parent 4b9784640c
commit fd0b4ee514
3 changed files with 23 additions and 5 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "api"] [submodule "api"]
path = api path = api
url = https://github.com/uup-dump-dev/api.git url = https://github.com/uup-dump/api.git

View File

@ -34,6 +34,11 @@ function generatePack($updateId) {
return 0; return 0;
} }
$updateTitle = $files['updateName'];
if(preg_match('/Corpnet Required/i', $updateTitle)) {
return 2;
}
$isku = $files['sku']; $isku = $files['sku'];
$ibld = $files['build']; $ibld = $files['build'];
$files = $files['files']; $files = $files['files'];
@ -75,7 +80,7 @@ function generatePack($updateId) {
if($ibld > 22557) { if($ibld > 22557) {
$dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $dataFiles, PREG_GREP_INVERT); $dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $dataFiles, PREG_GREP_INVERT);
$dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $files); $dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $files);
} }
unset($out); unset($out);
exec("$z7z x -o\"$tmp\" \"$loc\" -y", $out, $errCode); exec("$z7z x -o\"$tmp\" \"$loc\" -y", $out, $errCode);
@ -136,7 +141,7 @@ function generatePack($updateId) {
if($ibld > 22557) { if($ibld > 22557) {
$dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $dataFiles, PREG_GREP_INVERT); $dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $dataFiles, PREG_GREP_INVERT);
$dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $filesKeys); $dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $filesKeys);
} }
foreach($dataFiles as $val) { foreach($dataFiles as $val) {
if(!$files[$val]['sha256']) { if(!$files[$val]['sha256']) {
@ -258,6 +263,19 @@ function generatePack($updateId) {
unset($file, $xml, $name, $newName, $lang, $edition); unset($file, $xml, $name, $newName, $lang, $edition);
} }
if(isset($appsToRead) && $ibld > 22620) foreach($appsToRead as $val) {
$file = $tmp.'/'.$val;
$xml = simplexml_load_file($file);
foreach($xml->Features->Feature as $ftr) {
if(@count($ftr->Dependencies)) foreach($ftr->Dependencies->Feature as $dep) {
if(isset($dep['Group']) && ($dep['Group'] == 'PreinstalledApps')) $optAppx[] = strtolower($dep['FeatureID']);
}
}
unset($file, $xml);
}
$appxOpt = array_flip($optAppx); $appxOpt = array_flip($optAppx);
$paks = array(); $paks = array();
if(isset($appsToRead)) foreach($appsToRead as $val) { if(isset($appsToRead)) foreach($appsToRead as $val) {
@ -286,7 +304,7 @@ function generatePack($updateId) {
$packages[$lang][$edition][] = $paks[$chk][0]; $packages[$lang][$edition][] = $paks[$chk][0];
} }
continue; continue;
} }
if(!isset($appxOpt[strtolower($ftr['FeatureID'])])) continue; if(!isset($appxOpt[strtolower($ftr['FeatureID'])])) continue;
foreach($ftr->Packages->Package as $pkg) { foreach($ftr->Packages->Package as $pkg) {
$chk = (string)$pkg['ID']; $chk = (string)$pkg['ID'];

View File

@ -2,7 +2,7 @@
require_once dirname(__FILE__).'/../api/shared/main.php'; require_once dirname(__FILE__).'/../api/shared/main.php';
function brand($script = null) { function brand($script = null) {
$projVersion = '1.1.2'; $projVersion = '1.1.3';
return 'UUP dump standalone v'.$projVersion; return 'UUP dump standalone v'.$projVersion;
} }