Contact: devloic at gmail dot com

About using junctions to deploy CartoWeb projects

I found it very troublesome to redeploy a project on command line each time I modify a javascript file or a css. This only affects Windows systems as cw3setup.php creates symbolic links on linux. Although it isn't an officially supported function, symbolic links are available since Windows 2000 and are called junction points.

I have modified cw3setup.php (based on CartoWeb 3.4 RC1) so it uses junctions instead of copying directories and files under CARTOWEB_HOME/htdocs .
Junction.exe must be available in the systems path ( ex: C:\WINDOWS\system32 ) .
Junctions are only supported on NTFS volumes but you can still create a junction on a NTFS volume that links to a directory on a non-NTFS volume.
Junction.exe can be downloaded below or from Microsoft site :
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx

cw3setup.php syntax doesn't change. For deploying it's still something like:
php.exe cw3setup2.php --install --project myproject --base-url http://localhost/cartoweb3/htdocs/

If u wan't to avoid using junctions add the --no-symlinks options :
php.exe cw3setup2.php --install --no-symlinks --project myproject --base-url http://localhost/cartoweb3/htdocs/

You still need to redeploy if you create new directories in your project that contain css, js, gfx or so, for example when you create a new plugin that owns a htdocs directory.

I renamed the modified cw3setup.php to cw3setup2.php. It is available for download below.
cw3setup2.php has been tested on Windows XP with Junction 1.05 but should work on Windows 2000. Windows Vista has it's own implementation of symbolic links so I have no idea if junction points still work.

More info about junctions here: http://en.wikipedia.org/wiki/NTFS_junction_point

This version is intended for CartoWeb 3.4 . A version for CartoWeb 3.5 is being tested.

Loïc

AttachmentSizeHitsLast download
cw3setup2.phps39.79 KB93913 hours 41 min ago
Junction.zip45.29 KB1041 day 7 hours ago