diff --git a/.gitignore b/.gitignore index 81afb4a..d32d72a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.o git-crypt +git-crypt.exe diff --git a/INSTALL b/INSTALL index 41049f1..d09f7a4 100644 --- a/INSTALL +++ b/INSTALL @@ -70,3 +70,26 @@ and does not currently create key files with restrictive permissions, making it unsuitable for use on a multi-user system. Windows support will mature in a future version of git-crypt. Bug reports and patches are most welcome! + +Prerequisites: + +> This documentation is for 64 bit hosts + +Download and install msys2 POSIX compatibility layer from http://msys2.github.io/ (get the `msys2-x86_64-*.exe`) + +In the newly installed MSYS2 Shell, invoke the following commands to upgrade to the most recent version: + + $ pacman --sync --refresh --noconfirm pacman + $ pacman --sync --sysupgrade --noconfirm + +(You might be asked to close the shell and run the sysupgrade command again.) + + $ pacman --sync --refresh --noconfirm \ + mingw-w64-x86_64-gcc \ + mingw-w64-x86_64-make \ + mingw-w64-x86_64-openssl + +In MinGW-w64 64-bit Shell: + + $ cd "$YOUR_GIT_CRYPT_DIR" + $ make && make install diff --git a/INSTALL.md b/INSTALL.md index 7fdb577..7bde204 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -69,3 +69,32 @@ and does not currently create key files with restrictive permissions, making it unsuitable for use on a multi-user system. Windows support will mature in a future version of git-crypt. Bug reports and patches are most welcome! + +Prerequisites: + +> This documentation is for 64 bit hosts + +Download and install msys2 POSIX compatibility layer from http://msys2.github.io/ (get the `msys2-x86_64-*.exe`) + +In the newly installed MSYS2 Shell, invoke the following commands to upgrade to the most recent version: + +```sh +pacman --sync --refresh --noconfirm pacman +pacman --sync --sysupgrade --noconfirm +``` + +(You might be asked to close the shell and run the sysupgrade command again.) + +```sh +pacman --sync --refresh --noconfirm \ + mingw-w64-x86_64-gcc \ + mingw-w64-x86_64-make \ + mingw-w64-x86_64-openssl +``` + +In MinGW-w64 64-bit Shell: + +```sh +cd "$YOUR_GIT_CRYPT_DIR" +make && make install +``` diff --git a/Makefile b/Makefile index dfbf9de..1cb8e8c 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,13 @@ OBJFILES = \ fhstream.o OBJFILES += crypto-openssl.o -LDFLAGS += -lcrypto + +ifeq ($(OS),Windows_NT) + CXXFLAGS += -static -static-libgcc + LDFLAGS += -lcrypto -lgdi32 +else + LDFLAGS += -lcrypto +endif XSLTPROC ?= xsltproc DOCBOOK_FLAGS += --param man.output.in.separate.dir 1 \ @@ -66,7 +72,7 @@ CLEAN_TARGETS := clean-bin $(CLEAN_MAN_TARGETS-$(ENABLE_MAN)) clean: $(CLEAN_TARGETS) clean-bin: - rm -f $(OBJFILES) git-crypt + rm -f $(OBJFILES) git-crypt git-crypt.exe clean-man: rm -f man/man1/git-crypt.1