From 7dde3a15d4fa2b968bf3259ffc39d1689f138744 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 9 Apr 2017 17:09:22 +0300 Subject: [PATCH] Add appveyor CI --- CMakeLists.txt | 17 ++++++++--------- README.md | 2 +- appveyor.yml | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 appveyor.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index dc917ffb..f38328b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,6 @@ set(CMAKE_C_COMPILER gcc) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_INCLUDE_CURRENT_DIR ON) IF(NOT CMAKE_BUILD_TYPE) @@ -47,13 +46,9 @@ SET(PROJECT_VERSION ${CPACK_PACKAGE_VERSION}) MESSAGE(STATUS "Version: ${PROJECT_VERSION}") -set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} \ - -std=gnu++11 \ - -Wall \ - -Wextra \ - -Werror \ - -pedantic") +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall -Wextra -Werror -pedantic") +endif() set(SRC_FILES src/ChatPage.cc @@ -133,5 +128,9 @@ qt5_wrap_cpp(MOC_HEADERS qt5_add_resources(QRC resources/res.qrc) -add_executable (nheko ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC}) +add_executable (nheko ${OS_BUNDLE} ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC}) target_link_libraries (nheko Qt5::Widgets Qt5::Network) + +if(WIN32) + target_link_libraries(nheko Qt5::WinMain) +endif(WIN32) diff --git a/README.md b/README.md index 1d0299c6..e5d22709 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ nheko ---- -[![Build Status](https://travis-ci.org/mujx/nheko.svg?branch=master)](https://travis-ci.org/mujx/nheko) +[![Build Status](https://travis-ci.org/mujx/nheko.svg?branch=master)](https://travis-ci.org/mujx/nheko) [![Build status](https://ci.appveyor.com/api/projects/status/07qrqbfylsg4hw2h/branch/master?svg=true)](https://ci.appveyor.com/project/mujx/nheko/branch/master) The motivation behind the project is to provide a native desktop app for [Matrix] that feels more like a mainstream chat app ([Riot], Telegram etc) and less like an IRC client. diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..4c2f9b96 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,32 @@ +version: 0.1.0-{build} + +environment: + global: + MSYSTEM: "MINGW64" + +platform: x64 + +configuration: + - Release + +build: + verbosity: minimal + +install: + - set QT_DIR=C:\Qt\5.8\msvc2015_64 + - set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin + +build_script: + - cmake -G "Visual Studio 14 2015 Win64" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release + - cmake --build build + - ls -lh build + +after_build: + - mkdir NhekoRelease + - copy build\Debug\nheko.exe NhekoRelease\nheko.exe + - windeployqt --release NhekoRelease\nheko.exe + - 7z a nheko_win_64.zip .\NhekoRelease\* + +artifacts: + - path: nheko_win_64.zip + - path: NhekoRelease\nheko.exe