Using libCompiler in Version 4.x

Part 1: Compiling a Package

When you download a package, e.g., and unpack it, you get the following directory structure:

  • the codebase directory contains compiled files,
  • the docs directory includes link to the documentation,
  • the samples directory stores examples,
  • the skins directory keeps files for skins,
  • finally, the sources directory contains the library’s source files and the very libCompiler which all of you like so much.

In order for libCompiler to work you need:

  1. installed jre to run yui.jar
  2. installed php to run scripts
  3. the directories of source files

First configuration

Open the file compile.bat in a text editor:

In line 5 change the path c:\path_to_php_dir\ for the path to the directory where php is installed, e.g. C:\WebServers\PHP5. In general case the result will look like this:

That’s all, now you can run the compile.bat file. Pay attention that it’ll rewrite js/css files and images in the codebase directory. Delete the content of the codebase directory: all files and subfolders (not the directory itself!). Then libCompiler will create the necessary subdirectories and write the needed files.

The result of the compile.bat file execution is given below:

Part 2: Compiling the Debug package

Reproduce all the steps from the Part 1 with the file compile_debug.bat. This file will make the same compilation, as in the part 1 and create the dhtmlx_debug.js file additionally.

Run the compile_debug.bat file and when its execution finishes, the file dhtmlx_debug.js will appear in the codebase directory.

The result of file execution (pay attention to dhtmlx_debug.js in logs):

The same result but from the file system side:

The dhtmlx_debug.js file has the same components while the markup is preserved, which is rather handy during the debugging.

Back to top