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 yarr
Browse files Browse the repository at this point in the history
Yet Another ReveRsi game

log: add app
  • Loading branch information
Van020530 authored and kamiyadm committed May 29, 2024
1 parent a399510 commit 010c735
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
20 changes: 20 additions & 0 deletions io.github.yarr/linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package:
id: io.github.yarr
name: yarr
version: 0.1.0.2
kind: app
description: |
Yet Another ReveRsi game
runtime:
id: org.deepin.Runtime
version: 23.0.0

source:
kind: git
url: https://github.com/loimu/yarr.git
commit: 6eb2b06d0a2d18c741f8e94e64d558e18e3b4ccc
patch: patches/0001-fix-desktop.patch

build:
kind: cmake
35 changes: 35 additions & 0 deletions io.github.yarr/patches/0001-fix-desktop.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 2276b2143aba5568cf17b34661549d108f520c08 Mon Sep 17 00:00:00 2001
From: van <[email protected]>
Date: Thu, 9 May 2024 22:45:49 +0800
Subject: [PATCH] fix-desktop

---
CMakeLists.txt | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c05854..4368cc1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,4 +36,16 @@ qt5_add_resources(yarr_RESOURCES_RCC ${yarr_RSRCS})
add_executable(yarr ${yarr_SRCS} ${yarr_HEADERS_MOC} ${yarr_FORMS_HEADERS} ${yarr_RESOURCES_RCC})
target_link_libraries(yarr Qt5::Core Qt5::Widgets Qt5::Network Qt5::Test)

-install(TARGETS yarr RUNTIME DESTINATION bin)
+set(DESKTOP_FILE_CONTENT "
+[Desktop Entry]
+Type=Application
+Name=yarr
+Exec=yarr
+Icon=yarr
+Categories=Game;
+")
+
+file(WRITE ${CMAKE_BINARY_DIR}/yarr.desktop "${DESKTOP_FILE_CONTENT}")
+install(PROGRAMS ${CMAKE_BINARY_DIR}/yarr.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
+install(PROGRAMS ${CMAKE_BINARY_DIR}/../yarr.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps/)
+install(TARGETS yarr DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
\ No newline at end of file
--
2.33.1

0 comments on commit 010c735

Please sign in to comment.