Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into auth3
This commit is contained in:
commit
1bd4e60e99
@ -64,7 +64,8 @@ modules:
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
- -DBUILD_SHARED_LIBS:BOOL=ON
|
||||
- -DGLFW_USE_WAYLAND=ON
|
||||
- -DGLFW_USE_WAYLAND:BOOL=ON
|
||||
- -DGLFW_BUILD_DOCS:BOOL=OFF
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/glfw/glfw.git
|
||||
|
@ -83,8 +83,10 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings,
|
||||
data = file.readAll();
|
||||
file.close();
|
||||
} else {
|
||||
if (minecraftVersion.isEmpty())
|
||||
if (minecraftVersion.isEmpty()) {
|
||||
emit failed(tr("Could not find \"version.json\" inside \"bin/modpack.jar\", but Minecraft version is unknown"));
|
||||
return;
|
||||
}
|
||||
components->setComponentVersion("net.minecraft", minecraftVersion, true);
|
||||
components->installJarMods({ modpackJar });
|
||||
|
||||
@ -131,7 +133,9 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings,
|
||||
file.close();
|
||||
} else {
|
||||
// This is the "Vanilla" modpack, excluded by the search code
|
||||
emit failed(tr("Unable to find a \"version.json\"!"));
|
||||
components->setComponentVersion("net.minecraft", minecraftVersion, true);
|
||||
components->saveNow();
|
||||
emit succeeded();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
Net::NetRequest::Ptr ImgurAlbumCreation::make(std::shared_ptr<ImgurAlbumCreation::Result> output, QList<ScreenShot::Ptr> screenshots)
|
||||
{
|
||||
auto up = makeShared<ImgurAlbumCreation>();
|
||||
up->m_url = BuildConfig.IMGUR_BASE_URL + "album.json";
|
||||
up->m_url = BuildConfig.IMGUR_BASE_URL + "album";
|
||||
up->m_sink.reset(new Sink(output));
|
||||
up->m_screenshots = screenshots;
|
||||
return up;
|
||||
@ -72,7 +72,7 @@ void ImgurAlbumCreation::init()
|
||||
qDebug() << "Setting up imgur upload";
|
||||
auto api_headers = new Net::StaticHeaderProxy(
|
||||
QList<Net::HeaderPair>{ { "Content-Type", "application/x-www-form-urlencoded" },
|
||||
{ "Authorization", QString("Client-ID %1").arg(BuildConfig.IMGUR_CLIENT_ID).toStdString().c_str() },
|
||||
{ "Authorization", QString("Client-ID %1").arg(BuildConfig.IMGUR_CLIENT_ID).toUtf8() },
|
||||
{ "Accept", "application/json" } });
|
||||
addHeaderProxy(api_headers);
|
||||
}
|
||||
|
@ -50,9 +50,8 @@
|
||||
void ImgurUpload::init()
|
||||
{
|
||||
qDebug() << "Setting up imgur upload";
|
||||
auto api_headers = new Net::StaticHeaderProxy(
|
||||
QList<Net::HeaderPair>{ { "Authorization", QString("Client-ID %1").arg(BuildConfig.IMGUR_CLIENT_ID).toStdString().c_str() },
|
||||
{ "Accept", "application/json" } });
|
||||
auto api_headers = new Net::StaticHeaderProxy(QList<Net::HeaderPair>{
|
||||
{ "Authorization", QString("Client-ID %1").arg(BuildConfig.IMGUR_CLIENT_ID).toUtf8() }, { "Accept", "application/json" } });
|
||||
addHeaderProxy(api_headers);
|
||||
}
|
||||
|
||||
@ -70,14 +69,14 @@ QNetworkReply* ImgurUpload::getReply(QNetworkRequest& request)
|
||||
QHttpPart filePart;
|
||||
filePart.setBodyDevice(file);
|
||||
filePart.setHeader(QNetworkRequest::ContentTypeHeader, "image/png");
|
||||
filePart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"image\"");
|
||||
filePart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"image\"; filename=\"" + file->fileName() + "\"");
|
||||
multipart->append(filePart);
|
||||
QHttpPart typePart;
|
||||
typePart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"type\"");
|
||||
typePart.setBody("file");
|
||||
multipart->append(typePart);
|
||||
QHttpPart namePart;
|
||||
namePart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"name\"");
|
||||
namePart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"title\"");
|
||||
namePart.setBody(m_fileInfo.baseName().toUtf8());
|
||||
multipart->append(namePart);
|
||||
|
||||
@ -124,7 +123,7 @@ auto ImgurUpload::Sink::finalize(QNetworkReply&) -> Task::State
|
||||
Net::NetRequest::Ptr ImgurUpload::make(ScreenShot::Ptr m_shot)
|
||||
{
|
||||
auto up = makeShared<ImgurUpload>(m_shot->m_file);
|
||||
up->m_url = std::move(BuildConfig.IMGUR_BASE_URL + "upload.json");
|
||||
up->m_url = std::move(BuildConfig.IMGUR_BASE_URL + "image");
|
||||
up->m_sink.reset(new Sink(m_shot));
|
||||
return up;
|
||||
}
|
||||
|
@ -1113,7 +1113,6 @@ void PrismUpdaterApp::backupAppDir()
|
||||
"Qt*.dll",
|
||||
});
|
||||
}
|
||||
file_list.append("portable.txt");
|
||||
logUpdate("manifest.txt empty or missing. making best guess at files to back up.");
|
||||
}
|
||||
logUpdate(tr("Backing up:\n %1").arg(file_list.join(",\n ")));
|
||||
|
Loading…
Reference in New Issue
Block a user