Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions deploy_dep

This file was deleted.

162 changes: 0 additions & 162 deletions install_dep

This file was deleted.

33 changes: 16 additions & 17 deletions linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,35 @@ command:
- deepin-editor

build: |
# 下载和安装依赖
apt -y install --download-only qt6-5compat-dev qt6-base-dev qt6-tools-dev-tools qt6-tools-dev qt6-base-private-dev qt6-svg-dev libdtk6widget-dev libdtk6gui-dev libdtk6core-dev libdtk6declarative-dev libpolkit-qt6-1-dev libkf6syntaxhighlighting-dev libkf6codecs-dev libgtest-dev libgmock-dev libchardet-dev libuchardet-dev libicu-dev deepin-event-log
bash ./install_dep /var/cache/apt/archives "$PREFIX"

# 修改路径
sed -i 's|set(QT_LRELEASE "/lib/qt${QT_VERSION_MAJOR}/bin/lrelease")|set(QT_LRELEASE "lrelease")|g' cmake/translation-generate.cmake

# 构建
# 优先从 /runtime 解析 Qt6/DTK6,避免 buildext 装入 /usr 的 qt6 开发包抢占 find_package
VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
cmake -B build ${conf_args} \
-DCMAKE_PREFIX_PATH=/runtime \
-DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DBUILD_TESTS=OFF \
-DVERSION=${VERSION}
cmake --build build -j`nproc`
cmake --build build --target install > install.log 2>&1

# 项目生成应用名和动态隐式加载的依赖库,ldd无法找到的其他库
LDD_FILES=(
deepin-editor
libdeepin-event-log.so
libzpdcallback.so
)

# 生成.install 文件
bash ./deploy_dep "${LDD_FILES[@]}"
cmake --build build --target install

# allow apt download in build and do apt update
# 构建期与运行期缺失依赖声明式安装,由 linglong 解析闭包
buildext:
apt:
build_depends:
- libc6
- cmake
- libchardet-dev
- libicu-dev
- libkf6codecs-dev
- libkf6syntaxhighlighting-dev
- libuchardet-dev
depends:
- deepin-event-log
- libchardet1
- libkf6codecs6
- libkf6syntaxhighlighting6
- libuchardet0
Loading