mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-21 03:56:36 +02:00
After Steam updated skate., some installs had the supported Skate.exe over the new build's data (a copied game, or a download that stopped part-way). The launcher called that ready, every mod was left out as "made for game build 29544144, not the installed 29663206; rebuild it with ReSkate Studio", and the mods stayed out after the game files were put right. Launcher - Ready now also needs the game's data to be the supported build, read from Data\layout.toc against supported_build::game_data_changelist (29544144). Data of another build, or none, reads "Game files need verifying". - DOWNLOAD in that state checks every file (-validate) instead of fetching only what is missing. A download that fails part-way no longer ends on ready because Skate.exe arrived. - Data whose build cannot be read does not block. Mods - A mod left out because the game was of another build is no longer remembered in .reskate-excluded.json: it is checked on every launch. One already remembered for it is looked at again. - When it is the game that is not the supported build, the mod's message says to verify the game files in the launcher, not to rebuild the mod.
51 lines
2.5 KiB
C++
51 lines
2.5 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. When it is
|
|
// not, start_game runs the game in offline mode.
|
|
bool steam_signed_in();
|
|
// 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();
|
|
// 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
|