1

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!

Jonathan
  • 894
  • 2
  • 9
  • 20

2 Answers2

1

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.

ThomasH
  • 22,276
  • 13
  • 61
  • 62
  • Thank you, that was my problem! I was building the source on the webserver with the qooxdoo files below the web root. That link was really informative! Thanks again for the help! – Jonathan Feb 19 '12 at 19:44
  • While this is certainly true, as Jonathan shows he us making a build version, he should really be deploying the build dir to his web server, as indicated in the link you provided, ThomasH. Thanks for that. – d-_-b Apr 13 '12 at 00:28
  • Yes, but it is also an understandable desire that people want to run their source version through a web server, for various reasons. Maybe qooxdoo should make this scenario more approachable and "main stream". – ThomasH Apr 16 '12 at 08:46
0

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.

Tobi Oetiker
  • 5,167
  • 2
  • 17
  • 23