add importing from prefix
This commit is contained in:
parent
29a20324a6
commit
b83e530392
11 changed files with 287 additions and 22 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict'
|
||||
|
||||
const { runGame, runTool } = require('../runner')
|
||||
const { importGame } = require('../importer')
|
||||
const { importGame, importGameFromPrefix } = require('../importer')
|
||||
const library = require('../library')
|
||||
|
||||
function killProcessGroup(pid) {
|
||||
|
|
@ -114,7 +114,13 @@ function createGamesService({ getWindow, onGamesChanged }) {
|
|||
return importGame(srcDir, mode, data => sendToWindow(win, 'import:progress', data))
|
||||
}
|
||||
|
||||
return { isRunning, listRunning, start, kill, runToolFor, import: importTo, setOnGameExit }
|
||||
// prefix import: nothing is copied, the game just gets registered with
|
||||
// paths relative to the prefix (wine sees it as a normal C:\ install)
|
||||
async function importFromPrefix(win, prefix, srcDir) {
|
||||
return importGameFromPrefix(prefix, srcDir)
|
||||
}
|
||||
|
||||
return { isRunning, listRunning, start, kill, runToolFor, import: importTo, importFromPrefix, setOnGameExit }
|
||||
}
|
||||
|
||||
module.exports = { createGamesService, killProcessGroup, sendToWindow }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue