mirror of https://github.com/Kylart/KawAnime.git
Fix lib import for linux platforms
This commit is contained in:
parent
3c0ccf047f
commit
74463bb0f1
|
@ -3,6 +3,7 @@ const { join } = require('path')
|
|||
|
||||
const IS_LINUX = !['win32', 'darwin'].includes(process.platform)
|
||||
|
||||
if (!IS_LINUX) {
|
||||
const baseDir = ({
|
||||
'darwin': '/usr/local/lib',
|
||||
'win32': 'C:\\Windows\\system32'
|
||||
|
@ -15,9 +16,7 @@ const libFilename = ({
|
|||
|
||||
const libPath = join(baseDir, libFilename)
|
||||
|
||||
if (IS_LINUX) {
|
||||
console.log('KawANime [PostInstall] -- Linux platform detected, no need to move any library')
|
||||
} else if (!existsSync(libPath)) {
|
||||
if (!existsSync(libPath)) {
|
||||
console.warn('KawAnime [PostInstall] -- Could not find libmpv library file. Please install it and put it in `public/mpv`')
|
||||
} else {
|
||||
console.log(`KawAnime [PostInstall] -- Found libmpv at ${libPath}`)
|
||||
|
@ -27,3 +26,4 @@ if (IS_LINUX) {
|
|||
join(__dirname, '..', '..', '..', 'public', 'mpv', libFilename)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue