Qooxdoo 源无法工作,但构建可以
有谁知道为什么我的“generate.py build”工作得很好,但是当我运行“generate.py source”时它找不到: “http://localhost/qooxdoo-1.6-sdk/framework/source/class/qx/Bootstrap.js?nocache=0.39702596611879537”
这是因为它应该是: http://localhost/*用户名/*qooxdoo-1.6-sdk/framework/source/class /qx/Bootstrap.js?nocache=0.39702596611879537”
,但我找不到这个设置在哪里。
我尝试编辑变量“QOOXDOO_PATH” config.json,但这似乎不起作用,
请帮忙,谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不能只通过 Web 服务器运行源版本而不采取一些预防措施。生成器生成在文件系统级别上运行良好的相对 URI(即,当您在浏览器中使用
file://
协议打开应用程序时)。但相对路径在 Web 服务器下并不稳定。举个简单的例子,如果您有一个文件
/foo/bar/baz/index.html
引用../../bong/other.png
,其他。 png 将在文件系统/foo/bong/
中找到。但是,如果您的计算机上有一个 Web 服务器,其 DocumentRoot 为/foo/bar/
,则加载 index.html 的 URL 为http://localhost/baz/index.html
并且上面的相对引用超出了Web服务器的根目录并且会导致错误。实现此目的的一种方法是确保您的 Web 服务器的 DocumentRoot 位于您的应用程序正在使用的所有相关库的根目录(即您的应用程序本身、qooxdoo)的根目录之上。 SDK、您正在使用的其他库/贡献等)。有关更完整的说明,请参阅此处。
不要摆弄 QOOXDOO_PATH,因为这是查找框架类并首先构建应用程序所必需的。
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 ishttp://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.
确保在设置源位置时使用相对路径:
如果您使用 Perl,我建议使用 mojo 绑定 http://qooxdoo.org/contrib/project/rpcperl-mojo 它们允许您通过内置的 Web 服务器运行构建版本和源版本,并处理所有路径魔法。
make sure you use a relative path when setting the source location:
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.