Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow integration with launchers #11

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

keton
Copy link
Contributor

@keton keton commented Jan 16, 2024

Goals

New command line options

  • --launch=<game.exe or launcher URI> to specify game to launch
  • --launch_args=<space separated list of game.exe arguments> optional, mainly for Gog Galaxy integration
  • --delay=<number of seconds> to wait before injection for games that have problems with injecting right away

Changed behavior

  • --attach= now can accept full path to game executable and use it to find and delete VR plugins before the game is launched.

UI

There's a new UI flow. First time --launch= is used there will be dialog asking is auto starting game allowed:
image

This way launcher can always pass --launch= with --attach leaving decision what to do to UEVRInjector. This should also help clear the confusion that launcher is the same thing as UEVR (see Raicuparta's comments in linked Rai Pal discussion).

on top of that user can toggle auto start at any time using new checkbox:
image

@@ -637,6 +753,22 @@ public partial class MainWindow : Window {
return null;
}

private void RemoveVRPlugins(string? pluginsPath) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not delete them outright. Add a _bak to the original folder names or something along these lines so the user doesn't have to verify game integrity to get a clean install back.

Copy link
Contributor Author

@keton keton Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

keton added 6 commits January 23, 2024 08:57
`--launch=` option accepts both executable paths and URIs for launcher
compatibility.

Some games like Sackboy or Telltale Expanse Series on Epic
will fail to launch correctly if .exe path is used directly. Instead they
require proper launcher URI.

This change will allow UEVR fronted to act as a launcher for games.

Example. Creating shortcut to:
```
UEVRInjector.exe "--launch=com.epicgames.launcher://apps/da36711940d4460da57d8d6ad67236a4%3Aa1afcdb1d2344232954be97d4b86b9a8%3Acfbbc006f3ee4ba0bfff3ffa46942f90?action=launch&silent=true" --attach=CosmicShake-Win64-Shipping
```

Will allow to automatically launch and inject Sponge Bob: Cosmic Shake on EGS
Some games don't respond well to be injected directly on boot.
Intro movies, menus, loading screens can appear broken or as a black
screen.

This commit augments `--attach` mode with `--delay` parameter allowing
UEVR injector to wait upon detecting target application. This gives user
time to get into the game without needing to go back to the injector UI
and pressing inject manually.

Example: `UEVRInjector.exe --attach=CosmicShake-Win64-Shipping --delay=30`
will wait for SpongeBob Cosmic Shake process to spawn, then wait 30s on
top and inject.
Some launchers, notably GOG Galaxy don't support launching game via
URI. They require command line option `Galaxy.exe /run:gameId`.

This commit adds command line parameter `--launch-args=` thant can accept
space separated argument list as as single string.
This commit allows option to automatically rename unwanted VR plugins
to 'plugin_name_bak'. All user needs to do is to click 'yes'.

Additionally game is checked before launch for being UE title and
warning is issued if it's not.

This requires `--attach=` parameter to be full path to game executable.
If only process name is passed old behavior is used instead.
Adds 'autostart game' toggle. User can turn it off and `--launch=` will
be ignored.

When `--launch=` option is passed explanation dialog will appear with
option to launch game or not and hide the dialog on subsequent runs.

This allows launchers like Rai Pal to always pass `--launch=` along with
`--attach=`.
Otherwise the warning can get burried under autostart config dialog and
game window.
@keton keton force-pushed the feat/launcher_integration_flow branch from 5b05203 to 84b7eb0 Compare January 23, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants