forked from uup-dump/standalone
WNC stuff
This commit is contained in:
parent
3b95bf3edc
commit
70c73a9ff2
@ -76,10 +76,10 @@ function generatePack($updateId) {
|
|||||||
|
|
||||||
$files = preg_grep('/Path = /', $out);
|
$files = preg_grep('/Path = /', $out);
|
||||||
$files = preg_replace('/Path = /', '', $files);
|
$files = preg_replace('/Path = /', '', $files);
|
||||||
$dataFiles = preg_grep('/DesktopTargetCompDB_.*_.*\.|ServerTargetCompDB_.*_.*\.|ModernPCTargetCompDB_.*\.|HolographicTargetCompDB_.*\./i', $files);
|
$dataFiles = preg_grep('/DesktopTargetCompDB_.*_.*\.|ServerTargetCompDB_.*_.*\.|TargetCompDB_WNC_.*_.*_.*\.|ModernPCTargetCompDB_.*\.|HolographicTargetCompDB_.*\./i', $files);
|
||||||
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_.*\.|TargetCompDB_WNC_.*_App_.*/i', $dataFiles, PREG_GREP_INVERT);
|
||||||
$dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $files);
|
$dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|TargetCompDB_WNC_.*_App_.*/i', $files);
|
||||||
}
|
}
|
||||||
unset($out);
|
unset($out);
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ function generatePack($updateId) {
|
|||||||
throwError('7ZIP_ERROR');
|
throwError('7ZIP_ERROR');
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = preg_grep('/^-.*DesktopTargetCompDB_.*_.*\.|^-.*ServerTargetCompDB_.*_.*\.|^-.*ModernPCTargetCompDB_.*\.|^-.*HolographicTargetCompDB_.*\./i', $out);
|
$temp = preg_grep('/^-.*DesktopTargetCompDB_.*_.*\.|^-.*ServerTargetCompDB_.*_.*\.|^-.*TargetCompDB_WNC_.*_.*_.*\.|^-.*ModernPCTargetCompDB_.*\.|^-.*HolographicTargetCompDB_.*\./i', $out);
|
||||||
sort($temp);
|
sort($temp);
|
||||||
$temp = preg_replace('/^- /', '', $temp[0]);
|
$temp = preg_replace('/^- /', '', $temp[0]);
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ function generatePack($updateId) {
|
|||||||
throwError('7ZIP_ERROR');
|
throwError('7ZIP_ERROR');
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = preg_grep('/^-.*DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $out);
|
$temp = preg_grep('/^-.*DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|^-.*TargetCompDB_WNC_.*_App_.*/i', $out);
|
||||||
sort($temp);
|
sort($temp);
|
||||||
$temp = preg_replace('/^- /', '', $temp[0]);
|
$temp = preg_replace('/^- /', '', $temp[0]);
|
||||||
|
|
||||||
@ -137,10 +137,10 @@ function generatePack($updateId) {
|
|||||||
unlink($loc);
|
unlink($loc);
|
||||||
unset($loc, $checkFile, $checkEd, $dataFiles, $dataApps);
|
unset($loc, $checkFile, $checkEd, $dataFiles, $dataApps);
|
||||||
} else {
|
} else {
|
||||||
$dataFiles = preg_grep('/DesktopTargetCompDB_.*_.*\.|ServerTargetCompDB_.*_.*\.|ModernPCTargetCompDB\.|HolographicTargetCompDB\./i', $filesKeys);
|
$dataFiles = preg_grep('/DesktopTargetCompDB_.*_.*\.|ServerTargetCompDB_.*_.*\.|TargetCompDB_WNC_.*_.*_.*\.|ModernPCTargetCompDB\.|HolographicTargetCompDB\./i', $filesKeys);
|
||||||
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_.*\.|TargetCompDB_WNC_.*_App_.*/i', $dataFiles, PREG_GREP_INVERT);
|
||||||
$dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $filesKeys);
|
$dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|TargetCompDB_WNC_.*_App_.*/i', $filesKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($dataFiles as $val) {
|
foreach($dataFiles as $val) {
|
||||||
@ -165,7 +165,7 @@ function generatePack($updateId) {
|
|||||||
throwError('7ZIP_ERROR');
|
throwError('7ZIP_ERROR');
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = preg_grep('/^-.*DesktopTargetCompDB_.*_.*\.|^-.*ServerTargetCompDB_.*_.*\.|^-.*ModernPCTargetCompDB\.|^-.*HolographicTargetCompDB\./i', $out);
|
$temp = preg_grep('/^-.*DesktopTargetCompDB_.*_.*\.|^-.*ServerTargetCompDB_.*_.*\.|^-.*TargetCompDB_WNC_.*_.*_.*\.|^-.*ModernPCTargetCompDB\.|^-.*HolographicTargetCompDB\./i', $out);
|
||||||
sort($temp);
|
sort($temp);
|
||||||
$temp = preg_replace('/^- /', '', $temp[0]);
|
$temp = preg_replace('/^- /', '', $temp[0]);
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ function generatePack($updateId) {
|
|||||||
throwError('7ZIP_ERROR');
|
throwError('7ZIP_ERROR');
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = preg_grep('/^-.*DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $out);
|
$temp = preg_grep('/^-.*DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|^-.*TargetCompDB_WNC_.*_App_.*/i', $out);
|
||||||
sort($temp);
|
sort($temp);
|
||||||
$temp = preg_replace('/^- /', '', $temp[0]);
|
$temp = preg_replace('/^- /', '', $temp[0]);
|
||||||
|
|
||||||
@ -222,8 +222,8 @@ function generatePack($updateId) {
|
|||||||
$file = $tmp.'/'.$val;
|
$file = $tmp.'/'.$val;
|
||||||
$xml = simplexml_load_file($file);
|
$xml = simplexml_load_file($file);
|
||||||
|
|
||||||
$lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_/', '', $filNam);
|
$lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_|.*TargetCompDB_WNC_.*_.*_/', '', $filNam);
|
||||||
$edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|_'.$lang.'/', '', $filNam);
|
$edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|.*TargetCompDB_WNC_(.*?)_|_'.$lang.'/', '', $filNam);
|
||||||
if($isku == 189) {
|
if($isku == 189) {
|
||||||
$lang = 'en-us';
|
$lang = 'en-us';
|
||||||
$edition = 'Lite';
|
$edition = 'Lite';
|
||||||
@ -285,8 +285,8 @@ function generatePack($updateId) {
|
|||||||
$file = $tmp.'/'.$val;
|
$file = $tmp.'/'.$val;
|
||||||
$xml = simplexml_load_file($file);
|
$xml = simplexml_load_file($file);
|
||||||
|
|
||||||
$lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_/', '', $filNam);
|
$lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_|.*TargetCompDB_WNC_.*_.*_/', '', $filNam);
|
||||||
$edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|_'.$lang.'/', '', $filNam);
|
$edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|.*TargetCompDB_WNC_(.*?)_|_'.$lang.'/', '', $filNam);
|
||||||
|
|
||||||
$lang = strtolower($lang);
|
$lang = strtolower($lang);
|
||||||
$edition = strtoupper($edition);
|
$edition = strtoupper($edition);
|
||||||
|
@ -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.2.1';
|
$projVersion = '1.2.2';
|
||||||
return 'UUP dump standalone v'.$projVersion;
|
return 'UUP dump standalone v'.$projVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user