diff --git a/docs/en-us/2.1-LINUX_TUTORIAL.md b/docs/en-us/2.1-LINUX_TUTORIAL.md index 472322942d..87303857eb 100644 --- a/docs/en-us/2.1-LINUX_TUTORIAL.md +++ b/docs/en-us/2.1-LINUX_TUTORIAL.md @@ -23,25 +23,29 @@ 2. Build or download third-party libraries - - Donwload pre-built libraries (recommended) + You may either download pre-built dependencies or build them from scratch + + - Download pre-built libraries (recommended) > **Note** > It contains shared objects built on a relatively new linux distro (Ubuntu 22.04), which may cause ABI incompatibility if you are working on a system with older version of libstdc++. - ```cmd + ```bash python maadeps-download.py ``` + If this does not work for you due to ABI issue, and containerization is not an option, you may build them from scratch + - Build from source - ```cmd + ```bash git submodule update --init --recursive - python maadeps-build.py + cd MaaDeps + python build.py ``` 3. Build MAA ```bash - mkdir -p build CC=gcc-12 CXX=g++-12 cmake -B build \ -DINSTALL_THIRD_LIBS=ON \ -DINSTALL_RESOURCE=ON \ diff --git a/docs/开发文档/Linux编译教程.md b/docs/开发文档/Linux编译教程.md index 31420c058f..dcad53af47 100644 --- a/docs/开发文档/Linux编译教程.md +++ b/docs/开发文档/Linux编译教程.md @@ -23,26 +23,30 @@ MAA 的构建方法仍在讨论中, 本教程的内容可能过时, 请以 [GitH 2. 构建第三方库 - - 下载预构建的第三方库 + 可以选择下载预构建的依赖库或从头进行编译 + + - 下载预构建的第三方库 (推荐的) > **Note** > 包含在相对较新的 Linux 发行版 (Ubuntu 22.04) 中编译的动态库, 如果您系统中的 libstdc++ 版本较老, 可能遇到 ABI 不兼容的问题. - ```cmd + ```bash python maadeps-download.py ``` - - 自行构建第三方库 + 如果您发现上面的方法下载的库由于 ABI 版本等原因无法在您的系统上运行且不希望使用容器等方案, 也可以尝试从头编译 - ```cmd + - 自行构建第三方库 (将花费较长时间) + + ```bash git submodule update --init --recursive - python maadeps-build.py + cd MaaDeps + python build.py ``` 3. 编译 MAA ```bash - mkdir -p build CC=gcc-12 CXX=g++-12 cmake -B build \ -DINSTALL_THIRD_LIBS=ON \ -DINSTALL_RESOURCE=ON \ @@ -50,7 +54,7 @@ MAA 的构建方法仍在讨论中, 本教程的内容可能过时, 请以 [GitH cmake --build build ``` - 来将 MAA 安装到目标位置, 注意 MAA 推荐通过指定 `LD_LIBRARY_PATH` 来运行, 不要使用管理员权限将 MAA 装入 `/` + 来将 MAA 安装到目标位置, 注意 MAA 推荐通过指定 `LD_LIBRARY_PATH` 来运行, 不要使用管理员权限将 MAA 装入 `/usr` ```bash cmake --install build --prefix