diff options
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | appveyor.yml | 38 | ||||
| -rw-r--r-- | appveyor/build.bat | 16 | ||||
| -rw-r--r-- | player.cpp | 13 |
4 files changed, 64 insertions, 4 deletions
@@ -1,5 +1,6 @@ # AleePlayer A music player written in Qt +[](https://ci.appveyor.com/project/Alee14/aleeplayer) [](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 @@ -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; } |
