-
Notifications
You must be signed in to change notification settings - Fork 477
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
Add Windows compilation instructions #84
base: master
Are you sure you want to change the base?
Conversation
|
||
Instructions: | ||
|
||
- Download and install 32bit OpenSSL development binaries (the full ~16BM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BM? Maybe make this MB and --fixup
before merge ;-)
Thanks for working on this! I would definitely like to see better Windows support in git-crypt. However, I think we'd be better off targeting MinGW-w64/MSYS2, considering that it is more actively developed than MinGW/MSYS, and Git itself has switched to it. Also, MSYS2 has the Pacman package manager, so people could install OpenSSL from it instead of having to download a sketchy binary from a third party website. Would you be able to update the instructions and Makefile for MinGW-w64? |
Thank you! Turns out msys2 is the best thing ever, who knew :) I've updated the instructions. No changes to the Makefile are needed now and even the |
This make the binary redistributable without additional dependencies.
The resulting binary was not executable on systems without the compilation requirements. Assuming most users will compile and redistribute, I've modified the makefile to link statically. This obviously produces slightly larger binary (from 350KB to 5MB), but is executable as-is on vanilla Windows. |
Hi, any thoughts on this rewrite? :) |
This works on the current MSYS2. I did have to link against zlib as well: Install zlib-devel
Add -lz to LDFLAGS: diff --git a/Makefile b/Makefile
index 1cb8e8c..be5a445 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ OBJFILES += crypto-openssl.o
ifeq ($(OS),Windows_NT)
CXXFLAGS += -static -static-libgcc
- LDFLAGS += -lcrypto -lgdi32
+ LDFLAGS += -lcrypto -lgdi32 -ldl -lz
else
LDFLAGS += -lcrypto
endif |
This pull request with documentation has been very useful for building the windows binary. We have successfully followed the instructions to compile a Windows release. A note on the comment by @tomkooij : |
I was just looking into this and I would suggest using the Windows Subsystem for Linux, aka WSL aka bash for Windows. I've managed to successfully build and use git-crypt. Thank you! |
This is failing for me.
Any ideas? |
Hi, I've successfully built both the most recent version and the latest stable tag with those minor updates to the Makefile.
If you are willing to merge this, should I also update the
make install
task?