Install and deploy the Egret engine development environment in Mac OS X, osegret

Source: Internet
Author: User
Tags install node

Install and deploy the Egret engine development environment in Mac OS X, osegret

Overview

Egret is developed based on TypeScript, while tsc is developed based on Node. js. Therefore, during the installation process, we must first install the basic support tools. The software to be installed is as follows:

Node. jsTypeScript code editor HTTP server (optional) Chrome (optional) EgretJava

This document describes how to install Egret in a Mac environment. The installation steps are as follows.

1. Install Node. js

1.1 download Node. js

The Installation Method of Node. js is very simple. You can visit the Node. js official website and click the INSTALL button on the page to directly download the pkg installation package of Node. js.

At the time of this tutorial, the Node. js version is 0.10.29. If your version is later than this version, we will provide related version compatibility instructions. If no version compatibility instructions are provided, your version applies to Egret.

Double-click the pkg installation package to install Node. js. Installation Process

The downloaded Node. js installation package

1.2 install Node. js

Start installation Interface

License authorization instructions

Permit authorization

Installation type description

Provide administrator permissions. Here, the your name is your administrator account name and the account password is also provided.

Installation Process

After the installation is complete, your Node. js is installed/usr/local/bin/nodeThe installation package also installs the npm tool for you.

1.3 verify Node. js

After the installation is complete, start your terminal and enternode -vCommand to check your current Node. js version, and verify whether your Node. js installation is successful. If the installation is correct, the effect is shown in.

Ifnode: command not foundThe installation fails. You can refer to the Node. js installation failure Solution Below or ask for help in our [developer community.

1.4 npm Verification

RunnpmIf the content appears, it indicates that your npm is correctly installed.

Ifnpm: command not foundThe installation fails. For details, refer to the Node. js installation failure solution below.

1.5Node.js installation failure Solution

When installing the pkg installation package of nodejs in some MacOS, the installation fails. You can download the node. js source code and manually compile it.

2. Install the TypeScript code editor.

2.1 select an appropriate code editor.

Egret can use any code editor that supports scripting languages, including:

Official WebStorm

[Officially recommended] Microsoft Visual Studio 2012 + TypeScript plug-in Sublime Text + TypeScript plug-in

For more information about how to install the editor and how to configure the plug-in, see the related tools section in this document.

3. install an HTTP server

3.1 select an appropriate HTTP server.

Mac users can use their own servers. XMAPP is recommended for Mac users.

You can skip this step and use the simple HTTP server built in Egret Based on Node. js. However, to ensure a better development experience, Egret recommends that you install the above mature HTTP server.

For more information about server software installation, see the related tools section in this document.

4. Install Chrome

Egret can run on the vast majority of modern browsers, but Egret currently recommends developers to use Chrome as the main development and debugging environment.

Open Chrome browser settings-> Tools-> JavaScript console in JavaScript Console (lower right corner) settings (gear icon)-> Frequently-> disable browser cache

After the preceding settings are completed, as long as the JavaScript console is open, no browser cache is available for debugging.

5. Download and install

Egret5.1 download Egret from the official website

Egret provides two download channels: Egret official download and Egret Github download.

We recommend that you download the stable version from the official website. If you download the development version of the engine from github and the version is unstable, you may encounter many problems in actual development. These problems are usually not found in the stable version.

Go to the official download page, find the "Egret engine" product item, and click the blue Download button to download the latest version of the Egret engine ,.

5.2 install Egret

Decompress the downloaded Egret engine package to the specified directory, which can be any directory on the disk. Run the command in the terminal to enter the decompressed directory.

cd ${egret_folder}

Where${egret_folder}The decompressed path for the Egret engine.

After entering the directory, run the installation command.

npm install -g

If the installation command is incorrect, check the following three items to see if they are correct.

cd ${egret_folder}Command.

Whether the current directory is the Egret directory (there is a directory namedpackage.jsonFiles)

Whether the current user of the system has administrator permissions. If not, executesudo suCommand.

5.3Egret tool Verification

After the installation is complete, runegretCommand to check whether the current Egret is successfully installed. If the installation is successful, see.

6. Java

Java 7 or above is required in the release phase of the Egret project, which will also be used when packaged as an Android APP. The following shows how to download and install Java.

Download 6.1

A. JDK 7 on the Java website

B. Baidu Image

6.2 Installation

A. Check that the JAVA version must be later than 7.

B. Double-click the Mount installation package

C. Double-click the icon to install

D. All the way to Next

E. Pay attention to authorization

F. Confirm


Can you tell me if there is a java development environment that can run on mac OS x103?

If you are using Mac: All Mac operating systems are pre-installed with JAVA, you can use it with peace of mind.

For more information, see java.sun.com.
It is mainly about JRE and JVM.
 
How to Write C Programs on mac OS x?

There is a software called xcode that can be programmed in C language. It is an apple-native program written by developers of Apple programs, but we can also use it. There should be at the Weifeng Forum, after installation, you will see this icon in the developer's applications in the macintosh hd on your computer. After clicking this icon, select creat a new xcode and four icons will appear. Select the last command line. tool and select c in the following type, after you click choose, the compilation page is displayed. Three small file names are selected as main. c, the hello world compilation case will appear in the following compilation box. Delete this case and compile your own program. After editing, press the "build and run" button. If a "save" dialog box is displayed, click "yes" to save your programming. Finally, press the command + shift + R keys to view the running result. If it cannot be run, the program is wrong!




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.