Skip to content

Commit e3580bc

Browse files
authored
Merge pull request #437 from mikeller/fix_windows_release
Fixed release builds for Windows. Also made the build scripts throw an error on NSIS failures.
2 parents 82569d4 + a997eb3 commit e3580bc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

assets/windows/installer.nsi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# ${PLATFORM} - Platform to generate (win32 or win64)
1010
# ${DEST_FOLDER} - Destination folder for the installer files
1111
# ${SOURCE_FOLDER} - Source folder for the application files
12-
1312

1413
# Some definitions
1514
!define SOURCE_FILES "..\..\${SOURCE_FOLDER}\betaflight-blackbox-explorer\${PLATFORM}\*"

gulpfile.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,7 @@ function start_debug(done) {
429429
// Create installer package for windows platforms
430430
function release_win(arch, appDirectory, done) {
431431
if (!commandExistsSync('makensis')) {
432-
console.warn(`makensis command not found, not generating win package for ${arch}`);
433-
done();
432+
throw new Error(`makensis command not found, not generating win package for ${arch}`);
434433
}
435434

436435
// The makensis does not generate the folder correctly, manually
@@ -450,7 +449,7 @@ function release_win(arch, appDirectory, done) {
450449
var output = makensis.compileSync('./assets/windows/installer.nsi', options);
451450

452451
if (output.status !== 0) {
453-
console.error('Installer for platform ' + arch + ' finished with error ' + output.status + ': ' + output.stderr);
452+
throw new Error(`Installer for platform ${arch} finished with error ${output.status}: ${output.stderr}`);
454453
}
455454

456455
done();

0 commit comments

Comments
 (0)