diff --git a/shared/genpack.php b/shared/genpack.php index b5ec56c..518e3db 100644 --- a/shared/genpack.php +++ b/shared/genpack.php @@ -76,10 +76,10 @@ function generatePack($updateId) { $files = preg_grep('/Path = /', $out); $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) { - $dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $dataFiles, PREG_GREP_INVERT); - $dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $files); + $dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|TargetCompDB_WNC_.*_App_.*/i', $dataFiles, PREG_GREP_INVERT); + $dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|TargetCompDB_WNC_.*_App_.*/i', $files); } unset($out); @@ -100,7 +100,7 @@ function generatePack($updateId) { 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); $temp = preg_replace('/^- /', '', $temp[0]); @@ -122,7 +122,7 @@ function generatePack($updateId) { 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); $temp = preg_replace('/^- /', '', $temp[0]); @@ -137,10 +137,10 @@ function generatePack($updateId) { unlink($loc); unset($loc, $checkFile, $checkEd, $dataFiles, $dataApps); } else { - $dataFiles = preg_grep('/DesktopTargetCompDB_.*_.*\.|ServerTargetCompDB_.*_.*\.|ModernPCTargetCompDB\.|HolographicTargetCompDB\./i', $filesKeys); + $dataFiles = preg_grep('/DesktopTargetCompDB_.*_.*\.|ServerTargetCompDB_.*_.*\.|TargetCompDB_WNC_.*_.*_.*\.|ModernPCTargetCompDB\.|HolographicTargetCompDB\./i', $filesKeys); if($ibld > 22557) { - $dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $dataFiles, PREG_GREP_INVERT); - $dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\./i', $filesKeys); + $dataFiles = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|TargetCompDB_WNC_.*_App_.*/i', $dataFiles, PREG_GREP_INVERT); + $dataApps = preg_grep('/DesktopTargetCompDB_App_.*\.|ServerTargetCompDB_App_.*\.|TargetCompDB_WNC_.*_App_.*/i', $filesKeys); } foreach($dataFiles as $val) { @@ -165,7 +165,7 @@ function generatePack($updateId) { 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); $temp = preg_replace('/^- /', '', $temp[0]); @@ -199,7 +199,7 @@ function generatePack($updateId) { 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); $temp = preg_replace('/^- /', '', $temp[0]); @@ -222,8 +222,8 @@ function generatePack($updateId) { $file = $tmp.'/'.$val; $xml = simplexml_load_file($file); - $lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_/', '', $filNam); - $edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|_'.$lang.'/', '', $filNam); + $lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_|.*TargetCompDB_WNC_.*_.*_/', '', $filNam); + $edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|.*TargetCompDB_WNC_(.*?)_|_'.$lang.'/', '', $filNam); if($isku == 189) { $lang = 'en-us'; $edition = 'Lite'; @@ -285,8 +285,8 @@ function generatePack($updateId) { $file = $tmp.'/'.$val; $xml = simplexml_load_file($file); - $lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_/', '', $filNam); - $edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|_'.$lang.'/', '', $filNam); + $lang = preg_replace('/.*DesktopTargetCompDB_.*_|.*ServerTargetCompDB_.*_|.*TargetCompDB_WNC_.*_.*_/', '', $filNam); + $edition = preg_replace('/.*DesktopTargetCompDB_|.*ServerTargetCompDB_|.*TargetCompDB_WNC_(.*?)_|_'.$lang.'/', '', $filNam); $lang = strtolower($lang); $edition = strtoupper($edition); diff --git a/shared/main.php b/shared/main.php index 55fb46c..1838129 100644 --- a/shared/main.php +++ b/shared/main.php @@ -2,7 +2,7 @@ require_once dirname(__FILE__).'/../api/shared/main.php'; function brand($script = null) { - $projVersion = '1.2.1'; + $projVersion = '1.2.2'; return 'UUP dump standalone v'.$projVersion; }