
Choose the type of WebDSL installation, the Eclipse plugin (WebDSL in Eclipse) is recommended for most users:
Use the following instructions to install the WebDSL Eclipse plugin, the plugin also contains the compiler.
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
-Xss8m -Xms256m -Xmx1024m -XX:MaxPermSize=256m -server to set a 8 MB stack size and 1024 MB of virtual memory (adjust downwards for low-memory systems).
see Using the Editor.
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.
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 is automatically built as a Nix package for Mac.
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).
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
Finally, install WebDSL using Nix:
nix-channel --add http://hydra.nixos.org/project/webdsl/channel/latest
nix-channel --update
nix-env -i webdsl
To update to the latest version:
nix-channel --update
nix-env -u webdsl
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
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
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&
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.
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/channel/latest
nix-channel --update
nix-env -i aterm-2.5 sdf2-bundle strategoxt java-front
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.
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
WebDSL compilation from source on Mac OS X (tested on version 10.5 Leopard and 10.6 Snow Leopard).
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).
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
Install the Stratego/XT packages:
nix-channel --add http://hydra.nixos.org/channel/latest
nix-channel --update
Next, for Mac OS X 10.5 Leopard:
nix-env -i aterm-2.5 java-front sdf2-bundle strategoxt
or for Mac OS X 10.6 Snow Leopard:
nix-env --system-filter x86_64-darwin -i aterm-2.5 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
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
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
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, look up the other version that was being linked, also listed when running
nix-store -qR ~/.nix-profile
And install this version, e.g. if that version is 0.18pre20499:
nix-env --system-filter x86_64-darwin -i strategoxt-0.18pre20449
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
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
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&
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.
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-2.5 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.
Install the latest version of the Spoofax language workbench Eclipse plugin: http://strategoxt.org/Spoofax/Download
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.
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