Sergey Grebnov created CB-7416:
----------------------------------

             Summary: Windows+plugins. source-file is not correctly processed
                 Key: CB-7416
                 URL: https://issues.apache.org/jira/browse/CB-7416
             Project: Apache Cordova
          Issue Type: Bug
          Components: CordovaLib, Windows 8
            Reporter: Sergey Grebnov
            Assignee: Jesse MacFadyen


For backward compatibility and to avoid mass core plugins failures we re-use 
windows8 platform definitions for plugins for new windows platform.

But looks like after some recent changes in cordova-lib some of the elements 
are not processed correct,

I see the following logic added

/src/plugman/install.js


{code}
    var platformTag = pluginInfo._et.find('./platform[@name="'+platform+'"]');
    // CB-6976 Windows Universal Apps. For smooth transition and to prevent 
mass api failures
    // we allow using windows8 tag for new windows platform
    if (platform == 'windows' && !platformTag) {
        platformTag = pluginInfo._et.find('platform[@name="' + 'windows8' + 
'"]');
    }
    if ( pluginInfo.hasPlatformSection(platform) ) {
        var sourceFiles = platformTag.findall('./source-file'),
            headerFiles = platformTag.findall('./header-file'),
            resourceFiles = platformTag.findall('./resource-file'),
            frameworkFiles = platformTag.findall('./framework'),
            libFiles = platformTag.findall('./lib-file');

{code}

Looks like  pluginInfo.hasPlatformSection(platform) prevents plugin definitions 
to be applied for windows if they are defined under windows8

if I replace 
{code}
 if ( pluginInfo.hasPlatformSection(platform) ) {
{code}
with
{code}
 if ( platformTag) {
{code}

then  source-file and other definitions are correctly applied, but I see that 
added references (at lest for source-file) are not removed from 
CordovaApp.projitems after plugin uninstall



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to