官术网_书友最值得收藏!

Installing Emscripten on Windows

I am going to keep this section brief because these instructions are subject to change. You can supplement these instructions with the official Emscripten download and install instructions found on the Emscripten website: https://emscripten.org/docs/getting_started/downloads.html.

We will need to download and build Emscripten from the emsdk source files on GitHub. First, we will walk through what to do on Windows.

Python 2.7.12 or higher is a prerequisite. If you do not have a version of Python higher than 2.7.12 installed, you will need to get the windows installer from python.org and install that first: https://www.python.org/downloads/windows/.

If you have installed Python and you are still getting errors telling you that Python is not found, you may need to add Python to your Windows PATH variable. For more information, refer to this tutorial:  https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/.

If you have Git installed already, cloning the repository is relatively simple:

  1. Run the following command to clone the repository:
git clone https://github.com/emscripten-core/emsdk.git
  1. Wherever you run this command, it will create an emsdk directory. Enter that directory using the following:
cd emsdk

You may not have Git installed, in which case, the following steps will bring you up to speed:

  1. Go to the following URL in a web browser: https://github.com/emscripten-core/emsdk.
  2. You will see a green button on the right-hand side that says Clone or download. Download the ZIP file:
  1. Unzip the downloaded file to the c:\emsdk directory.
  2. Open up a Windows Command Prompt by typing cmd into the start menu and pressing Enter.
  3. From there, you can change to the c:\emsdk\emsdk-master directory by typing the following:
 cd \emsdk\emsdk-master

At this point, it does not matter whether you had Git installed or not. Let's move forward:

  1. Install emsdk from the source code running the following command:
emsdk install latest
  1. Then activate the latest emsdk:
emsdk activate latest
  1. Finally, set up our path and environment variables:
emsdk_env.bat
This last step will need to be rerun from your install directory every time you open a new command-line window. Unfortunately, it does not permanently set the Windows environment variables. Hopefully, that will change in the future.
主站蜘蛛池模板: 芮城县| 鄂托克前旗| 慈利县| 寻乌县| 商洛市| 高淳县| 德昌县| 乡宁县| 禹城市| 台江县| 尤溪县| 贵定县| 天水市| 中阳县| 岳西县| 洪湖市| 韶关市| 松潘县| 岳普湖县| 桂东县| 卫辉市| 阳东县| 万年县| 营口市| 白城市| 牡丹江市| 巴林左旗| 浦东新区| 广平县| 乌苏市| 莎车县| 岑巩县| 蒲江县| 沅江市| 巫山县| 绥棱县| 墨脱县| 罗田县| 恭城| 文昌市| 新巴尔虎左旗|