mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
2.2 KiB
2.2 KiB
Read Carefully
⚠️ Please read Platform-specific Compilation Notices before trying to build.
Dependencies
- Qt 6.2
- OpenSSL
- gRPC
- protobuf
- libuv, uvw (required by Qv2rayBase)
- Qv2rayBase / Qv2rayBase-PluginInterface
- A working C++ compiler with C++17 support
Compilation Steps
1. Obtaining dependencies
- Qt
- May be installed via Qt Online Installer, distribution packages or
aqtinstall
- May be installed via Qt Online Installer, distribution packages or
- OpenSSL, gRPC, protobuf
- You can install them via
vcpkg,brewor your Linux distribution's package manager.
- You can install them via
- libuv, uvw
- You can install them via
vcpkg, or Linux distribution's package manager.
- You can install them via
- Qv2rayBase, Qv2rayBase-PluginInterface
- Installing from Linux distribution packages (if exist) is suggested.
- Otherwise, the git submodule works fine.
2. Configuring QvPersonal with CMake
Suppose that:
- the current working directory contains
CMakeLists.txt, - the build output directory will be at
./build, - the desired installation path is
$INSTALLED,
So, firstly mkdir build; cd build and the initial CMake argument will be .. -DCMAKE_INSTALL_PREFIX=$INSTALLED
Then:
- If your Qt installation is not in a standard search path:
- append
-DCMAKE_PREFIX_PATH=/path/to/your/qt/installation/
- append
- If you are using
vcpkg- append
-DCMAKE_TOOLCHAIN_FILE=/path/to/your/vcpkg/scripts/buildsystems/vcpkg.cmake
- append
- If you are using package-manager-provided
libuvanduvw:- append
-DUSE_SYSTEM_LIBUV=ON -DUSE_SYSTEM_UVW=ON
- append
- If you are using package-manager-provided
Qv2rayBaseandQv2rayBase-PluginInterface:- append
-DQV2RAY_QV2RAYBASE_PROVIDER="package"
- append
- If you are using package-manager-provided
SingleApplication:- append
-DQV2RAY_SINGLEAPPLICATION_PROVIDER="package"
- append
- If you are using
Ninja- append
-GNinja
- append
3. Starting the build
Run: cmake --build . in the build directory
- If you want to speed up the compilation using multiple cores,
- Add
--parallel CORES(whereCORESis the number of your CPU cores (or$(nproc)))
- Add
4. Installing (deployment)
- Simply run
cmake --install .in the build directory.