Install and deploy the Egret development environment in Windows and deploy egret

Source: Internet
Author: User
Tags install node

Install and deploy the Egret development environment in Windows and deploy egret

The software to be installed is as follows:

Node. js
TypeScript
TypeScript code editor
HTTP server (optional)
Chrome (optional)
Egret
This document describes how to install Egret in Windows. The installation steps are as follows.

1. Install Node. js

1.1 download Node. js

The method for installing 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 msi 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 msi 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

Select the installation directory and keep the default options

Select the installation content, and we will install all the kits

Confirm installation and click "Install ".

Installation Process

On the installation page, your Node. js is installed in the C: \ Program Files \ nodejs \ directory, and the installation package also installs the npm tool for you.

1.3 verify Node. js

After the installation is complete, start your command line tool and enter the node-v command to check your current Node. js version and verify whether your node. js is successfully installed. If the installation is correct, the effect is shown in.

Enter cmd in start --> Search to run the command line tool.

If the node is not an internal or external command, or a program or batch file that can be run, the installation fails. For details, refer to the following Node. js installation failure solution or help in our developer community.

1.4 npm Verification

Run npm in the command line tool. If the content appears, it indicates that your npm is correctly installed.

If npm is not an internal or external command, or a program or batch file that can be run, the installation fails. For details, refer to the following Node. js installation failure solution or help in our developer community.

1.5Node.js installation failure Solution

After some Windows installation is complete, enter node and npm in cmd, and you may be prompted that the command cannot be found. The new Path must be restarted to take effect. Restart or use the absolute path of node and npm to run the command.

2. Install TypeScript

2.1 install TypeScript

After node. js is successfully installed, the node and npm commands can be used. Directly use the npm command to install TypeScript directly. For detailed installation methods, refer to the official website of TypeScript.

Enter the following command in the terminal: npm install-g typescript

The npm install command is used to install the specified Node. js library in the developer's system. typescript is the name of the library, and-g indicates to install the Library to the Global Path.


If installation is slow due to network problems, use the npm install-g typescript -- registry = http://r.cnpmjs.org command to access the domestic image version for installation.

2.2 verify TypeScript

After the installation is successful, run the tsc command. You should see the following interface:

3. Install the TypeScript code editor.

3.1 select an appropriate code editor.

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

Official WebStorm [official recommendations]
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.

4. install an HTTP server

4.1 select an appropriate HTTP server.

XMAPP is recommended for Windows 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.

5. 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
Settings> Tools> JavaScript Console
In the JavaScript Console (lower-right corner), set (gear icon)-> common-> disable browser cache
After the preceding settings are completed, as long as the JavaScript console is open, no browser cache is available for debugging.

6. Download and install Egret

6.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 ,.

6.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 command line tool to enter the decompressed directory. Because we place the decompressed file on the F: disk, we first enter the F disk, and the command is as follows:

F:

Then we enter the corresponding directory,

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.
Whether the current path in the command is correct.
Whether the current directory is the Egret directory (a file named package. json exists in this directory)
Whether the current user of the system has administrator permissions. If you extract Egret to drive C, this problem may occur.

6.3Egret tool Verification

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

If the installation fails, Please seek help in our developer community.


How to deploy a Linux server in a java project developed in windows

If the Linux System Code cannot be changed, there are three solutions:
1. Modify the Development Environment Code to make it the same as the server code.
2. Modify the JVM default encoding of the running program.
3. modify the program and perform unified encoding in the program.

How to install necessary system components in Windows Installer deployment

Most applications have essential components. A required system component is a component required to run an application on the target computer, such as the. NET Framework Runtime Library. The deployment tool in Visual Studio provides the ability to automatically check whether a component exists during installation and install a set of predefined system essential components, namely, a process called bootstrapping. For Windows Installer deployment,. NET Framework boot is enabled by default. You can disable boot for. NET Framework. However, you can disable this function only when you determine that the correct version of the Framework is installed on all target computers or that the application does not require the Framework. Note: For localized applications, if the "Localization" attribute of the deployed project is set to a region other than "English (US)", the. NET Framework Language Pack is also guided. Additional components should be guided only when the application depends on them. By default, guided components are deployed through the website of the component supplier. Other replacement options for the component supplier website include installing the component from the location where the application is installed (which can be file sharing, local disk or UNC file sharing. Install the SDK from a specified local path, URL, or file sharing location. Note that the following procedure is applicable to Windows Installer deployment. To use a ClickOnce application to install necessary system components, see how to install necessary system components with a ClickOnce application. Note that the displayed dialog box and menu commands may be different from those described in help, depending on the current settings or version. To change the settings, select "Import and Export Settings" from the "Tools" menu ". For more information, see Visual Studio settings. Select the required system components to install. In Solution Explorer, select a deployment project. Click properties on the project menu ". In the "properties page" dialog box, expand the "configuration properties" node and select the "generate" property page. Click required. In the "system essential" dialog box, make sure that the "Create installation program for installing system essential components" check box is selected. In the "select required system components to install" list, select the required system components you want to install, and then click "OK ". Download the required system components from Solution Explorer and select a deployment project. Click properties on the project menu ". In the "properties page" dialog box, expand the "configuration properties" node and select the "generate" property page. Click required. In the "system essential" dialog box, select a location: to deploy the installation program of the system essential components to the supplier, click "Download system essential components from the component supplier's website ". If you want to deploy the installer for the system essential components to the same location as the application installer, click Download system essential components from the same location as my application ". If you want to deploy the installer for the required system components to another location, click Download required system components from the following locations and enter a local path, URL, or file sharing location. Note that you must ensure that the installation program of the required system components has been copied to the specified location, and a subfolders are prepared for each required system component at this location. Note: The "installation URL" in the "property page" dialog box specifies the URL of the server or website used to install the application and/or essential components of the system. For information about how Windows Installer uses this URL, see "deployment project properties" dialog box> "configuration properties"> "generate ". Click OK to continue. Disable Bootstrap in Solution Explorer and select a deployment project. Click properties on the project menu ". In the "properties page" dialog box, expand the "configuration properties" node and select the "generate" property page. Click required. In the "system essential" dialog box, clear the "Create installer for installing system essential components" check box, and then click "OK ". Note that if boot is disabled, the necessary system components are not installed.

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.