From 0c4c7521f7ccf010a7a39d75e39b3f343dd7c2f2 Mon Sep 17 00:00:00 2001 From: sn-o-w Date: Tue, 24 Oct 2023 16:38:50 +0300 Subject: [PATCH] Download Microsoft component packages while using `--skip-download-wsa` (#698) Co-authored-by: Doddddd <88972478+Doddddd@users.noreply.github.com> --- scripts/build.sh | 2 ++ scripts/generateWSALinks.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) mode change 100755 => 100644 scripts/build.sh diff --git a/scripts/build.sh b/scripts/build.sh old mode 100755 new mode 100644 index 8c6ec08..ae080e6 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -509,6 +509,8 @@ if [ -z ${OFFLINE+x} ]; then # shellcheck disable=SC1090 source "$WSA_WORK_ENV" || abort else + echo "Generate Download Links" + python3 generateWSALinks.py "$ARCH" "$RELEASE_TYPE" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$DOWN_WSA" || abort WSA_MAJOR_VER=$(python3 getWSAMajorVersion.py "$ARCH" "$WSA_ZIP_PATH") fi if [[ "$WSA_MAJOR_VER" -lt 2211 ]]; then diff --git a/scripts/generateWSALinks.py b/scripts/generateWSALinks.py index 7c0fee9..19dc2b7 100644 --- a/scripts/generateWSALinks.py +++ b/scripts/generateWSALinks.py @@ -61,6 +61,7 @@ download_dir = Path.cwd().parent / \ "download" if sys.argv[3] == "" else Path(sys.argv[3]) ms_account_conf = download_dir/".ms_account" tempScript = sys.argv[4] +skip_wsa_download = sys.argv[5] == "no" if len(sys.argv) >= 6 else False cat_id = '858014f3-3934-4abe-8078-4aa193e74ca8' user = '' session = Session() @@ -153,7 +154,7 @@ for filename, values in identities.items(): elif re.match(f"Microsoft\.VCLibs\..+_.*_{arch}_.*\.appx", filename): out_file_name = f"{values[1]}_{arch}.appx" out_file = download_dir / out_file_name - elif re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename): + elif not skip_wsa_download and re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename): tmp_wsa_build_ver = re.search(u'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group() if(wsa_build_ver == 0): wsa_build_ver = tmp_wsa_build_ver