kiot-cordova-plugin-home-console
Version:
This plugin allows your Android app to download and install compressed updates without the Google Play Store.
29 lines (25 loc) • 1.09 kB
JavaScript
// hooks/check_ndk.js
module.exports = function(context) {
var fs = require('fs');
var path = require('path');
console.log('Checking Android NDK and CMake setup...');
// Check for Android SDK/NDK setup
var androidHome = process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT;
if (!androidHome) {
console.warn('ANDROID_HOME environment variable not set. Make sure Android SDK is properly configured.');
} else {
var ndkPath = path.join(androidHome, 'ndk');
if (!fs.existsSync(ndkPath)) {
console.warn('Android NDK not found at ' + ndkPath + '. Please install NDK through Android SDK Manager.');
} else {
console.log('Android NDK found at ' + ndkPath);
}
var cmakePath = path.join(androidHome, 'cmake');
if (!fs.existsSync(cmakePath)) {
console.warn('CMake not found at ' + cmakePath + '. Please install CMake through Android SDK Manager.');
} else {
console.log('CMake found at ' + cmakePath);
}
}
return true;
};