update icon & change PLGL to PLWL
This commit is contained in:
parent
e017187af5
commit
1aa603aeac
18 changed files with 117 additions and 110 deletions
|
|
@ -3,10 +3,10 @@
|
|||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
|
||||
const APP_NAME = 'PLGL'
|
||||
const APP_NAME = 'PLWL'
|
||||
|
||||
function findPng() {
|
||||
const p = path.resolve(__dirname, '..', 'renderer', 'plgl.png')
|
||||
const p = path.resolve(__dirname, '..', 'renderer', 'plwl.png')
|
||||
try {
|
||||
fs.accessSync(p)
|
||||
return p
|
||||
|
|
@ -24,7 +24,7 @@ function writeIconThemeDirs(png) {
|
|||
for (const [dir, size] of Object.entries(sizes)) {
|
||||
const themeDir = path.join(base, 'hicolor', dir, 'apps')
|
||||
fs.mkdirSync(themeDir, { recursive: true })
|
||||
fs.copyFileSync(png, path.join(themeDir, 'plgl.png'))
|
||||
fs.copyFileSync(png, path.join(themeDir, 'plwl.png'))
|
||||
}
|
||||
const desktopDir = path.join(home, '.local', 'share', 'applications')
|
||||
fs.mkdirSync(desktopDir, { recursive: true })
|
||||
|
|
@ -33,12 +33,12 @@ function writeIconThemeDirs(png) {
|
|||
'Type=Application',
|
||||
`Name=${APP_NAME}`,
|
||||
'Comment=Portable Linux Wine Launcher',
|
||||
'Exec=plgl',
|
||||
`Icon=plgl`,
|
||||
'Exec=plwl',
|
||||
`Icon=plwl`,
|
||||
'Terminal=false',
|
||||
'Categories=Game;'
|
||||
].join('\n')
|
||||
fs.writeFileSync(path.join(desktopDir, 'plgl.desktop'), desktop)
|
||||
fs.writeFileSync(path.join(desktopDir, 'plwl.desktop'), desktop)
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue