Howdy all, I like Carlos' suggestions in this jira ticket for dealing with Windows scripts:https://issues.apache.org/jira/browse/CB-5187 Appending a .bat or using cmd /c seem pretty easy fixes in this case. I'm +1 either way.
I propose to think about 'cordova' engine settings (in default-engines.js) > as a fallback in case we don't have any platform specific engine for some > platform. So in case of engine.attrib["name"] == 'cordova' we should check > if there is engine with ['cordova-' + platform] name first and if it does > not exist use 'cordova' engine settings only. For example we already do > this by the following line, but we need both engines (cordova and > cordova-wp8) specified in plugin.xml file. Thoughts? The reason for having both cordova and cordova-platform in your plugin.xml engine definition is so that you can override the base cordova version if a platform needs to have a different version. eg, <engines> <engine name="cordova" version=">=2.7.0" /> // this plugin will work on all platforms >=2.7.0 <engine name="cordova-android" version=">=3.0.0" /> // except for android which needs to be >= 3.0.0 </engines> // make sure we check for platform req's and not just cordova reqs > if(cordovaEngineIndex && cordovaPlatformEngineIndex) > uncheckedEngines.pop(cordovaEngineIndex); > PS. Another minor potential issue seems to be in check above; > cordovaEngineIndex && cordovaPlatformEngineIndex will return false if one > of indexes is zero (zero is valid/correct index in this context so it must > be true). Good catch. The getEngines function could use a refactor. Are you ok if I create ticket for this specific bug (plugman + wp78) and > fix it as per steps 1 and 2 above? I say go for it. -- Timothy Kim On 23 October 2013 12:51, Josh Soref <jso...@blackberry.com> wrote: > On 10/23/13 2:23 PM, "Carlos Santana" <csantan...@gmail.com> wrote: > >Actually just try it out and see that using spawn with "cmd" > >["/c","cordova/build",... > >is better option than adding the ".bat" then it covers "build.exe", > >"build.bat", and "build.cmd" on windows > > > >if someone thinks this is bad route, please shime in this jira issue [1] > > I'm actually +1 on this approachÅ > > [Note: I've become the recognized Windows expert here in under a week] > > --------------------------------------------------------------------- > This transmission (including any attachments) may contain confidential > information, privileged material (including material protected by the > solicitor-client or other applicable privileges), or constitute non-public > information. Any use of this information by anyone other than the intended > recipient is prohibited. If you have received this transmission in error, > please immediately reply to the sender and delete this information from > your system. Use, dissemination, distribution, or reproduction of this > transmission by unintended recipients is not authorized and may be unlawful. > > -- Timothy Kim