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

Rework mod launchers to address issues with icons on Windows #14435

Merged
merged 2 commits into from Dec 1, 2017

Conversation

Projects
None yet
5 participants
@penev92
Member

penev92 commented Nov 27, 2017

Until now the mod-specific launchers (with a specific name and icon) launched the mod-agnostic OpenRA.Game.exe and told it to pretend like it cares what mod it's running. That resulted in some issues with icons at least on Windows.

This changes the launchers to run the game loop directly, so instead of the launcher launching OpenRA.Game.exe, it now launches a child process of the same launcher, but in a different state, which runs the game loop. The point of having a parent and child processes is to maintain error handling if the child blows up.

Unfortunately not straight-forward to test on Windows, and apparently creating the launchers doesn't happen on Windows, so will need someone who can create those to provide reviewers with samples.

Fixes #14174.

@penev92 penev92 added this to the Next release milestone Nov 27, 2017

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Nov 27, 2017

Member

The two main problems prompting this change in approach are:

  • The current use of SendMessage works inconsistently, which causes #14174.
  • Pinning a running game to the taskbar leaves a broken launcher that can't launch the game.
Member

pchote commented Nov 27, 2017

The two main problems prompting this change in approach are:

  • The current use of SendMessage works inconsistently, which causes #14174.
  • Pinning a running game to the taskbar leaves a broken launcher that can't launch the game.
Pull out game loop initialization from OpenRA.Program into OpenRA.Gam…
…e and exception handling into its own class under OpenRA.Game/Support
@pchote

Looks good as a first cut on the feature.
Link to test build

I can confirm that this fixes pinning to taskbar, and that the icons work as expected. The crash dialog itself does not work, however.

A few minor code nits:

Show outdated Hide outdated packaging/windows/WindowsLauncher.cs.in Outdated
Show outdated Hide outdated packaging/windows/WindowsLauncher.cs.in Outdated
Show outdated Hide outdated packaging/windows/WindowsLauncher.cs.in Outdated
Make mod launchers run the game inside a child launcher instead of vi…
…a OpenRA.Game.exe

This also removes the need to manually set application icons on Windows.
@pchote

This comment has been minimized.

Show comment
Hide comment
@netnazgul

This comment has been minimized.

Show comment
Hide comment
@netnazgul

netnazgul Nov 30, 2017

Contributor

unknown
seems fixed

Contributor

netnazgul commented Nov 30, 2017

unknown
seems fixed

@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr

reaperrr Dec 1, 2017

Contributor

Woah, return of the "View logs" button! 👍

Contributor

reaperrr commented Dec 1, 2017

Woah, return of the "View logs" button! 👍

@reaperrr reaperrr merged commit e09d502 into OpenRA:bleed Dec 1, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment