@akiver/cs-demo-analyzer
Version:
Analyze and extract data from Counter-Strike demos.
25 lines (24 loc) • 938 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBinaryPath = getBinaryPath;
const node_path_1 = __importDefault(require("node:path"));
function getBinarySubpath() {
const supportedPlatforms = {
'darwin-x64': 'bin/darwin-x64/csda',
'darwin-arm64': 'bin/darwin-arm64/csda',
'linux-x64': 'bin/linux-x64/csda',
'linux-arm64': 'bin/linux-arm64/csda',
'win32-x64': 'bin/windows-x64/csda.exe',
};
const platformKey = `${process.platform}-${process.arch}`;
if (!supportedPlatforms[platformKey]) {
throw new Error(`Unsupported platform: ${platformKey}`);
}
return supportedPlatforms[platformKey];
}
function getBinaryPath() {
return node_path_1.default.join(__dirname, getBinarySubpath());
}