mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-06 19:01:36 +03:00
Merge pull request #10462 from OatmealDome/steam-runtime
DolphinQt: Add support for a Steam Runtime build
This commit is contained in:
commit
daf8e3ddde
4 changed files with 66 additions and 6 deletions
|
@ -13,7 +13,11 @@
|
|||
|
||||
typedef GLXContext (*PFNGLXCREATECONTEXTATTRIBSPROC)(Display*, GLXFBConfig, GLXContext, Bool,
|
||||
const int*);
|
||||
|
||||
#ifndef GLX_EXT_swap_control
|
||||
typedef void (*PFNGLXSWAPINTERVALEXTPROC)(Display*, GLXDrawable, int);
|
||||
#endif
|
||||
|
||||
typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int);
|
||||
|
||||
static PFNGLXCREATECONTEXTATTRIBSPROC glXCreateContextAttribs = nullptr;
|
||||
|
|
|
@ -552,16 +552,20 @@ ResultCode HostFileSystem::Rename(Uid uid, Gid gid, const std::string& old_path,
|
|||
}
|
||||
}
|
||||
|
||||
// Finally, remove the child from the old parent and move it to the new parent.
|
||||
FstEntry* new_entry = GetFstEntryForPath(new_path);
|
||||
new_entry->name = split_new_path.file_name;
|
||||
|
||||
// Finally, remove the child from the old parent and move it to the new parent.
|
||||
const auto it = std::find_if(old_parent->children.begin(), old_parent->children.end(),
|
||||
GetNamePredicate(split_old_path.file_name));
|
||||
if (it != old_parent->children.end())
|
||||
{
|
||||
*new_entry = *it;
|
||||
new_entry->data = it->data;
|
||||
new_entry->children = it->children;
|
||||
|
||||
old_parent->children.erase(it);
|
||||
}
|
||||
new_entry->name = split_new_path.file_name;
|
||||
|
||||
SaveFst();
|
||||
|
||||
return ResultCode::Success;
|
||||
|
|
|
@ -606,6 +606,47 @@ else()
|
|||
install(TARGETS dolphin-emu RUNTIME DESTINATION ${bindir})
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND STEAM)
|
||||
# Set that we want ORIGIN in FLAGS.
|
||||
# We also want RPATH, not RUNPATH, so disable the new tags.
|
||||
target_link_options(dolphin-emu
|
||||
PRIVATE
|
||||
LINKER:-z,origin
|
||||
LINKER:--disable-new-dtags
|
||||
)
|
||||
|
||||
# For Steam Runtime builds, our Qt shared libraries will be in a "lib" folder.
|
||||
set_target_properties(dolphin-emu PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH true
|
||||
INSTALL_RPATH "\$ORIGIN/lib"
|
||||
)
|
||||
|
||||
add_custom_command(TARGET dolphin-emu POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib"
|
||||
COMMAND cp -P "${QT_DIR}/../../*.so*" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${QT_DIR}/../../../plugins/platforms" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/platforms"
|
||||
)
|
||||
|
||||
# Copy qt.conf
|
||||
target_sources(dolphin-emu PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf")
|
||||
add_custom_command(TARGET dolphin-emu POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf"
|
||||
)
|
||||
|
||||
# Mark all data files as resources
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/Data/Sys")
|
||||
file(GLOB_RECURSE resources RELATIVE "${CMAKE_SOURCE_DIR}/Data" "${CMAKE_SOURCE_DIR}/Data/Sys/*")
|
||||
foreach(res ${resources})
|
||||
target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Data/${res}")
|
||||
source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/Data/${res}")
|
||||
endforeach()
|
||||
|
||||
# Copy Sys folder
|
||||
add_custom_command(TARGET dolphin-emu POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/Data/Sys" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sys"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(USE_MGBA)
|
||||
target_sources(dolphin-emu PRIVATE
|
||||
GBAHost.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue