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