Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bd18caa9a | |||
| 90f1a9b77f |
@@ -1,3 +1,7 @@
|
|||||||
|
0.1.6
|
||||||
|
-----
|
||||||
|
* Android: fix build result apk path
|
||||||
|
|
||||||
0.1.5
|
0.1.5
|
||||||
-----
|
-----
|
||||||
* Haxe: default version 4.0.5
|
* Haxe: default version 4.0.5
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ const Platform = {
|
|||||||
WINDOWS: 'windows',
|
WINDOWS: 'windows',
|
||||||
ANDROID: 'android',
|
ANDROID: 'android',
|
||||||
NEKO: 'neko',
|
NEKO: 'neko',
|
||||||
|
CPP: 'cpp',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class Haxe extends Sdk {
|
|||||||
const target = path.resolve(buildDir, platform, 'bin');
|
const target = path.resolve(buildDir, platform, 'bin');
|
||||||
fse.emptyDirSync(target);
|
fse.emptyDirSync(target);
|
||||||
const result = {
|
const result = {
|
||||||
'android': 'app/build/outputs/apk/*-debug.apk',
|
'android': `app/build/outputs/**/${config.meta.filename}-debug.apk`,
|
||||||
'flash': '*.swf',
|
'flash': '*.swf',
|
||||||
}[platform] || '**/*';
|
}[platform] || '**/*';
|
||||||
return this.haxelib(args).then(() => {
|
return this.haxelib(args).then(() => {
|
||||||
@@ -143,11 +143,22 @@ class Haxe extends Sdk {
|
|||||||
args.push('-debug');
|
args.push('-debug');
|
||||||
}
|
}
|
||||||
const target = path.resolve(buildDir, platform, 'bin');
|
const target = path.resolve(buildDir, platform, 'bin');
|
||||||
|
if (platform !== 'cpp') {
|
||||||
fse.emptyDirSync(target);
|
fse.emptyDirSync(target);
|
||||||
|
}
|
||||||
for (const asset of config.assets) {
|
for (const asset of config.assets) {
|
||||||
fse.copySync(asset, path.join(target, asset.split("/").pop()));
|
fse.copySync(asset, path.join(target, asset.split("/").pop()));
|
||||||
}
|
}
|
||||||
return this.haxe(args).then(() => vfs.src(`${target}/**/*`));
|
const result = {
|
||||||
|
'cpp': `${config.meta.filename}/${config.main.split('.').pop()}${debug ? '-debug' : ''}`,
|
||||||
|
}[platform] || '**/*';
|
||||||
|
return this.haxe(args).then(() => {
|
||||||
|
let r = vfs.src(`${target}/${result}`);
|
||||||
|
if (platform === 'cpp') {
|
||||||
|
r = r.pipe(rename(config.meta.filename));
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
install(packages) {
|
install(packages) {
|
||||||
|
|||||||
@@ -392,6 +392,19 @@ class LinuxRunner extends Runner {
|
|||||||
|
|
||||||
Runner.register(Platform.LINUX, LinuxRunner);
|
Runner.register(Platform.LINUX, LinuxRunner);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class CPPRunner extends LinuxRunner {
|
||||||
|
|
||||||
|
constructor(config, debug) {
|
||||||
|
super(config, debug);
|
||||||
|
this.platform = Platform.CPP
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Runner.register(Platform.CPP, CPPRunner);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gulp-haxetool",
|
"name": "gulp-haxetool",
|
||||||
"version": "0.1.5",
|
"version": "0.1.7",
|
||||||
"description": "HaXe Tool for Gulp",
|
"description": "HaXe Tool for Gulp",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Reference in New Issue
Block a user