-
Notifications
You must be signed in to change notification settings - Fork 3.1k
DolphinQt: Add support for a Steam Runtime build #10462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
abb7b35
52d7a6f
e679502
6b05f5c
77fb5fa
5c4122e
09875c6
df22439
2648837
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could possibly use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I tried that earlier and it used RUNPATH? |
||
| # 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason this isn't done all the time? Is Qt managed by the system or do we have a special build like on Windows?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no Qt present in the steamrt, so yes, we provide our own build. It's not in a submodule, though. I believe we will just have it on the builder. |
||
| 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" | ||
|
delroth marked this conversation as resolved.
|
||
| ) | ||
|
OatmealDome marked this conversation as resolved.
|
||
|
|
||
| # 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 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it doesn't matter but this is different behavior than before because all of the
FstEntryisn't copied. It'd be nice to keep the copy constructor behavior. What was the ut failure?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data,children, andname(which we don't care about because it's the old name) are all the members of this struct.Any test that attempted using Rename would crash when running it within the steamrt. I posted a valgrind output in a comment above.