mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-18 16:45:25 +02:00
Steam for Mac with NotProton or CrossOver passes the compatibility tool a path inside its app bundle, below the folder with config/loginusers.vdf, and the tool's stand-in keeps no record of the running client, so the launcher said Steam was not running and started offline. It now looks up from that path for config/loginusers.vdf, and when started by the native Steam client under Wine takes its most recent account where the running-client checks fail. Windows and Proton, where those checks pass, are unchanged. The offline panel's hint about the launch option shows only under Wine. MACOS-SETUP.md gives the launch option (/bin/bash, ROSETTA_ADVERTISE_AVX=1 for the game's CPU check) for the launcher in a folder of its own. Based on https://github.com/Dingo-Shenanigans/ReSkate/pull/219. Co-authored-by: codejunky <pmp.codejunky@gmail.com>
57 lines
2.8 KiB
C++
57 lines
2.8 KiB
C++
#pragma once
|
|
|
|
#include "Engine/Core/Platform/launcher_support.h"
|
|
#include "updater.h"
|
|
|
|
#include <filesystem>
|
|
#include <functional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace dingosdk::launcher_app {
|
|
|
|
struct Session {
|
|
std::filesystem::path self;
|
|
launcher::SiblingPaths paths;
|
|
};
|
|
|
|
// Resolves ReSkateLauncher.exe and its sibling game files and opens ReSkate.log.
|
|
Session open_session(const std::string& log_level);
|
|
// Skate.exe and steam_api64.dll are present and exactly the supported build.
|
|
bool game_files_supported(const launcher::SiblingPaths& paths);
|
|
// The build number the installed game's data says it is (Data\layout.toc), or empty when
|
|
// there is none or it cannot be read.
|
|
std::string game_data_build(const launcher::SiblingPaths& paths);
|
|
// Whether the game's data is missing or of another build than the supported one, whatever
|
|
// Skate.exe is: Steam updated the game under it, a copy of an updated game was put here, or a
|
|
// download stopped part-way. Such a game has to be verified against the supported build, file
|
|
// by file, not only topped up. False when the data's build cannot be told.
|
|
bool game_data_mismatched(const launcher::SiblingPaths& paths);
|
|
// The config's depot/manifest ships the build this launcher was compiled for.
|
|
bool config_matches_build(const launcher_update::Config& config);
|
|
void relaunch(const std::filesystem::path& self, const std::vector<std::wstring>& arguments);
|
|
// Under Wine/Proton with MangoHud on, restarts the launcher with MangoHud off for
|
|
// its own window and returns true. The game it starts still gets MangoHud.
|
|
bool relaunch_without_mangohud(const std::filesystem::path& self, const std::vector<std::wstring>& arguments);
|
|
// Steam's client process is running and signed in to an account (or, started by the native
|
|
// Steam client through a compatibility tool, it has a signed-in account). When it is not,
|
|
// start_game runs the game in offline mode.
|
|
bool steam_signed_in();
|
|
// Running under Wine (Proton, or a Wine-based tool on macOS).
|
|
bool under_wine();
|
|
// Why steam_signed_in() is false, for ReSkate.log; empty when it is true.
|
|
std::wstring steam_offline_reason();
|
|
// Display name of the signed-in Steam account (UTF-8), or empty when Steam is
|
|
// not running, signed out, or the name cannot be read.
|
|
std::string steam_persona_name();
|
|
// The signed-in account's profile picture in Steam's avatar cache, or empty
|
|
// when Steam is not running, signed out, or has not cached it.
|
|
std::filesystem::path steam_avatar_path();
|
|
// Validates, starts, injects and resumes Skate; returns its process id.
|
|
// `created` receives the id as soon as the process exists (ReSkate's startup
|
|
// splash can open before this returns). Throws a user-facing message.
|
|
DWORD start_game(const Session& session, const launcher::LaunchOptions& options,
|
|
const std::function<void(DWORD)>& created = {});
|
|
|
|
} // namespace dingosdk::launcher_app
|