[flashplayer] update download link

This commit is contained in:
2018-04-27 17:44:44 +03:00
parent 22a371292f
commit 00d9ec5c0e
5 changed files with 58 additions and 92 deletions

View File

@@ -3,10 +3,6 @@ const path = require('path');
const os = require('os');
const fs = require('fs');
const fse = require('fs-extra');
//const concat = require('gulp-concat');
//const uglify = require('gulp-uglify');
//const babel = require('gulp-babel');
//const template = require('gulp-template');
const Haxe = require('./haxe');
const FlashPlayer = require('./flashplayer');
const debug = require('./debug');
@@ -19,6 +15,8 @@ const vfs = require('vinyl-fs');
const rename = require('gulp-rename');
const template = require('lodash.template');
const mkdirp = require('mkdirp');
const through = require('through2');
const Vinyl = require('vinyl');
const streamToPromise = (stream) => {
@@ -217,7 +215,7 @@ class Runner extends Target {
}
log(stream) {
stream
return stream
.pipe(tail(debug.log))
.pipe(rename('out.log'))
.pipe(gulp.dest(this.targetPath));
@@ -241,7 +239,7 @@ class FlashRunner extends Runner {
constructor(config, debug) {
super(config, Platform.FLASH, debug);
this.player = new FlashPlayer();
this.player = new FlashPlayer(debug);
}
prepare() {
@@ -251,11 +249,16 @@ class FlashRunner extends Runner {
call() {
const target = this.targetPath;
const filename = path.resolve(target, this.config.meta.filename+'.swf');
const player = this.player.flashPlayerBin(this.debug);
const player = this.player.flashPlayerBin;
FlashPlayer.trust(filename);
fs.writeFileSync(FlashPlayer.log, '');
const result = gulp.src(filename).pipe(run(player + " <%=file.basename%>", {cwd: target}));
return this.log(gulp.src(FlashPlayer.log));
let result = gulp.src(filename)
.pipe(run(player + " <%=file.basename%>", {cwd: target, verbosity: 0}))
.pipe(through.obj(function (file, enc, callback) {
this.push(new Vinyl({path: FlashPlayer.log}));
callback();
}));
return this.log(result);
}
}
@@ -294,7 +297,7 @@ class LinuxRunner extends Runner {
call() {
const target = this.targetPath;
const filename = path.resolve(target, this.config.meta.filename);
const result = gulp.src(filename).pipe(run("./<%=file.basename%>", {cwd: target}));
const result = gulp.src(filename).pipe(run("./<%=file.basename%>", {cwd: target, verbosity: 0}));
return this.log(result);
}
}
@@ -327,29 +330,27 @@ Runner.register(Platform.NEKO, NekoRunner);
*/
class Project {
constructor(buildSystem, platforms, config) {
constructor(buildSystem, platforms, config, prepare) {
this.buildSystem = buildSystem;
this.platforms = Array.isArray(platforms) ? platforms : [platforms];
this.config = config;
this.prepare = prepare;
}
build(platform) {
const builder = Builder.new(this.config, platform, this.buildSystem, false);
return [
builder.prepare.bind(builder),
builder.call.bind(builder),
];
build(platform, debug) {
const builder = Builder.new(this.config, platform, this.buildSystem, debug);
const tasks = [builder.prepare.bind(builder)];
if (this.prepare) tasks.push(this.prepare);
tasks.push(builder.call.bind(builder));
return tasks;
}
run(platform) {
const builder = Builder.new(this.config, platform, this.buildSystem, debug);
const runner = Runner.new(this.config, platform, debug);
return [
builder.prepare.bind(builder),
builder.call.bind(builder),
return this.build(platform, debug).concat([
runner.prepare.bind(runner),
runner.call.bind(runner),
];
]);
}
pack(platform) {