forked from ufoaiorg/ufoai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
61 lines (61 loc) · 2.57 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
os:
- Windows Server 2012 R2
# - MinGW
configuration: Release
environment:
NSIS_ROOT: C:\nsis
matrix:
- generator: "mingw"
- generator: "msvc12"
branches:
only:
- master
clone_depth: 10
install:
# download dependencies
- ps: |
$file = "C:\deps.zip"
$urlDeps = "http://sourceforge.net/projects/ufoai/files/UFO_AI%202.x/2.5/ufoai-deps.zip"
Write-Host "Downloading deps"
appveyor DownloadFile $urlDeps -FileName $file
Write-Host "Unzip deps"
7z x -oC:\ $file > $null
Write-Host "Uninstalling previous CMake ..." -ForegroundColor Cyan
"`"${env:ProgramFiles(x86)}\CMake\Uninstall.exe`" /S" | out-file ".\uninstall-cmake.cmd" -Encoding ASCII
& .\uninstall-cmake.cmd
Write-Host "Installing CMake..." -ForegroundColor Cyan
$exePath = "$($env:USERPROFILE)\cmake-3.3.2-win32-x86.exe"
Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('https://cmake.org/files/v3.3/cmake-3.3.2-win32-x86.exe', $exePath)
Write-Host "Installing..."
cmd /c start /wait $exePath /S
cmake --version
Write-Host "CMake installed" -ForegroundColor Green
- set UFOAI_DEPS=C:\ufoai-deps
# For MinGW, we need to overwrite PATH or cmake will complain about sh.exe being present on the PATH
- if "%generator%" == "mingw" (set "PATH=c:\mingw\bin;C:\Program Files (x86)\CMake\bin;C:\ProgramData\chocolatey\bin;C:\Chocolatey\bin")
- echo %PATH%
build_script:
- cmake --version
# UFORADIANT cannot be built with MSVC because we don't have the required GTK libraries. We turn off UFOAI_BUILD_UFORADIANT
- if [%generator%]==[msvc12] cmake -G "Visual Studio 12" -DUFOAI_BUILD_GAME=ON -DUFOAI_BUILD_UFO2MAP=ON -DUFOAI_BUILD_UFODED=ON -DUFOAI_BUILD_UFO=ON -DUFOAI_BUILD_UFOMODEL=ON -DUFOAI_BUILD_UFOSLICER=ON -DUFOAI_BUILD_UFORADIANT=OFF -DUFOAI_BUILD_UFOTESTALL=ON && msbuild ALL_BUILD.vcxproj /verbosity:normal
- if [%generator%]==[mingw] cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DUFOAI_BUILD_GAME=ON -DUFOAI_BUILD_UFO2MAP=ON -DUFOAI_BUILD_UFODED=ON -DUFOAI_BUILD_UFO=ON -DUFOAI_BUILD_UFOMODEL=ON -DUFOAI_BUILD_UFOSLICER=ON -DUFOAI_BUILD_UFORADIANT=ON -DUFOAI_BUILD_UFOTESTALL=ON && mingw32-make
# verbosity: detailed
test_script:
# - ufotestall.exe
- cinst nsis -y -installArgs /D=%NSIS_ROOT%
artifacts:
- path: ufo.exe
name: ufo
- path: ufo2map.exe
name: ufo2map
- path: ufoded.exe
name: ufoded
- path: ufomodel.exe
name: ufomodel
- path: ufoslicer.exe
name: ufoslicer
- path: ufotestall.exe
name: testexe
# - path: contrib/installer/windows/*.exe
# name: NSIS Installer