Files
ReSkate/Launcher/launch.h
T
AyeZeeBB 4ac1343b95 Crash reports: self-hosted Sentry instead of Backtrace, and opt-in performance timings
Crash dumps now go to the project's own Sentry server. The launcher's
out-of-process helper is unchanged; only where it posts and what it expects
back are:

- The default endpoint is the Sentry project's minidump URL. Report
  attributes travel as Sentry tags, with the release as reskate@<version>.
- An upload counts as accepted when the server answers with an event ID.
- "backtrace" is "crash_report" throughout: the namespace, files, CMake
  targets, DINGOSDK_CRASH_REPORT_URL, DINGOSDK_BUILD_CRASH_REPORT_TESTS and
  the RESKATE_CRASH_REPORT_URL override.

Performance timings are new, and off unless "Send performance timings" is
ticked in the launcher's settings (RESKATE_TRACING=1). A small tracer
(Engine/Core/Debug/trace.h) posts each finished step to Sentry as a
transaction from a background thread; the launcher and the game it starts
share one trace. Timed: the update check, the Steam download, Thunderstore
installs, the mod merge, starting the game, the launch up to the first
playable level, each level load, joining a session, fetching the identity
lists, and the time spent in each level with its average frame rate and
long frames. Turning crash reports off turns timings off too.
2026-10-12 23:24:33 -05:00

43 lines
1.9 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 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