Skip to content

Commit

Permalink
Merge pull request #35 from limuy2022/main
Browse files Browse the repository at this point in the history
add archlinux development docs
  • Loading branch information
pigpigyyy authored Apr 30, 2024
2 parents 219f286 + 23c1fc9 commit 0e7901c
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 17 deletions.
67 changes: 59 additions & 8 deletions Site/docs/tutorial/dev-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,34 @@ git clone https://github.com/ippclub/Dora-SSR.git
### Android

1. Manually generate Lua bindings.

```sh
# ubuntu
sudo apt-get install lua5.1
sudo apt-get install -y luarocks
sudo luarocks install luafilesystem
cd Tools/tolua++
lua tolua++.lua

# macOS
cd Tools/tolua++
./build.sh

# Windows
cd Tools\tolua++
build.bat
```


2. Install latest **Android Studio**.
3. Open the project directory in the IDE: **Project/Android/Dora**.
4. Compile, debug, and run the project.

### Linux

#### Ubuntu

1. Manually generate Lua bindings.
```sh
# ubuntu
sudo apt-get install lua5.1
sudo apt-get install -y luarocks
sudo luarocks install luafilesystem
Expand All @@ -68,25 +69,75 @@ git clone https://github.com/ippclub/Dora-SSR.git
```
2. Install dependent packages.
```sh
# ubuntu
sudo apt-get install -y libsdl2-dev libgl1-mesa-dev x11proto-core-dev libx11-dev
```
3. Run the compile scripts.
* For the first time build

- For the first time build

```sh
# For arm architecture
cd Project/Linux
make arm

# For x86_64 architecture
cd Project/Linux
make x86_64
```

- For incremental build

```sh
cd Project/Linux
make
```

4. Run the generated software.
```sh
cd Assets
../Project/Linux/build/dora-ssr
```

#### ArchLinux

1. Install dependent packages.

```sh
sudo pacman -S lua51 luarocks sdl2 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
```

2. Manually generate Lua bindings.

```sh
sudo luarocks --lua-version 5.1 install luafilesystem
cd Tools/tolua++
lua5.1 tolua++.lua
```

3. Run the compile scripts.

- For the first time build

```sh
# For arm architecture
cd Project/Linux
make arm

# For x86_64 architecture
cd Project/Linux
make x86_64
```
* For incremental build

- For incremental build

```sh
cd Project/Linux
make
```

4. Run the generated software.
```sh
cd Assets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,34 @@ git clone https://github.com/ippclub/Dora-SSR.git
### Android

1. 手动生成 Lua 绑定。

```sh
# ubuntu
sudo apt-get install lua5.1
sudo apt-get install -y luarocks
sudo luarocks install luafilesystem
cd Tools/tolua++
lua tolua++.lua

# macOS
cd Tools/tolua++
./build.sh

# Windows
cd Tools\tolua++
build.bat
```



2. 安装最新版 **Android Studio**
3. 在 IDE 打开工程目录:**Project/Android/Dora**
4. 进行编译、调试和运行。

### Linux

#### Ubuntu

1. 手动生成 Lua 绑定。
```sh
# ubuntu
sudo apt-get install lua5.1
sudo apt-get install -y luarocks
sudo luarocks install luafilesystem
Expand All @@ -69,32 +69,80 @@ git clone https://github.com/ippclub/Dora-SSR.git
```
2. 安装依赖包。
```sh
# ubuntu
sudo apt-get install -y libsdl2-dev libgl1-mesa-dev x11proto-core-dev libx11-dev
```
3. 运行编译脚本。
* 进行首次编译

- 进行首次编译

```sh
# 硬件架构为 arm
cd Project/Linux
make arm

# 硬件架构为 x86_64
cd Project/Linux
make x86_64
```

* 进行后续增量编译
- 进行后续增量编译

```sh
cd Project/Linux
make
```

4. 运行生成的软件。
```sh
cd Assets
../Project/Linux/build/dora-ssr
```

#### ArchLinux

1. 安装依赖包。

```sh
sudo pacman -S lua51 luarocks sdl2 gcc make cmake --needed
# 因为lua的版本必须是5.1,你需要使用lua5.1而不是最新的lua
# 最简单的方法是用ln创建一个软链接
sudo ln -s /usr/bin/lua5.1 /usr/local/bin/lua
```

2. 手动生成 Lua 绑定。

```sh
sudo luarocks --lua-version 5.1 install luafilesystem
cd Tools/tolua++
lua5.1 tolua++.lua
```

3. 运行编译脚本。

- 进行首次编译

```sh
# 硬件架构为 arm
cd Project/Linux
make arm

# 硬件架构为 x86_64
cd Project/Linux
make x86_64
```

- 进行后续增量编译

```sh
cd Project/Linux
make
```

4. 运行生成的软件。
```sh
cd Assets
../Project/Linux/build/dora-ssr
```

## 三、进行 Dora Dora 编辑器的开发

Expand Down

0 comments on commit 0e7901c

Please sign in to comment.