Daniel,

I understand you have to map the deployed application to the web2py file layout. I would think you could copy everything under build/* to the static/ folder, as of your description:


On 10/24/2012 02:26 PM, Daniel Gonzalez Zaballos wrote:
Web2py applications have a strict structure for serving the pages:

web2py_location/applications/
      <application_name>/
           controllers/
           models/
           modules/
           ....
static/ -> static files like images/css/js (here is where qooxdoo goes)
           views/    -> html template files


What I don't get is your "real structure":


My real structure now is:

my_app_name/
    ...
    - scripts/
        - qooxdoo-desktop/
            - config.json
            - generate.py
    - static/
        - desktop/
            - source/
            - build/
            - qooxdoo/ -> symbolic link to the qooxdoo-sdk
            - Manifest.json


How did you come up with this layout? Why did you rip the skeleton structure apart, placing config.json and generate.py in one folder, but Manifest.json and the source/ tree in another?! Does this structure already belong to the web2py realm? Because I see a "statics" folder there (but "scripts" didn't show up above)?!

Is this your goal? Do you want to have the generator place the build version directly into the web2py file structure? Then simply set the BUILD_PATH macro in your config.json and you're all set.

Well, the first problem is the source version, that it doesn't find correctly the qooxdoo-sdk via URL (there is no problem with the generate.py)

It trys to reach:
- http://192.168.160.5:8000/static/desktop/qooxdoo/framework/ <http://192.168.160.5:8000/static/desktop/qooxdoo/framework/source/class/qx/ui/mobile/form/ToggleButton.js>
when it has to reach:
- http://192.168.160.5:8000/*my_app_name*/static/desktop/qooxdoo/framework/ <http://192.168.160.5:8000/static/desktop/qooxdoo/framework/source/class/qx/ui/mobile/form/ToggleButton.js>

So "doesn't find" in your description means doesn't find at run-time, not build-time, right?! It's a bit tricky to run a source version through a web server (recommendation is to load it from file:// directly), as you have to make sure that your app source tree and the qooxdoo SDK root folder are within the scope of the web servers file export, and that relative paths continue to work. See this entry:

http://qooxdoo.org/docs/general/snippets#running_a_source_version_from_a_web_server



And the second problem is in the build version with the resources (and i suppose that it happens in source version too, but as I cannot execute correctly, i cannot see if it happens).
I trys to reach:
http://192.168.160.5:8000/my_app_name/static/build/resource/omw/background.jpg <http://192.168.160.5:8000/openmywork/static/build/resource/omw/background.jpg>

And it has to reach:
http://192.168.160.5:8000/my_app_name/static/*desktop*/build/resource/omw/background.jpg <http://192.168.160.5:8000/openmywork/static/build/resource/omw/background.jpg>


The html are separated from source/ and build/ folders, and i have them into the web2py views/ directory following the web2py linkint the application main javascript file.

For the source version you can adjust the location of the index file with the config key compile-options/paths/app-root. For the build version you have to tweak two options to point to the script and resource folders, namely
  compile-options/uris/script        and
  compile-options/uris/resource

See the documentation at:
http://manual.qooxdoo.org/2.0.x/pages/tool/generator_config_ref.html#compile-options

But as I said before I don't understand your source setup. For the build version, if you have to place the index.html in views/, you could place the other contents of your build folder into ../static, and then use ../static/script and ../static/resource as values for the above config keys.


I've tried to set the "jobs" > "build-script" > "compile-options" > "uris" > "resource" to "desktop/resource" to avoid the second problem but it doesn't recognice the "/" char.


What do you mean? Does it try something like "desktopresource"?! I can hardly believe that.

But you found the right place, just think of the correct path from the index.html. 'desktop/resource' doesn't look right to me if index.html is in view/. It should be more something like '../static/desktop/resource'.

T.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to