diff --git a/appveyor.yml b/appveyor.yml index 7a783d9..1d57eea 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,6 +52,7 @@ build_script: - IF "%USE_CACHE%" NEQ "1" appveyor\install_aria2.cmd - IF "%USE_CACHE%" NEQ "1" appveyor\install_mustache.cmd - IF "%USE_CACHE%" NEQ "1" appveyor\install_libmicrohttpd.cmd + - IF "%USE_CACHE%" NEQ "1" appveyor\install_getopt.cmd - IF "%USE_CACHE%" NEQ "1" %MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/create_cache.sh" - appveyor\install_libzim.cmd - appveyor\install_kiwix-lib.cmd diff --git a/appveyor/install_getopt.cmd b/appveyor/install_getopt.cmd new file mode 100644 index 0000000..be10d26 --- /dev/null +++ b/appveyor/install_getopt.cmd @@ -0,0 +1,15 @@ +REM ======================================================== +REM Install getopt +curl -fsSL -O https://github.com/takamin/win-c/archive/v1.0.zip || exit /b 1 +7z x v1.0.zip -o. || exit /b 1 +cd win-c-1.0 +mkdir build +cd build +cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%EXTRA_DIR% .. || exit /b 1 +dir +nmake install || exit /b 1 +copy ..\include\getopt.h %EXTRA_DIR%\include +cd ..\.. + +dir %EXTRA_DIR%\include +dir %EXTRA_DIR%\lib diff --git a/appveyor/install_kiwix-tools.cmd b/appveyor/install_kiwix-tools.cmd index b0e6cea..326c57d 100644 --- a/appveyor/install_kiwix-tools.cmd +++ b/appveyor/install_kiwix-tools.cmd @@ -3,7 +3,7 @@ REM Install kiwix-lib git clone https://github.com/kiwix/kiwix-tools.git || exit /b 1 cd kiwix-tools set "CPPFLAGS=-I%EXTRA_DIR%/include" -set "LDFLAGS=-lshlwapi -lwinmm" +set "LDFLAGS=-lshlwapi -lwinmm -llibwinc" meson . build --prefix %EXTRA_DIR% -Dstatic-linkage=true --buildtype release || exit /b 1 cd build ninja || exit /b 1