feat: add bundled Windows native runtime

This commit is contained in:
reaper
2026-08-26 20:54:58 -05:00
parent bc92db6252
commit c9f832d250
12 changed files with 201 additions and 50 deletions
+17 -1
View File
@@ -136,7 +136,13 @@ export async function installNativeRuntimeArchive(source: string): Promise<Auror
validateArchiveEntries(stdout)
await execFileAsync(
'tar',
['-xzf', source, '--no-same-owner', '--no-same-permissions', '-C', staging],
[
'-xzf',
source,
...(process.platform === 'win32' ? [] : ['--no-same-owner', '--no-same-permissions']),
'-C',
staging
],
{ maxBuffer: 16 * 1024 * 1024 }
)
await rejectLinks(staging)
@@ -188,6 +194,16 @@ export async function installBundledNativeRuntime(): Promise<AuroraRuntimeStatus
return installNativeRuntimeArchive(join(directory, basename(archive)))
}
export async function ensureBundledNativeRuntime(): Promise<void> {
if ((await nativeStatus()).available) return
try {
await installBundledNativeRuntime()
} catch (error) {
// Development builds and platforms without a packaged target keep the manual installer available.
console.warn('Aurora Native bundled runtime was not installed:', error)
}
}
async function nativeStatus(): Promise<AuroraRuntimeStatus['native']> {
if (!supportedPlatforms.has(process.platform) || !supportedArchitectures.has(process.arch))
return {