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

build: add app mayo #2195

Merged
merged 1 commit into from
May 30, 2024
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
35 changes: 35 additions & 0 deletions io.github.mayo/linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package:
id: io.github.mayo
name: mayo
version: 0.8.0.3
kind: app
description: |
3D CAD viewer and converter based on Qt + OpenCascade

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

source:
kind: git
url: https://github.com/fougue/mayo.git
commit: ec5d7d7590396866f2db26c85826e6c4c2b272c4
patch: patches/0001-fix-desktop-and-binary-install.patch

depends:
- id: OCCT/7.7.2
type: runtime

build:
kind: cmake
manual:
configure: |
mkdir images/16x16 images/24x24 images/32x32 images/64x64 images/128x128 images/256x256
cp images/appicon.svg images/mayoIcon.svg
cp images/appicon_16.png images/16x16/mayoIcon.png
cp images/appicon_24.png images/24x24/mayoIcon.png
cp images/appicon_32.png images/32x32/mayoIcon.png
cp images/appicon_64.png images/64x64/mayoIcon.png
cp images/appicon_128.png images/128x128/mayoIcon.png
cp images/appicon_256.png images/256x256/mayoIcon.png
cmake -B ${build_dir} ${conf_args} ${extra_args}
46 changes: 46 additions & 0 deletions io.github.mayo/patches/0001-fix-desktop-and-binary-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 134678ead7c309a673f03b751ef4575498484e8b Mon Sep 17 00:00:00 2001
From: van <[email protected]>
Date: Mon, 20 May 2024 19:46:06 +0800
Subject: [PATCH] fix-desktop-and-binary-install

---
CMakeLists.txt | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5449b8..76433d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -687,3 +687,28 @@ add_custom_target(
src/mayo_version.h.cmake
README.md
)
+
+
+#install desktop
+set(DESKTOP_FILE_CONTENT "
+[Desktop Entry]
+Type=Application
+Name=mayo
+Exec=mayo
+Icon=mayoIcon
+Categories=Utility;
+")
+file(WRITE ${CMAKE_BINARY_DIR}/mayo.desktop "${DESKTOP_FILE_CONTENT}")
+install(PROGRAMS ${CMAKE_BINARY_DIR}/mayo.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
+
+#install icons
+install(PROGRAMS images/mayoIcon.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/ )
+install(PROGRAMS images/16x16/mayoIcon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/16x16/apps/ )
+install(PROGRAMS images/24x24/mayoIcon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/24x24/apps/ )
+install(PROGRAMS images/32x32/mayoIcon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps/ )
+install(PROGRAMS images/64x64/mayoIcon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps/ )
+install(PROGRAMS images/128x128/mayoIcon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps/ )
+install(PROGRAMS images/256x256/mayoIcon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps/ )
+
+#install binary
+install(TARGETS mayo DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
\ No newline at end of file
--
2.33.1

Loading