From 66e90ab19b9a9c586b4329a686ece68b9bd42e0a Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 6 Dec 2019 21:28:19 -0500 Subject: [PATCH] re-add Windows visual studio build back into the travis-ci tests New procedures added to win/win32/vs2017/travisci.sh for travis-ci testing. - use curl to obtain Lua from http://www.lua.org/ftp/lua-5.3.5.tar.gz - use tar to unzip lua into lib/lua-5.3.5/... Note: curl and tar were both added as part of Windows 10 in late Dec 2017 https://techcommunity.microsoft.com/t5/Containers/Tar-and-Curl-Come-to-Windows/ba-p/382409 - use git to clone pdcurses into lib/pdcurses - use git to clone universal-ctags into lib/ctags - build universal-ctags ahead of building NetHack + lua + pdcurses - adjust sys/winnt/Makefile.msc to look for those things in their lib locations when building under travis --- .travis.yml | 10 +++++----- sys/winnt/Makefile.msc | 5 +++++ win/win32/vs2017/travisci.sh | 12 ++++++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d56ffae16..4eab2f6ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,6 +69,11 @@ matrix: sed -i 's/^#define TEXTCOLOR//' include/unixconf.h make fetch-lua && make install cat dat/options + - os: windows + env: DESCR=windows-visualstudio + language: shell + script: + - ./win/win32/vs2017/travisci.sh - os: linux env: DESCR=msdos-cross-on-linux HINTS=linux LUA_VERSION=5.3.5 compiler: gcc @@ -80,11 +85,6 @@ matrix: - sh sys/msdos/msdos-cross-compile.sh exclude: - os: windows - env: DESCR=windows-visualstudio - language: shell - script: - - ./win/win32/vs2017/travisci.sh - - os: windows # install: choco install mingw env: DESCR=windows-mingw script: diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 3bae6668d..614b32533 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -527,7 +527,12 @@ DATABASE = $(DAT)\data.base # ctags options # #CTAGSCMD=ctags-orig.exe +!IF "$(TRAVIS_BUILD_DIR)" != "" +CTAGSCMD=..\lib\ctags\ctags.exe +!ELSE CTAGSCMD=..\..\..\ctags\ctags.exe +!ENDIF + CTAGSOPT =--language-force=c --sort=no -D"Bitfield(x,n)=unsigned x : n" --excmd=pattern # # ctags wants unix-style pathnames diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index 812f4cdd8..b3e7de13e 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -24,9 +24,17 @@ export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB -git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses +mkdir -p lib +cd lib +git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses +git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags +curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz +tar zxf lua-5.3.5.tar.gz +cd ctags +nmake -f mk_mvc.mak +cd ../../ export ADD_CURSES=Y -export PDCURSES_TOP=../../pdcurses +export PDCURSES_TOP=../lib/pdcurses export cd src cp ../sys/winnt/Makefile.msc ./Makefile