Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several troubles with SDK installer on Windows #1307

Closed
vault-thirteen opened this issue Dec 2, 2023 · 14 comments · Fixed by #1308
Closed

Several troubles with SDK installer on Windows #1307

vault-thirteen opened this issue Dec 2, 2023 · 14 comments · Fixed by #1308

Comments

@vault-thirteen
Copy link

vault-thirteen commented Dec 2, 2023

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.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

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).    
...

@vault-thirteen
Copy link
Author

vault-thirteen commented Dec 2, 2023

@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.

@vault-thirteen vault-thirteen changed the title SDK installer does not work properly on Windows SDK installer is neither intuitive nor convenient on Windows Dec 2, 2023
@vault-thirteen
Copy link
Author

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.

@vault-thirteen vault-thirteen changed the title SDK installer is neither intuitive nor convenient on Windows Several troubles with SDK installer on Windows Dec 2, 2023
@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

@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?

@vault-thirteen
Copy link
Author

vault-thirteen commented Dec 2, 2023

@sbc100
I think that a user should make choice during the installation process whether he/she wants to do following things:

  1. to save the environment variables or not;
  2. to save them for an O.S. user or for the whole Windows O.S.;
  3. to add a link on the desktop which points to the "Emscripten Command Prompt".

@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

@sbc100 I think that a user should make choice during the installation process whether he/she wants to do following things:

  1. to save the environment variables or not;
  2. to save them for an O.S. user or for the whole Windows O.S.;
  3. 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.

@vault-thirteen
Copy link
Author

vault-thirteen commented Dec 2, 2023

@sbc100
I think there should be two modes for the installer.

  1. The interactive way which asks a user for his/her choice (default mode);
  2. The non-interactive, i.e. silent mode which uses CLI arguments as input (for advanced users).

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

@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

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.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

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.

@vault-thirteen
Copy link
Author

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.
#1307 (comment)

For some reason my Start menu in Windows 10 lacks anything related to Emscripten. This is strange. Thank you.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

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.

@vault-thirteen
Copy link
Author

@sbc100
Yes, I tried to type this, but nothing is found.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

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.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 2, 2023

I think in the past there may have been an actual windows install so that tip might refer to those days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants