Encapsulator doesn't load JS files located in subdirectories

Encapsulator doesn't load JS files located in subdirectories

I packaged an application as a MeeGo RPM, but on installing it doesn't start correctly. The HTML page loads, but the JS files which draw the UI don't. Could you please provide some information on how the encapsulator packs the JS/CSS/image files into the application binary? Presumably using Qt resource paths? (I'm guessing here.) And are multiple folder levels supported? If JS loaders which use HTTP requests (like LAB.js) are unsupported (this is my guess as to why my app doesn't work), would it be possible to add support for them or provide an alternative? Finally, if there are certain patterns an application should follow (e.g. use inlined js only, pack all js into a single file, don't use a js loader), could you also add that to the FAQ? For information, my application is structured like this: app - js -- file.js - css -- file.css third-party - js -- a.js -- b.js - css -- a.css I'm loading the JS scripts using LAB.js, e.g.: <!DOCTYPE html> <html> <head> <title>app</title> <meta charset="utf-8"> <link rel="stylesheet" href="third-party/css/sencha-touch.css" /> <link rel="stylesheet" href="app/css/app.css" /> <script type="text/javascript" src="third-party/js/LAB.js"></script> <script> // load JS $LAB // utility libraries .script('third-party/js/json2.js') .script('third-party/js/underscore.js') // Sencha .script('third-party/js/sencha-touch-debug.js').wait() // main app script .script('app/js/app.js') // run .wait(function () { config(); run(); }); </script> </head> <body> </body> </html> I'm guessing this doesn't work as LAB.js uses HTTP requests to get the js files. Thanks.
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

(removed this comment as I realised I could fix the original post)

Good that you were able to Fix it. Pls feel free to write in forum or to us, if you have any issues with respect to encapsulator Tool

LAB.js supports http:// protocol but does not support file:/// protocol.

I tried the following non-blocking JavaScript loader and it worked well in my tests with Intel AppUp encapsulator. You can try this as an alternative.


You may try other JavaScript loaders available that suit your needs.

You may try the following as another alternative. Andy, a co-developer for Intel AppUp encapsulator implemented a simple JavaScript loader.

Leave a Comment

Please sign in to add a comment. Not a member? Join today