Tatsh/incoming-extractor
GitHub: Tatsh/incoming-extractor
从经典射击游戏 Incoming 的 PC 和 Dreamcast 版本中提取专有资源并转换为 PNG、OBJ、JSON、WAV 等开放格式的命令行工具。
Stars: 0 | Forks: 0
# incoming-extractor
[](https://www.python.org/)
[](https://pypi.org/project/incoming-extractor/)
[](https://github.com/Tatsh/incoming-extractor/tags)
[](https://github.com/Tatsh/incoming-extractor/blob/master/LICENSE.txt)
[](https://github.com/Tatsh/incoming-extractor/compare/v0.0.0...master)
[](https://github.com/Tatsh/incoming-extractor/actions/workflows/codeql.yml)
[](https://github.com/Tatsh/incoming-extractor/actions/workflows/qa.yml)
[](https://github.com/Tatsh/incoming-extractor/actions/workflows/tests.yml)
[](https://coveralls.io/github/Tatsh/incoming-extractor?branch=master)
[](https://github.com/dependabot)
[](https://incoming-extractor.readthedocs.org/?badge=latest)
[](https://mypy-lang.org/)
[](https://docs.astral.sh/uv/)
[](https://docs.pytest.org/en/stable/)
[](https://github.com/astral-sh/ruff)
[](https://pepy.tech/project/incoming-extractor)
[](https://github.com/Tatsh/incoming-extractor/stargazers)
[](https://github.com/pre-commit/pre-commit)
[](https://prettier.io/)
[](https://bsky.app/profile/Tatsh.bsky.social)
[](https://buymeacoffee.com/Tatsh)
[](irc://irc.libera.chat/Tatsh)
[](https://hostux.social/@Tatsh)
[](https://www.patreon.com/Tatsh2)
从 PC 和 Dreamcast 版本的
[_Incoming_](https://www.gog.com/en/game/incoming_incoming_forces)(Rage Software 开发,Interplay 发行,1998-1999)中提取并转换资源。
给定 PC 版光盘(目录、ISO 或 `DATA1.CAB`)、Dreamcast GDI,或者已经提取的 PC 或 GD-ROM 内容的目录,此工具会将源文件树镜像到一个输出目录中,将专有资源转换为开放格式,并原样复制其他所有文件。源文件永远不会被修改。
## 用法
```
incoming-extractor --output OUTPUT_DIR SOURCE
```
`SOURCE` 可以是包含 `DATA1.CAB`(或 `DATA1.CAB` 文件本身)的 PC 版光盘目录或 ISO、Dreamcast 的 `.gdi` 文件,或者是已经提取的 PC 或 GD-ROM 内容目录。识别到的资源将被转换(PVR 和 PPM 转为 PNG,IAN 和 `*_M.BIN` 转为 OBJ 和 MTL,terrain、saves 和 `.ctl` 转为 JSON,CDDA `.raw` 和 `.OSB` 转为 WAV,Shift-JIS 或 ISO-8859-15 编码的 `.TXT` 转为 UTF-8),其他所有文件均原样复制。
已安装的副本也可以作为源——只需指向游戏目录,例如
[Zoom Platform _Incoming Trilogy_](https://www.zoom-platform.com/product/incoming-trilogy)
的 `Incoming 3DFX` 文件夹(`…/Incoming Trilogy/Incoming 3DFX`)。_Incoming 3DFX_、_Incoming USA_ 和 _Incoming Subversion_(一个扩展包)这些游戏共享原始引擎并受支持;_Incoming Forces_ 不受支持。
当 native 工具不在 `PATH` 中时,请传入 `--gdiextract-path`、`--spvr2png-path` 或 `--unshield-path` 来指定其路径,并传入 `--debug` 以获取详细的日志记录。
## Native 工具
某些转换会调用 native 辅助工具,这些工具必须位于 `PATH` 中,或者通过相应的 `--*-path` 选项提供:
- [spvr2png](https://github.com/nextgeniuspro/spvr2png) — 将 Sega Dreamcast PVR 图像转换为 PNG。
- [gdiextract](https://github.com/MachXNU/gdiextract) — 从 Dreamcast GDI 中提取 ISO 9660 文件系统。
- [unshield](https://github.com/twogood/unshield) — 解包 PC 版光盘上的 InstallShield `DATA1.CAB` cabinet 文件。
从 PC ISO 中提取 `DATA1.CAB` 还会使用
[isodump](https://sourceforge.net/projects/cdrtools/) 或 [7z](https://www.7-zip.org/)。
## 开发说明
```
uv sync --all-groups --all-extras
yarn install
```
运行格式化和检查工具:
```
yarn format
yarn qa
```
标签:Dreamcast, PC游戏, Python, 云资产清单, 安全规则引擎, 文件解析, 无后门, 游戏资产提取, 逆向工具, 逆向工程