Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-java@v4
with:
distribution: temurin
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rebuild-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Rust Android toolchain
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-java@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "native/DingooEmu"]
path = native/DingooEmu
url = https://github.com/uplush/DingooEmu.git
branch = dingoobox-integration
46 changes: 31 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,39 @@ am start -n io.github.uplush.dingoobox/.MainActivity -e ROM "{file.path}"

## 构建

仓库包含供 `arm64-v8a` 使用的预编译 `libdingooemu.so` 和
`libc++_shared.so`。但首次构建 1.0.2 必须先重新编译一次 Rust 核心,才能将
游戏内“退出游戏”自动返回修复写入 `libdingooemu.so`:
DingooEmu 核心通过 Git Submodule 集成在 `native/DingooEmu`,主仓库会锁定到
经过 DingooBox 验证的核心提交。

```powershell
rustup target add aarch64-linux-android
cargo install cargo-ndk
$env:ANDROID_NDK_HOME = "$env:LOCALAPPDATA\Android\Sdk\ndk\28.2.13676358"
.\scripts\build-core.ps1
首次克隆请使用:

```bash
git clone --recurse-submodules https://github.com/uplush/DingooBox.git
cd DingooBox
```

如果已经克隆过仓库,或核心目录为空,请执行:

```bash
git submodule update --init --recursive
```

随后构建 APK:
仓库同时包含供 `arm64-v8a` 使用的预编译 `libdingooemu.so` 和
`libc++_shared.so`,可以直接构建 APK:

```bash
./gradlew assembleDebug
```

Windows PowerShell:

```powershell
.\gradlew.bat assembleDebug
```

生成文件位于 `app/build/outputs/apk/debug/app-debug.apk`。Debug 与 Release
构建使用相同的正式包名,不再追加 `.debug`。
构建使用相同的正式包名,不追加 `.debug`。

存档失败诊断:清空日志、复现一次失败,再导出两个原生标签:
存档失败诊断:清空日志、复现一次失败,再导出原生标签:

```powershell
adb logcat -c
Expand All @@ -97,25 +109,29 @@ adb logcat -d -s DingooState:I DingooCore:E *:S

## 重新构建 DingooEmu 核心

修改或更新核心源码后,需要重新生成 `libdingooemu.so`。

Linux/macOS:

```bash
git submodule update --init --recursive
rustup target add aarch64-linux-android
cargo install cargo-ndk
ANDROID_NDK_HOME=/path/to/ndk/28.2.13676358 ./scripts/build-core.sh
./gradlew assembleDebug
```

Windows PowerShell:

```powershell
git submodule update --init --recursive
rustup target add aarch64-linux-android
cargo install cargo-ndk
$env:ANDROID_NDK_HOME = "C:\path\to\ndk\28.2.13676358"
.\scripts\build-core.ps1
$env:ANDROID_NDK_HOME = "$env:LOCALAPPDATA\Android\Sdk\ndk\28.2.13676358"
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\build-core.ps1
.\gradlew.bat assembleDebug
```

然后运行 `./gradlew assembleDebug`(Windows 使用 `.\gradlew.bat assembleDebug`)。

## 已知限制

- 在线封面下载仅匹配 DingooEmu 上游验证截图目录中的 `.app` 游戏;目录外游戏仍可从长按菜单选择本地图片。
Expand Down
Binary file modified app/src/main/jniLibs/arm64-v8a/libdingooemu.so
Binary file not shown.
1 change: 1 addition & 0 deletions native/DingooEmu
Submodule DingooEmu added at bca43a
11 changes: 0 additions & 11 deletions native/DingooEmu/.github/dependabot.yml

This file was deleted.

39 changes: 0 additions & 39 deletions native/DingooEmu/.github/workflows/ci.yml

This file was deleted.

46 changes: 0 additions & 46 deletions native/DingooEmu/.github/workflows/codeql-analysis.yml

This file was deleted.

Loading
Loading