[android] fix android-ndk version
This commit is contained in:
@@ -10,6 +10,7 @@ class Android extends Sdk {
|
||||
|
||||
constructor(version) {
|
||||
super(Android.ID, version || Android.VERSION);
|
||||
this.platform = 19;
|
||||
}
|
||||
|
||||
get prepared() {
|
||||
@@ -39,7 +40,18 @@ class Android extends Sdk {
|
||||
}
|
||||
|
||||
prepare() {
|
||||
return super.prepare(0);
|
||||
const result = [];
|
||||
result.push(super.prepare(0));
|
||||
if (!fs.existsSync(path.join(this.ndk_home))) {
|
||||
result.push(this.prepare_ndk());
|
||||
}
|
||||
return Promise.all(result);
|
||||
}
|
||||
|
||||
prepare_ndk() {
|
||||
const url = 'https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip';
|
||||
// ToDo: download and extract to `this.ndk_home`
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
sdkmanager(packages) {
|
||||
@@ -127,7 +139,8 @@ Android.ID = 'android';
|
||||
|
||||
Android.VERSION_25_2_3 = '25.2.3';
|
||||
Android.VERSION_3859397 = '3859397';
|
||||
Android.VERSION_4333796 = '4333796';
|
||||
|
||||
Android.VERSION = Android.VERSION_3859397;
|
||||
Android.VERSION = Android.VERSION_4333796;
|
||||
|
||||
module.exports = Android;
|
||||
|
||||
@@ -27,4 +27,4 @@ module.exports = (dir, command) => {
|
||||
failure: failure,
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ class HaxeBuilder extends Builder {
|
||||
'platform-tools',
|
||||
'build-tools;27.0.3',
|
||||
'platforms;android-19',
|
||||
'ndk-bundle',
|
||||
//'ndk-bundle',
|
||||
'lldb;3.1',
|
||||
'cmake;3.6.4111459',
|
||||
]));
|
||||
@@ -282,7 +282,8 @@ class Html5Runner extends Runner {
|
||||
call() {
|
||||
return gulp.src(this.targetPath)
|
||||
.pipe(webserver({
|
||||
host: 'localhost', port: 3000,
|
||||
// ToDo: config?
|
||||
host: '0.0.0.0', port: 3000,
|
||||
open: true,
|
||||
fallback: 'index.html'
|
||||
}));
|
||||
|
||||
3
index.js
3
index.js
@@ -2,6 +2,7 @@ module.exports = {
|
||||
Sdk: require('./haxetool/sdk'),
|
||||
Haxe: require('./haxetool/haxe'),
|
||||
FlashPlayer: require('./haxetool/flashplayer'),
|
||||
Android: require('./haxetool/android'),
|
||||
AdobeAir: require('./haxetool/adobe_air'),
|
||||
Project: require('./haxetool/project'),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
<window fps="<%=meta.fps%>"/>
|
||||
<window fps="<%=meta.fps%>" width="<%=meta.width%>" height="<%=meta.height%>" unless="html5"/>
|
||||
<window orientation="landscape" resizable="false" if="android"/>
|
||||
|
||||
<haxeflag name="-D" value="swf-gpu"/>
|
||||
<haxeflag name="-D" value="native-trace"/>
|
||||
|
||||
Reference in New Issue
Block a user