Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

build: add app sprinter #356

Closed
wants to merge 1 commit into from
Closed
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
20 changes: 20 additions & 0 deletions io.github.sprinter/linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package:
id: io.github.sprinter
name: sprinter
version: 0.0.1
kind: app
description: |
Simple Qt application based on dmenu.

runtime:
id: org.deepin.Runtime
version: 23.0.0

source:
kind: git
url: https://github.com/hluk/sprinter.git
commit: 396c84bf22695dcb5a51f8e8b7375ca7101218bd
patch: patches/fix.patch

build:
kind: cmake
24 changes: 24 additions & 0 deletions io.github.sprinter/patches/fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- ../CMakeLists.txt 2023-10-28 12:09:28.601666654 +0800
+++ ../CMakeLists.txt 2023-10-28 10:03:47.639970000 +0800
@@ -39,6 +39,20 @@
${QT_LIBRARIES}
${sprinter_LIBRARIES}
)
+# 设置.desktop文件的内容
+set(DESKTOP_FILE_CONTENT "
+[Desktop Entry]
+Type=Application
+Name=sprinter
+Exec=sprinter
+Icon=/source/resources/icon
+Categories=Utility;
+")

-install(TARGETS sprinter DESTINATION bin)
+# 将.desktop文件写入构建目录
+file(WRITE ${CMAKE_BINARY_DIR}/sprinter.desktop "${DESKTOP_FILE_CONTENT}")
+
+install(PROGRAMS ${CMAKE_BINARY_DIR}/sprinter.desktop DESTINATION /opt/apps/io.github.sprinter/files/share/applications)
+
+install(TARGETS sprinter DESTINATION /opt/apps/io.github.sprinter/files/bin)

Loading