aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--appveyor.yml38
-rw-r--r--appveyor/build.bat16
-rw-r--r--player.cpp13
4 files changed, 64 insertions, 4 deletions
diff --git a/README.md b/README.md
index f5e5593..e37f6f1 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
# AleePlayer
A music player written in Qt
+[![Build status](https://ci.appveyor.com/api/projects/status/6ifpgxms79l4q0u2?svg=true)](https://ci.appveyor.com/project/Alee14/aleeplayer) [![Build Status](https://travis-ci.org/aleeproductions/AleePlayer.svg?branch=master)](https://travis-ci.org/aleeproductions/AleePlayer)
# Build instructions
```
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..bf9acb2
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,38 @@
+
+version: 1.0.{build}
+branches:
+ only:
+ - master
+skip_tags: true
+image: Visual Studio 2017
+clone_depth: 5
+
+environment:
+ GITHUB_TOKEN:
+ secure: hFxvrP00pBfZqJGfgLLZgkXPI5ZPGND3ToEURxPW5K5PYcuNaG0oiipX5b/O+dDR
+ REPO_SLUG: aleeproductions/AleePlayer
+ deploy_project: AleePlayer
+ deploy_version: ''
+ deploy_artifact: ''
+
+build_script:
+- cmd: >-
+ appveyor\build.bat
+test: off
+
+artifacts:
+- path: deploy
+ name: AleePlayer-Windows
+
+
+before_deploy:
+- ps:
+ iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/deploy.ps1'))
+
+deploy_script:
+- ps: >-
+
+ Start-FileDownload 'https://github.com/probonopd/uploadtool/raw/master/upload.sh'
+
+ sh -c "TRAVIS_BRANCH=$env:APPVEYOR_REPO_BRANCH TRAVIS_COMMIT=$env:APPVEYOR_REPO_BRANCH ./upload.sh /c/projects/AleePlayer/AleePlayer-Windows.zip 2>/dev/null"
+
diff --git a/appveyor/build.bat b/appveyor/build.bat
new file mode 100644
index 0000000..0c7d9e6
--- /dev/null
+++ b/appveyor/build.bat
@@ -0,0 +1,16 @@
+if "%APPVEYOR_REPO_TAG_NAME%"=="continuous" (
+
+ exit 1
+
+)
+
+set QTDIR=C:\Qt\5.14\msvc2017_64
+set PATH=%PATH%;%QTDIR%\bin
+call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
+
+qmake AleePlayer.pro "CONFIG+=release"
+nmake release
+mkdir deploy
+copy release\AleePlayer.exe deploy
+cd deploy
+windeployqt AleePlayer.exe -multimedia
diff --git a/player.cpp b/player.cpp
index b707aa7..dd95b23 100644
--- a/player.cpp
+++ b/player.cpp
@@ -1,10 +1,11 @@
-#include "player.h"
-#include "ui_player.h"
-#include "about.h"
#include <QMediaPlayer>
#include <QDebug>
#include <QFileDialog>
#include <QMessageBox>
+#include "player.h"
+#include "ui_player.h"
+#include "about.h"
+
void Player::mFileDialog()
@@ -14,13 +15,17 @@ void Player::mFileDialog()
mFile = QFileDialog::getOpenFileName(this, "Open any audio file", QDir::homePath(), tr("Audio Files (*.mp3 *.wav *.ogg)"));
if (mFile == NULL) {
qDebug() << "File cannot be found";
- msgbox.setText("File is invalid.");
+ msgbox.setWindowTitle("Uh oh! An error has occured!");
+ msgbox.setText("File is invalid. Maybe try loading a valid audio file.");
+ msgbox.setIcon(QMessageBox::Critical);
msgbox.exec();
return;
} else {
mPlayer->setMedia(QUrl::fromLocalFile(mFile));
qDebug() << "Opening" << mFile;
+ msgbox.setWindowTitle("Success!");
msgbox.setText("This audio file has been loaded.");
+ msgbox.setIcon(QMessageBox::Information);
msgbox.exec();
return;
}