diff --git a/.travis.yml b/.travis.yml index 9b25910..b12f22b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ before_install: - sudo apt-get update install: - - sudo apt-get -y install ccache qt510-meta-minimal qt510quickcontrols python3-setuptools qt510quickcontrols2 qt510svg libgl1-mesa-dev x11proto-xext-dev libx11-dev qt510x11extras qt510graphicaleffects + - sudo apt-get -y install ccache qt510-meta-minimal qt510quickcontrols qt510quickcontrols2 qt510svg qt510x11extras qt510graphicaleffects libgl1-mesa-dev x11proto-xext-dev libx11-dev python3-setuptools - sudo apt-get build-dep mpv - source /opt/qt*/bin/qt*-env.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 45bca62..f6b2ecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,8 @@ if(QML_DEBUG) add_definitions(-DQT_QML_DEBUG) endif() +option(OLD_UBUNTU "old ubuntu" OFF) + find_package(Qt5QuickCompiler) if(Qt5QuickCompiler_FOUND) qtquick_compiler_add_resources(qml_QRC src/qml/qml.qrc) @@ -103,6 +105,12 @@ target_link_libraries(KittehPlayer ${MPV_LIBRARIES} ${X11_LIBRARIES} ${Xext_LIBR include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS} ${Qt5Concurrent_INCLUDE_DIRS}) qt5_use_modules(KittehPlayer Qml Quick Core Gui Widgets X11Extras) +if(OLD_UBUNTU) +install (FILES "${PROJECT_NAME}-Wrapper" DESTINATION bin RENAME "${PROJECT_NAME}") +install (FILES "${PROJECT_NAME}-Wrapper" DESTINATION bin RENAME "${PROJECT_NAME}-bin") + +else() install (TARGETS ${PROJECT_NAME} DESTINATION bin) +endif() install (FILES "${PROJECT_NAME}.desktop" DESTINATION share/applications) install (FILES "${PROJECT_NAME}.png" DESTINATION share/icons/hicolor/256x256/apps) diff --git a/KittehPlayer-Wrapper b/KittehPlayer-Wrapper new file mode 100755 index 0000000..8653aa6 --- /dev/null +++ b/KittehPlayer-Wrapper @@ -0,0 +1,3 @@ +#!/bin/bash +source /opt/qt512/bin/qt512-env.sh +exec KittehPlayer-bin \ No newline at end of file diff --git a/README.md b/README.md index b532e7a..58f2cb8 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,11 @@ A video player based on Qt, QML and libmpv with themes for many online video pla ``` pacman -S git cmake qt5-svg qt5-declarative qt5-quickcontrols qt5-quickcontrols2 qt5-graphicaleffects mpv ``` -##### Ubuntu Xenial -``` -sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial -y +##### Ubuntu Bionic +``` +sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic -y sudo apt update -sudo apt install build-essential git nasm qt511-meta-minimal qt511quickcontrols qt511quickcontrols2 qt511imageformats qt511svg libgl1-mesa-dev libmpv-dev -sudo apt-get build-dep mpv libmpv* ffmpeg +sudo apt install build-essential git qt512-meta-minimal qt512quickcontrols qt512quickcontrols2 qt512svg qt512x11extras qt512graphicaleffects qt512svg libgl1-mesa-dev libmpv-dev ``` ##### Debian ``` @@ -50,6 +49,7 @@ sudo apt install build-essential cmake qtquickcontrols2-5-dev qtbase5-dev qtdecl - `git clone https://github.com/NamedKitten/KittehPlayer KittehPlayer` - `cd KittehPlayer` - `mkdir build && cd build` +- If you are on ubuntu bionic, run `source /opt/qt512/bin/qt512-env.sh` and add `-DOLD_UBUNTU=on` to the cmake command next. - `cmake .. -DCMAKE_INSTALL_PREFIX=/usr` - `make` - `sudo make install`