summarylogtreecommitdiffstats
path: root/0001-QtHost.cpp-Fixed-Resources-dir.patch
blob: 8d7041663d5af9b7f5685d1590afa7586480bb98 (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
55
56
57
58
59
60
61
62
63
64
65
66
From 5df445e8989eecd8796ee3bbfa74c3f0997cf26d Mon Sep 17 00:00:00 2001
From: kenshen112 <finalfantasytimothy@gmail.com>
Date: Sun, 22 May 2022 16:44:51 -0700
Subject: [PATCH 1/2] QtHost.cpp: Fixed Resources dir

Fixed location of Resources Dir to proper usr/share location

Fixed CMake to enable package mode
---
 .gitignore                    | 1 +
 pcsx2-qt/CMakeLists.txt       | 4 ++--
 pcsx2/Frontend/CommonHost.cpp | 8 +++++---
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index b3091f88f..64b010d33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,6 +75,7 @@ oprofile_data/
 /bin/**/*.lib
 /bin/**/*.pdb
 /bin/pcsx2
+/bin/pcsx2-qt
 /bin/PCSX2-linux.sh
 /bin/*ReplayLoader
 /bin/GS*.txt
diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt
index 619cc3932..e44581147 100644
--- a/pcsx2-qt/CMakeLists.txt
+++ b/pcsx2-qt/CMakeLists.txt
@@ -4,8 +4,8 @@ set(CMAKE_AUTOUIC ON)
 
 add_executable(pcsx2-qt)
 
-if (PACKAGE_MODE)
-	message(FATAL_ERROR "Package mode is not supported for Qt builds.")
+if(PACKAGE_MODE)
+	install(TARGETS pcsx2-qt DESTINATION ${CMAKE_INSTALL_BINDIR})
 else()
 	install(TARGETS pcsx2-qt DESTINATION ${CMAKE_SOURCE_DIR}/bin)
 endif()
diff --git a/pcsx2/Frontend/CommonHost.cpp b/pcsx2/Frontend/CommonHost.cpp
index c6c536182..980d2b887 100644
--- a/pcsx2/Frontend/CommonHost.cpp
+++ b/pcsx2/Frontend/CommonHost.cpp
@@ -110,12 +110,14 @@ void CommonHost::SetAppRoot()
 
 void CommonHost::SetResourcesDirectory()
 {
-#ifndef __APPLE__
+#ifdef __APPLE__
+	// On macOS, this is in the bundle resources directory.
+	EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources"));
+#elif !defined(PCSX2_APP_DATADIR)
 	// On Windows/Linux, these are in the binary directory.
 	EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources");
 #else
-	// On macOS, this is in the bundle resources directory.
-	EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources"));
+	EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, PCSX2_APP_DATADIR "/resources"));
 #endif
 }
 
-- 
2.37.3