Skip to content

Commit

Permalink
ci: add mingw, msbuild and debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Oct 7, 2015
1 parent 38d736e commit b3ae2cf
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 56 deletions.
87 changes: 31 additions & 56 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,55 @@ branches:
environment:

matrix:
- arch: x64
cc: VS2013
qt: 5.5.0
suffix: -debug
mode: debug
QTDIR: C:\Qt\5.5\msvc2013_64

- arch: x86
cc: VS2013
qt: 5.5.0
suffix: -xp
mode: release
QTDIR: C:\projects\QtAV\build\Qt

- arch: 32
cc: MinGW
qt: 5.5.0
suffix: GCC492-dwarf
mode: release
QTDIR: C:\Qt\5.5\mingw492_32

# - arch: 32
# cc: MinGW
# qt: 5.4.0
# suffix: GCC492-dwarf
matrix:
fast_finish: false

init:
- if not %cc%==MinGW call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %arch%
- C:\MinGW\bin\g++ --version
- echo %NUMBER_OF_PROCESSORS% cores
- echo %PROCESSOR_IDENTIFIER%
- set vcarch=%arch%
- if "%arch%" == "x64" set vcarch=amd64
- if not %cc%==MinGW call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %vcarch%
- C:\Qt\Tools\mingw492_32\bin\g++ --version
- echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%
- echo PROCESSOR_IDENTIFIER=%PROCESSOR_IDENTIFIER%
- echo QTDIR=%QTDIR%

install:
- git submodule update --init
- mkdir build
- cd build
- ps: $qt_url = 'http://sourceforge.net/projects/buildqt/files/release/' + $env:qt + '/Qt' + $env:qt + '-' + $env:cc + $env:arch + $env:suffix + '.7z/download'
- ps: Start-FileDownload $qt_url qt.7z
- ps: Start-FileDownload http://sourceforge.net/projects/qtav/files/depends/QtAV-depends-windows-x86%2Bx64-20150706.7z/download av.7z
- 7z x qt.7z > NUL
- 7z x av.7z > NUL
- move Qt%qt%-* Qt #Qt%qt%-%cc%%arch%%suffix% Qt
- move QtAV-depends* AV
- xcopy /syi AV\include Qt\include > NUL
- xcopy /syi AV\lib Qt\lib > NUL
- copy /y AV\bin\*.dll Qt\bin > NUL
- ..\tools\ci\win\install_dep.bat

before_build:
- set PATH=%CD%\Qt\bin;%PATH%
- if %cc%==MinGW set PATH=%CD%\MinGW\bin;C:\MinGW\bin;%PATH%
- set PATH=%QTDIR%\bin;%PATH%
- if %cc%==MinGW set PATH=C:\Qt\Tools\mingw492_32\bin;%PATH%
- echo PATH=%PATH%

build_script:
- qmake ..
- if not %cc%==MinGW (nmake) else (mingw32-make -j%NUMBER_OF_PROCESSORS%)
- ..\tools\ci\win\build.bat

after_build:
- copy /y Qt\bin\av*.dll bin
- copy /y Qt\bin\sw*.dll bin
- if exist Qt\bin\po*.dll copy /y Qt\bin\po*.dll bin
- if exist Qt\bin\msvc*.dll copy /y Qt\bin\msvc*.dll bin
- if exist Qt\bin\OpenAL32*.dll copy /y Qt\bin\OpenAL32*.dll bin
- if exist Qt\bin\OpenAL32-%cc%.dll copy /y Qt\bin\OpenAL32-%cc%.dll bin\OpenAL32.dll
- if exist Qt\bin\D3DCompiler_*.dll copy /y Qt\bin\D3DCompiler_*.dll bin
- if exist Qt\bin\lib*.dll copy /y Qt\bin\lib*.dll bin # libEGL, GLESv2, gcc_s_dw2-1, stdc++-6, winpthread-1
- echo [Paths] > bin\qt.conf
- echo Prefix=. >> bin\qt.conf
- copy /y Qt\bin\Qt*Core*.dll bin
- copy /y Qt\bin\Qt*Gui*.dll bin
- copy /y Qt\bin\Qt*OpenGL*.dll bin
- copy /y Qt\bin\Qt*Svg*.dll bin
- if exist Qt\bin\Qt*Widgets.dll copy /y Qt\bin\Qt*Widgets.dll bin
- if exist Qt\bin\Qt5Network.dll copy /y Qt\bin\Qt5Network.dll bin
- if exist Qt\bin\Qt*Qml.dll copy /y Qt\bin\Qt*Qml.dll bin
- if exist Qt\bin\Qt*Quick.dll copy /y Qt\bin\Qt*Quick.dll bin
- if exist Qt\qml\Qt xcopy /syi Qt\qml\Qt bin\qml\Qt > NUL
- if exist Qt\qml\QtQml xcopy /syi Qt\qml\QtQml bin\qml\QtQml > NUL
- if exist Qt\qml\QtQuick xcopy /syi Qt\qml\QtQuick bin\qml\QtQuick > NUL
- if exist Qt\qml\QtQuick.2 xcopy /syi Qt\qml\QtQuick.2 bin\qml\QtQuick.2 > NUL
- if exist Qt\plugins\platforms xcopy /syi Qt\plugins\platforms bin\plugins\platforms > NUL
- if exist Qt\plugins\imageformats xcopy /syi Qt\plugins\imageformats bin\plugins\imageformats > NUL
- if exist Qt\plugins\iconengines xcopy /syi Qt\plugins\iconengines bin\plugins\iconengines > NUL
- xcopy /syi tools\install_sdk\mkspecs mkspecs
- copy /y ..\qtc_packaging\ifw\packages\com.qtav.product.dev\data\sdk_deploy.bat .
- copy /y ..\qtc_packaging\ifw\packages\com.qtav.product.player\data\*.bat .
- xcopy /syi ..\src\QtAV include\QtAV
- xcopy /syi ..\widgets\QtAVWidgets include\QtAVWidgets
- move lib_* lib_
- if exist lib_\*AV*.lib xcopy /syi lib_\*AV*.lib lib
- if exist lib_\*AV*.a xcopy /syi lib_\*AV*.a lib
- 7z a %APPVEYOR_BUILD_FOLDER%\QtAV-Qt%qt%-%cc%%arch%-%APPVEYOR_REPO_COMMIT:~0,7%.7z bin lib include mkspecs sdk_deploy.bat install.bat uninstall.bat > NUL
- ..\tools\ci\win\deploy_win.bat

test: off

Expand Down
13 changes: 13 additions & 0 deletions tools/ci/win/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
echo cc=%cc%
if "%cc%" == "MinGW" (
qmake %APPVEYOR_BUILD_FOLDER%
mingw32-make -j%NUMBER_OF_PROCESSORS%
) else (
if "%mode%" == "debug" (
qmake %APPVEYOR_BUILD_FOLDER% -r -tp vc "CONFIG+=debug"
msbuild /m /p:Configuration=DEBUG
) else (
qmake %APPVEYOR_BUILD_FOLDER%
nmake
)
)
57 changes: 57 additions & 0 deletions tools/ci/win/deploy_win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
:: TODO: use windeployqt

copy /y %QTDIR%\bin\av*.dll bin
copy /y %QTDIR%\bin\sw*.dll bin
if exist %QTDIR%\bin\po*.dll copy /y %QTDIR%\bin\po*.dll bin
if exist %QTDIR%\bin\msvc*.dll copy /y %QTDIR%\bin\msvc*.dll bin
if exist %QTDIR%\bin\OpenAL32*.dll copy /y %QTDIR%\bin\OpenAL32*.dll bin
if exist %QTDIR%\bin\OpenAL32-%cc%.dll copy /y %QTDIR%\bin\OpenAL32-%cc%.dll bin\OpenAL32.dll
if exist %QTDIR%\bin\D3DCompiler_*.dll copy /y %QTDIR%\bin\D3DCompiler_*.dll bin
if exist %QTDIR%\bin\lib*.dll copy /y %QTDIR%\bin\lib*.dll bin # libEGL, GLESv2, gcc_s_dw2-1, stdc++-6, winpthread-1
if exist %QTDIR%\bin\icu*.dll xcopy /syi %QTDIR%\bin\icu*.dll bin
echo [Paths] > bin\qt.conf
echo Prefix=. >> bin\qt.conf

if exist %QTDIR%\qml\QtQuick.2 xcopy /syi %QTDIR%\qml\QtQuick.2 bin\qml\QtQuick.2 > NUL
if exist %QTDIR%\plugins\platforms xcopy /syi %QTDIR%\plugins\platforms bin\plugins\platforms > NUL
if exist %QTDIR%\plugins\imageformats xcopy /syi %QTDIR%\plugins\imageformats bin\plugins\imageformats > NUL
if exist %QTDIR%\plugins\iconengines xcopy /syi %QTDIR%\plugins\iconengines bin\plugins\iconengines > NUL
if exist %QTDIR%\qml\Qt xcopy /syi %QTDIR%\qml\Qt bin\qml\Qt > NUL
if exist %QTDIR%\qml\QtQml xcopy /syi %QTDIR%\qml\QtQml bin\qml\QtQml > NUL
if exist %QTDIR%\qml\QtQuick xcopy /syi %QTDIR%\qml\QtQuick bin\qml\QtQuick > NUL
if "%mode%" == "debug" (
if exist %QTDIR%\bin\Qt5Cored.dll copy /y %QTDIR%\bin\Qt5Cored.dll bin
if exist %QTDIR%\bin\Qt5Guid.dll copy /y %QTDIR%\bin\Qt5Guid.dll bin
if exist %QTDIR%\bin\Qt5OpenGLd.dll copy /y %QTDIR%\bin\Qt5OpenGLd.dll bin
if exist %QTDIR%\bin\Qt5Svgd.dll copy /y %QTDIR%\bin\Qt5Svgd.dll bin
if exist %QTDIR%\bin\Qt5Widgetsd.dll copy /y %QTDIR%\bin\Qt5Widgetsd.dll bin
if exist %QTDIR%\bin\Qt5Networkd.dll copy /y %QTDIR%\bin\Qt5Networkd.dll bin
if exist %QTDIR%\bin\Qt5Qmld.dll copy /y %QTDIR%\bin\Qt5Qmld.dll bin
if exist %QTDIR%\bin\Qt5Quickd.dll copy /y %QTDIR%\bin\Qt5Quickd.dll bin
) else (
if exist %QTDIR%\bin\Qt5Core.dll copy /y %QTDIR%\bin\Qt5Core.dll bin
if exist %QTDIR%\bin\Qt5Gui.dll copy /y %QTDIR%\bin\Qt5Gui.dll bin
if exist %QTDIR%\bin\Qt5OpenGL.dll copy /y %QTDIR%\bin\Qt5OpenGL.dll bin
if exist %QTDIR%\bin\Qt5Svg.dll copy /y %QTDIR%\bin\Qt5Svg.dll bin
if exist %QTDIR%\bin\Qt5Widgets.dll copy /y %QTDIR%\bin\Qt5Widgets.dll bin
if exist %QTDIR%\bin\Qt5Network.dll copy /y %QTDIR%\bin\Qt5Network.dll bin
if exist %QTDIR%\bin\Qt5Qml.dll copy /y %QTDIR%\bin\Qt5Qml.dll bin
if exist %QTDIR%\bin\Qt5Quick.dll copy /y %QTDIR%\bin\Qt5Quick.dll bin
echo deleting debug files
if exist bin\lib*GL*d.dll del bin\lib*GL*d.dll
:: delete debug dlls
dir /S /B bin\plugins
if exist bin\qml (
dir /S /B bin\qml
)
)
dir bin
xcopy /syi tools\install_sdk\mkspecs mkspecs
copy /y ..\qtc_packaging\ifw\packages\com.qtav.product.dev\data\sdk_deploy.bat .
copy /y ..\qtc_packaging\ifw\packages\com.qtav.product.player\data\*.bat .
xcopy /syi ..\src\QtAV include\QtAV
xcopy /syi ..\widgets\QtAVWidgets include\QtAVWidgets
move lib_* lib_
if exist lib_\*AV*.lib xcopy /syi lib_\*AV*.lib lib
if exist lib_\*AV*.a xcopy /syi lib_\*AV*.a lib
7z a %APPVEYOR_BUILD_FOLDER%\QtAV-Qt%qt%-%cc%%arch%-%mode%-%APPVEYOR_REPO_COMMIT:~0,7%.7z bin lib include mkspecs sdk_deploy.bat install.bat uninstall.bat > NUL
21 changes: 21 additions & 0 deletions tools/ci/win/install_dep.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if "%QTDIR:~0,6%" == "C:\Qt\" goto getdep

echo downloading qt "http://sourceforge.net/projects/buildqt/files/release/%qt%/Qt%qt%-%cc%%arch%%suffix%.7z/download"
appveyor DownloadFile "http://sourceforge.net/projects/buildqt/files/release/%qt%/Qt%qt%-%cc%%arch%%suffix%.7z/download" -FileName qt.7z
7z x qt.7z > NUL
move Qt%qt%-* %QTDIR%

:getdep
echo downloading qtav dep "http://sourceforge.net/projects/qtav/files/depends/QtAV-depends-windows-x86+x64-20150706.7z/download"
appveyor DownloadFile "http://sourceforge.net/projects/qtav/files/depends/QtAV-depends-windows-x86+x64-20150706.7z/download" -FileName av.7z
7z x av.7z > NUL
move QtAV-depends* AV
xcopy /syi AV\include %QTDIR%\include > NUL
if "%arch%" == "x64" (
xcopy /syi AV\lib\x64 %QTDIR%\lib > NUL
copy /y AV\bin\x64\*.dll %QTDIR%\bin > NUL
) else (
xcopy /syi AV\lib %QTDIR%\lib > NUL
copy /y AV\bin\*.dll %QTDIR%\bin > NUL
)

0 comments on commit b3ae2cf

Please sign in to comment.