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

Commit

Permalink
build: add app qcad
Browse files Browse the repository at this point in the history
QCAD Community Edition 是一个计算机辅助设计应用 (CAD)。

Log: add app qcad , fix install
  • Loading branch information
mhc2910463910 committed May 29, 2024
1 parent ceda2d7 commit 0f3cfb7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
22 changes: 22 additions & 0 deletions io.github.qcad/linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package:
id: io.github.qcad
name: qcad
version: 3.29.6.6
kind: app
description: |
QCAD Community Edition 是一个计算机辅助设计应用 (CAD)。.
runtime:
id: org.deepin.Runtime
version: 23.0.0

source:
kind: git
url: "https://github.com/qcad/qcad.git"
commit: 38a3944de996268087dc0c51f007109c0a7cb2b6
patch:
- patches/fix-3rdparty.patch
- patches/fix-install.patch
- patches/fix-desktop.patch
build:
kind: qmake
17 changes: 17 additions & 0 deletions io.github.qcad/patches/fix-3rdparty.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/3rdparty/3rdparty.pro b/src/3rdparty/3rdparty.pro
index 55e5271680..3205be912f 100644
--- a/src/3rdparty/3rdparty.pro
+++ b/src/3rdparty/3rdparty.pro
@@ -19,8 +19,10 @@ else {
}

!r_mobile {
- exists(qt-labs-qtscriptgenerator-$${QT_VERSION}) {
- SUBDIRS += qt-labs-qtscriptgenerator-$${QT_VERSION}
+# exists(qt-labs-qtscriptgenerator-$${QT_VERSION}) {
+# SUBDIRS += qt-labs-qtscriptgenerator-$${QT_VERSION}
+ exists(qt-labs-qtscriptgenerator-5.15.8) {
+ SUBDIRS += qt-labs-qtscriptgenerator-5.15.8
}
else {
lessThan(QT_MAJOR_VERSION, 6) {
13 changes: 13 additions & 0 deletions io.github.qcad/patches/fix-desktop.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/qcad.desktop b/qcad.desktop
index 93c5e97201..2d0e6bf32a 100644
--- a/qcad.desktop
+++ b/qcad.desktop
@@ -48,7 +48,7 @@ Comment[sv]=2D CAD-system
Comment[sl]=Sistem 2D CAD
Comment[uk]=2D САПР
Comment[tr]=2D CAD Sistemi
-Exec=qcad %F
+Exec=qcad-bin %F
X-MultipleArgs=true
Icon=qcad_icon
Terminal=false
20 changes: 20 additions & 0 deletions io.github.qcad/patches/fix-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/qcad.pro b/qcad.pro
index 74f874ef9d..65d8958023 100644
--- a/qcad.pro
+++ b/qcad.pro
@@ -26,3 +26,14 @@ else {
dummy {
SUBDIRS += scripts
}
+releasefile.target = install
+releasefile.commands = mkdir -p $$PREFIX/bin && cp -r $$PWD/release/* $$PREFIX/bin && mkdir -p $$PREFIX/bin/plugins && cp -r $$PWD/plugins/* $$PREFIX/bin/plugins
+QMAKE_EXTRA_TARGETS += releasefile
+
+desktopfile.files += $$PWD/qcad.desktop
+desktopfile.path = $$PREFIX/share/applications
+INSTALLS += desktopfile
+
+iconfile.files += $$PWD/scripts/qcad_icon.svg
+iconfile.path = $$PREFIX/share/icons/hicolor/scalable/apps
+INSTALLS += iconfile
\ No newline at end of file

0 comments on commit 0f3cfb7

Please sign in to comment.