webcomics/pywine

Git in Wine ?

Opened this issue · 4 comments

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.

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

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)

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

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.