Download

Choose the type of WebDSL installation, the Eclipse plugin (WebDSL in Eclipse) is recommended for most users:



WebDSL in Eclipse (recommended)

Use the following instructions to install the WebDSL Eclipse plugin, the plugin also contains the compiler.

Eclipse with plugin pre-installed

For quick setup, zipped eclipse installations are available with the plugin pre-installed:

Windows: http://webdsl.org/zip/eclipsewin.zip

Linux: http://webdsl.org/zip/eclipselinux.zip

Linux 64bit: http://webdsl.org/zip/eclipselinux64.zip

Mac: http://webdsl.org/zip/eclipsemac.zip

Mac 64bit: http://webdsl.org/zip/eclipsemac64.zip

Eclipse 3.5+ manual plugin installation

  • Go to Help -> Install New Software...
  • In the "Work with:" text area type: http://webdsl.org/update. Important: uncheck "Group items by category" to make the plugin visible (this works around a known issue)
  • Check "WebDSL Editor" and press "Install", accept the license agreement, finish the installation, and finally restart Eclipse.
  • Change the eclipse.ini file to include the options -Xss8m -Xms256m -Xmx1024m -XX:MaxPermSize=256m -server to set a 8 MB stack size and 1024 MB of virtual memory. These options must be added below the line that contains -vmargs. On Mac OS X the eclipse.ini file is located at Eclipse.app/Contents/MacOS/eclipse.ini.

Using the Editor

see Using the Editor.


WebDSL on Java

New users should get the Eclipse plugin here.

This page explains how to run a Java-based WebDSL in the terminal.

The WebDSL compiler runs on the Java Virtual Machine. The latest WebDSL Java version is automatically build on our buildfarm. Download the zip file of the latest succesful build at http://hydra.nixos.org/job/webdsl/trunk/buildJavaZip/latest.

Extract the zip file, and add the webdsl/bin directory to your path.

This requires at least JDK version 6 (http://java.sun.com/javase/downloads/index.jsp).

Apache Ant (http://ant.apache.org/bindownload.cgi) is also required to run the compiler.

WebDSL Java is included in the WebDSL Eclipse plugin, we recommend using the plugin.


WebDSL on Linux

New users should get the Eclipse plugin here.

This page explains how to get a C-based WebDSL for running in the terminal.

First the nix package manager needs to be installed from nixos.org, which includes standard nix installation packages including Ubuntu/Debian and RPM packages and RPM. You need at least version 0.13.

To start using nix using your regular (non-root) account, do the following:

sudo chown -R $USER:$USER /nix/store /nix/var

Next, run the shell script to configure the correct paths (and add this line to your ~/.bashrc or ~/.profile file):

/etc/profile.d/nix.sh

Finally, install WebDSL using Nix:

nix-channel --add http://hydra.nixos.org/project/webdsl/channel/latest
nix-channel --update
nix-env -i webdsl

WebDSL on Mac

New users should get the Eclipse plugin here.

This page explains how to get a C-based WebDSL for running in the terminal.

WebDSL is automatically built as a Nix package for Mac.

Nix requirements

Apple Xcode: install from your DVD.

MacPorts: download and install MacPorts. If you already had ports installed, you may need to do an update:

sudo port -d selfupdate

Install the required ports:

sudo port install curl m4 autoconf automake pkgconfig libtool subversion

Add to your ~/.profile:

export PATH=/opt/local/bin/:$PATH

To make sure the ports version of these tools is used instead of the older ones in XCode (assuming the default MacPorts install directory).

Nix installation

The Nix package manager needs to be installed, version 0.13 or higher.

Download the latest nix build: Download -> Latest unstable release -> Source distribution nix-0.13*.tar.gz. Untar it

tar -xzf nix-*.tar.gz

configure it (no --prefix!)

cd nix-*
./configure

and then make && sudo make install.

make && sudo make install

To start using nix using your regular (non-root) account, do the following:

sudo chown -R $USER /nix

Next, run the shell script to configure the correct paths (and add this line to your ~/.profile file):

. /usr/local/etc/profile.d/nix.sh

and restart bash or source the .profile file.

. ~/.profile

WebDSL installation with Nix

Finally, install WebDSL using Nix:

nix-channel --add http://hydra.nixos.org/project/webdsl/channel/latest
nix-channel --update

Then, for Mac OS X 10.5:

nix-env -i webdsl

Mac OS X 10.6:

nix-env --system-filter x86_64-darwin -i webdsl

To update to the latest version:

nix-channel --update
nix-env -u webdsl

Java 6

You may have to enable Java 6 SE, open

/Applications/Utilities/Java Preferences

to configure your Java version (drag Java 6 SE to the top). Add the JAVA_HOME and PATH environment variables in your ~/.profile file:

export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands:$PATH
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

Tomcat

Download Tomcat 6.x, Binary Distributions, Core, tar.gz direct link

extract tar.gz file

tar -xzf apache-tomcat-*.tar.gz

and add bin dir to path, e.g.:

export PATH=/Users/someone/apache-tomcat-6.0.20/bin/:$PATH

and restart bash or source the .profile file.

. ~/.profile

Make the catalina.sh file executable:

chmod +x catalina.sh

Start tomcat using:

catalina.sh run

Mysql

Mysql, tar package

Extract tar.gz file:

tar -xzf mysql*.tar.gz

and add bin dir to path, e.g.:

export PATH=/Users/someone/mysql*/bin/:$PATH

Start mysql using:

mysqld&

Known Mysql installation issues

If extracting the tar and running mysqld directly results in errors, try installing mysql using the .DMG and starting it using the prefpane or startup item included in the installation.


Building WebDSL on Linux (developers)

We use the following subversion repository: https://svn.strategoxt.org/repos/WebDSL/webdsls/trunk

Install automake, autoconf, libtool and pkg-config from your favorite package manager. GNU Automake 1.10.2 and GNU Autoconf 2.63 do the job in Ubuntu.

Install Nix (described here) and use it to retrieve

nix-channel --add http://hydra.nixos.org/jobset/strategoxt/strategoxt-packages/channel/latest
nix-channel --update
nix-env -i aterm sdf2-bundle strategoxt java-front strc-java

Note: do not install automake and autoconf using nix, these packages are currently not supported. Instead, install them using your operating system's package manager (e.g., 'sudo apt-get install automake autoconf build-essential' on Debian/Ubuntu-based distributions).

Now add the nix library path to your library search path by adding the following line to your ~/.bashrc or ~/.profile:

export PKG_CONFIG_PATH=~/.nix-profile/lib/pkgconfig

If all the dependencies all successfully installed, you should be able to build WebDSL as follows:

svn co https://svn.strategoxt.org/repos/WebDSL/webdsls/trunk/
cd trunk
./bootstrap
./configure --prefix=/<path where you want to install webdsl>
make
make install
ldconfig

The last two lines should be executed as root, or with sudo.

Troubleshooting

If you forgot to run ldconfig, the dynamic linker will present the following message:

Removing servlet project files and dist directory.
Loading application settings (application.ini)...
Creating Java Servlet application in .servletapp...
Copying your application files...
Building application...
/usr/local/bin/webdslc --servlet -i test.app     
/usr/local/bin/webdslc: error while loading shared libraries: libwebdsl-front.so.0: cannot open shared object file: No such file or directory
make: *** [test.appc] Error 127

On some (64-bit?) systems the default stack size of Linux is too small for successful compilation. In this case, segmentation faults will appear during the Stratego compilation. The following command enables unlimited stack size for processes:

ulimit -s unlimited

Building WebDSL on Mac (developers)

WebDSL compilation from source on Mac OS X (tested on version 10.5 Leopard and 10.6 Snow Leopard).

Nix requirements

Apple Xcode: install from your DVD.

MacPorts: download and install MacPorts. If you already had ports installed, you may need to do an update:

sudo port -d selfupdate

Install the required ports:

sudo port install curl m4 autoconf automake pkgconfig libtool subversion

Add to your ~/.profile:

export PATH=/opt/local/bin/:$PATH

To make sure the ports version of these tools is used instead of the older ones in XCode (assuming the default MacPorts install directory).

Nix installation

The Nix package manager needs to be installed, version 0.13 or higher.

Download the latest nix build: Download -> Latest unstable release -> Source distribution nix-0.13*.tar.gz. Untar it

tar -xzf nix-*.tar.gz

configure it (no --prefix!)

cd nix-*
./configure

and then make && sudo make install.

make && sudo make install

To start using nix using your regular (non-root) account, do the following:

sudo chown -R $USER /nix

Next, run the shell script to configure the correct paths (and add this line to your ~/.profile file):

. /usr/local/etc/profile.d/nix.sh

and restart bash or source the .profile file.

. ~/.profile

Installation of WebDSL requirements with Nix

Install the Stratego/XT packages:

nix-channel --add http://hydra.nixos.org/jobset/strategoxt/strategoxt-packages/channel/latest

nix-channel --update

Next, for Mac OS X 10.5 Leopard:

nix-env -i aterm java-front sdf2-bundle strategoxt

or for Mac OS X 10.6 Snow Leopard:

nix-env --system-filter x86_64-darwin -i aterm java-front sdf2-bundle strategoxt

Then, update your ~/.profile again and add:

export PKG_CONFIG_PATH=~/.nix-profile/lib/pkgconfig

and restart bash or source the .profile file.

. ~/.profile

Checkout and install WebDSL

Do a checkout of the latest version of WebDSL with your favorite subversion client (be it subversion itself, or git-svn):

svn co https://svn.strategoxt.org/repos/WebDSL/webdsls/trunk webdsl

And compile it:

cd webdsls
./bootstrap
./configure --disable-shared --prefix=/usr/local
make
make install

Known Issues When Compiling WebDSL

Under Snow Leopard, the Stratego compiler is missing these two libraries:

/usr/lib/libreadline.6.0.dylib
/usr/lib/libhistory.6.0.dylib

You can fix this by installing the readline libraries with MacPorts and creating symbolic links for the missing libraries:

sudo port install readline
sudo ln -s /opt/local/lib/libreadline.6.0.dylib /usr/lib/
sudo ln -s /opt/local/lib/libhistory.6.0.dylib /usr/lib/

or, if 6.1 but not 6.0 is available:

sudo ln -s /opt/local/lib/libreadline.6.1.dylib /usr/lib/libreadline.6.0.dylib
sudo ln -s /opt/local/lib/libhistory.6.1.dylib /usr/lib/libhistory.6.0.dylib

Known Issues When Running WebDSL

If you run into segmentation faults when using Snow Leopard (64bit Stratego, also holds for Leopard with 64bit Stratego), the stack size must be set higher, add

ulimit -s 64000

to your ~/.profile and source it.

If WebDSL compiles fine, but running it gives unexpected rule failures (mainly when calling into libraries), it is likely that different of stratego are simultaneously linked. This can be seen in the libtool invocation that the compilation of webdsl shows in the log.

A workaround for this issue: Remove the current stratego version shown by

nix-env -q '*'

with the

nix-env -e strategoxt

command. Then, see which Stratego version is currently in your nix store (java-front also includes stratego) using

nix-store -qR ~/.nix-profile

and install that using

nix-env -i /nix/store/....-strategoxt-...

Java 6

You may have to enable Java 6 SE, open

/Applications/Utilities/Java Preferences

to configure your Java version (drag Java 6 SE to the top). Add the JAVA_HOME and PATH environment variables in your ~/.profile file:

export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands:$PATH
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

and restart bash or source the .profile file.

. ~/.profile

Tomcat

Download Tomcat 6.x, Binary Distributions, Core, tar.gz direct link

extract tar.gz file

tar -xzf apache-tomcat-*.tar.gz

and add bin dir to path, e.g.:

export PATH=/Users/someone/apache-tomcat-6.0.20/bin/:$PATH

and restart bash or source the .profile file.

. ~/.profile

Make the catalina.sh file executable:

chmod +x catalina.sh

Start tomcat using:

catalina.sh run

Mysql

Mysql, tar package

Extract tar.gz file:

tar -xzf mysql*.tar.gz

and add bin dir to path, e.g.:

export PATH=/Users/someone/mysql*/bin/:$PATH

Start mysql using:

mysqld&

Known Mysql installation issues

If extracting the tar and running mysqld directly results in errors, try installing mysql using the .DMG and starting it using the prefpane or startup item included in the installation.


Building Eclipse plugin (developers)

Compiler

The plugin includes the compiler, which needs to be build first:

Follow the instructions for building the non-Java compiler Download/WebDSLOnLinux / Download/WebDSLOnMac, with 2 additions:

Install strc-java in addition to the other Nix packages:

nix-env -i aterm java-front sdf2-bundle strategoxt strc-java

Instead of ./configure --disable-shared --prefix=/usr/local, use:

./configure --enable-java-backend

To speed up compilation, or work around heap space issues in javac, use the Eclipse Java Compiler. Create a ~/scripts/ecj file:

#!/bin/sh -e
ECLIPSEHOME=~/eclipse
ECJJAR=`find $ECLIPSEHOME/plugins -name "org.eclipse.jdt.core_*"`
java -Xmx512m -Xms100m -server -XX:+UseParallelGC -cp $ECJJAR org.eclipse.jdt.internal.compiler.batch.Main "$@"

Set ECLIPSEHOME to the eclipse directory, and add ~/scripts/ to the path in ~/.profile or ~/.bash_rc:

export PATH=$HOME/scripts/:$PATH

Make the ecj file executable:

chmod +x ecj

The WebDSL Makefile will use the ecj command if it is available.

Plugin

dependencies

1 Install the latest version of the Spoofax language workbench Eclipse plugin: http://strategoxt.org/Spoofax/Download

2 Check out the Acoda project from SVN:

https://svn.strategoxt.org/repos/structure-evolution/trunk

Run the buildJava Ant task in build.xml.

WebDSL plugin

Check out the WebDSL editor project from SVN:

https://svn.strategoxt.org/repos/WebDSL/webdsl-editor/trunk/webdsl.editor

Copy import.webdsl.default.properties to import.webdsl.properties and set the directories to the location of the Java build of WebDSL. Also set acoda.home to the Acoda project location.

Run the all.release ant task.

After building, the editor should be automatically loaded in the same Eclipse instance.


Deploy the plugin using the feature project:

https://svn.strategoxt.org/repos/WebDSL/webdsl-editor/trunk/webdsl.editor.feature

and the update site project:

https://svn.strategoxt.org/repos/WebDSL/webdsl-editor/trunk/webdsl.editor.updatesite