Closed vault-thirteen closed 8 months ago
You can do this using the a flag to the activate
command. This is from the --help
on windows:
emsdk activate [--permanent] [--system] [--build=type] [--vs2019/--vs2022] <tool/sdk>
- Activates the given tool or SDK in the
environment of the current shell.
- If the `--permanent` option is passed, then the environment
variables are set permanently for the current user.
- If the `--system` option is passed, the registration
is done for all users of the system.
This needs admin privileges
(uses Machine environment variables).
...
@sbc100 It is good to know about this possibility. I personally think that a user should be provided with a friendly looking help during the installation process. Even the command line interface allows creation of interactive installers.
To access this prompt, type Emscripten in the Windows 8 start screen, and then select the Emscripten Command Prompt option. https://emscripten.org/docs/getting_started/Tutorial.html
I have no such an item in my Start menu in Windows 10. So, this is a bug.
@sbc100 It is good to know about this possibility. I personally think that a user should be provided with a friendly looking help during the installation process. Even the command line interface allows creation of interactive installers.
Perhaps we could point users to --permanent
and/or --system
in the installation instructions? Perhaps in the output of the activate
command?
@sbc100 I think that a user should make choice during the installation process whether he/she wants to do following things:
@sbc100 I think that a user should make choice during the installation process whether he/she wants to do following things:
- to save the environment variables or not;
- to save them for an O.S. user or for the whole Windows O.S.;
- to add a link on the desktop which points to the "Emscripten Command Prompt".
Do you mean we should make emsdk.py interactive? i.e. ask the user for input? So far we have never done that and instead relies on command line flags to control the process.
@sbc100 I think there should be two modes for the installer.
At the installation start, like in the installer of the modern Debian O.S., the installer can ask which one of the installation methods to use: simple or advanced.
Why ? Remember that even Linus Torvalds himself did not succeed in installing the old Debian O.S. and this became a well known meme. This is very important :-) https://www.youtube.com/watch?v=qHGTs1NSB1s
I think perhaps because this install doesn't have more than one or two options we can get away with better documenting those options rather than trying to convert emsdk.py to be interactive.
I created #1308 which points the use to how to setup permanently, in the same place we do for advising linux users to add to their .bashrc
.
For some reason I can not modify my first message, it must be a bug of GitHub platform, so I am kindly reminding about the second issue which I mentioned later in a separate message. https://github.com/emscripten-core/emsdk/issues/1307#issuecomment-1837185185
For some reason my Start menu in Windows 10 lacks anything related to Emscripten. This is strange. Thank you.
Did you "type Emscripten in the Windows 8 start screen" as the instructions say? IIUC that is some kind of search feature which should find the emscripten command prompt (emcmdprompt.bat) which lives in the emsdk directory. I'm not a windows user myself so I don't know how that is supposed to work, but I don't think we install anything directly into the start menu.
@sbc100 Yes, I tried to type this, but nothing is found.
I guess that instructions are out-of-date and we should remove the node. We do have a script called emcmdprompt.bat
but I don't know what makes searchable from the start menu.
I think in the past there may have been an actual windows install so that tip might refer to those days.
I have done all the steps described on the page named "Download and install" ( https://emscripten.org/docs/getting_started/downloads.html ), and after the installer has finished I am not able to use any of the SDK commands in command prompt. It looks like the installer did not properly set up environment variables in Windows O.S.
As far as I see on the "Emscripten Windows Command Prompt" page ( https://emscripten.org/docs/tools_reference/emcmdprompt.html#emcmdprompt ), environment variables are temporarily set for a separate command prompt which must be called by a separate BAT file, and this is not convenient to use.
I suggest that the SDK installer should have a GUI with a flag to enable setting of environment variables for a user or for the whole system (while the Windows O.S. can set environment variables for a user or for the whole system). This is the very basic thing that all software installers should do.
If you do not want to implement all this, you can simply create a desktop link to the BAT file which starts the "Emscripten Command Prompt" and name it "Emscripten Command Prompt". This will be much more convenient to use than the current solution.