Skip to content

Commit 94ddabe

Browse files
committed
Add portable build to Windows
1 parent 5eed5da commit 94ddabe

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

assets/windows/installer.iss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define ExecutableFileName "betaflight-blackbox-explorer.exe"
1616
#define GroupName "Betaflight"
1717
#define InstallerFileName "betaflight-blackbox-explorer-installer_" + version + "_" + archName
18+
#define InstallerFileName "betaflight-blackbox-explorer_" + version + "_" + archName + "-installer"
1819
#define SourcePath "..\..\" + sourceFolder + "\betaflight-blackbox-explorer\" + archName
1920
#define TargetFolderName "Betaflight-Blackbox-Explorer"
2021
#define UpdatesUrl "https://github.com/betaflight/blackbox-log-viewer/releases/"

gulpfile.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ function getRunDebugAppCommand(arch) {
185185
return command;
186186
}
187187

188-
function getReleaseFilename(platform, ext) {
189-
return `${pkg.name}_${pkg.version}_${platform}.${ext}`;
188+
function getReleaseFilename(platform, ext, portable = false) {
189+
return `${pkg.name}_${pkg.version}_${platform}${portable ? "-portable" : ""}.${ext}`;
190190
}
191191

192192
function clean_dist() {
@@ -409,7 +409,7 @@ function release_win(arch, appDirectory, done) {
409409
// Create distribution package (zip) for windows and linux platforms
410410
function release_zip(arch, appDirectory) {
411411
const src = path.join(appDirectory, pkg.name, arch, '**');
412-
const output = getReleaseFilename(arch, 'zip');
412+
const output = getReleaseFilename(arch, 'zip', true);
413413
const base = path.join(appDirectory, pkg.name, arch);
414414

415415
return compressFiles(src, base, output, 'Betaflight Blackbox Explorer');
@@ -620,12 +620,18 @@ function listReleaseTasks(appDirectory) {
620620
}
621621

622622
if (platforms.indexOf('win32') !== -1) {
623+
releaseTasks.push(function release_win32_zip() {
624+
return release_zip('win32', appDirectory);
625+
});
623626
releaseTasks.push(function release_win32(done) {
624627
return release_win('win32', appDirectory, done);
625628
});
626629
}
627630

628631
if (platforms.indexOf('win64') !== -1) {
632+
releaseTasks.push(function release_win64_zip() {
633+
return release_zip('win64', appDirectory);
634+
});
629635
releaseTasks.push(function release_win64(done) {
630636
return release_win('win64', appDirectory, done);
631637
});

0 commit comments

Comments
 (0)