summarylogtreecommitdiffstats
path: root/0001-Fix-resources-Fix-CMake.patch
diff options
context:
space:
mode:
authorkenshen1122023-03-24 09:28:22 -0700
committerkenshen1122023-03-24 09:28:22 -0700
commit4d43022a48af8b622aaff92aeb563f2503faa1ae (patch)
tree22806b5dec89fa7fc567f300cada7b7f0d0361d3 /0001-Fix-resources-Fix-CMake.patch
parent37561f2bb15910242def06a3b6fa3d1b9e5dae39 (diff)
downloadaur-4d43022a48af8b622aaff92aeb563f2503faa1ae.tar.gz
Further PKGBUILD work
Diffstat (limited to '0001-Fix-resources-Fix-CMake.patch')
-rw-r--r--0001-Fix-resources-Fix-CMake.patch95
1 files changed, 0 insertions, 95 deletions
diff --git a/0001-Fix-resources-Fix-CMake.patch b/0001-Fix-resources-Fix-CMake.patch
deleted file mode 100644
index a79c2bdeb866..000000000000
--- a/0001-Fix-resources-Fix-CMake.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 00251d1894fcd819768a3a6fe276a98148cfa86b Mon Sep 17 00:00:00 2001
-From: kenshen112 <finalfantasytimothy@gmail.com>
-Date: Sat, 24 Dec 2022 10:00:03 -0700
-Subject: [PATCH] Fix resources, Fix CMake
-
-S
----
- CMakeLists.txt | 5 +++++
- cmake/BuildParameters.cmake | 9 +++++++++
- pcsx2-qt/CMakeLists.txt | 6 ++++++
- pcsx2/Frontend/CommonHost.cpp | 8 +++++---
- 4 files changed, 25 insertions(+), 3 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 35622ee3c..bcdca1954 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -25,6 +25,9 @@ endif()
- # include some generic functions to ensure correctness of the env
- include(Pcsx2Utils)
-
-+set(EXECUTEABLE "pcsx2-qt")
-+set(PCSX2_MENU_CATEGORIES "Game;Emulator;")
-+
- check_no_parenthesis_in_path()
- detectOperatingSystem()
- check_compiler_version("7.0" "7.0")
-@@ -63,3 +66,5 @@ if(ACTUALLY_ENABLE_TESTS)
- add_subdirectory(tests/ctest)
- endif()
-
-+INSTALL(DIRECTORY "${CMAKE_BINARY_DIR}/bin/resources" DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2)
-+INSTALL(FILES "${CMAKE_BINARY_DIR}/bin/PCSX2.desktop" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
-diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake
-index a402ab883..abb4b228f 100644
---- a/cmake/BuildParameters.cmake
-+++ b/cmake/BuildParameters.cmake
-@@ -36,6 +36,15 @@ if(UNIX AND NOT APPLE)
- option(WAYLAND_API "Enable Wayland support" ON)
- endif()
-
-+if(PACKAGE_MODE)
-+ file(RELATIVE_PATH relative_datadir ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2)
-+ file(RELATIVE_PATH relative_docdir ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_DOCDIR})
-+ # Compile all source codes with those defines
-+ list(APPEND PCSX2_DEFS
-+ PCSX2_APP_DATADIR="${relative_datadir}"
-+ PCSX2_APP_DOCDIR="${relative_docdir}")
-+endif()
-+
- if(APPLE)
- option(OSX_USE_DEFAULT_SEARCH_PATH "Don't prioritize system library paths" OFF)
- option(SKIP_POSTPROCESS_BUNDLE "Skip postprocessing bundle for redistributability" OFF)
-diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt
-index 20590de61..10bf6583c 100644
---- a/pcsx2-qt/CMakeLists.txt
-+++ b/pcsx2-qt/CMakeLists.txt
-@@ -4,6 +4,12 @@ set(CMAKE_AUTOUIC ON)
-
- add_executable(pcsx2-qt)
-
-+if(PACKAGE_MODE)
-+ install(TARGETS pcsx2-qt DESTINATION ${CMAKE_INSTALL_BINDIR})
-+ else()
-+ install(TARGETS pcsx2-qt DESTINATION ${CMAKE_SOURCE_DIR}/bin)
-+endif()
-+
- target_sources(pcsx2-qt PRIVATE
- AboutDialog.cpp
- AboutDialog.h
-diff --git a/pcsx2/Frontend/CommonHost.cpp b/pcsx2/Frontend/CommonHost.cpp
-index 9da1dafd9..d948ac704 100644
---- a/pcsx2/Frontend/CommonHost.cpp
-+++ b/pcsx2/Frontend/CommonHost.cpp
-@@ -128,12 +128,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.39.0
-