mirror of
https://github.com/samvallad33/vestige.git
synced 2026-05-08 15:22:37 +02:00
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
|
|
const https = require('https');
|
||
|
|
const fs = require('fs');
|
||
|
|
const path = require('path');
|
||
|
|
const os = require('os');
|
||
|
|
const { execSync } = require('child_process');
|
||
|
|
|
||
|
|
const VERSION = require('../package.json').version;
|
||
|
|
const PLATFORM = os.platform();
|
||
|
|
const ARCH = os.arch();
|
||
|
|
|
||
|
|
const PLATFORM_MAP = {
|
||
|
|
darwin: 'apple-darwin',
|
||
|
|
linux: 'unknown-linux-gnu',
|
||
|
|
win32: 'pc-windows-msvc',
|
||
|
|
};
|
||
|
|
|
||
|
|
const ARCH_MAP = {
|
||
|
|
x64: 'x86_64',
|
||
|
|
arm64: 'aarch64',
|
||
|
|
};
|
||
|
|
|
||
|
|
const platformStr = PLATFORM_MAP[PLATFORM];
|
||
|
|
const archStr = ARCH_MAP[ARCH];
|
||
|
|
|
||
|
|
if (!platformStr || !archStr) {
|
||
|
|
console.error(`Unsupported platform: ${PLATFORM}-${ARCH}`);
|
||
|
|
process.exit(1);
|
||
|
|
}
|
||
|
|
|
||
|
|
const binaryName = PLATFORM === 'win32' ? 'engram-mcp.exe' : 'engram-mcp';
|
||
|
|
const targetDir = path.join(__dirname, '..', 'bin');
|
||
|
|
const targetPath = path.join(targetDir, binaryName);
|
||
|
|
|
||
|
|
// For now, just create a placeholder - real binaries come from GitHub releases
|
||
|
|
console.log(`Engram MCP v${VERSION} installed for ${archStr}-${platformStr}`);
|
||
|
|
console.log(`Binary location: ${targetPath}`);
|
||
|
|
|
||
|
|
// Ensure bin directory exists
|
||
|
|
if (!fs.existsSync(targetDir)) {
|
||
|
|
fs.mkdirSync(targetDir, { recursive: true });
|
||
|
|
}
|