Tries to fix SDL and Qt builds, introduces Emscripten in Travis.

This commit is contained in:
xawotihs
2016-06-19 10:25:22 +02:00
parent e4e809f3fe
commit 0a01b0af69
4 changed files with 18 additions and 1 deletions

View File

@@ -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

View File

@@ -135,6 +135,8 @@ public:
#elif (defined WIN32)
std::string filename;
void* mSample;
#else
void* mSample;
#endif
};

View File

@@ -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;
}

View File

@@ -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