git-crypt icon indicating copy to clipboard operation
git-crypt copied to clipboard

Add Windows support.

Open bySabi opened this issue 11 years ago • 32 comments

Tested with mingw and msysgit.

bySabi avatar Feb 12 '14 14:02 bySabi

Can you build windows version file and upload to your github? I am trying to build it on Windows 8.1 X64 but no success.

dungelin avatar Jun 08 '14 08:06 dungelin

Hello,

The binary is already in the github repo (https://github.com/ccleaud/git-crypt).

Please have a look to git-crypt.exe, this is the file you want.

Note that I’m working on this Windows version to improve it.

From: Viet Dzung [mailto:[email protected]] Sent: Sunday, June 8, 2014 10:11 AM To: AGWA/git-crypt Subject: Re: [git-crypt] Add Windows support. (#13)

Can you build windows version file and upload to your github? I am trying to build it on Windows 8.1 X64 but no success.

— Reply to this email directly or view it on GitHub https://github.com/AGWA/git-crypt/pull/13#issuecomment-45431163 . https://github.com/notifications/beacon/7109720__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNzgzNDI4NCwiZGF0YSI6eyJpZCI6MjU1MDk2NDN9fQ==--96babfb6a4535bf3139605233878ff4013c75c20.gif

ccleaud avatar Jun 08 '14 12:06 ccleaud

Thanks @ccleaud for the build. :)

dungelin avatar Jun 09 '14 11:06 dungelin

I just pushed Windows support to the 'windows' branch. The build system needs work, but it does compile with mingw-w64.

The branch is based on the 'revamp' branch which contains GPG support and which the next release will be based on. I've tested GPG support with gpg4win and it works. The revamp branch is still subject to change, so you should not use the windows branch for anything serious yet.

Thanks @bySabi and @ccleaud for the patches, but since much changed with the revamp branch it ended up being simpler to write the Windows support from scratch.

AGWA avatar Jun 15 '14 19:06 AGWA

I don't see a windows branch up there.

yoavram avatar Aug 06 '14 06:08 yoavram

Hi @yoavram, Windows support has since been merged into the revamp branch.

AGWA avatar Aug 06 '14 14:08 AGWA

OK, I checked out the revamp branch, opened MinGW shell, went to the git-crypto folder, and ran make. I get:

c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot find -lcrypto
collect2.exe: error: ld returned 1 exit status
make: *** [git-crypt] Error 1

Any clue?

yoavram avatar Aug 15 '14 06:08 yoavram

You need to build OpenSSL library first. This will produce 2 files.

You also have to put those files in you lib path in order to allow ld linking against it.

Currently only “libcrypto” is required to build git-crypt.

ccleaud avatar Aug 15 '14 09:08 ccleaud

OK, I installed OpenSSL from http://gnuwin32.sourceforge.net/packages/openssl.htm. Opened MingW shell, added the folder with the OpenSSL files to the library path:

> export LIBRARY_PATH
> LIBRARY_PATH="C:/Program Files (x86)/GnuWin32/lib;LIBRARY_PATH"

then ran make. Failed with an error, to which I found the solution here: I had to add -lgdi32 to the LDFLAGS in the Makefile. Then I was able to build git-crypto.

yoavram avatar Aug 27 '14 11:08 yoavram

hey, how is it going? is there any guide on how to build the lib on Windows, or (better) is anybody maintaining the compiled binaries?

here's what I got:

> make
c++ -Wall -pedantic -ansi -Wno-long-long -O2 -static-libgcc -static-libstdc++   -c -o git-crypt.o git-crypt.cpp
git-crypt.cpp:35:25: fatal error: openssl/err.h: No such file or directory
 #include <openssl/err.h>
                         ^
compilation terminated.
make: *** [git-crypt.o] Error 1

vorou avatar Apr 30 '15 08:04 vorou

@vorou You need to install OpenSSL under MinGW in order to compile git-crypt. I know very little about development environments on Windows so I don't know how you do that, but there is certain to be documentation online.

It's actually pretty easy for me to cross-compile Windows binaries from Linux. Here's a Windows binary, compiled from the current HEAD: https://www.cloudmutt.com/git-crypt-3104508/git-crypt.exe

I'll probably start building official Windows binaries like this.

AGWA avatar Apr 30 '15 16:04 AGWA

@AGWA works as magic, thanks! It would be nice if you could automate the build, so you don't have to build manually on each commit.

vorou avatar May 01 '15 06:05 vorou

I've created a chocolatey (apt-get for Windows) package for the binary, would you mind if I upload it to the public repository?

It downloads the .exe by your link and puts it into bin folder. It is ten times more convenient to type cinst -y git-crypt then to download the file manually on each box.

Also, am I right there is no requirement to have OpenSSL installed? I though it's required, but it looks like it's working fine w/o it on a virtual box.

vorou avatar May 01 '15 07:05 vorou

@vorou a chocolatey package sounds great - thanks! However, don't upload it quite yet - I need to move the .exe to a more permanent URL - the current one is very temporary. I'll let you know when it's ready.

AGWA avatar May 01 '15 14:05 AGWA

Roger that!

vorou avatar May 01 '15 16:05 vorou

Any word on when this becomes official?

bradwilson avatar Sep 10 '15 23:09 bradwilson

+1

tcastelli avatar Oct 01 '15 20:10 tcastelli

Any movement on a Windows exe? Would love to use it.

mnbeer avatar May 27 '16 03:05 mnbeer

It's actually pretty easy for me to cross-compile Windows binaries from Linux. Here's a Windows binary, compiled from the current HEAD: https://www.cloudmutt.com/git-crypt-3104508/git-crypt.exe

Found out that the link is broken, so here's a mirror.

I guess it's pretty old now, but we haven't had any problems with this version.

vorou avatar Jun 04 '16 10:06 vorou

Thanks! I actually had managed to create a Windows build with mingw after some painful pathing issues and I have put it to use. It's existence is much appreciated, thank you.

mnbeer avatar Jun 04 '16 19:06 mnbeer

:+1:

jaxzin avatar Jul 13 '16 22:07 jaxzin

Any updates on this?

seperman avatar Apr 01 '17 01:04 seperman

I have a Windows build. I can send or post somewhere. It works really well except when it doesn't. Merges tend to hammer encrypted files and it can be a bit painful undoing that. I try to merge with no-commit so there is less damage to rewind when things go haywire. I have to resort to "re-unlocking" and running git-crypt fix fairly frequently.

mnbeer avatar Apr 03 '17 15:04 mnbeer

+1

cniweb avatar Apr 24 '17 11:04 cniweb

+1 any updates?

radistao avatar May 05 '17 05:05 radistao

I have created a fork which builds the windows version using appveyor and pushes the result back to github automatically: https://github.com/LykkeCity/git-crypt/releases . There are a few changes/additions, which could be tracked from commits tab.

bijakatlykkex avatar Dec 16 '17 07:12 bijakatlykkex

:lgtm:


Review status: 0 of 9 files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

cniweb avatar Dec 22 '17 00:12 cniweb

https://stackoverflow.com/a/48529709/2777965

030 avatar Dec 25 '18 20:12 030

😴 💤 💤

andresmoschini avatar Mar 24 '20 14:03 andresmoschini

Any update on this?

pravin avatar Apr 19 '21 21:04 pravin

Any update on this?

Main branch works fine for me, just install the deps and build as described in INSTALL.md

LMBernardo avatar May 10 '21 23:05 LMBernardo

Anyway to help out on this branch?

artmotion avatar Sep 27 '21 14:09 artmotion