Skip to content

Commit

Permalink
Put the right MinGW directory into the path.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
guyharris committed Nov 5, 2019
1 parent 085bf2e commit e4b9d6e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand All @@ -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
Expand Down

0 comments on commit e4b9d6e

Please sign in to comment.