Merge pull request #13010 from OatmealDome/goodbye-steam

Remove Steam support
This commit is contained in:
Tilka 2024-08-16 20:03:38 +01:00 committed by GitHub
commit 45d6653a6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 1 additions and 99 deletions

View File

@ -70,9 +70,6 @@ DEFAULT_CONFIG = {
"run_unit_tests": False, "run_unit_tests": False,
# Whether we should make a build for Steam.
"steam": False,
# Whether our autoupdate functionality is enabled or not. # Whether our autoupdate functionality is enabled or not.
"autoupdate": True, "autoupdate": True,
@ -120,12 +117,6 @@ def parse_args(conf=DEFAULT_CONFIG):
parser.add_argument("--run_unit_tests", action="store_true", parser.add_argument("--run_unit_tests", action="store_true",
default=conf["run_unit_tests"]) default=conf["run_unit_tests"])
parser.add_argument(
"--steam",
help="Create a build for Steam",
action="store_true",
default=conf["steam"])
parser.add_argument( parser.add_argument(
"--autoupdate", "--autoupdate",
help="Enables our autoupdate functionality", help="Enables our autoupdate functionality",
@ -311,8 +302,6 @@ def build(config):
"-DMACOS_CODE_SIGNING_IDENTITY=" "-DMACOS_CODE_SIGNING_IDENTITY="
+ config["codesign_identity"], + config["codesign_identity"],
'-DMACOS_CODE_SIGNING="ON"', '-DMACOS_CODE_SIGNING="ON"',
"-DSTEAM="
+ python_to_cmake_bool(config["steam"]),
"-DENABLE_AUTOUPDATE=" "-DENABLE_AUTOUPDATE="
+ python_to_cmake_bool(config["autoupdate"]), + python_to_cmake_bool(config["autoupdate"]),
'-DDISTRIBUTOR=' + config['distributor'], '-DDISTRIBUTOR=' + config['distributor'],

View File

@ -104,7 +104,6 @@ option(ENABLE_VULKAN "Enables vulkan video backend" ON)
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence, show the current game on Discord" ON) option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence, show the current game on Discord" ON)
option(USE_MGBA "Enables GBA controllers emulation using libmgba" ON) option(USE_MGBA "Enables GBA controllers emulation using libmgba" ON)
option(ENABLE_AUTOUPDATE "Enables support for automatic updates" ON) option(ENABLE_AUTOUPDATE "Enables support for automatic updates" ON)
option(STEAM "Creates a build for Steam" OFF)
option(USE_RETRO_ACHIEVEMENTS "Enables integration with retroachievements.org" ON) option(USE_RETRO_ACHIEVEMENTS "Enables integration with retroachievements.org" ON)
# Maintainers: if you consider blanket disabling this for your users, please # Maintainers: if you consider blanket disabling this for your users, please
@ -391,7 +390,7 @@ if(ENABLE_LTO)
endif() endif()
if(UNIX) if(UNIX)
if(LINUX_LOCAL_DEV OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND STEAM)) if(LINUX_LOCAL_DEV)
add_definitions(-DLINUX_LOCAL_DEV) add_definitions(-DLINUX_LOCAL_DEV)
endif() endif()
endif() endif()
@ -753,10 +752,6 @@ else()
message(STATUS "libsystemd not found, disabling traversal server watchdog support") message(STATUS "libsystemd not found, disabling traversal server watchdog support")
endif() endif()
if(STEAM)
add_definitions(-DSTEAM)
endif()
if (WIN32) if (WIN32)
include_directories(Externals/WIL/include) include_directories(Externals/WIL/include)
include_directories(Externals/OpenAL/include) include_directories(Externals/OpenAL/include)

View File

@ -11,7 +11,6 @@
#define ROOT_DIR "." #define ROOT_DIR "."
// The normal user directory // The normal user directory
#ifndef STEAM
#ifdef _WIN32 #ifdef _WIN32
#define NORMAL_USER_DIR "Dolphin Emulator" #define NORMAL_USER_DIR "Dolphin Emulator"
#elif defined(__APPLE__) #elif defined(__APPLE__)
@ -21,15 +20,6 @@
#else #else
#define NORMAL_USER_DIR "dolphin-emu" #define NORMAL_USER_DIR "dolphin-emu"
#endif #endif
#else // ifndef STEAM
#ifdef _WIN32
#define NORMAL_USER_DIR "Dolphin Emulator (Steam)"
#elif defined(__APPLE__)
#define NORMAL_USER_DIR "Library/Application Support/Dolphin (Steam)"
#else
#define NORMAL_USER_DIR "dolphin-emu-steam"
#endif
#endif
// The portable user directory // The portable user directory
#ifdef _WIN32 #ifdef _WIN32

View File

@ -649,48 +649,6 @@ else()
install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() 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 "${Qt6_DIR}/../../LICENSE.*" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib"
COMMAND cp -P "${Qt6_DIR}/../../*.so*" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${Qt6_DIR}/../../../plugins" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/plugins"
)
# 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) if(USE_MGBA)
target_sources(dolphin-emu PRIVATE target_sources(dolphin-emu PRIVATE
GBAHost.cpp GBAHost.cpp

View File

@ -13,8 +13,5 @@
<!-- This is needed to use adhoc signed linked libraries --> <!-- This is needed to use adhoc signed linked libraries -->
<key>com.apple.security.cs.disable-library-validation</key> <key>com.apple.security.cs.disable-library-validation</key>
<true/> <true/>
<!-- Allows the Steam overlay library to be injected into our process -->
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -13,9 +13,6 @@
<!-- This is needed to use adhoc signed linked libraries --> <!-- This is needed to use adhoc signed linked libraries -->
<key>com.apple.security.cs.disable-library-validation</key> <key>com.apple.security.cs.disable-library-validation</key>
<true/> <true/>
<!-- Allows the Steam overlay library to be injected into our process -->
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<!-- This is needed to attach a debugger to the process --> <!-- This is needed to attach a debugger to the process -->
<key>com.apple.security.get-task-allow</key> <key>com.apple.security.get-task-allow</key>
<true/> <true/>

View File

@ -308,21 +308,12 @@ void SetUserDirectory(std::string custom_path)
// -> Use AppData\Roaming\Dolphin Emulator as the User directory path // -> Use AppData\Roaming\Dolphin Emulator as the User directory path
// 6. Default // 6. Default
// -> Use GetExeDirectory()\User // -> Use GetExeDirectory()\User
//
// On Steam builds, we take a simplified approach:
// 1. GetExeDirectory()\portable.txt exists
// -> Use GetExeDirectory()\User
// 2. AppData\Roaming exists
// -> Use AppData\Roaming\Dolphin Emulator (Steam) as the User directory path
// 3. Default
// -> Use GetExeDirectory()\User
// Get AppData path in case we need it. // Get AppData path in case we need it.
wil::unique_cotaskmem_string appdata; wil::unique_cotaskmem_string appdata;
bool appdata_found = SUCCEEDED( bool appdata_found = SUCCEEDED(
SHGetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_DEFAULT, nullptr, appdata.put())); SHGetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_DEFAULT, nullptr, appdata.put()));
#ifndef STEAM
// Check our registry keys // Check our registry keys
wil::unique_hkey hkey; wil::unique_hkey hkey;
DWORD local = 0; DWORD local = 0;
@ -389,21 +380,6 @@ void SetUserDirectory(std::string custom_path)
{ {
user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP; user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP;
} }
#else // ifndef STEAM
if (File::Exists(File::GetExeDirectory() + DIR_SEP "portable.txt")) // Case 1
{
user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP;
}
else if (appdata_found) // Case 2
{
user_path = TStrToUTF8(appdata.get()) + DIR_SEP NORMAL_USER_DIR DIR_SEP;
}
else // Case 3
{
user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP;
}
#endif
#else #else
if (File::IsDirectory(ROOT_DIR DIR_SEP EMBEDDED_USER_DIR)) if (File::IsDirectory(ROOT_DIR DIR_SEP EMBEDDED_USER_DIR))
{ {