magic-lang / magic

0 stars 2 forks source link

Build Status

Table of Contents

magic

Code analyzer for the ooc programming language.

Linux quick install

If you only want to use the release and won't bother with compiling anything yourself, this quick guide is for you.

Install node 0.12 (Ubuntu)

Taken from here (active as of september 2015)

If the first one doesn't do it for you, go here (active as of september 2015)

Install magic

Done! Now head over to the usage section.

very much readme

Very, very early alpha stage.

requirements

Known to work on Linux (x64), status on other platforms is unknown at this time.

if you don't have node.js and/or the Typescript compiler

First, install g++. Open up a terminal window and issue the following command, then follow the on-screen instructions.

sudo apt-get install g++

The node.js version provided by aptitude is outdated, so do not install via apt-get. Instead, download and unpack node.js into any folder, then follow the steps outlined below.

cd NODE_FOLDER
./configure
make
sudo make install

You may have to restart the terminal. Now that we've installed node.js, it's time to update npm (node package manager) and then install the Typescript compiler.

sudo npm install -g npm
sudo npm install -g typescript

Now verify that Typescript has been installed:

tsc --v

It should give you version 1.5.3 or greater.

installation

You can install magic in two different ways:

using the install script

magic's default install location is /usr/local/bin, which requires you to run the installer as root.

cd MAGIC_FOLDER
sudo ./install

If you want to install magic to a different location, you may give the installer that location as an argument. Depending on the location, you may have to run the installer as root.

./install ~/apps/bin

The installer will build the project for you. For ease of use, make sure you have magic's location in your $PATH. To find out, issue the command echo $PATH in the terminal.

using the release

build

If you have modified magic and want to rebuild it, make sure you're in magic's root folder, then do one of the following:

usage

If you don't specify a target directory, your current location will be used.

magic [TARGET DIRECTORY]
magic ~/projects/my_awesome_project/source

ignore list

If you want to prevent magic from analyzing certain folders or files in your project directory, create a file called .magicignore and put it in the root folder of your project. In this file you add everything you want to keep from magic, relative to the project root folder.

Example:

lib/somethirdpartylibrary
source/math/Transform.ooc

troubleshooting

Here are some problems that may occur along the way, and hopefully, solutions to them.

credits