refs #482 Rationalized the copying of files from source tree to build tree.

This commit is contained in:
Mathew Sutcliffe
2015-10-06 18:09:23 +01:00
parent a5d8db2354
commit e4adad45d0
9 changed files with 54 additions and 55 deletions

View File

@@ -27,19 +27,7 @@ DESTDIR = $$DestRoot/lib
DLLDESTDIR = $$DestRoot/bin
OTHER_FILES += ./sounds/*.wav sounds/readme.txt
COPY_FILES += $$PWD/sounds/*
RESOURCES +=
win32:isEmpty(MINGW_IN_SHELL): COPY = xcopy /yi
else: COPY = cp -r
win32 {
QMAKE_POST_LINK += $$COPY $$shell_path($$PWD/sounds) \
$$shell_path($$DestRoot/bin/sounds)
}
else {
QMAKE_POST_LINK += mkdir -p $$shell_path($$DestRoot/bin) && \
$$COPY $$shell_path($$PWD/sounds) \
$$shell_path($$DestRoot/bin)
}
load(common_post)

View File

@@ -492,12 +492,12 @@ namespace BlackSound
// order here is crucial, needs to be the same as in CSoundGenerator::Notification
if (!playlist) playlist = new QMediaPlaylist(mediaPlayer);
bool success = true;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/sounds/error.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/sounds/login.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/sounds/logoff.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/sounds/privatemessage.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/sounds/voiceroomjoined.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/sounds/voiceroomleft.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/../sounds/error.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/../sounds/login.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/../sounds/logoff.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/../sounds/privatemessage.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/../sounds/voiceroomjoined.wav"))) && success;
success = playlist->addMedia(QUrl::fromLocalFile(QCoreApplication::applicationDirPath().append("/../sounds/voiceroomleft.wav"))) && success;
Q_ASSERT(success);
playlist->setPlaybackMode(QMediaPlaylist::CurrentItemOnce);