3 Commits
0.1.5 ... 0.1.8

Author SHA1 Message Date
e0eddbcab5 [template] add flags to project.hxml template 2020-03-30 18:58:01 +03:00
1bd18caa9a [project] add cpp target 2020-03-25 21:03:46 +03:00
90f1a9b77f [android] fix build result apk path 2020-02-19 21:38:45 +03:00
6 changed files with 35 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
0.1.6
-----
* Android: fix build result apk path
0.1.5
-----
* Haxe: default version 4.0.5

View File

@@ -16,6 +16,7 @@ const Platform = {
WINDOWS: 'windows',
ANDROID: 'android',
NEKO: 'neko',
CPP: 'cpp',
};

View File

@@ -105,7 +105,7 @@ class Haxe extends Sdk {
const target = path.resolve(buildDir, platform, 'bin');
fse.emptyDirSync(target);
const result = {
'android': 'app/build/outputs/apk/*-debug.apk',
'android': `app/build/outputs/**/${config.meta.filename}-debug.apk`,
'flash': '*.swf',
}[platform] || '**/*';
return this.haxelib(args).then(() => {
@@ -143,11 +143,22 @@ class Haxe extends Sdk {
args.push('-debug');
}
const target = path.resolve(buildDir, platform, 'bin');
if (platform !== 'cpp') {
fse.emptyDirSync(target);
}
for (const asset of config.assets) {
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) {

View File

@@ -392,6 +392,19 @@ class LinuxRunner extends Runner {
Runner.register(Platform.LINUX, LinuxRunner);
/**
*
*/
class CPPRunner extends LinuxRunner {
constructor(config, debug) {
super(config, debug);
this.platform = Platform.CPP
}
}
Runner.register(Platform.CPP, CPPRunner);
/**
*
*/

View File

@@ -1,6 +1,6 @@
{
"name": "gulp-haxetool",
"version": "0.1.5",
"version": "0.1.8",
"description": "HaXe Tool for Gulp",
"main": "index.js",
"dependencies": {

View File

@@ -4,6 +4,8 @@
-lib <%=item.name%>:<%=item.version.split('@').shift()%><% }); %>
<% macros.forEach(function(item) { %>
--macro "<%=item%>"<% }); %>
<% flags.forEach(function(item) { %>
-D <%=item%><% }); %>
-main <%=main%>
-<%=out%> "<%=buildDir%>/<%=platform%>/bin/<%=meta.filename%><%=ext%>"