Skip to content

Commit

Permalink
Add Wine to PATH if it's bundled in FPSoftware
Browse files Browse the repository at this point in the history
On Mac & Linux systems, check if the `FPSoftware/Wine/bin` directory exists relative to fpPath. If it does, add it to the PATH, so Wine launches without the user having to modify the PATH themselves.
The PATH will not be modified if the directory doesn't exist, or if the launcher is running on Windows (obviously).
  • Loading branch information
Maoijoon authored Jul 31, 2024
1 parent cba47b5 commit 9e671bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/back/GameLauncher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ export namespace GameLauncher {
...newEnvVars, 'WINEDEBUG': 'fixme-all',
...(proxy !== '' ? {'http_proxy': `http://${proxy}/`, 'HTTP_PROXY': `http://${proxy}/`} : null)
};
// If WINE's bin directory exists in FPSoftware, add it to the PATH
if (fs.existsSync(`${fpPath}/FPSoftware/Wine/bin`)) {
newEnvVars = {
...newEnvVars, 'PATH': `${fpPath}/FPSoftware/Wine/bin:` + process.env.PATH
}
}
}
return {
// Copy this processes environment variables
Expand Down

0 comments on commit 9e671bb

Please sign in to comment.