Quick Nav
Installing the PKG ImageInstalling the Self-Install Image
Removing Ejscript
Running Ejscript
See Also
New FeaturesRelease Notes
Installation Overview
Installing on Linux
Installing on Windows
Installing on MAC OS X
The Embedthis Ejscript install distribution for LINUX is published in two formats
-
an PKG format
- a tar format for custom/self installs
It is recommended that you use the PKG format if your system supports the PKG package standard.
-
The PKG image is: ejs-VERSION-Apple-MACOSX-i386.rpm.tar.gz
-
The Self install image is: ejs-VERSION-Apple-MACOSX-i386.tar.tar.gz
The PKG format will register the software installation with the system's software package manager so that you can query, verify, and easily manage the software on your system. The self-install format consists of tar archives that you can manually extract for maximum control over the placement of the product files. You can however, still use the install script with the self-install distribution if you desire.
Both distribution images contains a binary distribution, documentation and samples in the one package. During installation you will have the option of installing the full distribution or just portions.
Installing the PKG Image
-
Double click on the file named: gunzip ejs-VERSION-Apple-MACOSX-i386.rpm.tar.gz.
Where VERSION is the current version (e.g. 1.2.3-1), and DIST is the name of the Linux distribution (e.g. fedora).
Installing the Self-Install Image
-
Run the Terminal application
- Get root privilege:
-
sudo bash
- Extract the files where you wish to place them:
gunzip ejs-VERSION-Apple-MACOSX-i386.tar.tar.gz tar xvf Ejscript-VERSION-Apple-MACOSX-i386.tar.tar cd {Desired-Directory-For-Binaries} gunzip Ejscript-VERSION-Apple-MACOSX-i386.tar.gz tar xvf Ejscript-VERSION-Apple-MACOSX-i386.tar cd {Desired-Directory-For-Documentation} gunzip Ejscript-doc-VERSION-DIST.tar.gz tar xvf Ejscript-doc-VERSION-DIST.tar
Removing Ejscript
- If you have installed the PKG distribution, then select the /Applications/Ejscript directory and move it to the trash.
- If you have installed the tar self install, change directory to the installation directory for Ejscript.
-
Run the remove script in the install directory for Ejscript by typing
./remove
Running Ejscript
The installation will install four commands:
| Name | Description |
|---|---|
| ejs | The Ejscript command shell. This command can parse and execute ejs scripts from files or typed interactively on the console. This command contains both the Ejscript compiler and virtual machine. |
| ec | The Ejscript compiler. This command can compile scripts into byte code form for later running via ejsvm. |
| ejsvm | The Ejscript virtual machine. This command executes Ejscript modules that have been compiled from scripts by the ec command. |
| ejsmod | The Ejscript module manager. This command generates assembler source code listings, HTML documentation and symbolic slot offset header files. |
These commands will be installed in /usr/bin. To do a "Hello World" test, try typing the following. The "Hello World" is echoed back by ejs:
ejs
ejs-0> print("Hello World")
Hello World
ejs-0>