2018-08-23 15:12:39 -04:00
|
|
|
set MSBUILD_LOGGER=/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
2015-11-04 09:30:27 -05:00
|
|
|
goto %TOOLSET%
|
|
|
|
|
|
|
|
:msbuild
|
|
|
|
cd build\msw
|
2018-08-23 15:12:39 -04:00
|
|
|
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" wx_vc12.sln %MSBUILD_LOGGER%
|
2017-11-22 07:04:12 -05:00
|
|
|
cd ..\..\tests
|
2018-08-23 15:12:39 -04:00
|
|
|
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" test_vc12.sln %MSBUILD_LOGGER%
|
|
|
|
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" test_gui_vc12.sln %MSBUILD_LOGGER%
|
2019-11-30 17:27:43 -05:00
|
|
|
cd ..\samples\minimal
|
|
|
|
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" minimal_vc12.sln %MSBUILD_LOGGER%
|
2015-11-04 09:30:27 -05:00
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:nmake
|
|
|
|
cd build\msw
|
|
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio %VS%\VC\vcvarsall.bat" %ARCH%
|
2020-03-26 18:34:41 -04:00
|
|
|
nmake -f makefile.vc BUILD=%BUILD%
|
2017-11-22 07:04:12 -05:00
|
|
|
cd ..\..\tests
|
2020-03-26 18:34:41 -04:00
|
|
|
nmake -f makefile.vc BUILD=%BUILD%
|
2019-11-30 17:27:43 -05:00
|
|
|
cd ..\samples\minimal
|
2020-03-26 18:34:41 -04:00
|
|
|
nmake -f makefile.vc BUILD=%BUILD%
|
2015-11-04 09:30:27 -05:00
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:mingw
|
|
|
|
cd build\msw
|
|
|
|
path C:\MinGW\bin;%path%
|
2015-11-07 17:36:10 -05:00
|
|
|
echo --- Tools versions:
|
Remove the correct directory from PATH for MinGW AppVeyor builds
We need to remove the directory containing sh.exe from the PATH as
otherwise mingw32-make seems to use it and not cmd.exe for executing the
commands in the makefile, but the wrong directory was being removed in
appveyor.yml, having no effect.
Fix this and undo 5f2ccde269278860d7afbe1ca101a1b69370fbfb which
compensated for it by (almost) clearing the PATH entirely which, in
turn, broke one of our unit tests (and could break other things in the
future, as having an empty PATH is rather unexpected).
Also use the full path for head program now that its directory is not in
the PATH any more. Alternative could be to use PowerShell, but while
powershell -Command "'gcc','mingw32-make','ar'|%%{ iex \"$_ --version\"|select -first 1 }"
does work, it looks really ugly, so avoid it for now.
See https://github.com/wxWidgets/wxWidgets/pull/142
See #17274.
2017-11-25 09:59:16 -05:00
|
|
|
g++ --version | "C:\Program Files\Git\usr\bin\head" -n 1
|
|
|
|
mingw32-make --version | "C:\Program Files\Git\usr\bin\head" -n 1
|
|
|
|
ar --version | "C:\Program Files\Git\usr\bin\head" -n 1
|
2015-11-07 17:36:10 -05:00
|
|
|
echo.
|
|
|
|
echo --- Starting the build
|
|
|
|
echo.
|
2015-12-04 07:08:22 -05:00
|
|
|
mingw32-make -f makefile.gcc setup_h BUILD=debug SHARED=0
|
|
|
|
mingw32-make -j3 -f makefile.gcc BUILD=debug SHARED=0
|
2017-11-22 07:04:12 -05:00
|
|
|
cd ..\..\tests
|
|
|
|
mingw32-make -j3 -f makefile.gcc BUILD=debug SHARED=0
|
2015-11-04 09:30:27 -05:00
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:msys2
|
|
|
|
path C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%path%
|
|
|
|
set CHERE_INVOKING=yes
|
|
|
|
:: Workaround for "configure: Bad file descriptor"
|
|
|
|
perl -i".bak" -pe "s/^test -n \".DJDIR\"/#$&/" configure
|
|
|
|
bash -lc "g++ --version"
|
2017-11-22 07:04:12 -05:00
|
|
|
bash -lc "CXXFLAGS=-Wno-deprecated-declarations ./configure --disable-optimise && make -j3 && make -j3 -C tests"
|
2015-11-04 09:30:27 -05:00
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:cygwin
|
2017-11-03 12:00:25 -04:00
|
|
|
C:\cygwin\setup-x86.exe -qgnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P libjpeg-devel -P libpng-devel -P libtiff-devel -P libexpat-devel
|
2015-11-04 09:30:27 -05:00
|
|
|
path c:\cygwin\bin;%path%
|
|
|
|
set CHERE_INVOKING=yes
|
|
|
|
:: Workaround for "configure: Bad file descriptor"
|
|
|
|
perl -i".bak" -pe "s/^test -n \".DJDIR\"/#$&/" configure
|
|
|
|
bash -lc "g++ --version"
|
2017-11-22 07:04:12 -05:00
|
|
|
bash -lc "LDFLAGS=-L/usr/lib/w32api ./configure --disable-optimise --disable-shared && make -j3 && make -j3 -C tests"
|
2015-11-04 09:30:27 -05:00
|
|
|
goto :eof
|
2016-10-05 04:16:30 -04:00
|
|
|
|
2018-09-25 13:46:21 -04:00
|
|
|
:cmake_qt
|
|
|
|
set SKIPINSTALL=1
|
|
|
|
set QT5DIR="C:\Qt\5.11\msvc2015_64"
|
|
|
|
set CMAKE_CONFIGURE_FLAGS=-DCMAKE_PREFIX_PATH=%QT5DIR% -DwxBUILD_TOOLKIT="qt" -DCMAKE_CXX_STANDARD=11
|
|
|
|
goto cmake
|
|
|
|
|
2016-10-05 04:16:30 -04:00
|
|
|
:cmake
|
|
|
|
echo --- Tools versions:
|
2016-11-03 16:28:26 -04:00
|
|
|
cmake --version
|
|
|
|
|
|
|
|
if "%SHARED%"=="" set SHARED=ON
|
|
|
|
if "%CONFIGURATION%"=="" set CONFIGURATION=Release
|
2018-08-23 15:12:39 -04:00
|
|
|
echo.%GENERATOR% | findstr /C:"Visual Studio">nul && (
|
|
|
|
set CMAKE_LOGGER=%MSBUILD_LOGGER%
|
|
|
|
)
|
2016-11-03 16:28:26 -04:00
|
|
|
|
|
|
|
if "%SKIPTESTS%"=="1" (
|
|
|
|
set BUILD_TESTS=OFF
|
|
|
|
) else (
|
2017-12-10 16:40:23 -05:00
|
|
|
set BUILD_TESTS=ALL
|
2016-11-03 16:28:26 -04:00
|
|
|
)
|
2016-10-05 04:16:30 -04:00
|
|
|
echo.
|
|
|
|
echo --- Generating project files
|
|
|
|
echo.
|
|
|
|
set WX_INSTALL_PATH=%HOMEDRIVE%%HOMEPATH%\wx_install_target
|
|
|
|
mkdir %WX_INSTALL_PATH%
|
2016-11-03 16:28:26 -04:00
|
|
|
mkdir build_cmake
|
|
|
|
pushd build_cmake
|
2019-02-03 13:00:03 -05:00
|
|
|
cmake -G "%GENERATOR%" -DwxBUILD_TESTS=%BUILD_TESTS% -DwxBUILD_SAMPLES=SOME -DCMAKE_INSTALL_PREFIX=%WX_INSTALL_PATH% -DwxBUILD_SHARED=%SHARED% %CMAKE_CONFIGURE_FLAGS% ..
|
2016-11-03 16:28:26 -04:00
|
|
|
if ERRORLEVEL 1 goto error
|
2016-10-05 04:16:30 -04:00
|
|
|
echo.
|
|
|
|
echo --- Starting the build
|
|
|
|
echo.
|
2018-08-23 15:12:39 -04:00
|
|
|
cmake --build . --config %CONFIGURATION% -- %CMAKE_NATIVE_FLAGS% %CMAKE_LOGGER%
|
2016-11-03 16:28:26 -04:00
|
|
|
if ERRORLEVEL 1 goto error
|
2016-10-05 04:16:30 -04:00
|
|
|
|
2016-11-03 16:28:26 -04:00
|
|
|
:: Package binaries as artifact
|
|
|
|
where 7z
|
|
|
|
if ERRORLEVEL 1 goto cmake_test
|
|
|
|
7z a -r wxWidgets_Binaries.zip lib/*.*
|
|
|
|
appveyor PushArtifact wxWidgets_Binaries.zip
|
|
|
|
|
|
|
|
:cmake_test
|
|
|
|
if NOT "%SKIPINSTALL%"=="1" (
|
|
|
|
echo.
|
|
|
|
echo --- Installing
|
|
|
|
echo.
|
2018-08-23 15:12:39 -04:00
|
|
|
cmake --build . --config %CONFIGURATION% --target install -- %CMAKE_LOGGER%
|
2016-11-03 16:28:26 -04:00
|
|
|
if ERRORLEVEL 1 goto error
|
|
|
|
popd
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo --- Test installed library
|
|
|
|
echo.
|
|
|
|
set WXWIN=%WX_INSTALL_PATH%
|
|
|
|
mkdir build_cmake_install_test
|
|
|
|
pushd build_cmake_install_test
|
|
|
|
echo --- Configure minimal sample
|
|
|
|
cmake -G "%GENERATOR%" ..\samples\minimal
|
|
|
|
if ERRORLEVEL 1 goto error
|
|
|
|
echo --- Building minimal sample with installed library
|
2018-08-23 15:12:39 -04:00
|
|
|
cmake --build . --config %CONFIGURATION% -- %CMAKE_LOGGER%
|
2016-11-03 16:28:26 -04:00
|
|
|
if ERRORLEVEL 1 goto error
|
|
|
|
)
|
2016-10-05 04:16:30 -04:00
|
|
|
popd
|
|
|
|
|
|
|
|
goto :eof
|
2016-11-03 16:28:26 -04:00
|
|
|
|
|
|
|
:error
|
|
|
|
echo.
|
|
|
|
echo --- Build failed !
|
|
|
|
echo.
|