cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: icons, splash and hooks
Date Fri, 09 Aug 2013 18:42:40 GMT
Hey guys,

Thanks for kicking this thread off. Lots of good stuff here.

First: there are several issues in our JIRA covering icon and splash
screen support. Most of the discussion has happened under the
<icon>-specific issue [1], and I think pretty much everything discussed
about <icon>s applies to <splashscreen>s. Right now: there is no good
support in cordova for icon and splash screens.

Michael: thank you for the pull request to add icon and splash screen
support. I have a bunch of comments:

1. Adding imagemagick as a dependency is probably a bad idea. Does it
build fine on OSX, Linux and Windows? I have my doubts, given my prior
experience with this tool.
2. I am not sure we want to do image processing at all to enable icon and
splash support. Based on [1], it sounds like an explicit enumeration of
particular icon/splash files with particular sizes (to be adapted
appropriately for the varying platforms we support) is the way we are
going with this feature. I encourage everyone to please check out [1],
read through the ideas described in that JIRA issue, and continue
discussion on that issue. Once a general approach to the problem is
identified and agreed on, we can employ the same strategy for splash
screens.
3. It seems like manifest-wise, Michael, you are following what PhoneGap
build has done to add support for icons. While that is nice, it is not the
way the standards are going for application manifests (in fact, XML isn't
the way the standards are going). Again, refer to [1] for discussion on
different ways to implement that.

Ivan, regarding your second point about hooks, I totally agree. We have an
issue filed to enable generic parameter passing to command-line hooks [2].

Ivan, regarding your third point, I don't think that would work out on
windows, will it? Shebangs or whatever you call them? Alternatively: have
a .bat file on windows that invokes node or whatever interpreter you wrote
your scripts in.

[1] https://issues.apache.org/jira/browse/CB-2606
[2] https://issues.apache.org/jira/browse/CB-4382

On 8/8/13 1:16 AM, "Ivan Baktsheev" <owner@apla.me> wrote:

>hello
>
>i have some projects which i want to migrate from cordova 2.x to cordova
>3.0. i'm very happy with the project format change and cordova cli, but
>some issues are very frustrating.
>
>1) icons and splash screens won't copy from res folder
>
>i created an after_prepare hook script
>(https://gist.github.com/apla/6179863) and assets go to the proper
>folders. probably, this can be added to the cordova cli. are there any
>reasons not to include this functionality into cordova?
>
>but this added other two issues:
>
>2) hook scripts know nothing about current command platform. for example,
>when i run "cordova prepare ios" i don't need assets from android copied.
>i propose to make a hook script reading an environment or the second
>command line parameter to get a current platform, would that work?
>
>3) hook is not running on windows, and i have to rename my hook to
>"something.js", windows will run this script via cscript.exe. i think,
>cordova could read the first line of a script file (#!/bin/env node) and
>launch a proper command, or interpret every hook on windows as a nodejs
>script; in this case we would be able to get cross-platform hooks.
>
>thank you!
>


Mime
View raw message