From 0a01b0af6967be4bea0aeffca7ffa831ea4e66f2 Mon Sep 17 00:00:00 2001 From: xawotihs Date: Sun, 19 Jun 2016 10:25:22 +0200 Subject: [PATCH] Tries to fix SDL and Qt builds, introduces Emscripten in Travis. --- .travis.yml | 6 ++++++ JGE/include/JSoundSystem.h | 2 ++ JGE/src/Downloader.cpp | 2 +- tools/travis-script.sh | 9 +++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bbdf06b35..1dfed9d77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,8 @@ matrix: - os: android language: android env: BUILD_TYPE=ANDROID + - os: osx + env: BUILD_TYPE=Emscripten android: components: @@ -69,6 +71,10 @@ before_install: - if [ "$BUILD_TYPE" == "SDL" ]; then export SDL2DIR="$TRAVIS_BUILD_DIR/thirdparty/SDL2"; fi +# Building for Emscripten here + - if [ "$BUILD_TYPE" == "Emscripten" ]; then + brew install emscripten && export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin && emcc; + fi install: - if [ "$TRAVIS_OS_NAME" == "linux" ]; then diff --git a/JGE/include/JSoundSystem.h b/JGE/include/JSoundSystem.h index 3b233ba79..f8d98d197 100644 --- a/JGE/include/JSoundSystem.h +++ b/JGE/include/JSoundSystem.h @@ -135,6 +135,8 @@ public: #elif (defined WIN32) std::string filename; void* mSample; +#else + void* mSample; #endif }; diff --git a/JGE/src/Downloader.cpp b/JGE/src/Downloader.cpp index 61cbdbafa..468072e92 100644 --- a/JGE/src/Downloader.cpp +++ b/JGE/src/Downloader.cpp @@ -139,7 +139,7 @@ void DownloadRequest::fileDownloaded() // let's check some error if(mNetworkReply->error() != QNetworkReply::NoError) { - processError(mNetworkReply->error(), mNetworkReply->errorString().toStdString()); + processError((int)mNetworkReply->error(), mNetworkReply->errorString().toStdString().c_str()); break; } diff --git a/tools/travis-script.sh b/tools/travis-script.sh index 7bbdfedb9..ad009f5fb 100755 --- a/tools/travis-script.sh +++ b/tools/travis-script.sh @@ -51,6 +51,15 @@ if [ "$BUILD_TYPE" = "ANDROID" ]; then cd .. fi +# we're building an Emscripten HTML here +if [ "$BUILD_TYPE" = "Emscripten" ]; then + mkdir build_emscripten + cd build_emscripten + emcmake cmake -DCMAKE_BUILD_TYPE=Release .. + emmake make -j4 + cd .. +fi + # we're building a Qt version with GUI here if [ "$BUILD_TYPE" = "Qt" ]; then mkdir build_qt_widget