also looking at this
fix(ci): unblock the three failing native lifecycle legs
#37
4 files
+130
-20
| @@ -964,6 +964,20 @@ export function windowsExecutableName(name: string): string { | ||
| 964 | 964 | return `${name}.exe` |
| 965 | 965 | } |
| 966 | 966 | |
| 967 | /** | |
| 968 | * `candle.exe` arguments. | |
| 969 | * | |
| 970 | * `-arch` is not optional. WiX v3 deprecated `Package/@Platform` in favour of | |
| 971 | * this switch, and candle defaults to `x86` without it — so an x64 payload was | |
| 972 | * being compiled into a 32-bit installer whose one component declares | |
| 973 | * `Win64="yes"` and installs under `ProgramFiles64Folder`. ICE80 exists to | |
| 974 | * catch exactly that contradiction, and `light -sval` below turns validation | |
| 975 | * off, so nothing ever reported it. | |
| 976 | */ | |
| 977 | export function candleArguments(architecture: 'x86' | 'x64' | 'arm64', wixobjPath: string, wxsPath: string): string[] { | |
| 978 | return ['-nologo', '-arch', architecture, '-out', wixobjPath, wxsPath] | |
| 979 | } | |
| 980 | ||
| 967 | 981 | function runCommand(command: string, args: string[], cwd?: string): Promise<void> { |
| 968 | 982 | return new Promise((resolve, reject) => { |
| 969 | 983 | const child = spawn(command, args, { cwd, stdio: 'inherit', windowsHide: true }) |
| @@ -981,7 +995,7 @@ async function createMSI(opts: MSIOptions): Promise<{ success: boolean; outputPa | ||
| 981 | 995 | const wixobjPath = join(tempDir, 'installer.wixobj') |
| 982 | 996 | copyFileSync(opts.binaryPath, sourcePath) |
| 983 | 997 | writeFileSync(wxsPath, renderWixSource(opts, binaryName)) |
| 984 | await runCommand('candle.exe', ['-nologo', '-out', wixobjPath, wxsPath], tempDir) | |
| 998 | await runCommand('candle.exe', candleArguments(opts.architecture, wixobjPath, wxsPath), tempDir) | |
| 985 | 999 | await runCommand('light.exe', ['-nologo', '-sval', '-out', opts.outputPath, wixobjPath], tempDir) |
| 986 | 1000 | if (opts.certificatePath) { |
| 987 | 1001 | const signArgs = ['sign', '/fd', 'sha256', '/tr', 'https://timestamp.digicert.com', '/td', 'sha256', '/f', opts.certificatePath] |