xmake-io / xmake-vscode

🍩 A XMake integration in Visual Studio Code
https://xmake.io
Apache License 2.0
232 stars 55 forks source link

xmake plugin cannot activate in wsl #35

Closed caizongchao closed 4 years ago

caizongchao commented 4 years ago

environment: vscode 1.45.1, ubuntu 20.04 in windows 10 wsl, xmake vscode extension 1.3.4

While opening a project folder from within wsl, xmake buttons does not appear on the bottom status bar. In vscode developer tools ->console, I can see an error message which says 'cannot spawn xmake, ENOENT'.

I guess this is because xmake is installed in user's home directory and vscode cannot find it. I moved xmake files from ~/.local/xmake to /usr/local and then the problem is gone.

Since xmake is recommended to be installed locally, I'd like to know whether there's another solution to this issue.

thanks

waruqi commented 4 years ago

You can use xmake.exe installer to install to c:/program files/xmake and it will add path automatically.

Or attempt run source ~/.xmake/profile?

I don’t have a win/wsl environment now, so I cannot test this case.

caizongchao commented 4 years ago

I just tried another wsl distribution (https://github.com/am11/VoidWSL) and everything works fine, even xmake is installed locally in ~/.local.

My previous test environment that has problem is Alpine linux (https://github.com/yuk7/AlpineWSL). Another issue in Alpine linux is that xmake cannot be installed via "bash <(curl -fsSL https://xmake.io/shget.text)". Finally I managed to install xmake by cloning and installing from the source .

Thanks for the great tool.

waruqi commented 4 years ago

ok

wangzhankun commented 3 years ago

I have the same issue with WSL of ubuntu18.04. Any idea?