From 3fa56f45af2a569bdb3d7dde70231ca2cd9c3174 Mon Sep 17 00:00:00 2001 From: mhc2910463910 <2910463910@qq.com> Date: Wed, 8 May 2024 15:43:55 +0800 Subject: [PATCH] build: add app qsseditor A cross-platform tool to edit and preview Qt style sheets. Log: add app qsseditor --- io.github.qsseditor/linglong.yaml | 25 +++++++++++++++++++ io.github.qsseditor/patches/fix-icon.patch | 17 +++++++++++++ io.github.qsseditor/patches/fix-install.patch | 22 ++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 io.github.qsseditor/linglong.yaml create mode 100644 io.github.qsseditor/patches/fix-icon.patch create mode 100644 io.github.qsseditor/patches/fix-install.patch diff --git a/io.github.qsseditor/linglong.yaml b/io.github.qsseditor/linglong.yaml new file mode 100644 index 000000000..ed16b68b2 --- /dev/null +++ b/io.github.qsseditor/linglong.yaml @@ -0,0 +1,25 @@ +package: + id: io.github.qsseditor + name: qsseditor + version: 0.6.1 + kind: app + description: | + A cross-platform tool to edit and preview Qt style sheets. + +runtime: + id: org.deepin.Runtime + version: 23.0.0 + +depends: + - id: qscintilla + version: 2.13.3.1 + +source: + kind: git + url: "https://github.com/HappySeaFox/qsseditor.git" + commit: 582a8fa147185d26c2ede7cab1d9f12322a15e37 + patch: + - patches/fix-install.patch + - patches/fix-icon.patch +build: + kind: qmake diff --git a/io.github.qsseditor/patches/fix-icon.patch b/io.github.qsseditor/patches/fix-icon.patch new file mode 100644 index 000000000..55cbae13a --- /dev/null +++ b/io.github.qsseditor/patches/fix-icon.patch @@ -0,0 +1,17 @@ +diff --git a/qsseditor.desktop b/qsseditor.desktop +index 9d9f0ac..c11762c 100644 +--- a/qsseditor.desktop ++++ b/qsseditor.desktop +@@ -2,10 +2,8 @@ + Encoding=UTF-8 + Type=Application + Categories=Qt;Graphics;Viewer +-Exec=qsseditor %f +-Icon=qsseditor ++Exec=QssEditor %f ++Icon=../icons/qsseditor-48.png + Terminal=false + Name=QSS Editor +-Name[ru]=Редактор QSS + Comment=Tool to edit and preview Qt style sheets +-Comment[ru]=Утилита для редактирования и предпросмотра таблиц стилей Qt diff --git a/io.github.qsseditor/patches/fix-install.patch b/io.github.qsseditor/patches/fix-install.patch new file mode 100644 index 000000000..25d4c5866 --- /dev/null +++ b/io.github.qsseditor/patches/fix-install.patch @@ -0,0 +1,22 @@ +diff --git a/QssEditor.pro b/QssEditor.pro +index 6beb244..5af598f 100644 +--- a/QssEditor.pro ++++ b/QssEditor.pro +@@ -189,3 +189,16 @@ OTHER_FILES += \ + # distribution + HTTPROOT="https://github.com/smoked-herring/qsseditor" + DEFINES += HTTPROOT=$$sprintf("\"\\\"%1\\\"\"", $$HTTPROOT) ++ ++#install ++DESKTOP_FILE = qsseditor.desktop ++ ++# 将 desktop 文件内容写入 ++desktop.files += $$DESKTOP_FILE ++desktop.path = $${PREFIX}/share/applications ++ ++icons.files += icons/qsseditor-48.png ++icons.path = $${PREFIX}/share/icons # 图标文件的安装路径 ++# 安装规则 ++target.path = $$(PREFIX)/bin ++INSTALLS += target desktop icons +\ No newline at end of file