improvemets & fixes:
- added 'open with' handling to desktop shortcuts - move logs button to app configuration - fix sync progress disappearing after long hashing - fix sync double file counter - merge wine and proton prefix folders via symlink
This commit is contained in:
parent
8c6db38fab
commit
59ff0b1088
15 changed files with 520 additions and 113 deletions
|
|
@ -44,8 +44,14 @@ function execToken(token) {
|
|||
return /[ $"'\\]/.test(token) ? `"${escaped}"` : escaped
|
||||
}
|
||||
|
||||
// The `%f` file field is appended AFTER escaping (a literal % would have been
|
||||
// doubled into a literal). It makes the shortcut a file handler: the file
|
||||
// manager substitutes the opened file there - and removes the field when the
|
||||
// shortcut is launched from the menu - so "Open with" on the shortcut runs the
|
||||
// app with that file, like it does on Windows.
|
||||
function execLine(extraArgs) {
|
||||
return [...launcherArgv(), ...extraArgs.split(' ').filter(Boolean).map(execToken)].map(execToken).join(' ')
|
||||
const tokens = [...launcherArgv(), ...String(extraArgs).split(' ').filter(Boolean)]
|
||||
return [...tokens.map(execToken), '%f'].join(' ')
|
||||
}
|
||||
|
||||
function sanitizeName(name) {
|
||||
|
|
@ -71,7 +77,7 @@ function buildDesktopEntry(game) {
|
|||
'Type=Application',
|
||||
`Name=${name}`,
|
||||
'Comment=Launch via PLWL',
|
||||
`Exec=${execLine(`--launch ${game.id}`)}`,
|
||||
`Exec=${execLine(`--launch ${game.id} --file`)}`,
|
||||
'Terminal=false',
|
||||
'Categories=Game;'
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue