From 1e1b20c889a53d24cfc37880bf6e6bba46f2ae78 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Wed, 22 Nov 2017 23:32:08 +0100 Subject: [PATCH 1/2] Add AppVeyor CI for automatic Windows Builds We already have automatic Linux and macOS build via Travis CI. This adds the same for Windows x86 and x86_64 with both Microsoft Visual Studio 2015 as well as MinGW-w64. --- README.md | 1 + appveyor.yml | 65 ++++++++++++++++++++++++++++++++++++++++++++++ src/CMakeLists.txt | 1 + 3 files changed, 67 insertions(+) create mode 100644 appveyor.yml diff --git a/README.md b/README.md index 5b5171aa2..febd8972e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ no fancy interface, no visual helpers, no auto-debugging... just coding in the m pure spartan-programmers way. Are you ready to learn? Jump to [code examples!](http://www.raylib.com/examples.html) [![Build Status](https://travis-ci.org/raysan5/raylib.svg?branch=develop)](https://travis-ci.org/raysan5/raylib) + features -------- diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..36f161c3a --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,65 @@ +#os: Visual Studio 2015 + +clone_depth: 5 + +cache: + - C:\ProgramData\chocolatey\bin -> appveyor.yml + - C:\ProgramData\chocolatey\lib -> appveyor.yml + +init: + - cmake -E remove c:\programdata\chocolatey\bin\cpack.exe + - set PATH=%PATH:C:\Program Files (x86)\Git\usr\bin;=% + - set PATH=%PATH:C:\Program Files\Git\usr\bin;=% + - set PATH=%prefix_dir%\bin;%PATH% + +environment: + matrix: + - compiler: MinGW-w64 + bits: 32 + prefix_dir: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32 + - compiler: MinGW-w64 + bits: 64 + prefix_dir: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64 + - compiler: MSVC15 + bits: 32 + - compiler: MSVC15 + bits: 64 + +before_build: + - appveyor DownloadFile http://openal-soft.org/openal-binaries/openal-soft-1.17.2-bin.zip + - 7z x openal-soft-1.17.2-bin.zip + - move openal-soft-1.17.2-bin src\external\openal + - if [%COMPILER%]==[MinGW-w64] set CFLAGS=-m%BITS% & set LDFLAGS=-m%BITS% & set GENERATOR="MinGW Makefiles" + - if [%COMPILER%]==[MSVC15] if [%BITS%]==[32] set GENERATOR="Visual Studio 14 2015" + - if [%COMPILER%]==[MSVC15] if [%BITS%]==[64] set GENERATOR="Visual Studio 14 2015 Win64" + - set VERBOSE=1 + - mkdir build + - cd build + +build_script: + - cmake -G %GENERATOR% -DBUILD_EXAMPLES=OFF -DBUILD_GAMES=OFF .. + - cmake --build . --target install + +after_build: +# - cmake --build . --target package + +before_test: + +test_script: + +#artifacts: +# - path: 'build\*.zip' +# +#deploy: +# description: 'Automatic build by CI' +# provider: GitHub +# auth_token: +# secure: XXX +# artifact: /.*\.zip/ +# draft: false +# prerelease: false +# force_update: true +# on: +# branch: master +# appveyor_repo_tag: true # deploy on tag push only +# diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f362b52f9..fc1e4ca85 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,6 +21,7 @@ set_property(CACHE OPENGL_VERSION PROPERTY STRINGS "3.3" "2.1" "1.1" "ES 2.0") ### Config options ### include_directories(external/glfw/include) +include_directories(external/openal/include) # For use with AppVeyor on Windows # Translate the config options to what raylib wants if(${PLATFORM} MATCHES "Desktop") From 17c91bad6f4c44c93933190eba5f08b69b257a67 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 23 Nov 2017 07:44:55 +0100 Subject: [PATCH 2/2] Disable CRT "secure" warnings Suppresses 88 of the 213 warnings reported when compiling with MSVC 2015 on AppVeyor. --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc1e4ca85..6ab8e6064 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,8 @@ if(${PLATFORM} MATCHES "Desktop") set(GRAPHICS "GRAPHICS_API_OPENGL_33") set_source_files_properties(rglfw.c PROPERTIES COMPILE_FLAGS "-x objective-c") link_libraries("-framework CoreFoundation -framework Cocoa -framework IOKit -framework CoreVideo") + elseif(WIN32) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() elseif(${PLATFORM} MATCHES "Web") set(PLATFORM "PLATFORM_WEB")