diff --git a/.gitignore b/.gitignore index 72a641d9..15c21ec3 100644 --- a/.gitignore +++ b/.gitignore @@ -322,3 +322,8 @@ waf3-*/ *.unsuccessfulbuild __pycache__ *.pyc + +# MSVC projects +*.vcproj +*.sln +*.vcxproj diff --git a/.travis.yml b/.travis.yml index 2f668c43..09ed9d33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,11 +94,11 @@ jobs: script: - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh after_script: - - sh scripts/yadisk_upload.sh xash3d-vc.7z + - sh scripts/yadisk_upload.sh xash3d-vc.7z xash3d-vc2008-sln.7z - stage: deploy name: "Deploy to github" os: linux cache: false script: - - sh scripts/travis-deploy.sh Xash3DFWGS-i386.AppImage xash3d-mingw.7z xash3d-osx.tar.bz2 xash3d-vc.7z + - sh scripts/travis-deploy.sh Xash3DFWGS-i386.AppImage xash3d-mingw.7z xash3d-osx.tar.bz2 xash3d-vc.7z xash3d-vc2008-sln.7z diff --git a/scripts/build_windows_engine.sh b/scripts/build_windows_engine.sh index 69407350..b26acba8 100644 --- a/scripts/build_windows_engine.sh +++ b/scripts/build_windows_engine.sh @@ -4,13 +4,24 @@ # Build engine cd $TRAVIS_BUILD_DIR -./waf configure --sdl2=$TRAVIS_BUILD_DIR/SDL2_VC --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug || die -./waf build || die + +# NOTE: to build with other version use --msvc_version during configuration +# NOTE: sometimes you may need to add WinSDK to %PATH% +./waf.bat configure -s "$TRAVIS_BUILD_DIR/SDL2_VC" -T "debug" --prefix=`pwd` +./waf.bat build +echo After build cp $TRAVIS_BUILD_DIR/SDL2_VC/lib/x86/SDL2.dll . # Install SDL2 -cp build/vgui_support/vgui_support.dll . cp vgui-dev/lib/win32_vc6/vgui.dll . -cp build/engine/xash.dll . -cp build/mainui/menu.dll . -cp build/game_launch/xash3d.exe . -7z a -t7z $TRAVIS_BUILD_DIR/xash3d-vc.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe +./waf.bat install + +7z a -t7z $TRAVIS_BUILD_DIR/xash3d-vc.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe *.pdb + +echo "Generating VC2008 project" +rm -rf vc2008/ +mkdir vc2008/ +./waf.bat msdev +find . -name "*.sln" -exec cp --parents \{\} vc2008/ \; +find . -name "*.vcproj" -exec cp --parents \{\} vc2008/ \; + +7z a -t7z $TRAVIS_BUILD_DIR/xash3d-vc2008-sln.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -r vc2008