This commit is contained in:
Howard Wu 2023-03-18 17:55:35 +08:00
parent 65c7c2670d
commit e54892a94e
2 changed files with 18 additions and 12 deletions
installer
scripts

View file

@ -1,3 +1,21 @@
# This file is part of MagiskOnWSALocal.
#
# MagiskOnWSALocal is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# MagiskOnWSALocal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
#
# Copyright (C) 2023 LSPosed Contributors
#
If ((Test-Path -Path "pri") -Eq $true -And (Test-Path -Path "xml") -Eq $true) {
$proc = Start-Process -PassThru makepri.exe -Args "resourcepack /pr .\pri /cf .\xml\priconfig.xml /of .\resources.pri /if .\resources.pri /o"
$proc.WaitForExit()

View file

@ -731,18 +731,6 @@ elif [ "$ROOT_SOL" = "kernelsu" ]; then
cp "$WORK_DIR/kernelsu/kernel" "$WORK_DIR/wsa/$ARCH/Tools/kernel"
echo -e "Integrate KernelSU done\n"
fi
# [ -f "$WORK_DIR/wsa/pri" ] && {
# echo "Merge Language Resources"
# if [ -f /proc/sys/fs/binfmt_misc/WSLInterop ] && [ "$(id -u)" != "0" ]; then
# "../wine/$HOST_ARCH/makepri.exe" resourcepack /pr "$(wslpath -w "$WORK_DIR/wsa/pri")" /cf "$(wslpath -w "../xml/priconfig.xml")" /of "$(wslpath -w "$WORK_DIR/wsa/$ARCH/resources.pri")" /if "$(wslpath -w "$WORK_DIR/wsa/$ARCH/resources.pri")" /o || res_merge_failed=1
# elif which wine64 >/dev/null; then
# wine64 "../wine/$HOST_ARCH/makepri.exe" resourcepack /pr "$WORK_DIR/wsa/pri" /cf "../xml/priconfig.xml" /of "$WORK_DIR/wsa/$ARCH/resources.pri" /if "$WORK_DIR/wsa/$ARCH/resources.pri" /o || res_merge_failed=1
# else
# res_merge_failed=1
# fi
# [ -z "$res_merge_failed" ] && sed -i -zE "s/<Resources.*Resources>/<Resources>\n$(cat "$WORK_DIR/wsa/xml/"* | grep -Po '<Resource [^>]*/>' | 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"
# } && [ -n "$res_merge_failed" ] && echo -e "Merge Language Resources failed\n" && unset res_merge_failed
echo "Add extra packages"
$SUDO cp -r "../$ARCH/system/"* "$SYSTEM_MNT" || abort