-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathappveyor.yml
129 lines (101 loc) · 10.2 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
os: Visual Studio 2019
clone_depth: 1
install:
- cmd: C:\msys64\usr\bin\bash -lc "pacman -Syu --noconfirm"
# Install dependencies
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy mingw-w64-i686-boost mingw-w64-i686-python3 mingw-w64-i686-libzip mingw-w64-i686-icu"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy mingw-w64-x86_64-boost mingw-w64-x86_64-python3 mingw-w64-x86_64-libzip mingw-w64-x86_64-icu"
# 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
# Download dpinst for Driver installing from swdownloads
- appveyor DownloadFile http://swdownloads.analog.com/cse/m1k/drivers/dpinst.zip -FileName C:\dpinst.zip
- 7z x -y "c:\dpinst.zip" -o"c:\dpinst" > nul
# 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"
- git clone https://github.com/analogdevicesinc/libsmu.git C:\projects\libsmu
- if not exist "c:\projects\pixelpulse2\distrib\drivers" mkdir c:\projects\pixelpulse2\distrib\drivers
- copy C:\projects\libsmu\dist\m1k-winusb.inf c:\projects\pixelpulse2\distrib\drivers
- copy C:\projects\libsmu\dist\m1k-winusb.cat c:\projects\pixelpulse2\distrib\drivers
- if not exist "c:\projects\pixelpulse2\distrib\drivers\x86" mkdir c:\projects\pixelpulse2\distrib\drivers\x86
- copy C:\projects\libsmu\dist\x86\* c:\projects\pixelpulse2\distrib\drivers\x86
- copy C:\dpinst\dpinst.exe c:\projects\pixelpulse2\distrib
- if not exist "c:\projects\pixelpulse2\distrib\drivers\amd64" mkdir c:\projects\pixelpulse2\distrib\drivers\amd64
- copy C:\projects\libsmu\dist\amd64\* c:\projects\pixelpulse2\distrib\drivers\amd64
- copy C:\dpinst\dpinst_amd64.exe c:\projects\pixelpulse2\distrib
- 'appveyor DownloadFile "https://ci.appveyor.com/api/projects/analogdevicesinc/pixelpulse2-trayer/artifacts/distrib.zip?branch=master" -FileName c:\distrib.zip'
- 7z x -y "c:\distrib.zip" -o"c:\" > nul
build_script:
# build 32-bit MinGW
#clone and build libsmu with mingw
- set PATH=C:\msys64\mingw32\bin;%PATH%
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U https://repo.msys2.org/mingw/i686/mingw-w64-i686-libusb-1.0.23-1-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U https://repo.msys2.org/mingw/i686/mingw-w64-i686-qt5-5.15.2-5-any.pkg.tar.zst"
# Hack: Qt5Qml CMake script throws errors when loading its plugins. So let's just drop those plugins.
- rm -f /mingw32/lib/cmake/Qt5Qml/*Factory.cmake
- mkdir c:\projects\libsmu\mingw-32
- C:\msys64\usr\bin\bash -lc "cd C:/projects/libsmu/mingw-32 && cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX=/mingw32 -DCMAKE_C_COMPILER:FILEPATH=/mingw32/bin/i686-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=/mingw32/bin/i686-w64-mingw32-g++.exe -DLIBUSB_LIBRARIES=C:/msys64/mingw32/lib/libusb-1.0.dll.a -DLIBUSB_INCLUDE_DIRS=C:/msys64/mingw32/include/libusb-1.0 -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DBUILD_PYTHON=OFF .. && cmake --build . && cmake --build . --target install"
- set RC_COMPILER="-DCMAKE_RC_COMPILER=/c/windres.exe"
- C:\msys64\usr\bin\bash -lc "/mingw32/bin/python3.exe --version"
- C:\msys64\usr\bin\bash -lc "/c/msys64/mingw32/bin/python3.exe --version"
- C:\msys64\usr\bin\bash -lc "mkdir /c/projects/build_32 ; cd /c/projects/build_32 ; cmake -G 'Unix Makefiles' %RC_COMPILER% -DCMAKE_BUILD_TYPE=RelWithDebInfo -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 -DPYTHON_EXECUTABLE=/mingw32/bin/python3.exe -DLIBUSB_LIBRARIES=C:/msys64/mingw32/lib/libusb-1.0.dll.a -DLIBUSB_INCLUDE_DIRS=C:/msys64/mingw32/include/libusb-1.0 -DLIBSMU_LIBRARIES=C:/msys64/mingw32/lib/libsmu.dll.a -DLIBSMU_INCLUDE_DIRS=C:/msys64/mingw32/include /c/projects/pixelpulse2"
- C:\msys64\usr\bin\bash -lc "cd /c/projects/build_32/ && sed -i 's/^\(FILEVERSION .*\)$/\1,0,"{build}"/' properties.rc
- C:\msys64\usr\bin\bash -lc "cd /c/projects/build_32 && make -j3"
# Copy the dependencies
- mkdir c:\pixelpulse_32
- mkdir c:\pixelpulse_32\pp2trayer
- copy c:\projects\build_32\pixelpulse2.exe c:\pixelpulse_32\
- if not exist "c:\pixelpulse_32\drivers" mkdir c:\pixelpulse_32\drivers
- copy C:\projects\libsmu\dist\m1k-winusb.inf c:\pixelpulse_32\drivers
- copy C:\projects\libsmu\dist\m1k-winusb.cat c:\pixelpulse_32\drivers
- if not exist "c:\pixelpulse_32\drivers\x86" mkdir c:\pixelpulse_32\drivers\x86
- copy C:\projects\libsmu\dist\x86\* c:\pixelpulse_32\drivers\x86
- copy C:\dpinst\dpinst.exe C:\pixelpulse_32\drivers
- C:\msys64\usr\bin\bash -lc "cp -r /c/distrib/* /c/pixelpulse_32/pp2trayer"
- 'appveyor DownloadFile "https://ci.appveyor.com/api/projects/analogdevicesinc/pixelpulse2-trayer/artifacts/pp2trayer.exe?branch=master" -FileName c:\pixelpulse_32\pp2trayer\pp2trayer.exe'
- c:\msys64\mingw32\bin\windeployqt.exe --dir c:\pixelpulse_32 --no-system-d3d-compiler --no-compiler-runtime --opengl --qmldir c:\projects\pixelpulse2\qml --qmlimport c:\projects\pixelpulse2\qml c:\projects\build_32\pixelpulse2.exe
- C:\msys64\usr\bin\bash -lc "cd /mingw32/bin ; cp -r libffi*.dll libbrotli*.dll libbz2*.dll libgobject-2.*.dll libfreetype-*.dll libgraphite*.dll libpng16-*.dll libharfbuzz*.dll libicu*.dll libiconv*.dll zlib*.dll libsmu*.dll libwinpthread-*.dll libgcc_*.dll libstdc++-*.dll libboost_{system,filesystem,atomic,program_options,regex,thread}-*.dll libglib-*.dll libintl-*.dll libusb-*.dll libzstd*.dll libgomp*.dll libdouble-conversion*.dll libpcre*.dll Qt5Core.dll Qt5Gui.dll Qt5Svg.dll Qt5Widgets.dll /c/pixelpulse_32/"
- 7z a "c:\pixelpulse-32bit.zip" c:\pixelpulse_32
- appveyor PushArtifact c:\pixelpulse-32bit.zip
# build 64-bit MinGW
#clone and build libsmu with mingw
- set PATH=C:\msys64\mingw64\bin;%PATH%
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libusb-1.0.23-1-any.pkg.tar.xz"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-qt5-5.15.2-5-any.pkg.tar.zst"
# Hack: Qt5Qml CMake script throws errors when loading its plugins. So let's just drop those plugins.
- rm -f /mingw64/lib/cmake/Qt5Qml/*Factory.cmake
- mkdir c:\projects\libsmu\mingw-64
- C:\msys64\usr\bin\bash -lc "cd C:/projects/libsmu/mingw-64 && cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX=/mingw64 -DCMAKE_C_COMPILER:FILEPATH=/mingw64/bin/x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=/mingw64/bin/x86_64-w64-mingw32-g++.exe -DLIBUSB_LIBRARIES=C:/msys64/mingw64/lib/libusb-1.0.dll.a -DLIBUSB_INCLUDE_DIRS=C:/msys64/mingw64/include/libusb-1.0 -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DBUILD_PYTHON=OFF .. && cmake --build . && cmake --build . --target install"
- copy C:\msys64\mingw64\bin\windres.exe C:\msys64\mingw64\bin\x86_64-w64-mingw32-windres.exe
- C:\msys64\usr\bin\bash -lc "/mingw64/bin/python3.exe --version"
- C:\msys64\usr\bin\bash -lc "/c/msys64/mingw64/bin/python3.exe --version"
- C:\msys64\usr\bin\bash -lc "mkdir /c/projects/build_64 ; cd /c/projects/build_64 ; cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo -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 -DPYTHON_EXECUTABLE=/mingw64/bin/python3.exe -DLIBUSB_LIBRARIES=C:/msys64/mingw64/lib/libusb-1.0.dll.a -DLIBUSB_INCLUDE_DIRS=C:/msys64/mingw64/include/libusb-1.0 -DLIBSMU_LIBRARIES=C:/msys64/mingw64/lib/libsmu.dll.a -DLIBSMU_INCLUDE_DIRS=C:/msys64/mingw64/include /c/projects/pixelpulse2"
- C:\msys64\usr\bin\bash -lc "cd /c/projects/build_64/ && sed -i 's/^\(FILEVERSION .*\)$/\1,0,"{build}"/' properties.rc
- C:\msys64\usr\bin\bash -lc "cd /c/projects/build_64 && make -j3"
# Copy the dependencies
- mkdir c:\pixelpulse_64
- mkdir c:\pixelpulse_64\pp2trayer
- copy c:\projects\build_64\pixelpulse2.exe c:\pixelpulse_64\
- if not exist "c:\pixelpulse_64\drivers" mkdir c:\pixelpulse_64\drivers
- copy C:\projects\libsmu\dist\m1k-winusb.inf c:\pixelpulse_64\drivers
- copy C:\projects\libsmu\dist\m1k-winusb.cat c:\pixelpulse_64\drivers
- if not exist "c:\pixelpulse_64\drivers\amd64" mkdir c:\pixelpulse_64\drivers\amd64
- copy C:\projects\libsmu\dist\amd64\* c:\pixelpulse_64\drivers\amd64
- copy C:\dpinst\dpinst_amd64.exe C:\pixelpulse_64\drivers
- C:\msys64\usr\bin\bash -lc "cp -r /c/distrib/* /c/pixelpulse_64/pp2trayer"
- 'appveyor DownloadFile "https://ci.appveyor.com/api/projects/analogdevicesinc/pixelpulse2-trayer/artifacts/pp2trayer.exe?branch=master" -FileName c:\pixelpulse_64\pp2trayer\pp2trayer.exe'
- c:\msys64\mingw64\bin\windeployqt.exe --dir c:\pixelpulse_64 --no-system-d3d-compiler --no-compiler-runtime --opengl --qmldir c:\projects\pixelpulse2\qml --qmlimport c:\projects\pixelpulse2\qml c:\projects\build_64\pixelpulse2.exe
- C:\msys64\usr\bin\bash -lc "cd /mingw64/bin ; cp -r libffi*.dll libbrotli*.dll libbz2*.dll libgobject-2.*.dll libfreetype-*.dll libgraphite*.dll libpng16-*.dll libharfbuzz*.dll libicu*.dll libiconv*.dll zlib*.dll libsmu*.dll libwinpthread-*.dll libgcc_*.dll libstdc++-*.dll libboost_{system,filesystem,atomic,program_options,regex,thread}-*.dll libglib-*.dll libintl-*.dll libusb-*.dll libzstd*.dll libgomp*.dll libdouble-conversion*.dll libpcre*.dll /c/pixelpulse_64/"
- C:\msys64\usr\bin\bash -lc "cd /mingw64/bin ; cp -r Qt5Core.dll Qt5Gui.dll Qt5Svg.dll Qt5Widgets.dll /c/pixelpulse_64/"
- 7z a "c:\pixelpulse-64bit.zip" c:\pixelpulse_64
- appveyor PushArtifact c:\pixelpulse-64bit.zip
# Install Inno Setup
- choco install InnoSetup
# Build the installer
- cd "c:\projects\build_64\"
- set PATH=%PATH%;"C:\Program Files (x86)\Inno Setup 5"
- ISCC /Q pixelpulse2.iss
- ps: appveyor PushArtifact c:\Pixelpulse2_win_setup.exe