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

Create symlink to enable bash scripts on Windows MSYS2 #3809

Open
JeppeKlitgaard opened this issue Feb 12, 2025 · 3 comments
Open

Create symlink to enable bash scripts on Windows MSYS2 #3809

JeppeKlitgaard opened this issue Feb 12, 2025 · 3 comments

Comments

@JeppeKlitgaard
Copy link

I am building and running Anki on Windows using MSYS2, which generally works really well.

One significant papercut that I have run into, however, is that the pyenv directory with binaries is different on Windows (out/pyenv/scripts) as opposed to out/pyenv/bin. The bash scripts generally assume the Linux path and fail in this manner:

Image

Since MSYS2 bash automatically appends the .exe if it is missing and an executable exists, this can be solved simply by creating a symlink from out/pyenv/bin to out/pyenv/scripts on Windows. I wanted to make a PR for this myself, but I am finding the build tooling to be a bit difficult to get a grasp on.

@JeppeKlitgaard
Copy link
Author

I have gotten sufficiently frustrated with trying to build it directly on Windows and am now developing in WSL instead.

This issue can be closed, though it might be worthwhile discussing whether to explicitly recommend developing on Ubuntu in WSL for Windows users now that GUIs are supported in WSL.

@dae
Copy link
Member

dae commented Feb 16, 2025

Aside from some fairly minor corner cases like some of the scripts in tools\ needing to be invoked with bash, building should work fine on Windows without WSL. It's how the official builds are built, and the core developers @abdnh and @RumovZ are both building on Windows without WSL AFAIAA. What problems did you hit?

No objections to the symlink if it doesn't introduce regressions. It can likely be done in setup_pyenv(), using junction::create, which already is used in another file.

@dae
Copy link
Member

dae commented Feb 16, 2025

(please note that you're expected to invoke things like run(.bat) via cmd.exe or a PS session - if you're using bash, that may cause it to try run the UNIX ./run instead)

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

No branches or pull requests

2 participants