forked from analogdevicesinc/Pixelpulse2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
74 lines (64 loc) · 2.96 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
os: Windows Server 2012 R2
platform:
- x86
install:
- ps: (new-object System.Net.WebClient).Downloadfile("http://www.7-zip.org/a/7z1514-x64.exe", "c:\projects\7zip_installer.exe")
- c:\projects\7zip_installer.exe /S /D=c:\projects\7zip_tool
- set PATH=c:\projects\7zip_tool;%PATH%
- ps: |
If (!(Test-Path -Path "c:\msys.zip")) {
(new-object System.Net.WebClient).Downloadfile("https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip", "c:\msys.zip")
}
- 7z x -y "c:\msys.zip" -o"C:\" > nul
- set MINGW_PATH=C:\Qt\Tools\mingw530_32
- set QTDIR=C:\Qt\5.10\mingw53_32
- set PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%MINGW_PATH%\bin;C:\msys\bin\;%QTDIR%\bin;%PATH%
- ps: (new-object System.Net.WebClient).Downloadfile("http://swdownloads.analog.com/cse/build/libusb-1.0-hp.7z", "c:\libusb.7z")
- 7z x -y "c:\libusb.7z" -o"C:\libusb" > nul
- git clone https://github.com/analogdevicesinc/libsmu.git C:\libsmu
- if not exist "c:\projects\pixelpulse2\distrib\driver" mkdir c:\projects\pixelpulse2\distrib\driver
- copy C:\libsmu\dist\m1k-winusb.inf c:\projects\pixelpulse2\distrib\driver
- copy C:\libsmu\dist\\m1k-winusbx86.cat c:\projects\pixelpulse2\distrib\driver
- copy C:\libsmu\dist\m1k-winusbx64.cat c:\projects\pixelpulse2\distrib\driver
- 'appveyor DownloadFile "https://ci.appveyor.com/api/projects/analogdevicesinc/pixelpulse2-trayer/artifacts/pp2trayer.exe?branch=master" -FileName c:\projects\pixelpulse2\distrib\pp2trayer.exe'
# Install Inno Setup
- choco install InnoSetup
build_script:
#clone and build libsmu with mingw
- cd C:\libsmu
- mkdir build
- cd build
- cmake -G "MSYS Makefiles" \
-DLIBUSB_LIBRARIES="C:\\libusb\\MinGW32\\static\\libusb-1.0.a" \
-DLIBUSB_INCLUDE_DIRS="C:\\libusb\\include\\libusb-1.0" \
-DBoost_USE_STATIC_LIBS=ON \
-DBUILD_STATIC_LIB=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
-DBOOST_ROOT="C:\\Libraries\\boost_1_62_0" \
-DBUILD_PYTHON=OFF \
..
- mingw32-make -j8
- cd c:\projects\pixelpulse2
- qmake pixelpulse2.pro "LIBSMU_LIBRARY = C:\libsmu\build\src\libsmu.dll.a" "LIBSMU_INCLUDE_PATH = C:\libsmu\include"
- mingw32-make -j8
# Bundle all dependencies
- ps: |
windeployqt --qmldir qml release\pixelpulse2.exe --dir distrib
cp C:\OpenSSL-Win32\libeay32.dll distrib
cp C:\OpenSSL-Win32\libssl32.dll distrib
cp C:\OpenSSL-Win32\ssleay32.dll distrib
cp C:\OpenSSL-Win32\bin\msvcr120.dll distrib
cp C:\libsmu\build\src\libsmu.dll distrib
cp $Env:MINGW_PATH\bin\libgomp-1.dll distrib
7z a -y distrib.zip distrib
# Build the installer
- set PATH=%PATH%;"C:\Program Files (x86)\Inno Setup 5"
- ISCC /Q pixelpulse2.iss
after_build:
- ps: |
appveyor PushArtifact release\pixelpulse2.exe
appveyor PushArtifact distrib.zip
appveyor PushArtifact C:\Pixelpulse2_win_setup.exe
cache:
- c:\msys.zip -> appveyor.yml