From f1d89d9fea0b3ace92776599f0509dfa0be190c5 Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 09:36:14 -0800 Subject: [PATCH 1/8] Create .appveyor.yml --- .appveyor.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 000000000..93a57678d --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,42 @@ +environment: + CYG_MIRROR: http://cygwin.mirror.constant.com + CYG_PACKAGES: make,gcc-core,clang,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core + matrix: + - MSYSTEM: MINGW64 + BASH: C:\msys64\usr\bin\bash + MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + - MSYSTEM: MINGW32 + BASH: C:\msys64\usr\bin\bash + MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + - CYG_ROOT: C:\cygwin64 + CYG_CACHE: C:\cygwin64\var\cache\setup + CYG_SETUP: setup-x86_64.exe + BASH: C:\cygwin64\bin\bash + - CYG_ROOT: C:\cygwin + CYG_CACHE: C:\cygwin\var\cache\setup + CYG_SETUP: setup-x86.exe + BASH: C:\cygwin\bin\bash + +# Cache Cygwin/MSYS files to speed up build +cache: + - '%CYG_CACHE%' + - '%MSYS_CACHE%' +clone_depth: 1 + +# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail +init: + - git config --global core.autocrlf input +# Allows RDP +# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + +# Install needed build dependencies +install: + - ps: if (Test-Path Env:\CYG_ROOT) { Start-FileDownload "http://cygwin.com/$env:CYG_SETUP" -FileName "$env:CYG_SETUP" } + - if defined CYG_ROOT (%CYG_SETUP% --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages "%CYG_PACKAGES%" --upgrade-also) + - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") + - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") +build_script: + - if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule init && git submodule update && make") +# Allows RDP +#on_finish: +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From 8ac2490ae5cc8e451d77c6b37fc9056f6f83af44 Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 13:11:42 -0800 Subject: [PATCH 2/8] add clang and gcc specifically --- .appveyor.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 93a57678d..bb39dd636 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,26 +1,44 @@ environment: CYG_MIRROR: http://cygwin.mirror.constant.com - CYG_PACKAGES: make,gcc-core,clang,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core + CYG_PACKAGES: make,gcc-core,clang matrix: - MSYSTEM: MINGW64 BASH: C:\msys64\usr\bin\bash MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + CC: gcc - MSYSTEM: MINGW32 BASH: C:\msys64\usr\bin\bash MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + CC: gcc - CYG_ROOT: C:\cygwin64 CYG_CACHE: C:\cygwin64\var\cache\setup CYG_SETUP: setup-x86_64.exe BASH: C:\cygwin64\bin\bash + CC: gcc - CYG_ROOT: C:\cygwin CYG_CACHE: C:\cygwin\var\cache\setup CYG_SETUP: setup-x86.exe BASH: C:\cygwin\bin\bash + CC: gcc + - MSYSTEM: MINGW64 + BASH: C:\msys64\usr\bin\bash + MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + CC: clang + - MSYSTEM: MINGW32 + BASH: C:\msys64\usr\bin\bash + MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + CC: clang + - CYG_ROOT: C:\cygwin64 + CYG_CACHE: C:\cygwin64\var\cache\setup + CYG_SETUP: setup-x86_64.exe + BASH: C:\cygwin64\bin\bash + CC: clang + - CYG_ROOT: C:\cygwin + CYG_CACHE: C:\cygwin\var\cache\setup + CYG_SETUP: setup-x86.exe + BASH: C:\cygwin\bin\bash + CC: clang -# Cache Cygwin/MSYS files to speed up build -cache: - - '%CYG_CACHE%' - - '%MSYS_CACHE%' clone_depth: 1 # Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail @@ -36,7 +54,7 @@ install: - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") build_script: - - if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule init && git submodule update && make") + - %BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule init && git submodule update && make" # Allows RDP #on_finish: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From e5b0556dead8fac77cb98e1282e86ff3da8b5c65 Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 13:12:33 -0800 Subject: [PATCH 3/8] Update .appveyor.yml --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index bb39dd636..4d7aaa1ec 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -54,7 +54,7 @@ install: - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") build_script: - - %BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule init && git submodule update && make" + - (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule init && git submodule update && make") # Allows RDP #on_finish: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From cbc355be3911d411c2ff73549c3a7aa62bc81ea6 Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 13:20:45 -0800 Subject: [PATCH 4/8] Update .appveyor.yml --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4d7aaa1ec..131d0b5b3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -54,7 +54,7 @@ install: - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") build_script: - - (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule init && git submodule update && make") + - if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule init && git submodule update && make") # Allows RDP #on_finish: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From 0abf79de4d257c149ea2d17b35a1655d12ea0ec2 Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 15:43:26 -0800 Subject: [PATCH 5/8] Update win_file_globbing.mk --- src/win_file_globbing.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win_file_globbing.mk b/src/win_file_globbing.mk index b74d5f873..719dfac05 100644 --- a/src/win_file_globbing.mk +++ b/src/win_file_globbing.mk @@ -104,7 +104,7 @@ ifneq (,$(IS_WIN_BUILD_NATIVE)) # entering this code path means: we need to check for CRT_glob.o since we try to build binaries for windows operating systems -CRT_GLOB := $(shell $(FIND) / -name $(CRT_GLOB_FILE_NAME) -print -quit) +CRT_GLOB := $(CRT_GLOB_FILE_NAME) ifeq (,$(CRT_GLOB)) define WARNING_MESSAGE= From 7826906f584e1f75a8459057fccfe99c441d7847 Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 16:00:00 -0800 Subject: [PATCH 6/8] Update Makefile --- src/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Makefile b/src/Makefile index 263c89eed..c57e93912 100644 --- a/src/Makefile +++ b/src/Makefile @@ -277,13 +277,13 @@ OBJS_ALL := affinity autotune benchmark bitmap bitops combinator NATIVE_STATIC_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.STATIC.o) NATIVE_SHARED_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.SHARED.o) -ifeq ($(UNAME),CYGWIN) -NATIVE_STATIC_OBJS += $(CRT_GLOB) -endif # CYGWIN +## ifeq ($(UNAME),CYGWIN) +## NATIVE_STATIC_OBJS += $(CRT_GLOB) +## endif # CYGWIN -ifeq ($(UNAME),MSYS2) -NATIVE_STATIC_OBJS += $(CRT_GLOB) -endif # MSYS2 +## ifeq ($(UNAME),MSYS2) +## NATIVE_STATIC_OBJS += $(CRT_GLOB) +## endif # MSYS2 LINUX_32_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.32.o) LINUX_64_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.64.o) @@ -397,7 +397,7 @@ $(HASHCAT_FRONTEND): src/main.c $(HASHCAT_LIBRARY) $(CC) $(CFLAGS_NATIVE) $^ -L. -lhashcat $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\" -o $@ else $(HASHCAT_FRONTEND): src/main.c $(NATIVE_STATIC_OBJS) - $(CC) $(CFLAGS_NATIVE) $^ $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\" -o $@ + $(CC) $(CFLAGS_NATIVE) $^ $(CRT_GLOB) $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\" -o $@ endif ## From 237182ff437c8bd371729c427d5a38db5501c19d Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 16:18:19 -0800 Subject: [PATCH 7/8] Update main.c --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index 69b38315c..0fd9a2170 100644 --- a/src/main.c +++ b/src/main.c @@ -20,6 +20,10 @@ #include "interface.h" #include "event.h" +#if defined(__MINGW64__) || defined(__MINGW32__) +int _dowildcard = -1; +#endif + static void main_log_clear_line (MAYBE_UNUSED const int prev_len, MAYBE_UNUSED FILE *fp) { #if defined (_WIN) From 28d37be94ada07dda1e20eba2ab111e3f2499f18 Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 6 Feb 2017 16:18:56 -0800 Subject: [PATCH 8/8] Update Makefile --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index c57e93912..e6e8d12d9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -397,7 +397,7 @@ $(HASHCAT_FRONTEND): src/main.c $(HASHCAT_LIBRARY) $(CC) $(CFLAGS_NATIVE) $^ -L. -lhashcat $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\" -o $@ else $(HASHCAT_FRONTEND): src/main.c $(NATIVE_STATIC_OBJS) - $(CC) $(CFLAGS_NATIVE) $^ $(CRT_GLOB) $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\" -o $@ + $(CC) $(CFLAGS_NATIVE) $^ $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\" -o $@ endif ##