No-Xcode route: older devices (A16 and earlier) are supported - give the packaging tool a Legacy Device Pack with D2RM_ASTC_PACK
This commit is contained in:
@@ -62,7 +62,7 @@ Afterwards `$D/pack` contains:
|
||||
- **The pack and the App are a matched pair.** The App checks the pack on the phone against the SHA-256 in `pack.json`; if you regenerate the pack, rebuild the App with the new `$D/pack`. The same game files, the same astcenc version and the same preset (`--preset thorough`) produce a byte-identical pack, so normally there is nothing to redo.
|
||||
- If the folder was not copied completely, is in the wrong place, or does not match the App, the App says which it is in the dialog.
|
||||
- The game resource folder is still needed as usual (see [GAME_FILES.md](GAME_FILES.md)); the pack is an additional folder, not a replacement.
|
||||
- This route currently needs a Mac and Xcode. The no-Xcode shell does not carry the older-device part in this version yet.
|
||||
- The above describes the "with a Mac" route. On the no-Xcode route (shell plus packaging tool) the three commands that make the pack are the same and only the way it goes into the install package differs; see the "Older devices" section of [NO_XCODE.md](NO_XCODE.md). On Windows the prebuilt astcenc executable from the upstream release page is all you need.
|
||||
|
||||
## What it does (if you are curious)
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ python3 dm/tools/astc_pack.py finalize "$D/pack" # 3 收尾:
|
||||
- **贴图包和 App 是配对的**。App 按 `pack.json` 里的 SHA-256 核对手机上的贴图包;重新生成过贴图包,就要用新的 `$D/pack` 重新构建 App。同一份游戏文件、同一版 astcenc、同一档(`--preset thorough`)生成的包是逐字节相同的,所以平时不需要重做。
|
||||
- 文件夹没拷完、拷错了位置、或者和 App 不配套,App 会在弹框里直接说是哪一种。
|
||||
- 游戏资源文件夹照常要放(见 [GAME_FILES.zh-CN.md](GAME_FILES.zh-CN.md));贴图包是另外加的一个文件夹,不是替换。
|
||||
- 这条路目前要用 Mac 和 Xcode 构建。「不用 Xcode」的壳这一版还不带老机型的配套部分。
|
||||
- 上面写的是「有 Mac」那条路。不用 Xcode、走壳加做包工具的,做贴图包的三条命令相同,带进安装包的方式不同,见 [NO_XCODE.zh-CN.md](NO_XCODE.zh-CN.md) 里「老机型」一节;Windows 上 astcenc 用上游发布页的现成可执行文件即可。
|
||||
|
||||
## 它做了什么(想了解的话)
|
||||
|
||||
|
||||
@@ -70,6 +70,24 @@ With a package made on a computer without that compiler, the app stops on a "Fir
|
||||
- You can switch away or close the app; when you come back it counts from the start again, but each shader already compiled takes less than a millisecond, so in effect it continues.
|
||||
- The phone gets warm during these minutes; keeping it plugged in and out of a thick case helps.
|
||||
|
||||
## Older devices (A16 and earlier chips)
|
||||
|
||||
The iPhone 14 family, iPhone 15 / 15 Plus and earlier models need an extra texture pack, passed in at step 1. The full explanation is in [LEGACY_DEVICES.md](LEGACY_DEVICES.md); on this route it goes like this:
|
||||
|
||||
1. Get the astcenc encoder: download the archive for your system from the upstream release page and unpack it (<https://github.com/ARM-software/astc-encoder/releases>; on Windows use `bin/astcenc-avx2.exe` from `astcenc-…-windows-x64.zip`).
|
||||
2. Make the texture pack (three commands; `<game files directory>` as above, `D` is an output directory of your choice):
|
||||
|
||||
```
|
||||
python3 dm/tools/astc_pack.py <game files directory>/RomFS D/work --astcenc <path to astcenc> --preset thorough
|
||||
python3 dm/tools/casc_overlay.py pack <game files directory>/RomFS D/pack D/work/repl.tsv 0-8
|
||||
python3 dm/tools/astc_pack.py finalize D/pack
|
||||
```
|
||||
|
||||
3. Pass it when packaging: set the environment variable `D2RM_ASTC_PACK` to the full path of `D/pack`, then run `d2rm_pack.py` as in step 1. The tool prints a line saying older-device support is included.
|
||||
4. When you put the game resources on the phone in step 3, also copy the whole `D/pack/Legacy Device Pack` folder to the phone, at the same level as the game resource folder.
|
||||
|
||||
The texture pack and the install package are a matched pair: if you remake the pack, remake the package.
|
||||
|
||||
## When something goes wrong
|
||||
|
||||
- The tool says the shell and this source are not the same version: use the source of the same release as the shell.
|
||||
|
||||
@@ -70,6 +70,24 @@ python3 dm/tools/d2rm_pack.py <D2RMobile-shell.ipa> <你的游戏文件目录> <
|
||||
- 可以切到后台或关掉;回来从头数一遍,已经编过的每个只要不到一毫秒,等于接着做。
|
||||
- 这几分钟手机会发热,建议插着电、别套太厚的壳。
|
||||
|
||||
## 老机型(A16 及更早的芯片)
|
||||
|
||||
iPhone 14 系列、iPhone 15 / 15 Plus 以及更早的机型,要多做一份贴图包,并在第一步里带上它。完整说明见 [LEGACY_DEVICES.zh-CN.md](LEGACY_DEVICES.zh-CN.md),这条路上的做法是:
|
||||
|
||||
1. 准备编码器 astcenc:从上游发布页下载对应系统的压缩包解开即可(<https://github.com/ARM-software/astc-encoder/releases>,Windows 用 `astcenc-…-windows-x64.zip` 里的 `bin/astcenc-avx2.exe`)。
|
||||
2. 做贴图包(三条命令,`<游戏文件目录>` 同上,`D` 是你选的输出目录):
|
||||
|
||||
```
|
||||
python3 dm/tools/astc_pack.py <游戏文件目录>/RomFS D/work --astcenc <astcenc 的路径> --preset thorough
|
||||
python3 dm/tools/casc_overlay.py pack <游戏文件目录>/RomFS D/pack D/work/repl.tsv 0-8
|
||||
python3 dm/tools/astc_pack.py finalize D/pack
|
||||
```
|
||||
|
||||
3. 做包时带上它:把环境变量 `D2RM_ASTC_PACK` 设成 `D/pack` 的完整路径,再照第一步运行 `d2rm_pack.py`。工具会说一句「带老机型支持」。
|
||||
4. 第三步放游戏资源时,把 `D/pack/Legacy Device Pack` 这个文件夹也整个拷进手机,和游戏资源文件夹放在同一层。
|
||||
|
||||
贴图包和安装包是配对的:重新做了贴图包,就要重新做包。
|
||||
|
||||
## 出了问题
|
||||
|
||||
- 工具报「壳与这份源码不是同一版」:换成与壳同一个发布版本的源码。
|
||||
|
||||
Reference in New Issue
Block a user