Skip to content

Commit

Permalink
Support 2302 (vhdx) (LSPosed#416)
Browse files Browse the repository at this point in the history
* Announcement not supported 2302

Will switch to Powershell scripts that require running under Windows 11

* Support 2302

* format

* Update makepri

* Refine quotes

* Refine quotes +1

* Refine quotes *3

* Fix KernelSU Magisk fallback

* Fix KernelSU build

* Refine resources merge

* Update build.sh

* Refine resize
  • Loading branch information
Howard20181 authored Mar 18, 2023
1 parent 58d25e9 commit 9236fac
Show file tree
Hide file tree
Showing 9 changed files with 253 additions and 188 deletions.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

The following dependencies are required:

| DistrOS | | | |
|:-------------------:|-------------------------------------------------------------------------------------------------|------------|------------|
| Debian | `lzip wine winetricks patchelf e2fsprogs aria2 python3 python3-pip aria2 p7zip-full attr unzip` | `whiptail` | `xz-utils` |
| openSUSE Tumbleweed | Same as above | `dialog` | `xz` |
| DistrOS | | | | |
|:-------------------:|-------------------------------------------------------------------------------------------------|------------|------------|--------------|
| Debian | `lzip wine winetricks patchelf e2fsprogs aria2 python3 python3-pip aria2 p7zip-full attr unzip` | `whiptail` | `xz-utils` | `qemu-utils` |
| openSUSE Tumbleweed | Same as above | `dialog` | `xz` | `qemu-tools` |

The following components need to be installed using `winetricks`: `msxml6`

Expand Down
400 changes: 220 additions & 180 deletions scripts/build.sh

Large diffs are not rendered by default.

21 changes: 17 additions & 4 deletions scripts/extractWSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,33 @@

import warnings
import zipfile
import os
from pathlib import Path
import re
import shutil

warnings.filterwarnings("ignore")

arch = sys.argv[1]

zip_name = ""
wsa_zip_path= Path(sys.argv[2]).resolve()
workdir = Path(sys.argv[3]) / "wsa"
rootdir = Path(sys.argv[3]).resolve()
env_file = Path(sys.argv[4]).resolve()

workdir = rootdir / "wsa"
archdir = Path(workdir / arch)

if not Path(rootdir).is_dir():
rootdir.mkdir()

if Path(workdir).is_dir():
shutil.rmtree(workdir)
else:
workdir.unlink(missing_ok=True)

if not Path(workdir).is_dir():
workdir.mkdir()

if not Path(archdir).is_dir():
archdir.mkdir()
with zipfile.ZipFile(wsa_zip_path) as zip:
Expand All @@ -53,12 +66,12 @@
main_ver = ver[0]
rel = ver_no[3].split(".")
rel_long = str(rel[0])
with open(os.environ['WSA_WORK_ENV'], 'a') as environ_file:
with open(env_file, 'a') as environ_file:
environ_file.write(f'WSA_VER={long_ver}\n')
environ_file.write(f'WSA_MAIN_VER={main_ver}\n')
environ_file.write(f'WSA_REL={rel_long}\n')
if 'language' in f.filename.lower() or 'scale' in f.filename.lower():
name = f.filename.split("-", 1)[1].split(".")[0]
name = f.filename.split("_")[2].split(".")[0]
zip.extract(f, workdir)
with zipfile.ZipFile(workdir / f.filename) as l:
for g in l.filelist:
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ check_dependencies() {
command -v setfattr > /dev/null 2>&1 || NEED_INSTALL+=("attr")
command -v xz > /dev/null 2>&1 || NEED_INSTALL+=("xz-utils")
command -v unzip > /dev/null 2>&1 || NEED_INSTALL+=("unzip")
command -v qemu-img > /dev/null 2>&1 || NEED_INSTALL+=("qemu-utils")
}
check_dependencies
osrel=$(sed -n '/^ID_LIKE=/s/^.*=//p' /etc/os-release);
Expand Down Expand Up @@ -107,6 +108,7 @@ if [ -n "${NEED_INSTALL[*]}" ]; then
NEED_INSTALL_FIX=${NEED_INSTALL_FIX//setools/setools-console} 2>&1
NEED_INSTALL_FIX=${NEED_INSTALL_FIX//whiptail/dialog} 2>&1
NEED_INSTALL_FIX=${NEED_INSTALL_FIX//xz-utils/xz} 2>&1
NEED_INSTALL_FIX=${NEED_INSTALL_FIX//qemu-utils/qemu-tools} 2>&1
} >> /dev/null

readarray -td ' ' NEED_INSTALL <<<"$NEED_INSTALL_FIX "; unset 'NEED_INSTALL[-1]';
Expand Down
Binary file modified wine/aarch64/makepri.exe
Binary file not shown.
Binary file modified wine/x86_64/makepri.exe
Binary file not shown.
10 changes: 10 additions & 0 deletions xml/priconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources targetOsVersion="10.0.0" majorVersion="1">
<index root="\" startIndexAt="\">
<default>
<qualifier name="Language" value="en-US"/>
</default>
<indexer-config type="folder" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="."/>
<indexer-config type="PRI"/>
</index>
</resources>

0 comments on commit 9236fac

Please sign in to comment.