diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 3e0b8d0ef2..0fc8c8cc90 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -457,6 +457,13 @@ endif() cotire(rpcs3) +if (UNIX) +# Copy icons to executable directory +add_custom_command(TARGET rpcs3 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_SOURCE_DIR}/bin/Icons $/Icons) +endif() + # Unix installation if(UNIX AND NOT APPLE) # Install the binary diff --git a/rpcs3/Emu/RSX/overlay_controls.h b/rpcs3/Emu/RSX/overlay_controls.h index 4a148f1fc6..8fd4eede57 100644 --- a/rpcs3/Emu/RSX/overlay_controls.h +++ b/rpcs3/Emu/RSX/overlay_controls.h @@ -472,6 +472,7 @@ namespace rsx //Resource was not found in config dir, try and grab from relative path (linux) info = std::make_unique(("Icons/ui/" + res).c_str()); #ifndef _WIN32 + // Check for Icons in ../share/rpcs3 for AppImages and /usr/bin/ if (info->data == nullptr) { char result[ PATH_MAX ]; @@ -483,6 +484,11 @@ namespace rsx std::string executablePath = dirname(result); info = std::make_unique((executablePath + "/../share/rpcs3/Icons/ui/" + res).c_str()); + // Check if the icons are in the same directory as the executable (local builds) + if (info->data == nullptr) + { + info = std::make_unique((executablePath + "/Icons/ui/" + res).c_str()); + } } #endif if (info->data != nullptr)