32 Star 227 Fork 40

GVPI++俱乐部/Dora-SSR

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
120.dev-configuration.mdx 7.10 KB
一键复制 编辑 原始数据 按行查看 历史
Li Jin 提交于 2026-04-22 11:49 +08:00 . Updated docs. [skip CI]
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# How to Build Dora SSR Engine
## 1. Get the Source
<Tabs groupId="git-select">
<TabItem value="github" label="GitHub">
```sh
git clone https://github.com/ippclub/Dora-SSR.git
```
</TabItem>
<TabItem value="gitee" label="Gitee">
```sh
git clone https://gitee.com/ippclub/Dora-SSR.git
```
</TabItem>
<TabItem value="gitcode" label="GitCode">
```sh
git clone https://gitcode.com/ippclub/Dora-SSR.git
```
</TabItem>
</Tabs>
## 2. Build Game Engine Runtime
Please select the target platform you want to build for.
<Tabs groupId="platform-select">
<TabItem value="windows" label="Windows">
1. Install **Rust**, **xmake**, and **Visual Studio Community 2022** with MSBuild tools.
2. Build bgfx libraries first, the same way as GitHub Actions.
```bat
Tools\build-scripts\build_lib_bgfx_windows.bat
```
3. Build the Windows runtime and solution.
```bat
Tools\build-scripts\build_windows.bat
```
4. For local debugging, open **Projects/Windows/Dora.sln** in Visual Studio and run the `Debug` configuration.
</TabItem>
<TabItem value="macos" label="macOS">
1. Install **Rust**, **xmake**, and the latest **Xcode**.
2. Build bgfx libraries, matching the CI workflow.
```sh
Tools/build-scripts/build_lib_bgfx.sh macos
```
3. Generate Lua bindings.
```sh
cd Tools/tolua++
./build.sh
```
4. Build the Rust runtime for macOS and copy the generated library.
```sh
cd Source/Rust
rustup target add x86_64-apple-darwin
cargo build --target x86_64-apple-darwin
cp target/x86_64-apple-darwin/debug/libdora_runtime.a lib/macOS/libdora_runtime.a
```
5. Build and run the app locally.
```sh
xcodebuild ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO -project Projects/macOS/Dora.xcodeproj -target Dora -configuration Debug
```
6. For IDE debugging, open **Projects/macOS/Dora.xcodeproj** in Xcode and run the `Dora` target.
</TabItem>
<TabItem value="ios" label="iOS">
1. Install **Rust**, **xmake**, and the latest **Xcode**.
2. Build bgfx libraries first.
```sh
Tools/build-scripts/build_lib_bgfx.sh ios
```
3. Generate Lua bindings.
```sh
cd Tools/tolua++
./build.sh
```
4. Build the Rust runtime for the iOS simulator.
```sh
cd Source/Rust
rustup target add aarch64-apple-ios-sim
cargo build --target aarch64-apple-ios-sim
cp target/aarch64-apple-ios-sim/debug/libdora_runtime.a lib/iOS-Simulator/libdora_runtime.a
```
5. Build the simulator target.
```sh
xcodebuild ARCHS=arm64 ONLY_ACTIVE_ARCH=NO -project Projects/iOS/Dora.xcodeproj -configuration Debug -target Simulator -sdk iphonesimulator
```
6. For IDE debugging, open **Projects/iOS/Dora.xcodeproj** in Xcode and run the `Simulator` target.
</TabItem>
<TabItem value="android" label="Android">
:::tip
Local Android builds require **JDK 17** in addition to **Android Studio**.
:::
1. Install **Rust**, **xmake**, and the latest **Android Studio**.
2. Generate Lua bindings first.
```sh
# Build on Ubuntu
sudo apt-get install lua5.1
sudo apt-get install -y luarocks
sudo luarocks install luafilesystem
cd Tools/tolua++
lua tolua++.lua
# Build on macOS
cd Tools/tolua++
./build.sh
# Build on Windows
cd Tools\tolua++
build.bat
```
3. Build bgfx libraries for Android.
```sh
Tools/build-scripts/build_lib_bgfx.sh android
```
4. Build the Rust runtime for Android ABIs.
```sh
Tools/build-scripts/build_lib_android.sh
```
5. Build the Android app locally.
```sh
cd Projects/Android/Dora
./gradlew assembleDebug
```
6. For IDE debugging, open **Projects/Android/Dora** in Android Studio and run the `app` module.
</TabItem>
<TabItem value="linux" label="Linux">
:::tip
Local Linux builds also use `pkg-config` and the `dbus-1` development package. On typical desktop Linux environments, they are usually already installed, so no extra setup is normally needed.
:::
1. Install **Rust** and **xmake**.
<Tabs groupId="linux-distribution-select">
<TabItem value="ubuntu" label="Ubuntu/Debian">
3. Install dependent packages.
```sh
sudo apt-get update
sudo apt-get install -y libsdl2-dev libgl1-mesa-dev libssl-dev libx11-dev lua5.1 luarocks
```
4. Manually generate Lua bindings.
```sh
sudo luarocks install luafilesystem
cd Tools/tolua++
lua tolua++.lua
```
</TabItem>
<TabItem value="arch-linux" label="Arch Linux">
3. Install dependent packages.
```sh
sudo pacman -S lua51 luarocks sdl2 openssl gcc make cmake --needed
# Because the lua version must be 5.1,you need to use lua 5.1 instead of the newest version of lua
# The easiest way is using 'ln' to create a soft link
sudo ln -s /usr/bin/lua5.1 /usr/local/bin/lua
```
4. Manually generate Lua bindings.
```sh
sudo luarocks --lua-version 5.1 install luafilesystem
cd Tools/tolua++
lua5.1 tolua++.lua
```
</TabItem>
</Tabs>
2. Build bgfx libraries, matching the Linux GitHub Action.
```sh
cd Source/3rdParty/bgfx
xmake f -p linux -a x86_64 -m release -y
xmake -v
```
3. Build the Rust runtime.
```sh title="For x86_64 architecture"
Tools/build-scripts/build_lib_linux_x86_64.sh
```
```sh title="For ARM64 architecture"
Tools/build-scripts/build_lib_linux_aarch64.sh
```
4. Run the compile scripts.
- For the first time build
```sh title="For ARM architecture"
cd Projects/Linux
make arm
```
```sh title="For x86_64 architecture"
cd Projects/Linux
make x86_64
```
- For incremental build
```sh
cd Projects/Linux
make
```
5. Run the generated software.
```sh
cd Assets
../Projects/Linux/build/dora-ssr
# Or specify the resource directory with command line arguments
./Projects/Linux/build/dora-ssr --asset Assets
```
</TabItem>
</Tabs>
## 3. Build Web IDE
1. Compile and run the Dora SSR engine.
2. Install the latest version of **Node.js** and **pnpm**.
3. Initialize the project and enter the Dora Dora editor development mode.
Please select the platform you are building with.
<Tabs groupId="platform-select">
<TabItem value="macos" label="macOS">
```sh
cd Tools/dora-dora && pnpm install
pnpm build-yarn-editor
pnpm start
```
Alternatively, you can generate the Web IDE release files for the full Dora SSR project. `pnpm build` now automatically builds and copies YarnEditor, then syncs the final Web IDE output to project folder `Assets/www`.
```sh
cd Tools/dora-dora
pnpm build
```
</TabItem>
<TabItem value="linux" label="Linux">
```sh
cd Tools/dora-dora && pnpm install
pnpm build-yarn-editor
pnpm start
```
Alternatively, you can generate the Web IDE release files for the full Dora SSR project. `pnpm build` now automatically builds and copies YarnEditor, then syncs the final Web IDE output to `Assets/www`.
```sh
# `pnpm build` also syncs the final output to Assets/www automatically
cd Tools/dora-dora
pnpm build
```
</TabItem>
<TabItem value="windows" label="Windows">
```sh
cd Tools\dora-dora && pnpm install
pnpm build-yarn-editor
pnpm start
```
Alternatively, you can generate the Web IDE release files for the full Dora SSR project. `pnpm build` now automatically builds and copies YarnEditor, then syncs the final Web IDE output to `Assets/www`.
```sh
# `pnpm build` also syncs the final output to Assets/www automatically
cd Tools\dora-dora
pnpm build
```
</TabItem>
</Tabs>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/ippclub/Dora-SSR.git
git@gitee.com:ippclub/Dora-SSR.git
ippclub
Dora-SSR
Dora-SSR
main

搜索帮助