You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Sergey Grebnov (Akvelon)" <v-...@microsoft.com> on 2014/03/25 15:32:00 UTC

config.xml parsing strategy

Hi, adding more ppl to our discussion with @purplecabbage<https://github.com/purplecabbage> regarding above
https://github.com/apache/cordova-cli/pull/145

Working on icons and splash screen support I've encountered with the following dilemma. It is easy to add support of the features above as part of cordova-cli: during prepare step. But ideally (agree w/ Jesse) this needs to be handled in the platform repo, since projects can be built outside of the cordova-cli and if the property is in the application root config.xml it should always be valid. This should be resolved at runtime.

This makes our live more complicated since we can't apply some properties in runtime, for example an icon which is showed before the app is even started or requires some additional tricks/hacks.  So let's define our strategy.


1.       If some preference could be applied in Runtime, then it must be read from config.xml and applied in runtime.

2.       If not, or requires dirty hacks (for ex: app icon or default splash screen) then we should apply such preference during build

a)      Support as part of cordova cli build only OR

b)      Must be implemented as part of platform repo build (applied before actual build)

a.       On Windows we can use additional cordova/pre_build.bat and MSBuild Pre-Build event so it will run automatically before every build.

Any ideas how better to resolve this? How important 2b is?

Thx!
Sergey


RE: config.xml parsing strategy

Posted by Axel Nennker <ig...@gmail.com>.
I would say: if the app can change it then runtime else project_Dir
But most OSes do not care about splash screens so its runtime to allow apps
to change it.

0.02$
 Am 25.03.2014 18:07 schrieb "Sergey Grebnov (Akvelon)" <
v-segreb@microsoft.com>:

> What is about app splash screen image? Does it belong to
> <project_dir>/config.XML or  <runtime>/config.XML (or both)?
>
> Thx!!
> Sergey
> -----Original Message-----
> From: Axel Nennker [mailto:ignisvulpis@gmail.com]
> Sent: Tuesday, March 25, 2014 6:39 PM
> To: dev
> Subject: Re: config.xml parsing strategy
>
> Its important to distinguish between <project_dir>/config.XML and
> <runtime>/config.XML
>
> Launcher icon is in the first, app preferences in the second  Am 25.03.2014
> 15:32 schrieb "Sergey Grebnov (Akvelon)" <
> v-segreb@microsoft.com>:
>
> > Hi, adding more ppl to our discussion with @purplecabbage<
> > https://github.com/purplecabbage> regarding above
> > https://github.com/apache/cordova-cli/pull/145
> >
> > Working on icons and splash screen support I've encountered with the
> > following dilemma. It is easy to add support of the features above as
> > part of cordova-cli: during prepare step. But ideally (agree w/ Jesse)
> > this needs to be handled in the platform repo, since projects can be
> > built outside of the cordova-cli and if the property is in the
> > application root config.xml it should always be valid. This should be
> resolved at runtime.
> >
> > This makes our live more complicated since we can't apply some
> > properties in runtime, for example an icon which is showed before the
> > app is even started or requires some additional tricks/hacks.  So
> > let's define our strategy.
> >
> >
> > 1.       If some preference could be applied in Runtime, then it must be
> > read from config.xml and applied in runtime.
> >
> > 2.       If not, or requires dirty hacks (for ex: app icon or default
> > splash screen) then we should apply such preference during build
> >
> > a)      Support as part of cordova cli build only OR
> >
> > b)      Must be implemented as part of platform repo build (applied
> before
> > actual build)
> >
> > a.       On Windows we can use additional cordova/pre_build.bat and
> > MSBuild Pre-Build event so it will run automatically before every build.
> >
> > Any ideas how better to resolve this? How important 2b is?
> >
> > Thx!
> > Sergey
> >
> >
>

RE: config.xml parsing strategy

Posted by "Sergey Grebnov (Akvelon)" <v-...@microsoft.com>.
What is about app splash screen image? Does it belong to <project_dir>/config.XML or  <runtime>/config.XML (or both)?

Thx!!
Sergey
-----Original Message-----
From: Axel Nennker [mailto:ignisvulpis@gmail.com] 
Sent: Tuesday, March 25, 2014 6:39 PM
To: dev
Subject: Re: config.xml parsing strategy

Its important to distinguish between <project_dir>/config.XML and <runtime>/config.XML

Launcher icon is in the first, app preferences in the second  Am 25.03.2014 15:32 schrieb "Sergey Grebnov (Akvelon)" <
v-segreb@microsoft.com>:

> Hi, adding more ppl to our discussion with @purplecabbage< 
> https://github.com/purplecabbage> regarding above
> https://github.com/apache/cordova-cli/pull/145
>
> Working on icons and splash screen support I've encountered with the 
> following dilemma. It is easy to add support of the features above as 
> part of cordova-cli: during prepare step. But ideally (agree w/ Jesse) 
> this needs to be handled in the platform repo, since projects can be 
> built outside of the cordova-cli and if the property is in the 
> application root config.xml it should always be valid. This should be resolved at runtime.
>
> This makes our live more complicated since we can't apply some 
> properties in runtime, for example an icon which is showed before the 
> app is even started or requires some additional tricks/hacks.  So 
> let's define our strategy.
>
>
> 1.       If some preference could be applied in Runtime, then it must be
> read from config.xml and applied in runtime.
>
> 2.       If not, or requires dirty hacks (for ex: app icon or default
> splash screen) then we should apply such preference during build
>
> a)      Support as part of cordova cli build only OR
>
> b)      Must be implemented as part of platform repo build (applied before
> actual build)
>
> a.       On Windows we can use additional cordova/pre_build.bat and
> MSBuild Pre-Build event so it will run automatically before every build.
>
> Any ideas how better to resolve this? How important 2b is?
>
> Thx!
> Sergey
>
>

Re: config.xml parsing strategy

Posted by Andrew Grieve <ag...@chromium.org>.
CLI-only is my thought as well. If you add enough functionality to
platforms to enable this, then I think you'd end up with CLI in the end
anyways.


On Tue, Mar 25, 2014 at 11:20 AM, Jesse <pu...@gmail.com> wrote:

> I have given this some more thought, and discussed it a bit with Joe
> offline.
>
> I think it actually makes the most sense as part of the cli workflow,
> meaning your pull requests are probably fine Sergey.
>
> We should explicitly state that if you want to change the splash-screen
> image used when your app is loading in a 'single platform project' you
> CANNOT do it by simply updating the appRoot/config.xml file, and need to
> change it according to the platform's conventions.
>
> We can revisit this in the future if we ever get to a platform hooks
> decision.
>
>
>
>
>
> @purplecabbage
> risingj.com
>
>
> On Tue, Mar 25, 2014 at 10:26 AM, Bryan Higgins <bryan@bryanhiggins.net
> >wrote:
>
> > My 2 cents:
> >
> > - For CLI projects, put assets into merges folder and make use of
> > <platform> tag
> > - The platform is responsible for adding icons and splash screens as part
> > of the build script
> >
> > Is there something specific to WP8 which makes this "a dity hack"?
> >
> >
> > On Tue, Mar 25, 2014 at 10:38 AM, Axel Nennker <ignisvulpis@gmail.com
> > >wrote:
> >
> > > Its important to distinguish between <project_dir>/config.XML and
> > > <runtime>/config.XML
> > >
> > > Launcher icon is in the first, app preferences in the second
> > >  Am 25.03.2014 15:32 schrieb "Sergey Grebnov (Akvelon)" <
> > > v-segreb@microsoft.com>:
> > >
> > > > Hi, adding more ppl to our discussion with @purplecabbage<
> > > > https://github.com/purplecabbage> regarding above
> > > > https://github.com/apache/cordova-cli/pull/145
> > > >
> > > > Working on icons and splash screen support I've encountered with the
> > > > following dilemma. It is easy to add support of the features above as
> > > part
> > > > of cordova-cli: during prepare step. But ideally (agree w/ Jesse)
> this
> > > > needs to be handled in the platform repo, since projects can be built
> > > > outside of the cordova-cli and if the property is in the application
> > root
> > > > config.xml it should always be valid. This should be resolved at
> > runtime.
> > > >
> > > > This makes our live more complicated since we can't apply some
> > properties
> > > > in runtime, for example an icon which is showed before the app is
> even
> > > > started or requires some additional tricks/hacks.  So let's define
> our
> > > > strategy.
> > > >
> > > >
> > > > 1.       If some preference could be applied in Runtime, then it must
> > be
> > > > read from config.xml and applied in runtime.
> > > >
> > > > 2.       If not, or requires dirty hacks (for ex: app icon or default
> > > > splash screen) then we should apply such preference during build
> > > >
> > > > a)      Support as part of cordova cli build only OR
> > > >
> > > > b)      Must be implemented as part of platform repo build (applied
> > > before
> > > > actual build)
> > > >
> > > > a.       On Windows we can use additional cordova/pre_build.bat and
> > > > MSBuild Pre-Build event so it will run automatically before every
> > build.
> > > >
> > > > Any ideas how better to resolve this? How important 2b is?
> > > >
> > > > Thx!
> > > > Sergey
> > > >
> > > >
> > >
> >
>

Re: config.xml parsing strategy

Posted by Jesse <pu...@gmail.com>.
I have given this some more thought, and discussed it a bit with Joe
offline.

I think it actually makes the most sense as part of the cli workflow,
meaning your pull requests are probably fine Sergey.

We should explicitly state that if you want to change the splash-screen
image used when your app is loading in a 'single platform project' you
CANNOT do it by simply updating the appRoot/config.xml file, and need to
change it according to the platform's conventions.

We can revisit this in the future if we ever get to a platform hooks
decision.





@purplecabbage
risingj.com


On Tue, Mar 25, 2014 at 10:26 AM, Bryan Higgins <br...@bryanhiggins.net>wrote:

> My 2 cents:
>
> - For CLI projects, put assets into merges folder and make use of
> <platform> tag
> - The platform is responsible for adding icons and splash screens as part
> of the build script
>
> Is there something specific to WP8 which makes this "a dity hack"?
>
>
> On Tue, Mar 25, 2014 at 10:38 AM, Axel Nennker <ignisvulpis@gmail.com
> >wrote:
>
> > Its important to distinguish between <project_dir>/config.XML and
> > <runtime>/config.XML
> >
> > Launcher icon is in the first, app preferences in the second
> >  Am 25.03.2014 15:32 schrieb "Sergey Grebnov (Akvelon)" <
> > v-segreb@microsoft.com>:
> >
> > > Hi, adding more ppl to our discussion with @purplecabbage<
> > > https://github.com/purplecabbage> regarding above
> > > https://github.com/apache/cordova-cli/pull/145
> > >
> > > Working on icons and splash screen support I've encountered with the
> > > following dilemma. It is easy to add support of the features above as
> > part
> > > of cordova-cli: during prepare step. But ideally (agree w/ Jesse) this
> > > needs to be handled in the platform repo, since projects can be built
> > > outside of the cordova-cli and if the property is in the application
> root
> > > config.xml it should always be valid. This should be resolved at
> runtime.
> > >
> > > This makes our live more complicated since we can't apply some
> properties
> > > in runtime, for example an icon which is showed before the app is even
> > > started or requires some additional tricks/hacks.  So let's define our
> > > strategy.
> > >
> > >
> > > 1.       If some preference could be applied in Runtime, then it must
> be
> > > read from config.xml and applied in runtime.
> > >
> > > 2.       If not, or requires dirty hacks (for ex: app icon or default
> > > splash screen) then we should apply such preference during build
> > >
> > > a)      Support as part of cordova cli build only OR
> > >
> > > b)      Must be implemented as part of platform repo build (applied
> > before
> > > actual build)
> > >
> > > a.       On Windows we can use additional cordova/pre_build.bat and
> > > MSBuild Pre-Build event so it will run automatically before every
> build.
> > >
> > > Any ideas how better to resolve this? How important 2b is?
> > >
> > > Thx!
> > > Sergey
> > >
> > >
> >
>

Re: config.xml parsing strategy

Posted by Bryan Higgins <br...@bryanhiggins.net>.
My 2 cents:

- For CLI projects, put assets into merges folder and make use of
<platform> tag
- The platform is responsible for adding icons and splash screens as part
of the build script

Is there something specific to WP8 which makes this "a dity hack"?


On Tue, Mar 25, 2014 at 10:38 AM, Axel Nennker <ig...@gmail.com>wrote:

> Its important to distinguish between <project_dir>/config.XML and
> <runtime>/config.XML
>
> Launcher icon is in the first, app preferences in the second
>  Am 25.03.2014 15:32 schrieb "Sergey Grebnov (Akvelon)" <
> v-segreb@microsoft.com>:
>
> > Hi, adding more ppl to our discussion with @purplecabbage<
> > https://github.com/purplecabbage> regarding above
> > https://github.com/apache/cordova-cli/pull/145
> >
> > Working on icons and splash screen support I've encountered with the
> > following dilemma. It is easy to add support of the features above as
> part
> > of cordova-cli: during prepare step. But ideally (agree w/ Jesse) this
> > needs to be handled in the platform repo, since projects can be built
> > outside of the cordova-cli and if the property is in the application root
> > config.xml it should always be valid. This should be resolved at runtime.
> >
> > This makes our live more complicated since we can't apply some properties
> > in runtime, for example an icon which is showed before the app is even
> > started or requires some additional tricks/hacks.  So let's define our
> > strategy.
> >
> >
> > 1.       If some preference could be applied in Runtime, then it must be
> > read from config.xml and applied in runtime.
> >
> > 2.       If not, or requires dirty hacks (for ex: app icon or default
> > splash screen) then we should apply such preference during build
> >
> > a)      Support as part of cordova cli build only OR
> >
> > b)      Must be implemented as part of platform repo build (applied
> before
> > actual build)
> >
> > a.       On Windows we can use additional cordova/pre_build.bat and
> > MSBuild Pre-Build event so it will run automatically before every build.
> >
> > Any ideas how better to resolve this? How important 2b is?
> >
> > Thx!
> > Sergey
> >
> >
>

Re: config.xml parsing strategy

Posted by Axel Nennker <ig...@gmail.com>.
Its important to distinguish between <project_dir>/config.XML and
<runtime>/config.XML

Launcher icon is in the first, app preferences in the second
 Am 25.03.2014 15:32 schrieb "Sergey Grebnov (Akvelon)" <
v-segreb@microsoft.com>:

> Hi, adding more ppl to our discussion with @purplecabbage<
> https://github.com/purplecabbage> regarding above
> https://github.com/apache/cordova-cli/pull/145
>
> Working on icons and splash screen support I've encountered with the
> following dilemma. It is easy to add support of the features above as part
> of cordova-cli: during prepare step. But ideally (agree w/ Jesse) this
> needs to be handled in the platform repo, since projects can be built
> outside of the cordova-cli and if the property is in the application root
> config.xml it should always be valid. This should be resolved at runtime.
>
> This makes our live more complicated since we can't apply some properties
> in runtime, for example an icon which is showed before the app is even
> started or requires some additional tricks/hacks.  So let's define our
> strategy.
>
>
> 1.       If some preference could be applied in Runtime, then it must be
> read from config.xml and applied in runtime.
>
> 2.       If not, or requires dirty hacks (for ex: app icon or default
> splash screen) then we should apply such preference during build
>
> a)      Support as part of cordova cli build only OR
>
> b)      Must be implemented as part of platform repo build (applied before
> actual build)
>
> a.       On Windows we can use additional cordova/pre_build.bat and
> MSBuild Pre-Build event so it will run automatically before every build.
>
> Any ideas how better to resolve this? How important 2b is?
>
> Thx!
> Sergey
>
>