Skip to content

Turn meetings into live agent loops. Record, transcribe, and analyze meetings with real-time AI intelligence — before, during, and after calls.

build: remove capture artifact staging helper

Nischay Joshi8146d29a153b
diff --git a/README.md b/README.md
index f8464b5..a8e7646 100644
--- a/README.md
+++ b/README.md
@@ -66,9 +66,8 @@ onboarding.
| Linux | Build from source with `npm run dist:linux` | App features available; recording not supported |
The VideoDB capture SDK now ships recording binaries for `darwin-arm64`,
-`darwin-x64`, and `win32-x64`. Call.md stages the matching checksum-pinned
-artifact during packaging and verifies that the capture executable and SQLite
-native module are present in the packaged app.
+`darwin-x64`, and `win32-x64`. Call.md verifies that the capture executable and
+SQLite native module are present in the packaged app.
Windows x64 recording is supported by the source build, but the project does
not currently publish a Windows installer. Linux and Windows ARM64 builds can
@@ -219,10 +218,10 @@ npm run dist:win
```
Build and run the release candidate on its target OS. The project uses published
-target prebuilds for `better-sqlite3` and checksum-pinned VideoDB capture
-artifacts, so a macOS development machine can cross-package a Windows x64
-directory build for structural verification. That does not replace native
-Windows testing or installer signing. This follows
+target prebuilds for `better-sqlite3` and packaged VideoDB capture binaries, so
+a macOS development machine can cross-package a Windows x64 directory build for
+structural verification. That does not replace native Windows testing or
+installer signing. This follows
[electron-builder's multi-platform build guidance](https://www.electron.build/docs/features/multi-platform-build),
which requires target prebuilds for native dependencies and still needs
target-platform validation.
diff --git a/build/prepare-videodb-capture.cjs b/build/prepare-videodb-capture.cjs
deleted file mode 100644
index 07f0191..0000000
--- a/build/prepare-videodb-capture.cjs
+++ /dev/null
@@ -1,105 +0,0 @@
-const crypto = require('node:crypto');
-const fs = require('node:fs');
-const https = require('node:https');
-const os = require('node:os');
-const path = require('node:path');
-const tar = require('tar');
-
-function download(url, destination) {
- return new Promise((resolve, reject) => {
- const request = https.get(url, { headers: { 'User-Agent': 'call-md-builder' } }, (response) => {
- if (
- response.statusCode &&
- response.statusCode >= 300 &&
- response.statusCode < 400 &&
- response.headers.location
- ) {
- response.resume();
- download(response.headers.location, destination).then(resolve, reject);
- return;
- }
- if (response.statusCode !== 200) {
- response.resume();
- reject(new Error(`VideoDB capture download failed: HTTP ${response.statusCode}`));
- return;
- }
-
- const output = fs.createWriteStream(destination, { mode: 0o600 });
- response.pipe(output);
- output.on('finish', () => output.close(resolve));
- output.on('error', reject);
- });
- request.on('error', reject);
- });
-}
-
-function sha256(filePath) {
- return new Promise((resolve, reject) => {
- const hash = crypto.createHash('sha256');
- const input = fs.createReadStream(filePath);
- input.on('data', (chunk) => hash.update(chunk));
- input.on('end', () => resolve(hash.digest('hex')));
- input.on('error', reject);
- });
-}
-
-async function prepareVideoDBCapture(projectDir, platform, arch) {
- const packagePath = path.join(projectDir, 'node_modules', 'videodb', 'package.json');
- const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
- const config = packageJson.binaryConfig;
- const platformKey = `${platform}-${arch}`;
- const expectedChecksum = config?.checksums?.[platformKey];
-
- if (!expectedChecksum) {
- throw new Error(`VideoDB capture does not publish a ${platformKey} artifact`);
- }
-
- const binDir = path.join(projectDir, 'node_modules', 'videodb', 'bin');
- const expectedBinary = platform === 'win32'
- ? path.join(binDir, 'capture.exe')
- : path.join(binDir, 'VideoDBCapture.app', 'Contents', 'MacOS', 'capture');
-
- if (fs.existsSync(expectedBinary)) {
- console.log(`VideoDB capture already staged for ${platformKey}`);
- return;
- }
-
- const temporaryDir = fs.mkdtempSync(path.join(os.tmpdir(), 'call-md-capture-'));
- const archivePath = path.join(temporaryDir, 'capture.tar.gz');
- const extractedPath = path.join(temporaryDir, 'extracted');
- fs.mkdirSync(extractedPath);
-
- try {
- const url = `${config.baseUrl}/v${config.version}/capture-${platformKey}.tar.gz`;
- console.log(`Downloading checksum-pinned VideoDB capture artifact: ${platformKey}`);
- await download(url, archivePath);
-
- const actualChecksum = await sha256(archivePath);
- if (actualChecksum !== expectedChecksum) {
- throw new Error(
- `VideoDB capture checksum mismatch for ${platformKey}: ` +
- `expected ${expectedChecksum}, got ${actualChecksum}`
- );
- }
-
- await tar.extract({ file: archivePath, cwd: extractedPath });
- const extractedBinary = platform === 'win32'
- ? path.join(extractedPath, 'capture.exe')
- : path.join(extractedPath, 'VideoDBCapture.app');
-
- if (!fs.existsSync(extractedBinary)) {
- throw new Error(`VideoDB capture archive did not contain the expected ${platformKey} binary`);
- }
-
- fs.mkdirSync(binDir, { recursive: true });
- if (platform === 'win32') {
- fs.copyFileSync(extractedBinary, expectedBinary);
- } else {
- fs.cpSync(extractedBinary, path.join(binDir, 'VideoDBCapture.app'), { recursive: true });
- }
- } finally {
- fs.rmSync(temporaryDir, { recursive: true, force: true });
- }
-}
-
-module.exports = { prepareVideoDBCapture };
diff --git a/electron-builder.config.js b/electron-builder.config.js
index 8f2d5e4..a1e5596 100644
--- a/electron-builder.config.js
+++ b/electron-builder.config.js
@@ -1,7 +1,6 @@
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
-const { prepareVideoDBCapture } = require('./build/prepare-videodb-capture.cjs');
function getTargetArchName(arch) {
if (arch === 1 || arch === 'x64') return 'x64';
@@ -108,16 +107,6 @@ const config = {
const targetArch = context.arch;
const archName = getTargetArchName(targetArch);
console.log('Before pack - target arch:', targetArch, archName);
- const platformName = context.packager.platform.name;
- const nodePlatform = platformName === 'mac'
- ? 'darwin'
- : platformName === 'windows'
- ? 'win32'
- : null;
-
- if (nodePlatform) {
- await prepareVideoDBCapture(context.packager.projectDir, nodePlatform, archName);
- }
},
afterPack: async (context) => {
const appOutDir = context.appOutDir;