-
Notifications
You must be signed in to change notification settings - Fork 64
How to build 如何构建
You can refer to our CI file.
你可以参考我们的 CI 文件。
Required Tools
Required Dependencies
- Qt >= 5.11 (recommendation 5.14)
- KSyntaxHighlighting
Notepanda uses git submodules for some of its dependencies. To make sure submodules are restored or updated, be sure to run the following prior to building:
Notepanda 使用 git submodules 处理它的一些依赖关系。为了确保子模块被恢复或更新,请确保在构建之前运行以下内容:
git submodule update --init --recursive
If you don't want to build KSyntaxHighlighting yourself or it’s difficult to build (especially under Windows), you can use Craft - an open source meta build system and package manager. by KDE:
如果你不想自己构建 KSyntaxHighlighting 或者难以构建(尤其是在 Windows 系统下),你可以使用 Craft - 一个开源的元构建系统和程序包管理器。KDE 制作:
craft syntax-highlighting
Then, you can ignore the Build ECM
and Build KSyntaxHighlighting
sections below.
然后,您可以忽略下面的 Build ECM
和 Build KSyntaxHighlighting
部分。
# Build ECM
cd src/3rdparty/extra-cmake-modules
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr
cmake --build .
cmake --build . --target install
# Build KSyntaxHighlighting
cd ../../syntax-highlighting
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr
cmake --build . --parallel $(nproc)
cmake --build . --target install
# Build Notepanda
cd ../../../../
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./AppDir/usr
cmake --build . --parallel $(nproc)
cmake --install .
# Build ECM
cd src/3rdparty/extra-cmake-modules
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF
cmake --build .
cmake --build . --target install
# Build KSyntaxHighlighting
cd ../../syntax-highlighting
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF
cmake --build .
cmake --build . --target install
# Build Notepanda
cd ../../../../
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=Release -DKF5SyntaxHighlighting_DIR="C:/Program Files (x86)/ECM/lib/cmake/KF5SyntaxHighlighting"
cmake --build . --parallel $(nproc)
cmake --install .
We need you! Join us to develop together! :smiley: