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

Git in Wine ? #54

Open
olivierdalang opened this issue Jan 16, 2024 · 4 comments
Open

Git in Wine ? #54

olivierdalang opened this issue Jan 16, 2024 · 4 comments
Assignees

Comments

@olivierdalang
Copy link

Hey !! Thanks for the image, works flawlessly to cross build .exe !!

I'm however stuck with a project which relies on setuptools_scm, since there is not git in Wine.

I was not able to install it even by following https://github.com/git-for-windows/git/wiki/Silent-or-Unattended-Installation.

You probably don't want to include too much things in wine, but git would be a nice addition, especially in the context of CI.

@TobiX TobiX self-assigned this Jan 17, 2024
@TobiX
Copy link
Member

TobiX commented Jan 17, 2024

Interesting idea, I'll think about it...

@olivierdalang
Copy link
Author

For reference, after fiddling quite a bit more, I found a way to make it work:

curl -L https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/MinGit-2.43.0-64-bit.zip --output MinGit-2.43.0-64-bit.zip
unzip MinGit-2.43.0-64-bit.zip -d mingit
cp mingit/cmd/* ${WINEPREFIX}/drive_c/windows/system32/
cp mingit/mingw64/bin/* ${WINEPREFIX}/drive_c/windows/system32/

(I'm running these steps directly in my gitlab runner on your tobix/pywine:3.11, meaning it should probably work by just adding these steps in the dockerfile)

Not sure how clean it is to just write to c/windows/system32/, but trying to put it elsewhere and adding to path didn't cut it (some scripts with subprocess.run(..., shell=False) wouldn't find the git executable)

@TobiX
Copy link
Member

TobiX commented Jan 17, 2024

When using the (headless) installer, did you try running wineboot afterwards? Maybe the PATH extension is delayed until the next "reboot"?

@olivierdalang
Copy link
Author

I wasn't able to complete the headless installation due to git-for-windows/git#3636
But maybe there's a way, I'm not familiar at all with wine nor the windows command line.

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

No branches or pull requests

2 participants