Embedthis Appweb 3.0A.0
Home > Installation > Installing on MAC

Quick Nav

Installing the PKG Image
Installing the Self-Install Image
Removing Ejscript
Running Ejscript

See Also

New Features
Release 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

It is recommended that you use the PKG format if your system supports the PKG package standard.

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

  1. 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

  1. Run the Terminal application

  2. Get root privilege:
  3. sudo bash
    
  4. 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

  1. If you have installed the PKG distribution, then select the /Applications/Ejscript directory and move it to the trash.
  2. If you have installed the tar self install, change directory to the installation directory for Ejscript.
  3. 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>

© Embedthis Software LLC, 2003-2009. All rights reserved. Embedthis, Ejscript and Appweb are trademarks of Embedthis Software LLC.