Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add portable build to windows #2739

Merged
merged 1 commit into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/windows/installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define CompanyUrl "https://betaflight.com/"
#define ExecutableFileName "betaflight-configurator.exe"
#define GroupName "Betaflight"
#define InstallerFileName "betaflight-configurator-installer_" + version + "_" + archName
#define InstallerFileName "betaflight-configurator_" + version + "_" + archName + "-installer"
#define SourcePath "..\..\" + sourceFolder + "\betaflight-configurator\" + archName
#define TargetFolderName "Betaflight-Configurator"
#define UpdatesUrl "https://github.com/betaflight/betaflight-configurator/releases"
Expand Down
12 changes: 9 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ function getRunDebugAppCommand(arch) {
return command;
}

function getReleaseFilename(platform, ext) {
return `${metadata.name}_${metadata.version}_${platform}.${ext}`;
function getReleaseFilename(platform, ext, portable = false) {
return `${metadata.name}_${metadata.version}_${platform}${portable ? "-portable" : ""}.${ext}`;
}

function clean_dist() {
Expand Down Expand Up @@ -688,7 +688,7 @@ function release_win(arch, appDirectory, done) {
// Create distribution package (zip) for windows and linux platforms
function release_zip(arch, appDirectory) {
const src = path.join(appDirectory, metadata.name, arch, '**');
const output = getReleaseFilename(arch, 'zip');
const output = getReleaseFilename(arch, 'zip', true);
const base = path.join(appDirectory, metadata.name, arch);

return compressFiles(src, base, output, 'Betaflight Configurator');
Expand Down Expand Up @@ -885,12 +885,18 @@ function listReleaseTasks(isReleaseBuild, appDirectory) {
}

if (platforms.indexOf('win32') !== -1) {
releaseTasks.push(function release_win32_zip() {
return release_zip('win32', appDirectory);
});
releaseTasks.push(function release_win32(done) {
return release_win('win32', appDirectory, done);
});
}

if (platforms.indexOf('win64') !== -1) {
releaseTasks.push(function release_win64_zip() {
return release_zip('win64', appDirectory);
});
releaseTasks.push(function release_win64(done) {
return release_win('win64', appDirectory, done);
});
Expand Down