summarylogtreecommitdiffstats
path: root/0002-Added-QT-Desktop-file.patch
blob: 4473404801312d1558d659a95042ac958e0584b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From ee42d04c5d73b2e8f037cc18aceb044b2e87a5fb Mon Sep 17 00:00:00 2001
From: kenshen112 <finalfantasytimothy@gmail.com>
Date: Mon, 29 Aug 2022 16:43:14 -0700
Subject: [PATCH 2/2] Added QT Desktop file

---
 CMakeLists.txt                 | 10 ++++++++++
 linux_various/PCSX2.desktop.in |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91a2c6756..8f18ecb99 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,9 @@ set(TOP_CMAKE_WAS_SOURCED TRUE)
 # set module path
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
 
+#set executable name
+set(EXECUTEABLE "pcsx2")
+
 # include some generic functions to ensure correctness of the env
 include(Pcsx2Utils)
 
@@ -66,6 +69,13 @@ if(PACKAGE_MODE)
 	else()
 		set(PCSX2_MENU_CATEGORIES "Game;Emulator;")
 	endif()
+
+	if(QT_BUILD)
+		set(EXECUTEABLE "pcsx2-qt")
+	else()
+		set(EXECUTEABLE "pcsx2")
+	endif()
+
 	configure_file("${CMAKE_SOURCE_DIR}/linux_various/PCSX2.desktop.in" "${CMAKE_BINARY_DIR}/linux_various/PCSX2.desktop" @ONLY)
 
 	INSTALL(FILES "${CMAKE_BINARY_DIR}/linux_various/PCSX2.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
diff --git a/linux_various/PCSX2.desktop.in b/linux_various/PCSX2.desktop.in
index 9dbc8f2d1..321453975 100644
--- a/linux_various/PCSX2.desktop.in
+++ b/linux_various/PCSX2.desktop.in
@@ -9,7 +9,7 @@ GenericName[zh_CN]=PlayStation 2 模拟器
 Comment=Sony PlayStation 2 emulator
 Comment[ru]=Эмулятор Sony PlayStation 2
 Comment[zh_CN]=索尼 PlayStation 2 模拟器
-Exec=env GDK_BACKEND=x11 MESA_NO_ERROR=1 pcsx2
+Exec=env GDK_BACKEND=x11 MESA_NO_ERROR=1 @EXECUTEABLE@
 Icon=PCSX2
 Keywords=game;emulator;
 Categories=@PCSX2_MENU_CATEGORIES@
-- 
2.37.3