Skip to content

Commit 380e7c5

Browse files
committed
Added support for linux32 and win64
1 parent 2087d26 commit 380e7c5

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

gulpfile.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ gulp.task('default', debugBuild);
7272

7373
// Get platform from commandline args
7474
// #
75-
// # gulp <task> [<platform>]+ Run only for platform(s) (with <platform> one of --linux64, --osx64, --win32 or --chromeos)
75+
// # gulp <task> [<platform>]+ Run only for platform(s) (with <platform> one of --linux64, --linux32, --osx64, --win32, --win64, or --chromeos)
7676
// #
7777
function getInputPlatforms() {
78-
var supportedPlatforms = ['linux64', 'osx64', 'win32', 'chromeos'];
78+
var supportedPlatforms = ['linux64', 'linux32', 'osx64', 'win32', 'win64', 'chromeos'];
7979
var platforms = [];
8080
var regEx = /--(\w+)/;
8181
for (var i = 3; i < process.argv.length; i++) {
@@ -133,7 +133,6 @@ function getDefaultPlatform() {
133133
return defaultPlatform;
134134
}
135135

136-
137136
function getPlatforms() {
138137
return SELECTED_PLATFORMS.slice();
139138
}
@@ -153,11 +152,13 @@ function getRunDebugAppCommand(arch) {
153152
break;
154153

155154
case 'linux64':
155+
case 'linux32':
156156
return path.join(DEBUG_DIR, pkg.name, arch, pkg.name);
157157

158158
break;
159159

160160
case 'win32':
161+
case 'win64':
161162
return path.join(DEBUG_DIR, pkg.name, arch, pkg.name + '.exe');
162163

163164
break;
@@ -293,6 +294,14 @@ function listPostBuildTasks(folder, done) {
293294
postBuildTasks.push(function post_build_win32(done){ return post_build('win32', folder, done) });
294295
}
295296

297+
if (platforms.indexOf('win64') != -1) {
298+
postBuildTasks.push(function post_build_win64(done){ return post_build('win64', folder, done) });
299+
}
300+
301+
if (platforms.indexOf('linux32') != -1) {
302+
postBuildTasks.push(function post_build_linux32(done){ return post_build('linux32', folder, done) });
303+
}
304+
296305
if (platforms.indexOf('linux64') != -1) {
297306
postBuildTasks.push(function post_build_linux64(done){ return post_build('linux64', folder, done) });
298307
}
@@ -310,7 +319,7 @@ function listPostBuildTasks(folder, done) {
310319

311320
function post_build(arch, folder, done) {
312321

313-
if (arch == 'win32') {
322+
if ((arch == 'win32') || (arch == 'win64')) {
314323
// Copy ffmpeg codec library into Windows app
315324
var libSrc = './library/' + arch + '/ffmpeg.dll'
316325
var libDest = path.join(folder, pkg.name, arch);
@@ -319,7 +328,7 @@ function post_build(arch, folder, done) {
319328
.pipe(gulp.dest(libDest));
320329
}
321330

322-
if (arch == 'linux64') {
331+
if ((arch == 'linux32') || (arch == 'linux64')) {
323332

324333
// Copy Ubuntu launcher scripts to destination dir
325334
var launcherDir = path.join(folder, pkg.name, arch);
@@ -466,6 +475,9 @@ function release_deb(arch) {
466475
var debArch;
467476

468477
switch (arch) {
478+
case 'linux32':
479+
debArch = 'i386';
480+
break;
469481
case 'linux64':
470482
debArch = 'amd64';
471483
break;
@@ -555,6 +567,11 @@ function listReleaseTasks(done) {
555567
releaseTasks.push(function release_linux64_deb(){ return release_deb('linux64') });
556568
}
557569

570+
if (platforms.indexOf('linux32') !== -1) {
571+
releaseTasks.push(function release_linux32_zip(){ return release_zip('linux32') });
572+
releaseTasks.push(function release_linux32_deb(){ return release_deb('linux32') });
573+
}
574+
558575
if (platforms.indexOf('osx64') !== -1) {
559576
releaseTasks.push(release_osx64);
560577
}
@@ -563,5 +580,9 @@ function listReleaseTasks(done) {
563580
releaseTasks.push(function release_win32(done){ return release_win('win32', done) });
564581
}
565582

583+
if (platforms.indexOf('win64') !== -1) {
584+
releaseTasks.push(function release_win64(done){ return release_win('win64', done) });
585+
}
586+
566587
return releaseTasks;
567588
}

library/linux32/libffmpeg.so

11.6 MB
Binary file not shown.

library/win64/ffmpeg.dll

2.02 MB
Binary file not shown.

0 commit comments

Comments
 (0)