add support for directly launching windows exes from file exporer using .desktop shortcut
This commit is contained in:
parent
66f42f30cc
commit
5e217472aa
15 changed files with 440 additions and 28 deletions
|
|
@ -31,6 +31,14 @@ function createGamesService({ getWindow, onGamesChanged }) {
|
|||
const isRunning = id => running.has(id)
|
||||
const listRunning = () => [...running.keys()]
|
||||
|
||||
// "Open with PLWL" handoff: queue the file for the renderer (picker popup
|
||||
// with wine version + prefix). Safe to call at any time - if the window is
|
||||
// not up yet, the renderer picks the file up right after boot.
|
||||
function openExternally(openPath) {
|
||||
require('../openwith').setPending(openPath)
|
||||
sendToWindow(getWindow(), 'openwith:file', openPath)
|
||||
}
|
||||
|
||||
function resolveWine(game) {
|
||||
const system = { id: 'system', type: 'system', label: 'System Wine' }
|
||||
const wanted = game.wine === 'default' ? (library.loadSettings().defaultWine || 'system') : (game.wine || 'system')
|
||||
|
|
@ -120,7 +128,7 @@ function createGamesService({ getWindow, onGamesChanged }) {
|
|||
return importGameFromPrefix(prefix, srcDir)
|
||||
}
|
||||
|
||||
return { isRunning, listRunning, start, kill, runToolFor, import: importTo, importFromPrefix, setOnGameExit }
|
||||
return { isRunning, listRunning, start, kill, runToolFor, import: importTo, importFromPrefix, setOnGameExit, openExternally }
|
||||
}
|
||||
|
||||
module.exports = { createGamesService, killProcessGroup, sendToWindow }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue