mirror of
https://github.com/leon-ai/leon.git
synced 2025-01-02 13:43:51 +03:00
refactor(scripts): add bin
level for Node.js bridge
This commit is contained in:
parent
0e4ec4fb97
commit
8dc8c05d7d
@ -88,7 +88,7 @@ const setupBinaries = async (key) => {
|
||||
if (!manifest || manifest.version !== version) {
|
||||
const buildPath = isPlatformDependent
|
||||
? path.join(distPath, BINARIES_FOLDER_NAME)
|
||||
: distPath
|
||||
: path.join(distPath, 'bin')
|
||||
const archivePath = path.join(distPath, archiveName)
|
||||
|
||||
await Promise.all([
|
||||
@ -130,7 +130,9 @@ const setupBinaries = async (key) => {
|
||||
LogHelper.success(`${name} downloaded`)
|
||||
LogHelper.info(`Extracting ${name}...`)
|
||||
|
||||
const absoluteDistPath = path.resolve(distPath)
|
||||
const absoluteDistPath = isPlatformDependent
|
||||
? path.resolve(distPath)
|
||||
: path.resolve(distPath, 'bin')
|
||||
await extractZip(archivePath, { dir: absoluteDistPath })
|
||||
|
||||
LogHelper.success(`${name} extracted`)
|
||||
@ -151,7 +153,7 @@ const setupBinaries = async (key) => {
|
||||
}
|
||||
|
||||
export default async () => {
|
||||
// await setupBinaries('nodejs-bridge')
|
||||
await setupBinaries('nodejs-bridge')
|
||||
await setupBinaries('python-bridge')
|
||||
await setupBinaries('tcp-server')
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ export const PYTHON_BRIDGE_BIN_PATH = path.join(
|
||||
)
|
||||
export const NODEJS_BRIDGE_BIN_PATH = `${process.execPath} ${path.join(
|
||||
NODEJS_BRIDGE_DIST_PATH,
|
||||
'bin',
|
||||
NODEJS_BRIDGE_BIN_NAME
|
||||
)}`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user