From b71eed35fa6581b4beec30f94c7f2ba11668417e Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Fri, 9 Dec 2022 20:11:20 +0800 Subject: [PATCH] Skip merge language resources when they do not exist --- scripts/build.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 72e08e9..8dc528d 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -634,9 +634,9 @@ EOF fi echo "Merge Language Resources" -cp "$WORK_DIR"/wsa/"$ARCH"/resources.pri "$WORK_DIR"/wsa/pri/en-us.pri -cp "$WORK_DIR"/wsa/"$ARCH"/AppxManifest.xml "$WORK_DIR"/wsa/xml/en-us.xml -tee "$WORK_DIR"/wsa/priconfig.xml < @@ -645,9 +645,10 @@ tee "$WORK_DIR"/wsa/priconfig.xml < EOF -wine64 ../wine/"$HOST_ARCH"/makepri.exe new /pr "$WORK_DIR"/wsa/pri /in MicrosoftCorporationII.WindowsSubsystemForAndroid /cf "$WORK_DIR"/wsa/priconfig.xml /of "$WORK_DIR"/wsa/"$ARCH"/resources.pri /o -sed -i -zE "s//\n$(cat "$WORK_DIR"/wsa/xml/* | grep -Po ']*/>' | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/\$/\\$/g' | sed 's/\//\\\//g')\n<\/Resources>/g" "$WORK_DIR"/wsa/"$ARCH"/AppxManifest.xml -echo -e "Merge Language Resources done\n" + wine64 ../wine/"$HOST_ARCH"/makepri.exe new /pr "$WORK_DIR"/wsa/pri /in MicrosoftCorporationII.WindowsSubsystemForAndroid /cf "$WORK_DIR"/wsa/priconfig.xml /of "$WORK_DIR"/wsa/"$ARCH"/resources.pri /o + sed -i -zE "s//\n$(cat "$WORK_DIR"/wsa/xml/* | grep -Po ']*/>' | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/\$/\\$/g' | sed 's/\//\\\//g')\n<\/Resources>/g" "$WORK_DIR"/wsa/"$ARCH"/AppxManifest.xml + echo -e "Merge Language Resources done\n" +} || echo -e "Merge Language Resources failed\n" echo "Add extra packages" $SUDO cp -r ../"$ARCH"/system/* "$MOUNT_DIR" || abort