Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 46 additions & 13 deletions site/source/docs/getting_started/downloads.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _sdk-download-and-install:

====================
Download and install
Download & Install
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change rather needless. Why change it?

If you do change it can you change the length of the ==== lines above and below?

====================

.. note:: You can also :ref:`build Emscripten from source
Expand Down Expand Up @@ -35,26 +35,59 @@ the first time with:
download => Download ZIP" on the `emsdk GitHub page
<https://github.com/emscripten-core/emsdk>`_.

Run the following :ref:`emsdk <emsdk>` commands to get the latest tools from
GitHub and set them as :term:`active <Active Tool/SDK>`:
Getting the tools
^^^^^^^^^^^^
To get the latest tools from GitHub and set them as :term:`active <Active Tool/SDK>` run the following :ref:`emsdk <emsdk>` commands.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the from GitHub (they are actually common from google storage, not github).


**Linux/Mac**

::

# Fetch the latest version of the emsdk (not needed the first time you clone)
git pull
#Fetch the latest version of the emsdk (not needed the first time you clone)
git pull
# Download and install the latest SDK tools.
./emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest
# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh

# Download and install the latest SDK tools.
./emsdk install latest
**Windows**

# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest
::

# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh
#Fetch the latest version of the emsdk (not needed the first time you clone)
git pull
# Download and install the latest SDK tools.
emsdk.bat install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
emsdk.bat activate latest
# Activate PATH and other environment variables in the current terminal (optional)
emsdk_env.bat

.. tip:: If you want to avoid executing `source ./emsdk_env.sh` every time you open a new terminal, you can follow the instructions given by the `emsdk activate` command above to add this command to your startup scripts.

.. note:: On Windows, run ``emsdk.bat`` instead of ``./emsdk``, and ``emsdk_env.bat`` instead of ``source ./emsdk_env.sh``.
.. tip:: For Windows machines here is a useful routine to follow:

::

# To open the emscripten command line in your IDE terminal run the following

# Navigate to newly created emsdk folder
cd emsdk
# Run the emcmdprompt.bat file
emcmdprompt.bat
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just make this a single command \path\to\emsdk\emsdk_env.bat

(emsdk_env.bat is what you use if you are already in a command window. emcmdprompt.bat opens a new terminal windows with the environment already setup)

# To use the compilation commands remember to navigate one folder up
cd..
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You con't need to be in any particlar directory. emcc and other commands are now in the PATH and should work from anywhere.


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I'm not sure we need this new windows-specific tip do we? Isn't it covered by the exiting tip below?

.. tip:: If you want to avoid executing `source ./emsdk_env.sh` every time you open a new terminal, you can follow the instructions given by the `emsdk activate` command above to add this command to your startup scripts.

.. note:: On Windows, if you use the ``activate`` command, the step of ``emsdk_env.bat`` is optional. If you want to know more, see :ref:`activate SDK version <emsdk-set-active-tools>`.

Expand Down