From 0c2fbab0f8e05fd8f1ae721e7c5207e2311499bb Mon Sep 17 00:00:00 2001 From: david-spaeth Date: Wed, 7 Mar 2018 17:37:50 +0100 Subject: [PATCH 1/2] Fix the productName value when attributes are used Fix the bad value of productName variable if short attribute has use in name tag Cordova allow short attribute in name tag. See: https://cordova.apache.org/docs/en/latest/config_ref/#short-name --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 2ce0268..ff51276 100644 --- a/index.js +++ b/index.js @@ -131,6 +131,9 @@ var getProjectName = function () { deferred.reject(err); } var projectName = result.widget.name[0]; + if (typeof projectName == "object") { + projectName = projectName._.trim() + } deferred.resolve(projectName); }); }); From 814615f9a2022817a58758517b2fa6eff6a824e6 Mon Sep 17 00:00:00 2001 From: david-spaeth Date: Fri, 9 Mar 2018 13:42:44 +0100 Subject: [PATCH 2/2] add compatibily Cordova-android < 7 --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ff51276..f4739fb 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ var settings = {}; settings.CONFIG_FILE = argv.config || 'config.xml'; settings.SPLASH_FILE = argv.splash || 'splash.png'; settings.OLD_XCODE_PATH = argv['xcode-old'] || false; +settings.OLD_ANDROID_PATH = argv['android-old'] || false; /** * Check which platforms are added to the project and return their splash screen names and sizes @@ -55,7 +56,7 @@ var getPlatforms = function (projectName) { platforms.push({ name : 'android', isAdded : fs.existsSync('platforms/android'), - splashPath : 'platforms/android/app/src/main/res/', + splashPath : settings.OLD_ANDROID_PATH ? 'platforms/android/res/' : 'platforms/android/app/src/main/res/', splash : [ // Landscape { name: 'drawable-land-ldpi/screen.png', width: 320, height: 200 },