Skip to content

Commit

Permalink
add version requirement in README
Browse files Browse the repository at this point in the history
  • Loading branch information
cinit committed Dec 11, 2022
1 parent bafa15e commit 5f6b6d7
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 53 deletions.
71 changes: 34 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,44 @@ I have tested on Windows 10 22H2 10.0.19045.2311 x64 with WSA 2210.40000.7.0.

### Instructions

1. Get WSA appx zip. You can do this by following instructions in https://github.com/LSPosed/MagiskOnWSALocal
1. Make sure your Windows version is at least Windows 10 22H2 10.0.19045.2311.
- You can check your Windows version with command `winver`.
- If your Windows version is lower than 10.0.19045.2311, please install update KB5020030.
2. Get WSA appx zip. You can do this by following instructions in https://github.com/LSPosed/MagiskOnWSALocal
(You need to "build" this yourself with your local WSL2).
2. Get "icu.dll" from Windows 11 22H2. Note that you MUST use icu.dll from Windows 11.
3. Get "icu.dll" from Windows 11 22H2. Note that you MUST use icu.dll from Windows 11.
The icu.dll from Windows 10 will NOT work.
(I have made a copy of these DLLs in the original.dll.win11.22h2 dir. They are digitally signed by Microsoft.)
3. Build WsaPatch.dll with source code in this repo.
4. Build WsaPatch.dll with source code in this repo.
(Build with MSVC toolchain, not MinGW or something else.)
4. Patch icu.dll: add WsaPatch.dll as an import DLL as icu.dll.
5. Copy patched icu.dll and WsaPatch.dll to WsaClient dir.
6. Patch AppxManifest.xml: Find TargetDeviceFamily node and change the MinVersion attribute to your Windows version.
<details>

Find the following line in AppxManifest.xml.
```xml
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.22000.120" MaxVersionTested="10.0.22000.120"/>
```

Change the `MinVersion` from `10.0.22000.120` to your Windows version, like `10.0.19045.2311`.
</details>
7. Patch AppxManifest.xml: Delete all nodes about "customInstall" extension in AppxManifest.xml.
<details>
Delete the following content from AppxManifest.xml.

```xml
<rescap:Capability Name="customInstallActions"/>
```

```xml
<desktop6:Extension Category="windows.customInstall">
<desktop6:CustomInstall Folder="CustomInstall" desktop8:RunAsUser="true">
<desktop6:RepairActions>
<desktop6:RepairAction File="WsaSetup.exe" Name="Repair" Arguments="repair"/>
</desktop6:RepairActions>
<desktop6:UninstallActions>
<desktop6:UninstallAction File="WsaSetup.exe" Name="Uninstall" Arguments="uninstall"/>
</desktop6:UninstallActions>
</desktop6:CustomInstall>
</desktop6:Extension>
```

</details>
5. Patch icu.dll: add WsaPatch.dll as an import DLL as icu.dll.
6. Copy patched icu.dll and WsaPatch.dll to WsaClient dir.
7. Patch AppxManifest.xml.
1. Find TargetDeviceFamily node in AppxManifest.xml.
```xml
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.22000.120" MaxVersionTested="10.0.22000.120"/>
```

Change the `MinVersion` from `10.0.22000.120` to `10.0.19045.2311`.

2. Delete all nodes about "customInstall" extension (see below) in AppxManifest.xml.
```xml
<rescap:Capability Name="customInstallActions"/>
```

```xml
<desktop6:Extension Category="windows.customInstall">
<desktop6:CustomInstall Folder="CustomInstall" desktop8:RunAsUser="true">
<desktop6:RepairActions>
<desktop6:RepairAction File="WsaSetup.exe" Name="Repair" Arguments="repair"/>
</desktop6:RepairActions>
<desktop6:UninstallActions>
<desktop6:UninstallAction File="WsaSetup.exe" Name="Uninstall" Arguments="uninstall"/>
</desktop6:UninstallActions>
</desktop6:CustomInstall>
</desktop6:Extension>
```

8. Run "Run.bat" to register your WSA appx.
9. You should be able to run WSA now.

Expand Down
30 changes: 14 additions & 16 deletions README_zhs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,29 @@

### 操作步骤

1. 安装 WSL2 (我用的 Ubuntu 22.04 LTS, 当然你也可以选择你喜欢的发行版,下一步要用到).
2. 按照 https://github.com/LSPosed/MagiskOnWSALocal 的步骤,得到集成了 Magisk 的 WSA AppX 包.
1. 将你的系统更新到 Windows 10 22H2 10.0.19045.2311 或更高版本.
- 你可以通过 `winver` 命令查看您当前的 Windows 版本.
- 如果您的 Windows 版本低于 10.0.19045.2311, 请安装 KB5020030 累积更新.
2. 安装 WSL2 (我用的 Ubuntu 22.04 LTS, 当然你也可以选择你喜欢的发行版,下一步要用到).
3. 按照 https://github.com/LSPosed/MagiskOnWSALocal 的步骤,得到集成了 Magisk 的 WSA AppX 包.
- 注:你需要在你的 WSL2 里进行操作,WSA 版本建议选 Insider Fast/Dev Channel.
3. 把你的 WSA AppX 包从 WSL2 里复制出来, 它应该是一个压缩包, 解压到你希望安装 WSA 的地方.
4. 把你的 WSA AppX 包从 WSL2 里复制出来, 它应该是一个压缩包, 解压到你希望安装 WSA 的地方.
- 位于 `MagiskOnWSALocal/output`, 文件名类似于 `WSA-with-magisk-stable-MindTheGapps_2210.40000.7.0_x64_Release-Nightly.7z`.
4. 用 Visual Studio 编译本仓库的代码,得到 WsaPatch.dll (用 MSVC 工具链编译,如果你不想自己编译,你可以去 release 里下).
5. 想办法从 Windows 11 22H2 的 System32 里复制一个 icu.dll 过来,找一个 PE32+ 编辑工具给它的导入表加一个 WsaPatch.dll.
5. 用 Visual Studio 编译本仓库的代码,得到 WsaPatch.dll (用 MSVC 工具链编译,如果你不想自己编译,你可以去 release 里下).
6. 想办法从 Windows 11 22H2 的 System32 里复制一个 icu.dll 过来,找一个 PE32+ 编辑工具给它的导入表加一个 WsaPatch.dll.
- 你必须用 Windows 11 22H2 里的 icu.dll, 因为 Windows 10 的 icu.dll 缺符号;
- 如果你没有 Windows 11 22H2, 本仓库的 original.dll.win11.22h2 就有原版带微软签名的 icu.dll;
- 如果你不想自己搞,你可以用 release 里已经修改过的 icu.dll.
6. 把编译好的 WsaPatch.dll 和修改过的 icu.dll 复制到 WSA 的 WsaClient 文件夹.
7. 按以下要求修改 AppxManifest.xml:
1.`AppxManifest.xml` 找到 `TargetDeviceFamily` 节点,把 `MinVersion` 改成你的 Windows 版本.
<details>

找到
7. 把编译好的 WsaPatch.dll 和修改过的 icu.dll 复制到 WSA 的 WsaClient 文件夹.
8. 按以下要求修改 AppxManifest.xml:
1.`AppxManifest.xml` 找到 `TargetDeviceFamily` 节点
```xml
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.22000.120" MaxVersionTested="10.0.22000.120"/>
```

把 `MinVersion` 从 `10.0.22000.120` 改成你的 Windows 版本,如 `10.0.19045.2311`.
</details>
把 `MinVersion` 从 `10.0.22000.120` 改成 `10.0.19045.2311`.

2. 在 `AppxManifest.xml` 删除 "customInstall" 相关节点,一共有两个.
<details>
找到以下内容,然后删掉.

```xml
Expand All @@ -51,8 +50,7 @@
</desktop6:Extension>
```

</details>
8. 运行 `Run.bat` (需要管理员权限).
9. 运行 `Run.bat` (需要管理员权限).

编译好的 WsaPatch.dll 和修改过的 icu.dll 可以从 [release 页面](https://github.com/cinit/WSAPatch/releases) 下载.

Expand Down

0 comments on commit 5f6b6d7

Please sign in to comment.