General Installation Information (for Qt 4.6)

In order to use Lively for Qt, follow the steps below:

    1. Install the Qt platform on your target computer or device.
    2. Add support for JavaScript bindings to the Qt environment by running the QtScriptGenerator tool.
    3. Use the generated qs_eval tool to run the system using the syntax shown in file "Qtly.bat". The general syntax is:
      "qs_eval ...application files... QtInspector.js Qtly.js"
    4. In order to run Lively for Qt without any applications or additional tools, just say:
      "qs_eval Qtly.js"

Note that you can also run Lively for Qt in any web browser using a Qt web browser plugin. Instructions for installing the necessary web browser plugin(s) will be available here later.

Installation instructions for Qt 4.5 are available here.

1. Installing the Qt Platform

The following sections contain instructions for the installation of Qt for Windows XP, Mac OS X 10.4 & 10.5, Ubuntu Linux 9.10 and Nokia's Maemo Platform. The instructions should be applicable to other systems as well. Information about supported platforms for Qt can be found in Platform specific notes are available at Installation instruction provided by Qt are available at

Installation on Windows XP

  • Download Qt libraries 4.6 for Windows.
  • Download the MinGW compiler in order to compile the QtScriptGenerator (MinGW can be chosen to be downloaded and installed with Qt).
  • Execute the Qt installer. The default installation path should be fine. Note that you should install Qt to a directory whose name does not contain whitespaces.
  • The installer adds a new folder called Qt SDK by Nokia v2009.05 (open source) to the Start menu. Shortcut called Qt Command Prompt configures environment variables and opens up a new console window.
  • Create a new file called make.bat in (MINGW_DIR)/bin directory with following lines:
  • @echo off
    mingw32-make %*
    now the make should work.
  • Additional helpful information for MinGW-based installation.
  • Support for Secure Sockets Layer (SSL) communication is provided by the OpenSSL Toolkit, which must be obtained separately. Binary distribution for Windows is available at (Win32 OpenSSL v0.9.8l Light).
  • The system can also be built using Microsoft Visual Studio 2005 or later. From the Microsoft Visual Studio 2005 Command Prompt, first type configure and then nmake. The configuration step takes about 20-30 minutes, and the nmake build about 2-3 hours on a typical laptop computer.

Installation on Ubuntu Linux 9.10 and Mac OS X

  • Download Qt Libraries 4.6 for Linux/X11 or Mac.
  • On Linux: at the command line, type:
    chmod u+x qt-sdk-linux-x86-opensource-2009.05.bin

    to run the Setup wizard.
  • On Mac OSX: run the installer and follow instructions on the wizard.
  • Set QTDIR environment variable to <path to your installation>/qt In console, for example:
    export QTDIR
  • You may also want to include path to (QTDIR)/bin in part of your PATH definition

Installation on Maemo Scratchbox (Nokia N800/N810/N900)

Verifying the Qt Installation

A successful Qt build will usually take several hours. If the compilation succeeded without errors, you should verify the installation by running some of the demo applications, and by reviewing the online documentation provided with Qt.

  • To run the demo applications, execute the qtdemo program provided in directory (QTDIR)/bin.
  • To review the online documentation, execute the assistant program provided in directory (QTDIR)/bin.

2. Installing the JavaScript Bindings Using QtScriptGenerator

By default, the JavaScript engine included in the Qt platform does not have access to the Qt APIs. In order to add the JavaScript bindings to the Qt environment, a tool called QtScriptGenerator can be used.

  • To begin installation of the JavaScript bindings, download QtScriptGenerator. The latest version of the tool is generally recommended. There is a download link provided on the right side of the page (Download master as tar.gz).
  • Unzip the download package, and read the instructions in the README file.

Build QtScriptGenerator as follows (this build process should be nearly identical on all target platforms):

  • Open a new shell (in Windows: Qt Command Prompt or Visual Studio 2005 Command Prompt).
  • Make sure the QTDIR environment variable is defined and points to the root of the Qt installation directory (see the instructions above). Also make sure that (QTDIR)/bin is part of your PATH definition.
  • Switch to the top-level directory of the QtScriptGenerator.
    1. In subdirectory generator, compile the generator by first invoking qmake and then make (nmake if you are using Microsoft Visual Studio). This will take about 1-2 minutes. Note that Qt Script Generator does not compile under Maemo Scratchbox unless it is compiled in the debug mode:
      make debug
    2. Next, execute the generator by invoking release/generator. The generator generates the C++ classes that represent the JavaScript bindings. About 500 C++ classes will be generated in the generated_cpp subdirectory. This step will take about 2-4 minutes. If the generator is not able to detect the header files, you should provide the location of the Qt header files with compilation directive --include-paths. The necessary include files are generally located in directory (QTDIR)/include
      Example: release\generator --include-paths=c:\qt-win\include
    3. When the generator has generated the required classes, switch to directory qtbindings and execute qmake and then make release (nmake release if using Microsoft Visual Studio). This will build the actual JavaScript bindings plugins. This entire step will take about 20-30 minutes.
  • To verify that the QtScriptGenerator build succeeded, check that you can find the qs_eval executable in directory qtbindings/qs_eval/release. QtScriptGenerator includes a set of code files (with file type *.js) that can be used to test and verify that the environment is functional. The files are located in subdirectory examples. Use the qs_eval tool to execute some of the sample applications.

Note that the development of QtScriptGenerator is still in progress and that there may be occasional problems when building the environment. For instance, the OpenGL and Phonon libraries sometimes fail to build. If that happens, you can exclude those components from the build by tweaking the file in subdirectory qtbindings and then rebuilding the QtScriptGenerator.

3. Running JavaScript Applications and Lively for Qt

  • To execute a JavaScript file simply type
    qs_eval file.js
    (it is recommended that you add the directory containing qs_eval to system PATH).
  • To execute the Lively for Qt system, place the files from ZIP file of the Lively for Qt system in the release directory of the qs_eval tool. The necessary path will look something like:
    Then execute the command line included in file Qtly.bat.
  • In order to run Lively for Qt without any applications or additional tools, just say:
    qs_eval Qtly.js

Notes on Invoking qs_eval

  • Note that qs_eval does not display any error messages if the file(s) to be executed cannot be found.
  • If you wish to include/execute more than one JavaScript file, you should switch to the directory where those JavaScript files reside before calling qs_eval. Otherwise, the requested files are not necessarily found.
  • You may want to use command line option -graphicssystem raster to speed up drawing operations.
  • The JavaScript environment inside Qt ("QtScript") is equipped with a built-in debugger that can be extremely useful during development. The debugger can be opened manually by invoking "debugger;" from JavaScript code.

Qt API Documentation

  • The Qt JavaScript API documentation generated by QtScriptGenerator can be found in HTML format under subdirectory doc.
  • The general Qt API documentation can be viewed either by opening the (QTDIR)/bin/assistant tool or by viewing Qt API documentation on the web.

4. Running Lively for Qt Inside a Web Browser

Lively for Qt can be run in any web browser using a Qt web browser plugin. Instructions for installing the necessary web browser plugin(s) will be available here later.