[Development] Runtime Platform Content Selection

Mohamed Fawzi Fawzi.Mohamed at digia.com
Tue Jan 15 13:39:05 CET 2013


In the Platform Content Selection thread some saw runtime selection as not needed.
I disagree, as I think it could be very useful in some occasions (high_res/low_res, different orientation,…).
I do not believe that having a separate binary for all those things is the correct choice.
Still the issues with runtime selection are different enough (and making the discussion on the static part unclear) that they warrant a different discussion.

One could address this in another way (for example with a loader), but I think that runtime resource selection can be an attractive solution.

A possible solution is to hava an environment that is basically an hash table string -> string.
Then if any path piece is *.qmlbundle, then that string is looked up int the environment hash table and if found *.bundle is replaced with "*.bundle/"+hash.value("*.qmlbundle")

For speed and simplicity considerations I would make the replacement always, thus all different "runtime branches" need all files without fallback. A simple implementation could have issues if the path to the directory contains something called xxx.qmlbundle, just like one of the segments to replace, but I think that is rather unlikely.

The use of a special string (.qmlbundle) to identify the places for runtime replacement should make the intent clear.
Also this should not clash with the ability to automatically prune the paths that are statically known to be not taken.

Fawzi


More information about the Development mailing list