[Travis] Use build matrix.
This commit is contained in:
parent
2621325479
commit
e7c3ce3aa4
33
.travis.yml
33
.travis.yml
|
@ -1,32 +1,19 @@
|
||||||
language: cpp
|
matrix:
|
||||||
compiler: clang
|
include:
|
||||||
sudo: require
|
- env: PLATFORM='linux64'
|
||||||
dist: xenial
|
os: linux
|
||||||
cache:
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
|
compiler: clang
|
||||||
|
language: cpp
|
||||||
|
cache:
|
||||||
ccache: true
|
ccache: true
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.ccache
|
- $HOME/.ccache
|
||||||
- $HOME/.cache/apt
|
- $HOME/.cache/apt
|
||||||
#- $HOME/.cache/mpv-build
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- mkdir -p $HOME/.cache/apt/partial
|
|
||||||
- sudo rm -rf /var/cache/apt/archives
|
|
||||||
- sudo ln -s $HOME/.cache/apt /var/cache/apt/archives
|
|
||||||
- sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial -y
|
|
||||||
- sudo apt-get update
|
|
||||||
|
|
||||||
install:
|
|
||||||
- sudo apt-get -y install libxpm-dev libcurl3 libcurl4-openssl-dev automake libtool desktop-file-utils libjack0 libjack-dev nasm ccache qt511-meta-minimal qt511quickcontrols qt511quickcontrols2 qt511imageformats qt511svg libgl1-mesa-dev checkinstall
|
|
||||||
- sudo apt-get build-dep libmpv1
|
|
||||||
- source /opt/qt*/bin/qt*-env.sh
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- bash scripts/build-mpv.sh
|
- bash scripts/ci-${PLATFORM}.sh
|
||||||
- bash scripts/makeappimage.sh
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- bash scripts/upload.sh
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
|
|
17
scripts/ci-linux64.sh
Normal file
17
scripts/ci-linux64.sh
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mkdir -p $HOME/.cache/apt/partial
|
||||||
|
sudo rm -rf /var/cache/apt/archives
|
||||||
|
sudo ln -s $HOME/.cache/apt /var/cache/apt/archives
|
||||||
|
sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial -y
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
sudo apt-get -y install libxpm-dev libcurl3 libcurl4-openssl-dev automake libtool desktop-file-utils libjack0 libjack-dev nasm ccache qt511-meta-minimal qt511quickcontrols qt511quickcontrols2 qt511imageformats qt511svg libgl1-mesa-dev checkinstall
|
||||||
|
sudo apt-get build-dep libmpv1
|
||||||
|
source /opt/qt*/bin/qt*-env.sh
|
||||||
|
|
||||||
|
bash scripts/build-mpv.sh
|
||||||
|
bash scripts/makeappimage.sh
|
||||||
|
|
||||||
|
bash scripts/upload.sh
|
|
@ -26,7 +26,7 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePlayPauseIcon() {
|
function updatePlayPauseIcon() {
|
||||||
var paused = renderer.getProperty("pause")
|
var paused = player.getProperty("pause")
|
||||||
if (paused) {
|
if (paused) {
|
||||||
playPauseButton.icon.source = "qrc:/player/icons/play.svg"
|
playPauseButton.icon.source = "qrc:/player/icons/play.svg"
|
||||||
} else {
|
} else {
|
||||||
|
@ -35,8 +35,8 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateVolume() {
|
function updateVolume() {
|
||||||
var muted = renderer.getProperty("mute")
|
var muted = player.getProperty("mute")
|
||||||
var volume = renderer.getProperty("volume")
|
var volume = player.getProperty("volume")
|
||||||
|
|
||||||
if (muted || volume === 0) {
|
if (muted || volume === 0) {
|
||||||
volumeButton.icon.source = "qrc:/player/icons/volume-mute.svg"
|
volumeButton.icon.source = "qrc:/player/icons/volume-mute.svg"
|
||||||
|
@ -50,7 +50,7 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePrev() {
|
function updatePrev() {
|
||||||
var playlist_pos = renderer.getProperty("playlist-pos")
|
var playlist_pos = player.getProperty("playlist-pos")
|
||||||
if (playlist_pos > 0) {
|
if (playlist_pos > 0) {
|
||||||
playlistPrevButton.visible = true
|
playlistPrevButton.visible = true
|
||||||
playlistPrevButton.width = playPauseButton.width
|
playlistPrevButton.width = playPauseButton.width
|
||||||
|
@ -67,7 +67,7 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePlayPause() {
|
function updatePlayPause() {
|
||||||
renderer.command(["cycle", "pause"])
|
player.command(["cycle", "pause"])
|
||||||
updatePlayPauseIcon()
|
updatePlayPauseIcon()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,32 +76,32 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function tracksMenuUpdate() {
|
function tracksMenuUpdate() {
|
||||||
var tracks = renderer.getProperty("track-list/count")
|
var tracks = player.getProperty("track-list/count")
|
||||||
var track = 0
|
var track = 0
|
||||||
subModel.clear()
|
subModel.clear()
|
||||||
audioModel.clear()
|
audioModel.clear()
|
||||||
vidModel.clear()
|
vidModel.clear()
|
||||||
|
|
||||||
var aid = renderer.getProperty("aid")
|
var aid = player.getProperty("aid")
|
||||||
var sid = renderer.getProperty("sid")
|
var sid = player.getProperty("sid")
|
||||||
var vid = renderer.getProperty("vid")
|
var vid = player.getProperty("vid")
|
||||||
|
|
||||||
console.log("Updating Track Menu, Total Tracks: " + tracks)
|
console.log("Updating Track Menu, Total Tracks: " + tracks)
|
||||||
for (track = 0; track <= tracks; track++) {
|
for (track = 0; track <= tracks; track++) {
|
||||||
var trackID = renderer.getProperty("track-list/" + track + "/id")
|
var trackID = player.getProperty("track-list/" + track + "/id")
|
||||||
var trackType = renderer.getProperty(
|
var trackType = player.getProperty(
|
||||||
"track-list/" + track + "/type")
|
"track-list/" + track + "/type")
|
||||||
var trackLang = LanguageCodes.localeCodeToEnglish(
|
var trackLang = LanguageCodes.localeCodeToEnglish(
|
||||||
String(renderer.getProperty(
|
String(player.getProperty(
|
||||||
"track-list/" + track + "/lang")))
|
"track-list/" + track + "/lang")))
|
||||||
var trackTitle = renderer.getProperty(
|
var trackTitle = player.getProperty(
|
||||||
"track-list/" + track + "/title")
|
"track-list/" + track + "/title")
|
||||||
if (trackType == "sub") {
|
if (trackType == "sub") {
|
||||||
subModel.append({
|
subModel.append({
|
||||||
key: trackLang,
|
key: trackLang,
|
||||||
value: trackID
|
value: trackID
|
||||||
})
|
})
|
||||||
if (renderer.getProperty("track-list/" + track + "/selected")) {
|
if (player.getProperty("track-list/" + track + "/selected")) {
|
||||||
subList.currentIndex = subList.count
|
subList.currentIndex = subList.count
|
||||||
}
|
}
|
||||||
} else if (trackType == "audio") {
|
} else if (trackType == "audio") {
|
||||||
|
@ -110,7 +110,7 @@ Window {
|
||||||
+ trackLang,
|
+ trackLang,
|
||||||
value: trackID
|
value: trackID
|
||||||
})
|
})
|
||||||
if (renderer.getProperty("track-list/" + track + "/selected")) {
|
if (player.getProperty("track-list/" + track + "/selected")) {
|
||||||
audioList.currentIndex = audioList.count
|
audioList.currentIndex = audioList.count
|
||||||
}
|
}
|
||||||
} else if (trackType == "video") {
|
} else if (trackType == "video") {
|
||||||
|
@ -118,7 +118,7 @@ Window {
|
||||||
key: "Video " + trackID,
|
key: "Video " + trackID,
|
||||||
value: trackID
|
value: trackID
|
||||||
})
|
})
|
||||||
if (renderer.getProperty("track-list/" + track + "/selected")) {
|
if (player.getProperty("track-list/" + track + "/selected")) {
|
||||||
vidList.currentIndex = vidList.count
|
vidList.currentIndex = vidList.count
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
MpvObject {
|
MpvObject {
|
||||||
id: renderer
|
id: player
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
FontLoader {
|
FontLoader {
|
||||||
|
@ -140,7 +140,7 @@ Window {
|
||||||
running: false
|
running: false
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
renderer.startPlayer()
|
player.startPlayer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: { initTimer.start() }
|
Component.onCompleted: { initTimer.start() }
|
||||||
|
@ -149,7 +149,7 @@ Window {
|
||||||
var args = Qt.application.arguments
|
var args = Qt.application.arguments
|
||||||
var len = Qt.application.arguments.length
|
var len = Qt.application.arguments.length
|
||||||
var argNo = 0
|
var argNo = 0
|
||||||
renderer.setOption("ytdl-format", "bestvideo[width<=" + Screen.width
|
player.setOption("ytdl-format", "bestvideo[width<=" + Screen.width
|
||||||
+ "][height<=" + Screen.height + "]+bestaudio")
|
+ "][height<=" + Screen.height + "]+bestaudio")
|
||||||
if (len > 1) {
|
if (len > 1) {
|
||||||
for (argNo = 1; argNo < len; argNo++) {
|
for (argNo = 1; argNo < len; argNo++) {
|
||||||
|
@ -165,11 +165,11 @@ Window {
|
||||||
if (splitArg[1].length == 0) {
|
if (splitArg[1].length == 0) {
|
||||||
splitArg[1] = "true"
|
splitArg[1] = "true"
|
||||||
}
|
}
|
||||||
renderer.setOption(splitArg[0], splitArg[1])
|
player.setOption(splitArg[0], splitArg[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
renderer.command(["loadfile", argument])
|
player.command(["loadfile", argument])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,12 +198,12 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setTitle() {
|
function setTitle() {
|
||||||
titleLabel.text = renderer.getProperty("media-title")
|
titleLabel.text = player.getProperty("media-title")
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideControls() {
|
function hideControls() {
|
||||||
if (! subtitlesMenu.visible) {
|
if (! subtitlesMenu.visible) {
|
||||||
renderer.setOption("sub-margin-y", "22")
|
player.setOption("sub-margin-y", "22")
|
||||||
controlsBar.visible = false
|
controlsBar.visible = false
|
||||||
controlsBackground.visible = false
|
controlsBackground.visible = false
|
||||||
titleBar.visible = false
|
titleBar.visible = false
|
||||||
|
@ -213,7 +213,7 @@ Window {
|
||||||
|
|
||||||
function showControls() {
|
function showControls() {
|
||||||
updateControls()
|
updateControls()
|
||||||
renderer.setOption("sub-margin-y",
|
player.setOption("sub-margin-y",
|
||||||
String(controlsBar.height + progressBar.height))
|
String(controlsBar.height + progressBar.height))
|
||||||
controlsBar.visible = true
|
controlsBar.visible = true
|
||||||
controlsBackground.visible = true
|
controlsBackground.visible = true
|
||||||
|
@ -226,7 +226,7 @@ Window {
|
||||||
title: "Please choose a file"
|
title: "Please choose a file"
|
||||||
folder: shortcuts.home
|
folder: shortcuts.home
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
renderer.command(["loadfile", String(fileDialog.fileUrl)])
|
player.command(["loadfile", String(fileDialog.fileUrl)])
|
||||||
fileDialog.close()
|
fileDialog.close()
|
||||||
}
|
}
|
||||||
onRejected: {
|
onRejected: {
|
||||||
|
@ -239,7 +239,7 @@ Window {
|
||||||
title: "URL / File Path"
|
title: "URL / File Path"
|
||||||
standardButtons: StandardButton.Cancel | StandardButton.Open
|
standardButtons: StandardButton.Cancel | StandardButton.Open
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
renderer.command(["loadfile", pathText.text])
|
player.command(["loadfile", pathText.text])
|
||||||
pathText.text = ""
|
pathText.text = ""
|
||||||
}
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -275,7 +275,7 @@ Window {
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
renderer.command(["cycle", "pause"])
|
player.command(["cycle", "pause"])
|
||||||
updateControls()
|
updateControls()
|
||||||
}
|
}
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
|
@ -287,11 +287,11 @@ Window {
|
||||||
running: false
|
running: false
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
renderer.hideControls()
|
player.hideControls()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
renderer.showControls()
|
player.showControls()
|
||||||
mouseAreaPlayerTimer.restart()
|
mouseAreaPlayerTimer.restart()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ Window {
|
||||||
id: audioModel
|
id: audioModel
|
||||||
}
|
}
|
||||||
onActivated: {
|
onActivated: {
|
||||||
renderer.command(["set", "aid", String(
|
player.command(["set", "aid", String(
|
||||||
audioModel.get(index).value)])
|
audioModel.get(index).value)])
|
||||||
}
|
}
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
@ -433,7 +433,7 @@ Window {
|
||||||
id: subModel
|
id: subModel
|
||||||
}
|
}
|
||||||
onActivated: {
|
onActivated: {
|
||||||
renderer.command(["set", "sid", String(
|
player.command(["set", "sid", String(
|
||||||
subModel.get(index).value)])
|
subModel.get(index).value)])
|
||||||
}
|
}
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
@ -459,7 +459,7 @@ Window {
|
||||||
id: vidModel
|
id: vidModel
|
||||||
}
|
}
|
||||||
onActivated: {
|
onActivated: {
|
||||||
renderer.command(["set", "vid", String(
|
player.command(["set", "vid", String(
|
||||||
vidModel.get(index).value)])
|
vidModel.get(index).value)])
|
||||||
}
|
}
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
@ -480,7 +480,7 @@ Window {
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
onMoved: {
|
onMoved: {
|
||||||
renderer.command(["seek", progressBar.value, "absolute"])
|
player.command(["seek", progressBar.value, "absolute"])
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
@ -524,7 +524,7 @@ Window {
|
||||||
visible: false
|
visible: false
|
||||||
width: 0
|
width: 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
renderer.command(["playlist-prev"])
|
player.command(["playlist-prev"])
|
||||||
updatePrev()
|
updatePrev()
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
@ -559,7 +559,7 @@ Window {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: playPauseButton.right
|
anchors.left: playPauseButton.right
|
||||||
onClicked: {
|
onClicked: {
|
||||||
renderer.command(["playlist-next", "force"])
|
player.command(["playlist-next", "force"])
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
@ -576,7 +576,7 @@ Window {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: playlistNextButton.right
|
anchors.left: playlistNextButton.right
|
||||||
onClicked: {
|
onClicked: {
|
||||||
renderer.command(["cycle", "mute"])
|
player.command(["cycle", "mute"])
|
||||||
updateVolume()
|
updateVolume()
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
@ -602,7 +602,7 @@ Window {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
onMoved: {
|
onMoved: {
|
||||||
renderer.command(["set", "volume", Math.round(
|
player.command(["set", "volume", Math.round(
|
||||||
volumeBar.value).toString()])
|
volumeBar.value).toString()])
|
||||||
updateVolume()
|
updateVolume()
|
||||||
}
|
}
|
||||||
|
@ -710,11 +710,11 @@ Window {
|
||||||
focus: true
|
focus: true
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
if (event.key == Qt.Key_K || event.key == Qt.Key_Space) {
|
if (event.key == Qt.Key_K || event.key == Qt.Key_Space) {
|
||||||
renderer.command(["cycle", "pause"])
|
player.command(["cycle", "pause"])
|
||||||
} else if (event.key == Qt.Key_J) {
|
} else if (event.key == Qt.Key_J) {
|
||||||
renderer.command(["seek", "-10"])
|
player.command(["seek", "-10"])
|
||||||
} else if (event.key == Qt.Key_L) {
|
} else if (event.key == Qt.Key_L) {
|
||||||
renderer.command(["seek", "10"])
|
player.command(["seek", "10"])
|
||||||
}
|
}
|
||||||
updateControls()
|
updateControls()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue