mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
Install and load icons from Icons in executable directory, fixes local builds using Icons
This commit is contained in:
parent
9d079ede85
commit
70fe0cc224
@ -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 $<TARGET_FILE_DIR:rpcs3>/Icons)
|
||||
endif()
|
||||
|
||||
# Unix installation
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Install the binary
|
||||
|
@ -472,6 +472,7 @@ namespace rsx
|
||||
//Resource was not found in config dir, try and grab from relative path (linux)
|
||||
info = std::make_unique<image_info>(("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<image_info>((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<image_info>((executablePath + "/Icons/ui/" + res).c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (info->data != nullptr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user