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

Provide single compiled executable for windows users #371

Closed
jessehouwing opened this issue Jun 9, 2022 · 8 comments
Closed

Provide single compiled executable for windows users #371

jessehouwing opened this issue Jun 9, 2022 · 8 comments

Comments

@jessehouwing
Copy link

jessehouwing commented Jun 9, 2022

As many others I've been wrestling with git-filter-repo on Windows. Ideally, we'd get a single compiled executable install and add to the %path% to make things work. That could then be distributed on winget and chocolatey for easy installation...

Since this is a public github repo, github actions' Windows Runner may be an ideal place to build and test the installation process and to make sure things 'just work' even without running from git-bash. Ideally git-filter-repo would work on cmd and pwsh just as happily.

I've also tried getting git-filter-repo to run on WSL, but there too, the process is non ideal and the docs limited. Doing the manual build from the repo seems to work, but again, ideally things would just work. Unfortunately, snap doesn't work on WSL by default.

Many other packaging tools do, but snap won't.

I'd love to help out, but my python skills are severely limited, I have windows though, and understand that part quite well.

@Jaifroid
Copy link

Jaifroid commented Oct 4, 2022

I'm also struggling with this. Tried on WSL, but it appears we need to have a higher version of Ubuntu than is supported on WSL at the moment. So I tried on Windows, installing with scoop, but I just get "NameError: name 'git' is not defined". Git is definitely installed and running in Windows, as is Python (installed from the Microsoft Store).

@jessehouwing
Copy link
Author

This is what I ended up doing:
https://jessehouwing.net/installing-git-filter-repo-on-windows/

@Jaifroid
Copy link

Jaifroid commented Oct 4, 2022

@jessehouwing Thank you very much! That's very helpful.

@newren
Copy link
Owner

newren commented Oct 12, 2022

I'm sorry it was difficult for you and I'm glad you figured it out and that it apparently helped someone else. It's unfortunate that installing python on Windows is apparently not trivial, and that adding something to PATH appears to be foreign to Windows users as well. They are such trivial things to do on Linux.

The request makes no sense though; there's nothing to compile. It's a single-file script. So I'll go ahead and close.

@newren newren closed this as completed Oct 12, 2022
@Jaifroid
Copy link

I think the problems Windows users encounter are down to the lack of documentation that has actually been tested on a Windows installation. A link to @jessehouwing's blog post in the documentation would probably help a lot of people.

@jessehouwing
Copy link
Author

There is a way to compile/package python 3, the dependencies and the script into a single windows executable that just works when you invoke it from the commandline.

Without having to install python, or pip or changing the environment.

With that it would be possible to publish the resulting single executable to Winget, Chocolatey or even the windows store.

You can't publish your existing py file and expect it to work on any Windows machine.

Providing an installer script or something would also help...

@jessehouwing
Copy link
Author

@newren
Copy link
Owner

newren commented Oct 18, 2022

I updated the installation docs to make it clearer that the installation process is essentially just downloading 1 file, and rewrote the Windows section to note specific issues people have run into with simpler workarounds. I also linked to this ticket first in the historical Windows issues section.

Thanks for the info about creating a single windows executable. However, once you have the dependencies (Git & Python) in place, the installation process for git-filter-repo is literally as simple as downloading a single file. The idea of creating windows binaries sounds unnecessarily complex, especially since git-filter-repo has no build process at all right now. Let's see how the updated instructions + windows workarounds + link to your ticket do.

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

3 participants