mozilla / chromeless

DEPRECATED - Build desktop applications with web technologies.
http://mozillalabs.com/chromeless
760 stars 129 forks source link

Generated XULRunner app fails due to full path in staticArgs argument #29

Closed taboca closed 13 years ago

taboca commented 13 years ago

We so far pass a file path to the main.js. This uses the full path of the harddisk and works fine for tests ( using cfx ). But if we consider generating the output application i.e., xulrunner --install-app, it will fail to launch the application because of the full path.

We need to use a path that is relative to the app, this could be a reason to use resource:// protocol instead.

Here is how the harness-options.json looks like, the line in evidence, if you use cfx with the "xpi" instead the "run" option.

"staticArgs": "{\"browser\": \"/Users/marciogalli/Desktop/chromeless/mozilla/repository/chromeless-nov10a/chromeless/examples/first_browser/index.html\"}",

taboca commented 13 years ago

Patch proposed - change to harness to build the full path from the relative, in case the app path is passed as browser_embeded_path ( relative ) https://github.com/taboca/chromeless/commit/2e0e97cdcd558299952bcb82e8aaa208eb50d783

taboca commented 13 years ago

Landed patch b71c38a3af5b024e7c539be7de19ce4e16e49aca . Now in "run" which is test mode, the app launches with a full path ( depends on chromeless script ) and in "package" mode the app is embeded in the ZIP file.