HOWTO setup Dojo 2D testing environment

dojo

After the installation of Windows XP on VMWare, it is time to roll up the sleeves to make some progress on Dojo 2D. Hold on, before we make our hands dirty, let us try to make the test environment as comfortable as possible:

  • Using SVN to keep the dojo source tree updated
  • Using SVK to maintain the gfx branch
  • MSIE, Firefox can render by refreshing the page

First of all, check out the code in dojo,copythedojo2dimplementationtodojo, copy the dojo 2d implementation todojosvg, and check into the local svk repository.

cd $dojo;
svk co //dojosvg .
# link the src/gfx, tests/gfx to the dojo HEAD
cd $dojo/trunk/src; ln -sf ../../dojogfx/trunk/src/gfx/ gfx
cd $dojo/trunk/tests; ln -sf ../../dojogfx/trunk/tests/gfx/ gfx

Install mini_httpd (42K src) for testing:

sudo emerge mini_httpd

Modify the /etc/conf.d/mini_httpd

MINI_HTTPD_DOCROOT=$dojo

Notes: dojo/trunk/src/gfxislinkedtodojo/trunk/src/gfx is linked todojo/dojogfx/src/gfx, so we can work in $dojo/dojogfx/src/gfx, and commit the change to our local svk repository.

We have to use the relative symbol link since mini_httpd will chroot before the execution, the absolute path is not accessable by the web server.

For my case, Gentoo is the host, Windows XP is the slave, they are connected by NAT VMWare network. In linux, you can access the localhost:8080/path/to/test_gfx.html, in Windows, gateway:8080/path/to/test_gfx.html.