From 23c1fc98244e1137925c05439b30b88f4e5c8578 Mon Sep 17 00:00:00 2001 From: limuy Date: Tue, 30 Apr 2024 19:06:23 +0800 Subject: [PATCH] add archlinux development docs --- Site/docs/tutorial/dev-configuration.md | 67 ++++++++++++++++--- .../current/tutorial/dev-configuration.md | 66 +++++++++++++++--- 2 files changed, 116 insertions(+), 17 deletions(-) diff --git a/Site/docs/tutorial/dev-configuration.md b/Site/docs/tutorial/dev-configuration.md index 5924cf10b..cf449c951 100644 --- a/Site/docs/tutorial/dev-configuration.md +++ b/Site/docs/tutorial/dev-configuration.md @@ -33,6 +33,7 @@ git clone https://github.com/ippclub/Dora-SSR.git ### Android 1. Manually generate Lua bindings. + ```sh # ubuntu sudo apt-get install lua5.1 @@ -40,26 +41,26 @@ git clone https://github.com/ippclub/Dora-SSR.git 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 @@ -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 diff --git a/Site/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorial/dev-configuration.md b/Site/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorial/dev-configuration.md index ad0a4f1f6..ef29733ab 100644 --- a/Site/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorial/dev-configuration.md +++ b/Site/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorial/dev-configuration.md @@ -33,6 +33,7 @@ git clone https://github.com/ippclub/Dora-SSR.git ### Android 1. 手动生成 Lua 绑定。 + ```sh # ubuntu sudo apt-get install lua5.1 @@ -40,27 +41,26 @@ git clone https://github.com/ippclub/Dora-SSR.git 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 @@ -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 编辑器的开发