General EQWatcher Concepts > Venturing into the Unknown  > Using the Compiler


EQWatcher Advanced now includes a simple front-end for its compiler.  Information on using the command-line compiler is further below.  I will explain usage of the easy GUI here first.

The compiler front-end can be run from the Start Menu by selecting "EQWatcher Script Compiler" in the EQWatcher Advanced section.

The main window shows two grayed-out edit boxes that contain the filenames to work with.  The top box of course is the input file, as it says, and the bottom box is the output file, as it also says.  To select the files, hit the "Browse..." button to the right of the corresponding box.  By default, the core script is selected.  When you select a new input file, the program will default to an output filename matching it, except in the main EQWatcher directory.  You can select the filename and destination yourself after this if you wish.  Input files are source code, and output files are compiled scripts.  When you are ready to compile, simply hit the Compile button.  The compiler itself will open a new window and show some output.  Based on this output you will see whether or not the script was successfully compiled (it will say "Script written to disk." as one of the last couple lines).

This is pretty much all you need to know to use the graphical interface to the compiler.

The compiler itself is fairly simple.  The syntax is as follows:

EQWASC [source] [output]

Both of the parameters must be given.

The compiler must be run from the EQWatcher directory, and all relative path names given are based on the EQWatcher directory found in the OPTIONS.EQW file.  If your file has incorrect information please fix it by starting EQWatcher and manually selecting the correct directory.  Obviously if you want to run the compiler from a different path you can start EQWatcher and manually select a different directory, then copying that options.eqw file to that directory.

All source files must currently be in the same directory, which is defined in the source parameter.  If you type "EQWASC source\core.eas core.eac" it will be looking in the source directory for core.eas and all of the #include files.  The output file can be in another directory, which is defined in the output parameter.  If you type "EQWASC source\core.eas c:\core.eac", core.eac will be written to c:\.  You do not need to supply the .EAS or .EAC extensions, EQWASC will apply them automatically for you if no "." is seen in your filename. 

I suggest not leaving all of your own scripts in the "source" directory, but rather put them in your own "scripts" directory or something.  The core script source and compiled core.eac will be replaced by each new version, so if you make modifications to it I suggest keeping it backed up in another location.  You do not need to use the core.eac provided, but core.eac will always be loaded when EQWatcher Advanced starts (note:  This is no longer completely true.  By DEFAULT, core.eac will always be loaded.  The Script Management system can be used to change this.).  Feel free to remove features you do not wish to use, or make any modifications to suit your needs.

The compiler's source code will not be released yet, it still needs to be cleaned up a bit and documented.