From fcb9e2ef516cff0b6d5168bc6465e4615d2aa96e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 21 Oct 2026 11:22:38 +0000 Subject: ci(bundle): publish portable Windows and macOS desktop packages Build and check Bundle alongside each native compiler. Publish a single Windows exe with an embedded compiler extracted into the startup directory, and a macOS tar.xz containing the app and compiler. Check Linux without publishing a desktop package and require all six nightly attachments. Include licenses in embedded assets and app resources. Verify local builds, package smoke checks and release replacement with a simulated GitHub API. Co-Authored-By: Claude Opus 5.5 --- bundle/scripts/prepare-compiler.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bundle/scripts/prepare-compiler.js') diff --git a/bundle/scripts/prepare-compiler.js b/bundle/scripts/prepare-compiler.js index de5346a..8568ae9 100644 --- a/bundle/scripts/prepare-compiler.js +++ b/bundle/scripts/prepare-compiler.js @@ -1,5 +1,6 @@ import { execFileSync } from 'node:child_process'; -import { copyFileSync, mkdirSync } from 'node:fs'; +import { copyFileSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { gzipSync } from 'node:zlib'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -7,7 +8,11 @@ const root = fileURLToPath(new URL('..', import.meta.url)); const target = execFileSync('rustc', ['--print', 'host-tuple'], { encoding: 'utf8' }).trim(); const extension = process.platform === 'win32' ? '.exe' : ''; const source = path.resolve(process.argv[2] || path.join(root, '..', 'build', `cpsc${extension}`)); -const destination = path.join(root, 'src-tauri', 'binaries', `cpsc-${target}${extension}`); +const destination = path.join(root, 'src-tauri', 'binaries', process.platform === 'win32' ? 'cpsc.exe.gz' : `cpsc-${target}${extension}`); mkdirSync(path.dirname(destination), { recursive: true }); -copyFileSync(source, destination); +if (process.platform === 'win32') { + writeFileSync(destination, gzipSync(readFileSync(source))); +} else { + copyFileSync(source, destination); +} console.log(`Bundled compiler: ${source}`); -- cgit v1.3.1-4-g156e