victory play: the program alone, beside the title, is all there is to start
Started with no command (a double click) or as `victory play [exe]`, the program finds game_scarlett_master.exe beside itself and starts it with the settings scripts\play-foxhound.ps1 gives it, built in (apps/victory/src/play.rs): the same switch table, what the F1 menu saved over it, DLSS and frame generation made ready where NVIDIA's files are, the frame rate cap, and `--set NAME=VALUE` for anything else. Nothing is written beside the program or into the title's folder: the menu's settings file, a log for every start (play-<utc>-<pid>.log, the newest ten kept) and NVIDIA's files are under %LOCALAPPDATA%\victory, where the caches and saves already are. NVIDIA's DLSS and frame generation files stay NVIDIA's and are not part of the program: a first start without them asks once whether to fetch them from NVIDIA's GitHub, and `victory get-dlss` does it later (the fetcher script, embedded, with a new -To). victory-core logging: VICTORY_LOG_FILE adds a plain-text log file. README: the quick start is the release's exe (download, put beside the title, double click); building it yourself is kept below. Checked on an RTX 5070: no title beside it (a clear error), a file of that name (found, Streamline loaded), get-dlss (66.6 MB in 38 s, files identical to the SDK's), two muted runs of the title from a folder of the program's own (25-28 fps in the opening rooms, right picture, nothing written beside it), and a start from the title's folder by the user. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
1010e02314
commit
48ad7859fb
6 files changed
+604
-34
No files matched your search
@@ -5,6 +5,8 @@
|
||||
|
||||
mod census;
|
||||
mod inspect;
|
||||
#[cfg(windows)]
|
||||
mod play;
|
||||
#[cfg(all(windows, feature = "diagnostics"))]
|
||||
mod replay;
|
||||
mod run;
|
||||
@@ -127,6 +129,16 @@ enum Command {
|
||||
#[arg(long, hide = true)]
|
||||
these: Option<String>,
|
||||
},
|
||||
/// Play: the title with this fork's settings, as a start with no
|
||||
/// command at all does (a double click on the program beside the
|
||||
/// title's `game_scarlett_master.exe`). F1 in the game is the settings
|
||||
/// menu, F3 the stats panel.
|
||||
#[cfg(windows)]
|
||||
Play(play::Play),
|
||||
/// Fetch NVIDIA's DLSS and frame generation files from NVIDIA's GitHub
|
||||
/// (about 70 MB) to where `play` looks for them.
|
||||
#[cfg(windows)]
|
||||
GetDlss,
|
||||
/// Prepare, map and bind a title executable; with --execute, run it.
|
||||
Run {
|
||||
exe: PathBuf,
|
||||
@@ -186,13 +198,35 @@ enum Console {
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
victory_core::logging::init("info");
|
||||
// The audio recorder `run` starts for `VICTORY_AUDIO_CAPTURE`.
|
||||
#[cfg(all(windows, feature = "diagnostics"))]
|
||||
if victory_hle::modules::audio::capture::child() {
|
||||
return Ok(());
|
||||
if std::env::var_os("VICTORY_AUDIO_CAPTURE").is_some() {
|
||||
victory_core::logging::init("info");
|
||||
if victory_hle::modules::audio::capture::child() {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
let cli = Cli::parse();
|
||||
// Started with nothing after its name (a double click): play.
|
||||
let bare = std::env::args_os().len() == 1;
|
||||
let cli = if bare && cfg!(windows) { Cli::parse_from(["victory", "play"]) } else { Cli::parse() };
|
||||
// Play puts its settings into the environment and names its log file
|
||||
// before anything else is set up.
|
||||
#[cfg(windows)]
|
||||
if let Command::Play(options) = &cli.command {
|
||||
let done = play::prepare(options).and_then(|ready| {
|
||||
victory_core::logging::init("info");
|
||||
let console = if ready.series_s { Console::SeriesS } else { Console::SeriesX };
|
||||
run::run(&ready.exe, Unimplemented::Trap, false, true, console)
|
||||
});
|
||||
if let Err(e) = &done
|
||||
&& bare
|
||||
{
|
||||
eprintln!("Error: {e:#}");
|
||||
play::hold_window();
|
||||
}
|
||||
return done;
|
||||
}
|
||||
victory_core::logging::init("info");
|
||||
match cli.command {
|
||||
Command::Inspect {
|
||||
file,
|
||||
@@ -234,6 +268,10 @@ fn main() -> Result<()> {
|
||||
Command::Shaders { paths, jobs } => translate::precompile(paths, jobs),
|
||||
#[cfg(windows)]
|
||||
Command::Warm { jobs, limit, again, used, these } => warm::run(jobs, limit, again, used, these),
|
||||
#[cfg(windows)]
|
||||
Command::Play(_) => unreachable!("handled above"),
|
||||
#[cfg(windows)]
|
||||
Command::GetDlss => play::get_dlss(),
|
||||
Command::Run {
|
||||
exe,
|
||||
unimplemented,
|
||||
|
||||
Reference in new issue
Block a user