Remove obsolete docs on README (#270)

A bunch of info there is out of date.

Instead, let the link to the install instructions on the main site (which was there already on line 11 higher up) speak for itself; we should have just one central location for these basic instructions.
This commit is contained in:
Alon Zakai
2019-06-10 10:10:06 -07:00
committed by GitHub
parent 169a3ac27c
commit fc0ed1e17c

101
README.md
View File

@@ -15,107 +15,6 @@ documentation](https://emscripten.org/docs/getting_started/downloads.html).
**Old Releases** are available in the **Archived Releases** section below.
## Installation Instructions
The initial setup process is as follows:
1. Download and unzip the portable SDK package to a directory of your choice.
This directory will contain the Emscripten SDK.
2. Open a command prompt to the directory of the SDK.
3. Run `emsdk update`. This will fetch the latest registry of available tools.
4. Run `emsdk install latest`. This will download and install the latest set of
precompiled SDK tools.
5. Run `emsdk activate latest`. This will set up **~/.emscripten** to point to
the SDK.
6. Depending on your OS:
- OS X and Linux: Run `source ./emsdk_env.sh`. This will add PATH and other
required environment variables to the currently executing terminal prompt. If
you want to permanently add these environment variables to each terminal
instance on your system, add a call to this command to `.bash_profile` or
another initialization script for your terminal.
- Windows: Call `emsdk_env.bat` to add PATH and other environment variables to
the current command prompt. If you want to persist these environment
variables to all command prompts, run `emsdk activate --global latest` to
have Emsdk edit the Windows registry to add these variables.
Whenever you change the location of the Portable SDK (e.g. take it to another
computer), re-run steps 5 and 6. If you choose not to permanently add the
environment variables to all terminal prompts, rerun step 6 whenever opening a
new terminal window.
Note: On Linux and OS X, type `./emsdk` instead of `emsdk` above.
### Building an Emscripten tag or branch from source
In addition to providing precompiled compiler versions, Emscripten SDK automates
driving builds of the Emscripten toolchain from source. These builds obtain the
source code directly from GitHub, and can either target a specific tagged
release, or one of the two main Emscripten development branches, `incoming` and
`master`. Building tagged releases from source is useful to build a version of
Emscripten that there is no provided precompiled build available. Building one
of the development branches is useful when you want to get the very latest
version from source, e.g. to verify a brand new bugfix, or to participate to
Emscripten development.
To build one of the tagged releases from source, run the following steps:
1. Open a command prompt to the directory of the SDK.
2. Run `emsdk update-tags`. This will ping GitHub to obtain the latest list of
known tags in the different repositories.
3. Run `emsdk list` to check out the list of available tags. Look for the
section "The following SDKs can be compiled from source".
4. Proceed through the steps 4, 5 and 6 above, except substitute `latest` with
the SDK version of your choice, for example `emsdk install
sdk-tag-1.37.9-64bit` followed by `emsdk activate sdk-tag-1.37.9-64bit`.
To build one of the Github branches, `emsdk install` one of the targets
`sdk-incoming-64bit` or `sdk-master-64bit`.
Building Emscripten involves building LLVM with Clang from source. LLVM build
configuration allows specifying a number of extra configuration fields, see
here: http://llvm.org/docs/CMake.html. To build the SDK with a specific set of
custom CMake parameters, run the emsdk build script with the environment
variable `LLVM_CMAKE_ARGS="param1=value1,param2=value2,..."`. For example, to
use the gold linker to link the final Clang executable and to enable assertions,
run the installation with the command
`LLVM_CMAKE_ARGS="-DLLVM_USE_LINKER=gold,-DLLVM_ENABLE_ASSERTIONS=ON" ./emsdk
install sdk-incoming-64bit`.
### Installing emsdk directly from GitHub
If you want to bootstrap to the development version of emsdk instead of the
stable releases, you can do so by installing emsdk directly from github.
Functionally this behaves identical to the Portable SDK. As a prerequisite on
Windows, you must first manually download and install
[Python](https://www.python.org) to bootstrap, and after that, run:
git clone https://github.com/juj/emsdk.git
cd emsdk
./emsdk update-tags
./emsdk install <sdk-of-your-choice>
./emsdk activate <sdk-of-your-choice>
source ./emsdk_env.sh (Windows: emsdk_env.bat)
The only difference in this setup is that you will then use `git pull` instead
of `./emsdk update` to update to a newer version of Emscripten SDK.
## Getting Started with Emscripten
The tools in the Emscripten toolchain can be accessed in various ways. Which one
you use depends on your preference.
##### Command line usage
The Emscripten compiler is available on the command line by invoking `emcc` or
`em++`. They are located in the folder `emsdk/emscripten/<version>/` in the SDK.
The root directory of the Emscripten SDK contains scripts `emsdk_env.bat`
(Windows) and `emsdk_env.sh` (Linux, OS X) which set up `PATH` and other
environment variables for the current terminal. After calling these scripts,
`emcc`, `clang`, etc. are all accessible from the command line.
**Check out the tutorial!** See the Emscripten [Tutorial](https://github.com/kripken/emscripten/wiki/Tutorial) page for help on how to get going with the tools from command line.
## SDK Concepts
The Emscripten SDK is effectively a small package manager for tools that are