From 030dc264cc39c7d8590a7cc95f92efdc9e9ac46d Mon Sep 17 00:00:00 2001 From: Jukka Jylanki Date: Wed, 17 Sep 2014 10:09:18 +0300 Subject: [PATCH] Document --global in more places. --- README.md | 2 +- emsdk | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 16582c7..9d3451b 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ On Windows, you can directly install an old SDK version by using one of the arch ##### How do I change the currently active SDK version? -You can toggle between different tools and SDK versions by running `emsdk activate `. Activating a tool will set up `~/.emscripten` to point to that particular tool. +You can toggle between different tools and SDK versions by running `emsdk activate `. Activating a tool will set up `~/.emscripten` to point to that particular tool. On Windows, you can pass the option `--global` to the `activate` command to register the environment permanently to the system registry for all users. ##### How do I track the latest Emscripten development with the SDK? diff --git a/emsdk b/emsdk index e29b0f8..db8d2ed 100755 --- a/emsdk +++ b/emsdk @@ -1163,14 +1163,25 @@ def main(): emsdk install - Downloads and installs the given tool or SDK. emsdk uninstall - Removes the given tool or SDK from disk. - - emsdk activate - Permanently activates the given tool or SDK as - the default tool in the system environment.''' + + emsdk activate - Activates the given tool or SDK in the + environment of the current shell.''' if WINDOWS: print ''' + emsdk activate [--global] - Activates the given tool or SDK in + the environment of the current + shell. If the --global option is + passed, the registration is done + globally to all users in the system + environment. + emcmdprompt.bat - Spawns a new command prompt window with the Emscripten environment active.''' + else: + print ''' + emsdk activate - Activates the given tool or SDK in the + environment of the current shell.''' return 1 cmd = sys.argv[1] @@ -1261,6 +1272,8 @@ def main(): return 1 tools_to_activate += [tool] tools_to_activate = set_active_tools(tools_to_activate, permanently_activate=permanently_activate) + if WINDOWS and not permanently_activate: + print 'To permanently register this environment globally to all users in Windows Registry, rerun the command with the option --global.' return 0 elif cmd == 'install': if len(sys.argv) <= 2: