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

Allow running a setup script on Windows analogous to setup.sh on Linux #374

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

E14
Copy link
Contributor

@E14 E14 commented Oct 5, 2020

Script is located at %APPDATA%/elixir_ls/setup.bat which usually translates to C:\Users\<username>\AppData\Roaming\elixir_ls

Example use-case:

@echo off
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"

Very useful for nifs.

…Linux

Script is located at `%APPDATA%`/elixir_ls/setup.bat` which usually translates to `C:\Users\<username>\AppData\Roaming\elixir_ls`
@E14 E14 changed the title Allow running a setup script analogous to setup.sh on Linux Allow running a setup script on Windows analogous to setup.sh on Linux Oct 5, 2020
Copy link
Member

@axelson axelson left a comment

Choose a reason for hiding this comment

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

Thanks! This does indeed look helpful ❤️

@axelson axelson merged commit 4d4ded0 into elixir-lsp:master Oct 19, 2020
axelson added a commit that referenced this pull request Oct 19, 2020
@princemaple
Copy link
Contributor

FYI if anyone fails to start elixir-ls after adding a setup script, make sure the script does not print anything.

@echo off
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 >nul

@echo off does not prevent the results from being printed, only the commands. >nul is needed too.

@axelson
Copy link
Member

axelson commented Feb 1, 2021

@princemaple thanks for the note. I think it would be helpful for more people to see it so I've added a similar note to the README: #468

Does the wording on that make sense to you?

@princemaple
Copy link
Contributor

It looks good to me. I'm not a batch script expert though, I'm not sure if it is needed on every single line. I guess to be safe - sure. 👍 Thanks

@E14
Copy link
Contributor Author

E14 commented Feb 2, 2021

@princemaple thanks for the note. I think it would be helpful for more people to see it so I've added a similar note to the README: #468

Does the wording on that make sense to you?

We could update the batch file to add > nul to the calls in debugger.bat and language_server.bat directly, that should prevent the output of stdout at least - I think (not a batch expert either), maybe @princemaple can test this with their existing script?

@princemaple
Copy link
Contributor

@E14 good thinking. Adding >nul at the end of the line with the call seems to do the trick.

@princemaple
Copy link
Contributor

princemaple commented Feb 2, 2021

CALL "%APPDATA%\elixir_ls\setup.bat" > nul 2>&1 If the user can make sure the script works before really using it.

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 this pull request may close these issues.

4 participants