Skip to content

How to build 如何构建

Haoshen Zhong edited this page Jun 17, 2020 · 4 revisions

You can refer to our CI file.

你可以参考我们的 CI 文件

Required Tools

Required Dependencies

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

Linux / MacOS

# 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 .

Windows

# 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:

Clone this wiki locally