Reputation: 914
Does anyone know why my "generate.py build" works just fine, but when I run "generate.py source" it cannot find: "http://localhost/qooxdoo-1.6-sdk/framework/source/class/qx/Bootstrap.js?nocache=0.39702596611879537"
this is because it should be: http://localhost/*username/*qooxdoo-1.6-sdk/framework/source/class/qx/Bootstrap.js?nocache=0.39702596611879537"
but I cannot find where this setting is.
I tried editing the variable "QOOXDOO_PATH" in config.json, but that didn't seem to work.
Please help, thanks!
Upvotes: 1
Views: 532
Reputation: 23526
You cannot just run a source version through a web server without taking some precautions. The generator generates relative URIs which work nicely on the file-system level (i.e. when you open your app with the file://
protocol in the browser). But relative paths are not stable under a web server.
As a simple example, if you have a file /foo/bar/baz/index.html
which references ../../bong/other.png
, other.png will be found on the file system in /foo/bong/
. But if you have a web server on this machine with a DocumentRoot of /foo/bar/
, the URL to load the index.html is http://localhost/baz/index.html
and the above relative reference is overstepping the web server's root and will cause an error.
One way to make this work is to make sure that your web server's DocumentRoot is above the root directories of all involved libraries your app is using (i.e. your app itself, the qooxdoo SDK, other lib/contribs you are using, etc.). See here for a fuller explanation.
Don't fiddle with QOOXDOO_PATH, as this is necessary to find the framework classes and build your app in the first place.
Upvotes: 1
Reputation: 5460
make sure you use a relative path when setting the source location:
../../../../../../../../home/*user*/qooxdoo-1.6-sdk
if you are working with perl, I would recommend using the the mojo bindings http://qooxdoo.org/contrib/project/rpcperl-mojo they allow you to run both the build and the source version through the built in web server, taking care of all the path magic.
Upvotes: 0