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

Install EOS overlay by default #3356

Merged
merged 12 commits into from
Jan 7, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function getStatus(): {
readFileSync(installedVersionPath(), 'utf-8')
)

if (install_path !== defaultInstallPath) {
if (install_path !== defaultInstallPath()) {
logWarning(
'EOS Overlay is not installed in default location, permission issues might arise',
LogPrefix.Legendary
Expand Down Expand Up @@ -98,7 +98,7 @@ async function install() {
{
subcommand: 'eos-overlay',
action: 'install',
'--path': Path.parse(defaultInstallPath)
'--path': Path.parse(defaultInstallPath())
},
{
abortId: eosOverlayAppName,
Expand All @@ -124,7 +124,7 @@ async function install() {
'-y': true,
subcommand: 'eos-overlay',
action: 'install',
'--path': Path.parse(defaultInstallPath)
'--path': Path.parse(defaultInstallPath())
},
{
abortId: eosOverlayAppName,
Expand Down
7 changes: 7 additions & 0 deletions src/backend/storeManagers/legendary/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { join } from 'path'
import { getGameInfo, runWineCommandOnGame } from './games'
import { getInstallInfo } from './library'
import { sendGameStatusUpdate } from 'backend/utils'
import { enable, getStatus, isEnabled } from './eos_overlay/eos_overlay'
import { split } from 'shlex'
import { logError } from 'backend/logger/logger'

Expand Down Expand Up @@ -56,4 +57,10 @@ export const legendarySetup = async (appName: string) => {
logError(`getInstallInfo failed with ${error}`)
}
}

const isOverlayEnabled = await isEnabled(appName)

if (getStatus().isInstalled && !isOverlayEnabled) {
await enable(appName)
}
}