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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
|
@ -32,6 +32,7 @@
|
||||
#cmakedefine HAVE_LIBINDICATE
|
||||
#cmakedefine HAVE_LIBLASTFM
|
||||
#cmakedefine HAVE_LIBMTP
|
||||
#cmakedefine HAVE_QCA
|
||||
#cmakedefine HAVE_REMOTE
|
||||
#cmakedefine HAVE_SPARKLE
|
||||
#cmakedefine HAVE_SPOTIFY
|
||||
|
@ -15,6 +15,7 @@
|
||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "spotifyblobdownloader.h"
|
||||
#include "spotifyservice.h"
|
||||
#include "core/logging.h"
|
||||
@ -25,7 +26,10 @@
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkReply>
|
||||
#include <QProgressDialog>
|
||||
|
||||
#ifdef HAVE_QCA
|
||||
#include <QtCrypto>
|
||||
#endif // HAVE_QCA
|
||||
|
||||
const char* SpotifyBlobDownloader::kSignatureSuffix = ".sha1";
|
||||
|
||||
@ -109,6 +113,7 @@ void SpotifyBlobDownloader::ReplyFinished() {
|
||||
file_data[filename] = reply->readAll();
|
||||
}
|
||||
|
||||
#ifdef HAVE_QCA
|
||||
// Load the public key
|
||||
QCA::ConvertResult conversion_result;
|
||||
QCA::PublicKey key = QCA::PublicKey::fromPEMFile(":/clementine-spotify-public.pem",
|
||||
@ -132,6 +137,7 @@ void SpotifyBlobDownloader::ReplyFinished() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Make the destination directory and write the files into it
|
||||
QDir().mkpath(path_);
|
||||
|
@ -78,7 +78,7 @@ using boost::scoped_ptr;
|
||||
|
||||
#include <echonest/Config.h>
|
||||
|
||||
#ifdef HAVE_SPOTIFY
|
||||
#ifdef HAVE_QCA
|
||||
#include <QtCrypto>
|
||||
#endif
|
||||
|
||||
@ -373,7 +373,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SPOTIFY
|
||||
#ifdef HAVE_QCA
|
||||
QCA::Initializer qca_initializer;
|
||||
#endif
|
||||
|
||||
|
@ -566,7 +566,7 @@ msgstr ""
|
||||
msgid "Always start playing"
|
||||
msgstr ""
|
||||
|
||||
#: internet/spotifyblobdownloader.cpp:55
|
||||
#: internet/spotifyblobdownloader.cpp:59
|
||||
msgid ""
|
||||
"An additional plugin is required to use Spotify in Clementine. Would you "
|
||||
"like to download and install it now?"
|
||||
@ -793,7 +793,7 @@ msgstr ""
|
||||
msgid "CUE sheet support"
|
||||
msgstr ""
|
||||
|
||||
#: internet/spotifyblobdownloader.cpp:39
|
||||
#: internet/spotifyblobdownloader.cpp:43
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
@ -1432,7 +1432,7 @@ msgstr ""
|
||||
msgid "Downloading Magnatune catalogue"
|
||||
msgstr ""
|
||||
|
||||
#: internet/spotifyblobdownloader.cpp:39
|
||||
#: internet/spotifyblobdownloader.cpp:43
|
||||
msgid "Downloading Spotify plugin"
|
||||
msgstr ""
|
||||
|
||||
@ -1584,7 +1584,7 @@ msgstr ""
|
||||
msgid "Error deleting songs"
|
||||
msgstr ""
|
||||
|
||||
#: internet/spotifyblobdownloader.cpp:187
|
||||
#: internet/spotifyblobdownloader.cpp:193
|
||||
msgid "Error downloading Spotify plugin"
|
||||
msgstr ""
|
||||
|
||||
@ -3696,7 +3696,7 @@ msgstr ""
|
||||
msgid "Spotify plugin"
|
||||
msgstr ""
|
||||
|
||||
#: internet/spotifyblobdownloader.cpp:54
|
||||
#: internet/spotifyblobdownloader.cpp:58
|
||||
msgid "Spotify plugin not installed"
|
||||
msgstr ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user