[android] update
This commit is contained in:
@@ -7,6 +7,7 @@ const Haxe = require('./haxe');
|
||||
const FlashPlayer = require('./flashplayer');
|
||||
const Android = require('./android');
|
||||
const Neko = require('./neko');
|
||||
const Env = require('./env');
|
||||
const debug = require('./debug');
|
||||
const webserver = require('gulp-webserver');
|
||||
const run = require('../run/index');
|
||||
@@ -88,18 +89,25 @@ class HaxeBuilder extends Builder {
|
||||
let result = this.haxe.prepare().then(() => this.haxe.install(this.config.libs));
|
||||
if (this.buildSystem === BuildSystem.OPENFL) {
|
||||
if (this.platform === Platform.ANDROID) {
|
||||
result = result.then(() => this.android.prepare()).then(() => this.android.activate());
|
||||
result = result
|
||||
.then(() => this.android.prepare())
|
||||
.then(() => this.android.activate())
|
||||
.then(() => this.android.sdkmanager([
|
||||
'tools',
|
||||
'platform-tools',
|
||||
'build-tools;27.0.3',
|
||||
'platforms;android-19',
|
||||
'ndk-bundle',
|
||||
'lldb;3.1',
|
||||
'cmake;3.6.4111459',
|
||||
]));
|
||||
const AndroidSDK = this.android.android_home;
|
||||
const AndroidNDK = this.android.ndk_home;
|
||||
const answer = `echo "${[AndroidSDK, AndroidNDK].join('\n')}"`;
|
||||
result = result.then(() => {
|
||||
return exec('.', [answer, '|', this.haxe.haxelibBin, 'run', 'openfl', 'setup', this.platform].join(' '));
|
||||
});
|
||||
}
|
||||
result = result.then(() => {
|
||||
return exec('.', [
|
||||
'echo',
|
||||
`"${this.android.path}"`,
|
||||
`"${this.android.path + '/ndk-bundle'}"`,
|
||||
'|',
|
||||
this.haxe.haxelibBin, 'run', 'openfl', 'setup', this.platform,
|
||||
].join(' '));
|
||||
//return this.haxe.haxelib(['echo'].concat(answers.map(item => `"${item}"`)).concat(['|', 'run', 'openfl', 'setup', this.platform]));
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user