mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 10:10:45 +08:00
1.8 KiB
1.8 KiB
Linux Compilation Tutorial
The tutorial requires some basic knowledge about Linux OS!
Note
Linux build of MAA is still under discussion, some of the content might be outdated, please follow the script in GitHub workflow file
Compiling MAA
-
Download build depends
- Ubuntu/Debian
sudo apt install gcc-12 g++-12 cmake zlib1g-dev- Arch Linux
sudo pacman -S --needed gcc cmake zlib -
Build or download third-party libraries, choose one, I recommend downloading
-
Donwload
python maadeps-download.py -
Build
git submodule update --init --recursive python maadeps-build.py
-
-
Build MAA
mkdir -p build CC=gcc-12 CXX=g++-12 cmake -B build \ -DINSTALL_THIRD_LIBS=ON \ -DINSTALL_RESOURCE=ON \ -DINSTALL_PYTHON=ON cmake --build buildTo install MAA to the target location, note that MAA is recommended to run by specifying
LD_LIBRARY_PATH, do not use administrator privileges to load MAA into/cmake --install build --prefix <target_directory>
Integration
Python
Refer to the implementation of __main__ in Python demo
C
Refer to the implementation of CppSample
C sharp
Refer to the implementation of MaaWpfGui