Don't make QCA a requirement if we're bundling the spotify blob (since we won't need to download anything at runtime)
This commit is contained in:
parent
568f78d874
commit
fccd0a5458
@ -234,13 +234,23 @@ if(ENABLE_BREAKPAD)
|
|||||||
set(HAVE_BREAKPAD ON)
|
set(HAVE_BREAKPAD ON)
|
||||||
endif(ENABLE_BREAKPAD)
|
endif(ENABLE_BREAKPAD)
|
||||||
|
|
||||||
if(ENABLE_SPOTIFY AND PROTOBUF_FOUND AND PROTOBUF_PROTOC_EXECUTABLE AND QCA_FOUND)
|
if(ENABLE_SPOTIFY AND PROTOBUF_FOUND AND PROTOBUF_PROTOC_EXECUTABLE)
|
||||||
set(HAVE_SPOTIFY ON)
|
set(HAVE_SPOTIFY ON)
|
||||||
endif(ENABLE_SPOTIFY AND PROTOBUF_FOUND AND PROTOBUF_PROTOC_EXECUTABLE AND QCA_FOUND)
|
endif(ENABLE_SPOTIFY AND PROTOBUF_FOUND AND PROTOBUF_PROTOC_EXECUTABLE)
|
||||||
|
|
||||||
if(HAVE_SPOTIFY AND SPOTIFY_FOUND)
|
if(ENABLE_SPOTIFY_BLOB AND PROTOBUF_FOUND AND PROTOBUF_PROTOC_EXECUTABLE AND SPOTIFY_FOUND)
|
||||||
set(HAVE_SPOTIFY_BLOB ON)
|
set(HAVE_SPOTIFY_BLOB ON)
|
||||||
endif(HAVE_SPOTIFY AND SPOTIFY_FOUND)
|
endif(ENABLE_SPOTIFY_BLOB AND PROTOBUF_FOUND AND PROTOBUF_PROTOC_EXECUTABLE AND SPOTIFY_FOUND)
|
||||||
|
|
||||||
|
if((NOT HAVE_SPOTIFY_BLOB) AND (NOT QCA_FOUND))
|
||||||
|
# If we're not bundling the spotify blob then we must ensure QCA is available
|
||||||
|
# so we can verify the blob we download at runtime.
|
||||||
|
unset(HAVE_SPOTIFY)
|
||||||
|
endif((NOT HAVE_SPOTIFY_BLOB) AND (NOT QCA_FOUND))
|
||||||
|
|
||||||
|
if(QCA_FOUND)
|
||||||
|
set(HAVE_QCA ON)
|
||||||
|
endif(QCA_FOUND)
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_VISUALISATIONS)
|
if(ENABLE_VISUALISATIONS)
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#cmakedefine HAVE_LIBINDICATE
|
#cmakedefine HAVE_LIBINDICATE
|
||||||
#cmakedefine HAVE_LIBLASTFM
|
#cmakedefine HAVE_LIBLASTFM
|
||||||
#cmakedefine HAVE_LIBMTP
|
#cmakedefine HAVE_LIBMTP
|
||||||
|
#cmakedefine HAVE_QCA
|
||||||
#cmakedefine HAVE_REMOTE
|
#cmakedefine HAVE_REMOTE
|
||||||
#cmakedefine HAVE_SPARKLE
|
#cmakedefine HAVE_SPARKLE
|
||||||
#cmakedefine HAVE_SPOTIFY
|
#cmakedefine HAVE_SPOTIFY
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "spotifyblobdownloader.h"
|
#include "spotifyblobdownloader.h"
|
||||||
#include "spotifyservice.h"
|
#include "spotifyservice.h"
|
||||||
#include "core/logging.h"
|
#include "core/logging.h"
|
||||||
@ -25,7 +26,10 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
#include <QtCrypto>
|
|
||||||
|
#ifdef HAVE_QCA
|
||||||
|
#include <QtCrypto>
|
||||||
|
#endif // HAVE_QCA
|
||||||
|
|
||||||
const char* SpotifyBlobDownloader::kSignatureSuffix = ".sha1";
|
const char* SpotifyBlobDownloader::kSignatureSuffix = ".sha1";
|
||||||
|
|
||||||
@ -109,6 +113,7 @@ void SpotifyBlobDownloader::ReplyFinished() {
|
|||||||
file_data[filename] = reply->readAll();
|
file_data[filename] = reply->readAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_QCA
|
||||||
// Load the public key
|
// Load the public key
|
||||||
QCA::ConvertResult conversion_result;
|
QCA::ConvertResult conversion_result;
|
||||||
QCA::PublicKey key = QCA::PublicKey::fromPEMFile(":/clementine-spotify-public.pem",
|
QCA::PublicKey key = QCA::PublicKey::fromPEMFile(":/clementine-spotify-public.pem",
|
||||||
@ -132,6 +137,7 @@ void SpotifyBlobDownloader::ReplyFinished() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Make the destination directory and write the files into it
|
// Make the destination directory and write the files into it
|
||||||
QDir().mkpath(path_);
|
QDir().mkpath(path_);
|
||||||
|
@ -78,7 +78,7 @@ using boost::scoped_ptr;
|
|||||||
|
|
||||||
#include <echonest/Config.h>
|
#include <echonest/Config.h>
|
||||||
|
|
||||||
#ifdef HAVE_SPOTIFY
|
#ifdef HAVE_QCA
|
||||||
#include <QtCrypto>
|
#include <QtCrypto>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SPOTIFY
|
#ifdef HAVE_QCA
|
||||||
QCA::Initializer qca_initializer;
|
QCA::Initializer qca_initializer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@ msgstr ""
|
|||||||
msgid "Always start playing"
|
msgid "Always start playing"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/spotifyblobdownloader.cpp:55
|
#: internet/spotifyblobdownloader.cpp:59
|
||||||
msgid ""
|
msgid ""
|
||||||
"An additional plugin is required to use Spotify in Clementine. Would you "
|
"An additional plugin is required to use Spotify in Clementine. Would you "
|
||||||
"like to download and install it now?"
|
"like to download and install it now?"
|
||||||
@ -793,7 +793,7 @@ msgstr ""
|
|||||||
msgid "CUE sheet support"
|
msgid "CUE sheet support"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/spotifyblobdownloader.cpp:39
|
#: internet/spotifyblobdownloader.cpp:43
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1432,7 +1432,7 @@ msgstr ""
|
|||||||
msgid "Downloading Magnatune catalogue"
|
msgid "Downloading Magnatune catalogue"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/spotifyblobdownloader.cpp:39
|
#: internet/spotifyblobdownloader.cpp:43
|
||||||
msgid "Downloading Spotify plugin"
|
msgid "Downloading Spotify plugin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1584,7 +1584,7 @@ msgstr ""
|
|||||||
msgid "Error deleting songs"
|
msgid "Error deleting songs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/spotifyblobdownloader.cpp:187
|
#: internet/spotifyblobdownloader.cpp:193
|
||||||
msgid "Error downloading Spotify plugin"
|
msgid "Error downloading Spotify plugin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3696,7 +3696,7 @@ msgstr ""
|
|||||||
msgid "Spotify plugin"
|
msgid "Spotify plugin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/spotifyblobdownloader.cpp:54
|
#: internet/spotifyblobdownloader.cpp:58
|
||||||
msgid "Spotify plugin not installed"
|
msgid "Spotify plugin not installed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user