diff options
author | kenshen112 | 2022-12-24 10:29:17 -0700 |
---|---|---|
committer | kenshen112 | 2022-12-24 10:29:17 -0700 |
commit | c58cc5ed24bec6cd6631a464559def796ad448ec (patch) | |
tree | f709f0607f7d77ceb35813d2cfae4607147533c9 | |
parent | fce8af93513526f4bca9cb327208949014984097 (diff) | |
download | aur-c58cc5ed24bec6cd6631a464559def796ad448ec.tar.gz |
Remove WX
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | 0001-Fix-resources-Fix-CMake.patch | 79 | ||||
-rw-r--r-- | 0001-QtHost.cpp-Fixed-Resources-dir.patch | 66 | ||||
-rw-r--r-- | 0002-Added-QT-Desktop-file.patch | 54 | ||||
-rw-r--r-- | PKGBUILD | 12 |
5 files changed, 87 insertions, 132 deletions
@@ -1,6 +1,6 @@ pkgbase = pcsx2-git pkgdesc = A Sony PlayStation 2 emulator - pkgver = v1.7.3770.r0.g9f461253a + pkgver = v1.7.3780.r0.g18bdf4a8d pkgrel = 1 url = https://www.pcsx2.net install = post.install @@ -39,10 +39,8 @@ pkgbase = pcsx2-git provides = pcsx2-qt conflicts = pcsx2 source = git+https://github.com/PCSX2/pcsx2.git - source = 0001-QtHost.cpp-Fixed-Resources-dir.patch - source = 0002-Added-QT-Desktop-file.patch + source = 0001-Fix-resources-Fix-CMake.patch sha256sums = SKIP - sha256sums = 88207a76ba366a343b5b9d8f90da0f44f2dd8145df0ad7582c223ff072528473 - sha256sums = 33b3d6bde2c3973db918a28d4eacbef6e5db4be65856091988364f840d3702e1 + sha256sums = 5b7e23e32c65b07c0450250e2faf6f1e62a03dd75342766a0c917ee768abcd30 pkgname = pcsx2-git diff --git a/0001-Fix-resources-Fix-CMake.patch b/0001-Fix-resources-Fix-CMake.patch new file mode 100644 index 000000000000..c9460ba25193 --- /dev/null +++ b/0001-Fix-resources-Fix-CMake.patch @@ -0,0 +1,79 @@ +From a01eceba4f1b28fa2a6e9fd3c64058b12955db08 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 + +--- + cmake/BuildParameters.cmake | 9 +++++++++ + pcsx2-qt/CMakeLists.txt | 8 ++++---- + pcsx2/Frontend/CommonHost.cpp | 12 +++++++----- + 3 files changed, 20 insertions(+), 9 deletions(-) + +diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake +index f38e0bea8..2e11ee7f7 100644 +--- a/cmake/BuildParameters.cmake ++++ b/cmake/BuildParameters.cmake +@@ -54,6 +54,15 @@ if(UNIX AND NOT APPLE) + option(WAYLAND_API "Enable Wayland support" OFF) + 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 7e822cb2a..0581bca2b 100644 +--- a/pcsx2-qt/CMakeLists.txt ++++ b/pcsx2-qt/CMakeLists.txt +@@ -4,11 +4,11 @@ set(CMAKE_AUTOUIC ON) + + add_executable(pcsx2-qt) + +-if (PACKAGE_MODE) +- message(FATAL_ERROR "Package mode is not supported for Qt builds.") +-else() ++if(PACKAGE_MODE) ++ install(TARGETS pcsx2-qt DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ else() + install(TARGETS pcsx2-qt DESTINATION ${CMAKE_SOURCE_DIR}/bin) +-endif() ++ endif() + + target_sources(pcsx2-qt PRIVATE + AboutDialog.cpp +diff --git a/pcsx2/Frontend/CommonHost.cpp b/pcsx2/Frontend/CommonHost.cpp +index ab992e483..477fdce63 100644 +--- a/pcsx2/Frontend/CommonHost.cpp ++++ b/pcsx2/Frontend/CommonHost.cpp +@@ -128,13 +128,15 @@ void CommonHost::SetAppRoot() + + void CommonHost::SetResourcesDirectory() + { +-#ifndef __APPLE__ +- // On Windows/Linux, these are in the binary directory. +- EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources"); +-#else ++#ifdef __APPLE__ + // On macOS, this is in the bundle resources directory. + EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources")); +-#endif ++ #elif !defined(PCSX2_APP_DATADIR) ++ // On Windows/Linux, these are in the binary directory. ++ EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources"); ++ #else ++ EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, PCSX2_APP_DATADIR "/resources")); ++ #endif + } + + bool CommonHost::ShouldUsePortableMode() +-- +2.38.1 + diff --git a/0001-QtHost.cpp-Fixed-Resources-dir.patch b/0001-QtHost.cpp-Fixed-Resources-dir.patch deleted file mode 100644 index 8d7041663d5a..000000000000 --- a/0001-QtHost.cpp-Fixed-Resources-dir.patch +++ /dev/null @@ -1,66 +0,0 @@ -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 - diff --git a/0002-Added-QT-Desktop-file.patch b/0002-Added-QT-Desktop-file.patch deleted file mode 100644 index 447340480131..000000000000 --- a/0002-Added-QT-Desktop-file.patch +++ /dev/null @@ -1,54 +0,0 @@ -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 - @@ -3,7 +3,7 @@ # Contributor: Themaister <maister@archlinux.us> pkgname=pcsx2-git -pkgver=v1.7.3770.r0.g9f461253a +pkgver=v1.7.3780.r0.g18bdf4a8d pkgrel=1 pkgdesc='A Sony PlayStation 2 emulator' arch=(x86_64) @@ -61,16 +61,14 @@ conflicts=(pcsx2) source=( git+https://github.com/PCSX2/pcsx2.git -0001-QtHost.cpp-Fixed-Resources-dir.patch -0002-Added-QT-Desktop-file.patch +0001-Fix-resources-Fix-CMake.patch ) prepare() { cd $srcdir/pcsx2 git submodule update --init --recursive - git apply -3 "${srcdir}/0001-QtHost.cpp-Fixed-Resources-dir.patch" - git apply -3 "${srcdir}/0002-Added-QT-Desktop-file.patch" + git apply -3 "${srcdir}/0001-Fix-resources-Fix-CMake.patch" export CMAKE_C_COMPILER=/usr/bin/clang-12 export CMAKE_CXX_COMPILER=/usr/bin/clang++-12 @@ -112,5 +110,5 @@ package() # vim: ts=2 sw=2 et: sha256sums=('SKIP' - '88207a76ba366a343b5b9d8f90da0f44f2dd8145df0ad7582c223ff072528473' - '33b3d6bde2c3973db918a28d4eacbef6e5db4be65856091988364f840d3702e1') + '5b7e23e32c65b07c0450250e2faf6f1e62a03dd75342766a0c917ee768abcd30' +) |