forked from analogdevicesinc/scopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
91 lines (70 loc) · 7.87 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
clone_depth: 1
#init:
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
# Remove dependencies that prevent us from upgrading to GCC 6.2
- C:\msys64\usr\bin\bash -lc "pacman -Rs --noconfirm mingw-w64-i686-gcc-ada mingw-w64-i686-gcc-fortran mingw-w64-i686-gcc-libgfortran mingw-w64-i686-gcc-objc"
- C:\msys64\usr\bin\bash -lc "pacman -Rs --noconfirm mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-gcc-libgfortran mingw-w64-x86_64-gcc-objc"
# Remove existing file that causes GCC install to fail
- C:\msys64\usr\bin\bash -lc "rm /mingw32/etc/gdbinit /mingw64/etc/gdbinit"
# Install an older version of icu library
- C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm http://repo.msys2.org/mingw/i686/mingw-w64-i686-icu-58.2-3-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm http://repo.msys2.org/mingw/i686/mingw-w64-i686-icu-debug-libs-58.2-3-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-icu-58.2-3-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-icu-debug-libs-58.2-3-any.pkg.tar.xz"
# Update to GCC 6.2 and install dependencies
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy mingw-w64-i686-gcc mingw-w64-i686-libusb mingw-w64-i686-boost mingw-w64-i686-python3 mingw-w64-i686-fftw mingw-w64-i686-libzip mingw-w64-i686-glibmm mingw-w64-i686-matio"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy mingw-w64-x86_64-gcc mingw-w64-x86_64-libusb mingw-w64-x86_64-boost mingw-w64-x86_64-python3 mingw-w64-x86_64-fftw mingw-w64-x86_64-libzip mingw-w64-x86_64-glibmm mingw-w64-x86_64-matio"
# Install an older version of Qt due to uic.exe issues
- C:\msys64\usr\bin\bash -lc "wget -q http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-qt5-5.9.1-1-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm mingw-w64-x86_64-qt5-5.9.1-1-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "wget -q http://repo.msys2.org/mingw/i686/mingw-w64-i686-qt5-5.9.1-1-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm mingw-w64-i686-qt5-5.9.1-1-any.pkg.tar.xz"
# Install 32-bit pre-compiled libraries
- 'appveyor DownloadFile "https://ci.appveyor.com/api/projects/analogdevicesinc/scopy-mingw-build-deps/artifacts/scopy-mingw32-build-deps.tar.xz?branch=master&job=Environment: MINGW_VERSION=mingw32, ARCH=i686" -FileName C:\scopy-mingw32-build-deps.tar.xz'
- C:\msys64\usr\bin\bash -lc "cd /c ; tar xJf scopy-mingw32-build-deps.tar.xz"
# Install 64-bit pre-compiled libraries
- 'appveyor DownloadFile "https://ci.appveyor.com/api/projects/analogdevicesinc/scopy-mingw-build-deps/artifacts/scopy-mingw64-build-deps.tar.xz?branch=master&job=Environment: MINGW_VERSION=mingw64, ARCH=x86_64" -FileName C:\scopy-mingw64-build-deps.tar.xz'
- C:\msys64\usr\bin\bash -lc "cd /c ; tar xJf scopy-mingw64-build-deps.tar.xz"
# Download a 32-bit version of windres.exe
- appveyor DownloadFile http://swdownloads.analog.com/cse/build/windres.exe.gz -FileName C:\windres.exe.gz
- C:\msys64\usr\bin\bash -lc "cd /c ; gunzip windres.exe.gz"
# Hack: Qt5Qml CMake script throws errors when loading its plugins. So let's just drop those plugins.
- C:\msys64\usr\bin\bash -lc "rm -f /mingw32/lib/cmake/Qt5Qml/*Factory.cmake"
- C:\msys64\usr\bin\bash -lc "rm -f /mingw64/lib/cmake/Qt5Qml/*Factory.cmake"
# Install Inno Setup
- choco install InnoSetup
build_script:
- set OLD_PATH=%PATH%
- set PATH=C:\msys64\mingw64\bin;%PATH%
- C:\msys64\usr\bin\bash -lc "mkdir /c/build_64 ; cd /c/build_64 ; cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DGIT_EXECUTABLE=/c/Program\\ Files/Git/cmd/git.exe -DPKG_CONFIG_EXECUTABLE=/mingw64/bin/pkg-config.exe -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++.exe /c/projects/scopy"
- C:\msys64\usr\bin\bash -lc "cd /c/build_64/resources && sed -i 's/^\(FILEVERSION .*\)$/\1,0,"{build}"/' properties.rc"
- C:\msys64\usr\bin\bash -lc "cd /c/build_64 && make -j3"
# Copy the dependencies
- mkdir c:\scopy_64
- copy c:\build_64\Scopy.exe c:\scopy_64\
- c:\msys64\mingw64\bin\windeployqt.exe --dir c:\scopy_64 --release --no-system-d3d-compiler --no-compiler-runtime --no-quick-import --opengl --printsupport c:\build_64\Scopy.exe
- C:\msys64\usr\bin\bash -lc "cp -r /c/projects/scopy/resources/decoders /c/scopy_64/"
- C:\msys64\usr\bin\bash -lc "tar -C /c/scopy_64 --strip-components=3 -xJf /c/scopy-mingw64-build-deps.tar.xz msys64/mingw64/bin"
- C:\msys64\usr\bin\bash -lc "cd /mingw64/bin ; cp -r libmatio-*.dll libhdf5-*.dll libszip*.dll libwinpthread-*.dll libgcc_*.dll libstdc++-*.dll libboost_{system,filesystem,atomic,program_options,regex,thread}-*.dll libglib-*.dll libintl-*.dll libiconv-*.dll libpcre-*.dll libpcre16-*.dll libglibmm-2.*.dll libgmodule-2.*.dll libgobject-2.*.dll libffi-*.dll libsigc-2.*.dll libfftw3f-*.dll libicu{in,uc,dt}[!d]*.dll zlib*.dll libharfbuzz-*.dll libfreetype-*.dll libbz2-*.dll libpng16-*.dll libgraphite2.dll libjpeg-*.dll libsqlite3-*.dll libwebp-*.dll libxml2-*.dll liblzma-*.dll libxslt-*.dll libzip*.dll libpython3.*.dll libeay32.dll libgnutls*.dll libnettle*.dll libhogweed*.dll libgmp*.dll libidn*.dll libp11*.dll libtasn*.dll libunistring*.dll ssleay32.dll libusb-*.dll /mingw64/lib/python3.* /c/scopy_64/"
- 7z a "c:\scopy-64bit.zip" c:\scopy_64
- appveyor PushArtifact c:\scopy-64bit.zip
- set PATH=C:\msys64\mingw32\bin;%OLD_PATH%
- C:\msys64\usr\bin\bash -lc "mkdir /c/build_32 ; cd /c/build_32 ; cmake -G 'Unix Makefiles' -DCMAKE_RC_COMPILER=/c/windres.exe -DCMAKE_BUILD_TYPE=Release -DGIT_EXECUTABLE=/c/Program\\ Files/Git/cmd/git.exe -DPKG_CONFIG_EXECUTABLE=/mingw32/bin/pkg-config.exe -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++.exe /c/projects/scopy"
- C:\msys64\usr\bin\bash -lc "cd /c/build_32/resources && sed -i 's/^\(FILEVERSION .*\)$/\1,0,"{build}"/' properties.rc"
- C:\msys64\usr\bin\bash -lc "cd /c/build_32 && make -j3"
# Copy the dependencies
- mkdir c:\scopy_32
- copy c:\build_32\Scopy.exe c:\scopy_32\
- c:\msys64\mingw32\bin\windeployqt.exe --dir c:\scopy_32 --release --no-system-d3d-compiler --no-compiler-runtime --no-quick-import --opengl --printsupport c:\build_32\Scopy.exe
- C:\msys64\usr\bin\bash -lc "cp -r /c/projects/scopy/resources/decoders /c/scopy_32/"
- C:\msys64\usr\bin\bash -lc "tar -C /c/scopy_32 --strip-components=3 -xJf /c/scopy-mingw32-build-deps.tar.xz msys64/mingw32/bin"
- C:\msys64\usr\bin\bash -lc "cd /mingw32/bin ; cp -r libmatio-*.dll libhdf5-*.dll libszip*.dll libwinpthread-*.dll libgcc_*.dll libstdc++-*.dll libboost_{system,filesystem,atomic,program_options,regex,thread}-*.dll libglib-*.dll libintl-*.dll libiconv-*.dll libpcre-*.dll libpcre16-*.dll libglibmm-2.*.dll libgmodule-2.*.dll libgobject-2.*.dll libffi-*.dll libsigc-2.*.dll libfftw3f-*.dll libicu{in,uc,dt}[!d]*.dll zlib*.dll libharfbuzz-*.dll libfreetype-*.dll libbz2-*.dll libpng16-*.dll libgraphite2.dll libjpeg-*.dll libsqlite3-*.dll libwebp-*.dll libxml2-*.dll liblzma-*.dll libxslt-*.dll libzip*.dll libpython3.*.dll libeay32.dll libgnutls*.dll libnettle*.dll libhogweed*.dll libgmp*.dll libidn*.dll libp11*.dll libtasn*.dll libunistring*.dll ssleay32.dll libusb-*.dll /mingw32/lib/python3.* /c/scopy_32/"
- 7z a "c:\scopy-32bit.zip" c:\scopy_32
- appveyor PushArtifact c:\scopy-32bit.zip
# Build the installer
- set PATH=%PATH%;"C:\Program Files (x86)\Inno Setup 5"
- ISCC /Q C:\build_32\scopy.iss
- appveyor PushArtifact C:\scopy-setup.exe
#on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))