Add passing of tokens to hifi in qt launcher, and remove dead code

This commit is contained in:
Ryan Huffman 2019-09-13 14:57:22 -07:00
parent 21e3e08679
commit a78be7a451
3 changed files with 6 additions and 5 deletions

View file

@ -223,6 +223,7 @@ Q_INVOKABLE void LauncherState::receivedLoginReply() {
_loginResponse.tokenType = root["token_type"].toString();
qDebug() << "Got response for login: " << data;
_loginTokenResponse = data;
downloadClient();
}
@ -421,6 +422,10 @@ void LauncherState::launchClient() {
+ " --displayName " + displayName
+ " --cache " + contentCachePath;
if (!_loginTokenResponse.isEmpty()) {
params += " --tokens \"" + _loginTokenResponse.replace("\"", "\\\"") + "\"";
}
#if defined(Q_OS_WIN)
STARTUPINFO si;
PROCESS_INFORMATION pi;

View file

@ -137,6 +137,7 @@ private:
LastLoginError _lastLoginError { NONE };
QString _buildTag { QString::null };
QString _contentCacheURL{ "https://orgs.highfidelity.com/content-cache/content_cache_small-only_data8.zip" }; // QString::null }; // If null, there is no content cache to download
QString _loginTokenResponse;
QFile _clientZipFile;
QFile _contentZipFile;

View file

@ -9,10 +9,6 @@ Unzipper::Unzipper(const QString& zipFilePath, const QDir& outputDirectory) :
_zipFilePath(zipFilePath), _outputDirectory(outputDirectory) {
}
//uint64_t extractZip(const QString& zipFile, const std::string& path,
//std::vector<std::string>& files) {
//std::function<void(float)> progressCallback) {
void Unzipper::run() {
qDebug() << "Reading zip file" << _zipFilePath << ", extracting to" << _outputDirectory.absolutePath();
@ -45,7 +41,6 @@ void Unzipper::run() {
return;
}
// Get root folder
uint64_t totalSize = 0;
uint64_t totalCompressedSize = 0;
bool _shouldFail = false;