From e4b9d6e6de74d53987fe82669489e8bdb8f8614b Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 5 Nov 2019 11:47:20 -0800 Subject: [PATCH] Put the right MinGW directory into the path. It looks as if the 32-bit MinGW directory is in the path by default; remove it and then put the appropriate directory, whether it's the 32-bit version or some 64-bit version, into the path. Maybe this fixes the "gcc can't compile a simple program" error we're getting. --- .appveyor.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 470b04770e..c8cdc259f9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -43,9 +43,19 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 GENERATOR: "MinGW Makefiles" SDK: WpdPack + MINGW_PATH: C:\MinGW\bin + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + GENERATOR: "MinGW Makefiles" + SDK: npcap-sdk-0.1 + MINGW_PATH: C:\MinGW\bin - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 GENERATOR: "MinGW Makefiles" SDK: WpdPack + MINGW_PATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + GENERATOR: "MinGW Makefiles" + SDK: npcap-sdk-0.1 + MINGW_PATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0 build_script: # @@ -54,8 +64,13 @@ build_script: - type NUL >.devel - md build - cd build - - if "%GENERATOR%"=="MinGW Makefiles" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0;%PATH% - # Workaround for CMake not wanting sh.exe on PATH for MinGW + # Remove the default MinGW path + - if "%GENERATOR%"=="MinGW Makefiles" set PATH=%PATH:C:\MinGW\bin;=% + # Add the specified MinGW path + - if "%GENERATOR%"=="MinGW Makefiles" set PATH=%MINGW_PATH%;%PATH% + # Remove the path to Git, so that we don't pick up its sh.exe, as + # that breaks MinGW builds - CMake checks for that and fails in the + # configuration stage - if "%GENERATOR%"=="MinGW Makefiles" set PATH=%PATH:C:\Program Files\Git\usr\bin;=% - cmake -DPacket_ROOT=c:\projects\libpcap\Win32\%SDK% -G"%GENERATOR%" .. - if NOT "%GENERATOR%"=="MinGW Makefiles" msbuild /m /nologo /p:Configuration=Release pcap.sln