From 09644b70b48f895cf2d6c0645d3cfaafd80f6cc5 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Fri, 15 Feb 2019 16:20:24 -0800 Subject: [PATCH] testing gtk plugin for qt, updated error_str in loading --- .travis/install.sh | 15 +++++++++++++-- .travis/script.sh | 16 +++++++++++++++- io/loadthread.cpp | 5 ++++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 3983d60dd..52ae8375e 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,16 +1,27 @@ #!/bin/bash if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + brew install ffmpeg qt5 python@2 export PATH="/usr/local/opt/qt/bin:/usr/local/opt/python@2/libexec/bin:$PATH" + elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - if [ "$ARCH" == "x86_64" ]; then sudo apt-get -y install qt59base qt59multimedia libavformat-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev frei0r-plugins-dev frei0r-plugins fuse; fi - if [ "$ARCH" == "i386" ]; then sudo apt-get -y install gcc-multilib g++-multilib qt59base:i386 qt59multimedia:i386 libavformat-dev:i386 libavcodec-dev:i386 libavfilter-dev:i386 libavutil-dev:i386 libswscale-dev:i386 libswresample-dev:i386 frei0r-plugins-dev:i386 frei0r-plugins:i386 pkg-config:i386 libgl1-mesa-dev:i386 fuse:i386; fi + + if [ "$ARCH" == "x86_64" ]; then + sudo apt-get -y install qt59base qt59multimedia libavformat-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev frei0r-plugins-dev frei0r-plugins fuse libgtk2.0-dev + fi + + if [ "$ARCH" == "i386" ]; then + sudo apt-get -y install gcc-multilib g++-multilib qt59base:i386 qt59multimedia:i386 libavformat-dev:i386 libavcodec-dev:i386 libavfilter-dev:i386 libavutil-dev:i386 libswscale-dev:i386 libswresample-dev:i386 frei0r-plugins-dev:i386 frei0r-plugins:i386 pkg-config:i386 libgl1-mesa-dev:i386 fuse:i386 libgtk2.0-dev:i386 + fi source /opt/qt*/bin/qt*-env.sh + elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + #/c/msys64/usr/bin/bash -l -c "pacman -Syu --noconfirm" # install build tools /c/msys64/usr/bin/bash -l -c "pacman -S --noconfirm mingw-w64-x86_64-toolchain mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-qt5" + fi diff --git a/.travis/script.sh b/.travis/script.sh index 46ae8084e..075f5ae5f 100644 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -1,6 +1,7 @@ #!/bin/bash if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + # generate translation files lrelease olive.pro @@ -27,7 +28,17 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then # distribute in zip zip -r Olive-$(git rev-parse --short HEAD)-macOS.zip Olive.app + elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + + # get, compile, and install GTK style plugin + git clone http://code.qt.io/qt/qtstyleplugins.git + cd qtstyleplugins + qmake + make -j$(nproc) + make install + cd - + # generate translation files lrelease olive.pro @@ -55,7 +66,7 @@ elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export VERSION=$(git rev-parse --short HEAD) # use linuxdeployqt to set up dependencies - ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage + ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage -extra-plugins=platformthemes/libqgtk2.so,styles/libqgtk2style.so # 64-bit linuxdeployqt can only generate a 64-bit AppImage # to generate a 32-bit one, we need to download and run 32-bit AppImageTool @@ -65,11 +76,14 @@ elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod a+x appimagetool-i686.AppImage ./appimagetool-i686.AppImage "appdir" -n -g fi + elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + /c/msys64/mingw64/bin/qmake CONFIG+=release /c/msys64/mingw64/bin/mingw32-make -f Makefile.Debug mkdir olive-editor mv olive-editor.exe olive-editor/ /c/msys64/mingw64/bin/windeployqt olive-editor/olive-editor.exe 7z a Olive-$(git rev-parse --short HEAD)-w64p.zip olive-editor + fi diff --git a/io/loadthread.cpp b/io/loadthread.cpp index d8e720cf5..fb663212f 100644 --- a/io/loadthread.cpp +++ b/io/loadthread.cpp @@ -698,7 +698,10 @@ void LoadThread::run() { panel_project->start_preview_generator(loaded_media_items.at(i), true); } } else { - error_str = tr("User aborted loading"); + if (error_str.isEmpty()) { + error_str = tr("User aborted loading"); + } + emit error(); }