diff --git a/.github/scripts/Windows/install_natpmp.sh b/.github/scripts/Windows/install_natpmp.sh index 0121d6912..94fe80ce3 100755 --- a/.github/scripts/Windows/install_natpmp.sh +++ b/.github/scripts/Windows/install_natpmp.sh @@ -1,8 +1,13 @@ -#!/bin/sh -eu +#!/bin/sh -eux git clone --depth 1 https://github.com/miniupnp/libnatpmp cd libnatpmp -cmd /c build.bat + +gcc -c -Wall -Os -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR getgateway.c +gcc -c -Wall -Os -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR natpmp.c +gcc -c -Wall -Os -DWIN32 wingettimeofday.c +ar cr natpmp.a getgateway.o natpmp.o wingettimeofday.o + cp natpmp.a /usr/local/lib/libnatpmp.a cp natpmp_declspec.h natpmp.h /usr/local/include cd -