Compare commits
No commits in common. "develop" and "update_flake_lock_action" have entirely different histories.
develop
...
update_fla
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Create backport PRs
|
- name: Create backport PRs
|
||||||
uses: korthout/backport-action@v2.1.0
|
uses: korthout/backport-action@v2.0.0
|
||||||
with:
|
with:
|
||||||
# Config README: https://github.com/korthout/backport-action#backport-action
|
# Config README: https://github.com/korthout/backport-action#backport-action
|
||||||
pull_description: |-
|
pull_description: |-
|
||||||
|
11
README.md
11
README.md
@ -18,18 +18,11 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
- All downloads and instructions for Prism Launcher can be found on our [Website](https://prismlauncher.org/download).
|
- All downloads and instructions for Prism Launcher can be found on our [Website](https://prismlauncher.org/download).
|
||||||
- Last build status can be found in the [GitHub Actions](https://github.com/PrismLauncher/PrismLauncher/actions) tab (this also includes the pull requests status).
|
- Last build status can be found in the [GitHub Actions](https://github.com/PrismLauncher/PrismLauncher/actions).
|
||||||
|
|
||||||
### Development Builds
|
### Development Builds
|
||||||
|
|
||||||
Please understand that these builds are not intended for most users. There may be bugs, and other instabilities. You have been warned.
|
There are development builds available [here](https://github.com/PrismLauncher/PrismLauncher/actions). These have debug information in the binaries, so their file sizes are relatively larger.
|
||||||
|
|
||||||
There are development builds available through:
|
|
||||||
|
|
||||||
- [GitHub Actions](https://github.com/PrismLauncher/PrismLauncher/actions) (includes builds from pull requests opened by contribuitors)
|
|
||||||
- [nightly.link](https://nightly.link/PrismLauncher/PrismLauncher/workflows/trigger_builds/develop) (this will always point only to the latest version of develop)
|
|
||||||
|
|
||||||
These have debug information in the binaries, so their file sizes are relatively larger.
|
|
||||||
|
|
||||||
Prebuilt Development builds are provided for **Linux**, **Windows** and **macOS**.
|
Prebuilt Development builds are provided for **Linux**, **Windows** and **macOS**.
|
||||||
|
|
||||||
|
@ -644,7 +644,6 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
|||||||
|
|
||||||
// Minecraft mods
|
// Minecraft mods
|
||||||
m_settings->registerSetting("ModMetadataDisabled", false);
|
m_settings->registerSetting("ModMetadataDisabled", false);
|
||||||
m_settings->registerSetting("ModDependenciesDisabled", false);
|
|
||||||
|
|
||||||
// Minecraft offline player name
|
// Minecraft offline player name
|
||||||
m_settings->registerSetting("LastOfflinePlayerName", "");
|
m_settings->registerSetting("LastOfflinePlayerName", "");
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include <QPixmapCache>
|
#include <QPixmapCache>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <limits>
|
|
||||||
|
|
||||||
#define GET_TYPE() \
|
#define GET_TYPE() \
|
||||||
Qt::ConnectionType type; \
|
Qt::ConnectionType type; \
|
||||||
@ -101,14 +100,10 @@ class PixmapCache final : public QObject {
|
|||||||
*/
|
*/
|
||||||
bool _markCacheMissByEviciton()
|
bool _markCacheMissByEviciton()
|
||||||
{
|
{
|
||||||
static constexpr uint maxInt = static_cast<uint>(std::numeric_limits<int>::max());
|
|
||||||
static constexpr uint step = 10240;
|
|
||||||
static constexpr int oneSecond = 1000;
|
|
||||||
|
|
||||||
auto now = QTime::currentTime();
|
auto now = QTime::currentTime();
|
||||||
if (!m_last_cache_miss_by_eviciton.isNull()) {
|
if (!m_last_cache_miss_by_eviciton.isNull()) {
|
||||||
auto diff = m_last_cache_miss_by_eviciton.msecsTo(now);
|
auto diff = m_last_cache_miss_by_eviciton.msecsTo(now);
|
||||||
if (diff < oneSecond) { // less than a second ago
|
if (diff < 1000) { // less than a second ago
|
||||||
++m_consecutive_fast_evicitons;
|
++m_consecutive_fast_evicitons;
|
||||||
} else {
|
} else {
|
||||||
m_consecutive_fast_evicitons = 0;
|
m_consecutive_fast_evicitons = 0;
|
||||||
@ -116,17 +111,11 @@ class PixmapCache final : public QObject {
|
|||||||
}
|
}
|
||||||
m_last_cache_miss_by_eviciton = now;
|
m_last_cache_miss_by_eviciton = now;
|
||||||
if (m_consecutive_fast_evicitons >= m_consecutive_fast_evicitons_threshold) {
|
if (m_consecutive_fast_evicitons >= m_consecutive_fast_evicitons_threshold) {
|
||||||
// increase the cache size
|
// double the cache size
|
||||||
uint newSize = _cacheLimit() + step;
|
auto newSize = _cacheLimit() * 2;
|
||||||
if (newSize >= maxInt) { // increase it until you overflow :D
|
qDebug() << m_consecutive_fast_evicitons << "pixmap cache misses by eviction happened too fast, doubling cache size to"
|
||||||
newSize = maxInt;
|
<< newSize;
|
||||||
qDebug() << m_consecutive_fast_evicitons
|
_setCacheLimit(newSize);
|
||||||
<< tr("pixmap cache misses by eviction happened too fast, doing nothing as the cache size reached it's limit");
|
|
||||||
} else {
|
|
||||||
qDebug() << m_consecutive_fast_evicitons
|
|
||||||
<< tr("pixmap cache misses by eviction happened too fast, increasing cache size to") << static_cast<int>(newSize);
|
|
||||||
}
|
|
||||||
_setCacheLimit(static_cast<int>(newSize));
|
|
||||||
m_consecutive_fast_evicitons = 0;
|
m_consecutive_fast_evicitons = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -575,20 +575,15 @@ QProcessEnvironment MinecraftInstance::createLaunchEnvironment()
|
|||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
if (settings()->get("EnableMangoHud").toBool() && APPLICATION->capabilities() & Application::SupportsMangoHud) {
|
if (settings()->get("EnableMangoHud").toBool() && APPLICATION->capabilities() & Application::SupportsMangoHud) {
|
||||||
QStringList preloadList;
|
auto preloadList = env.value("LD_PRELOAD").split(QLatin1String(":"));
|
||||||
if (auto value = env.value("LD_PRELOAD"); !value.isEmpty())
|
auto libPaths = env.value("LD_LIBRARY_PATH").split(QLatin1String(":"));
|
||||||
preloadList = value.split(QLatin1String(":"));
|
|
||||||
QStringList libPaths;
|
|
||||||
if (auto value = env.value("LD_LIBRARY_PATH"); !value.isEmpty())
|
|
||||||
libPaths = value.split(QLatin1String(":"));
|
|
||||||
|
|
||||||
auto mangoHudLibString = MangoHud::getLibraryString();
|
auto mangoHudLibString = MangoHud::getLibraryString();
|
||||||
if (!mangoHudLibString.isEmpty()) {
|
if (!mangoHudLibString.isEmpty()) {
|
||||||
QFileInfo mangoHudLib(mangoHudLibString);
|
QFileInfo mangoHudLib(mangoHudLibString);
|
||||||
|
|
||||||
// dlsym variant is only needed for OpenGL and not included in the vulkan layer
|
// dlsym variant is only needed for OpenGL and not included in the vulkan layer
|
||||||
preloadList << "libMangoHud_dlsym.so"
|
preloadList << "libMangoHud_dlsym.so" << mangoHudLib.fileName();
|
||||||
<< "libMangoHud_opengl.so" << mangoHudLib.fileName();
|
|
||||||
libPaths << mangoHudLib.absolutePath();
|
libPaths << mangoHudLib.absolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,11 +131,6 @@ QVariant ModFolderModel::data(const QModelIndex& index, int role) const
|
|||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
case Qt::SizeHintRole:
|
|
||||||
if (column == ImageColumn) {
|
|
||||||
return QSize(32, 32);
|
|
||||||
}
|
|
||||||
return {};
|
|
||||||
case Qt::CheckStateRole:
|
case Qt::CheckStateRole:
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case ActiveColumn:
|
case ActiveColumn:
|
||||||
|
@ -117,11 +117,6 @@ QVariant ResourcePackFolderModel::data(const QModelIndex& index, int role) const
|
|||||||
}
|
}
|
||||||
return m_resources[row]->internal_id();
|
return m_resources[row]->internal_id();
|
||||||
}
|
}
|
||||||
case Qt::SizeHintRole:
|
|
||||||
if (column == ImageColumn) {
|
|
||||||
return QSize(32, 32);
|
|
||||||
}
|
|
||||||
return {};
|
|
||||||
case Qt::CheckStateRole:
|
case Qt::CheckStateRole:
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case ActiveColumn:
|
case ActiveColumn:
|
||||||
|
@ -104,11 +104,6 @@ QVariant TexturePackFolderModel::data(const QModelIndex& index, int role) const
|
|||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
case Qt::SizeHintRole:
|
|
||||||
if (column == ImageColumn) {
|
|
||||||
return QSize(32, 32);
|
|
||||||
}
|
|
||||||
return {};
|
|
||||||
case Qt::CheckStateRole:
|
case Qt::CheckStateRole:
|
||||||
if (column == ActiveColumn) {
|
if (column == ActiveColumn) {
|
||||||
return m_resources[row]->enabled() ? Qt::Checked : Qt::Unchecked;
|
return m_resources[row]->enabled() ? Qt::Checked : Qt::Unchecked;
|
||||||
|
@ -208,10 +208,8 @@ Task::Ptr FlameAPI::getFile(const QString& addonId, const QString& fileId, std::
|
|||||||
return netJob;
|
return netJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const
|
|
||||||
{
|
|
||||||
// https://docs.curseforge.com/?python#tocS_ModsSearchSortField
|
// https://docs.curseforge.com/?python#tocS_ModsSearchSortField
|
||||||
return { { 1, "Featured", QObject::tr("Sort by Featured") },
|
static QList<ResourceAPI::SortingMethod> s_sorts = { { 1, "Featured", QObject::tr("Sort by Featured") },
|
||||||
{ 2, "Popularity", QObject::tr("Sort by Popularity") },
|
{ 2, "Popularity", QObject::tr("Sort by Popularity") },
|
||||||
{ 3, "LastUpdated", QObject::tr("Sort by Last Updated") },
|
{ 3, "LastUpdated", QObject::tr("Sort by Last Updated") },
|
||||||
{ 4, "Name", QObject::tr("Sort by Name") },
|
{ 4, "Name", QObject::tr("Sort by Name") },
|
||||||
@ -219,4 +217,8 @@ QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const
|
|||||||
{ 6, "TotalDownloads", QObject::tr("Sort by Downloads") },
|
{ 6, "TotalDownloads", QObject::tr("Sort by Downloads") },
|
||||||
{ 7, "Category", QObject::tr("Sort by Category") },
|
{ 7, "Category", QObject::tr("Sort by Category") },
|
||||||
{ 8, "GameVersion", QObject::tr("Sort by Game Version") } };
|
{ 8, "GameVersion", QObject::tr("Sort by Game Version") } };
|
||||||
|
|
||||||
|
QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const
|
||||||
|
{
|
||||||
|
return s_sorts;
|
||||||
}
|
}
|
||||||
|
@ -111,12 +111,14 @@ Task::Ptr ModrinthAPI::getProjects(QStringList addonIds, std::shared_ptr<QByteAr
|
|||||||
return netJob;
|
return netJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ResourceAPI::SortingMethod> ModrinthAPI::getSortingMethods() const
|
|
||||||
{
|
|
||||||
// https://docs.modrinth.com/api-spec/#tag/projects/operation/searchProjects
|
// https://docs.modrinth.com/api-spec/#tag/projects/operation/searchProjects
|
||||||
return { { 1, "relevance", QObject::tr("Sort by Relevance") },
|
static QList<ResourceAPI::SortingMethod> s_sorts = { { 1, "relevance", QObject::tr("Sort by Relevance") },
|
||||||
{ 2, "downloads", QObject::tr("Sort by Downloads") },
|
{ 2, "downloads", QObject::tr("Sort by Downloads") },
|
||||||
{ 3, "follows", QObject::tr("Sort by Follows") },
|
{ 3, "follows", QObject::tr("Sort by Follows") },
|
||||||
{ 4, "newest", QObject::tr("Sort by Last Updated") },
|
{ 4, "newest", QObject::tr("Sort by Last Updated") },
|
||||||
{ 5, "updated", QObject::tr("Sort by Newest") } };
|
{ 5, "updated", QObject::tr("Sort by Newest") } };
|
||||||
|
|
||||||
|
QList<ResourceAPI::SortingMethod> ModrinthAPI::getSortingMethods() const
|
||||||
|
{
|
||||||
|
return s_sorts;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ QString getCreditsHtml()
|
|||||||
stream << "<h3>" << QObject::tr("With thanks to", "About Credits") << "</h3>\n";
|
stream << "<h3>" << QObject::tr("With thanks to", "About Credits") << "</h3>\n";
|
||||||
stream << QString("<p>Boba %1</p>\n").arg(getWebsite("https://bobaonline.neocities.org/"));
|
stream << QString("<p>Boba %1</p>\n").arg(getWebsite("https://bobaonline.neocities.org/"));
|
||||||
stream << QString("<p>Davi Rafael %1</p>\n").arg(getWebsite("https://auti.one/"));
|
stream << QString("<p>Davi Rafael %1</p>\n").arg(getWebsite("https://auti.one/"));
|
||||||
stream << QString("<p>Fulmine %1</p>\n").arg(getWebsite("https://fulmine.xyz/"));
|
stream << QString("<p>Fulmine %1</p>\n").arg(getWebsite("https://www.fulmine.xyz/"));
|
||||||
stream << QString("<p>ely %1</p>\n").arg(getGitHub("elyrodso"));
|
stream << QString("<p>ely %1</p>\n").arg(getGitHub("elyrodso"));
|
||||||
stream << QString("<p>gon sawa %1</p>\n").arg(getGitHub("gonsawa"));
|
stream << QString("<p>gon sawa %1</p>\n").arg(getGitHub("gonsawa"));
|
||||||
stream << QString("<p>Pankakes</p>\n");
|
stream << QString("<p>Pankakes</p>\n");
|
||||||
|
@ -186,7 +186,7 @@ void ModUpdateDialog::checkCandidates()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!APPLICATION->settings()->get("ModDependenciesDisabled").toBool()) { // dependencies
|
{ // dependencies
|
||||||
auto depTask = makeShared<GetModDependenciesTask>(this, m_instance, m_mod_model.get(), selectedVers);
|
auto depTask = makeShared<GetModDependenciesTask>(this, m_instance, m_mod_model.get(), selectedVers);
|
||||||
|
|
||||||
connect(depTask.get(), &Task::failed, this,
|
connect(depTask.get(), &Task::failed, this,
|
||||||
|
@ -270,7 +270,6 @@ QList<BasePage*> ModDownloadDialog::getPages()
|
|||||||
|
|
||||||
GetModDependenciesTask::Ptr ModDownloadDialog::getModDependenciesTask()
|
GetModDependenciesTask::Ptr ModDownloadDialog::getModDependenciesTask()
|
||||||
{
|
{
|
||||||
if (!APPLICATION->settings()->get("ModDependenciesDisabled").toBool()) { // dependencies
|
|
||||||
if (auto model = dynamic_cast<ModFolderModel*>(getBaseModel().get()); model) {
|
if (auto model = dynamic_cast<ModFolderModel*>(getBaseModel().get()); model) {
|
||||||
QList<std::shared_ptr<GetModDependenciesTask::PackDependency>> selectedVers;
|
QList<std::shared_ptr<GetModDependenciesTask::PackDependency>> selectedVers;
|
||||||
for (auto& selected : getTasks()) {
|
for (auto& selected : getTasks()) {
|
||||||
@ -279,7 +278,6 @@ GetModDependenciesTask::Ptr ModDownloadDialog::getModDependenciesTask()
|
|||||||
|
|
||||||
return makeShared<GetModDependenciesTask>(this, m_instance, model, selectedVers);
|
return makeShared<GetModDependenciesTask>(this, m_instance, model, selectedVers);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,6 @@ void LauncherPage::applySettings()
|
|||||||
|
|
||||||
// Mods
|
// Mods
|
||||||
s->set("ModMetadataDisabled", ui->metadataDisableBtn->isChecked());
|
s->set("ModMetadataDisabled", ui->metadataDisableBtn->isChecked());
|
||||||
s->set("ModDependenciesDisabled", ui->dependenciesDisableBtn->isChecked());
|
|
||||||
}
|
}
|
||||||
void LauncherPage::loadSettings()
|
void LauncherPage::loadSettings()
|
||||||
{
|
{
|
||||||
@ -279,7 +278,6 @@ void LauncherPage::loadSettings()
|
|||||||
// Mods
|
// Mods
|
||||||
ui->metadataDisableBtn->setChecked(s->get("ModMetadataDisabled").toBool());
|
ui->metadataDisableBtn->setChecked(s->get("ModMetadataDisabled").toBool());
|
||||||
ui->metadataWarningLabel->setHidden(!ui->metadataDisableBtn->isChecked());
|
ui->metadataWarningLabel->setHidden(!ui->metadataDisableBtn->isChecked());
|
||||||
ui->dependenciesDisableBtn->setChecked(s->get("ModDependenciesDisabled").toBool());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LauncherPage::refreshFontPreview()
|
void LauncherPage::refreshFontPreview()
|
||||||
|
@ -186,16 +186,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="dependenciesDisableBtn">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Disable automatically checking and installation of mod dependencies.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Do not install mod dependencies</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -214,10 +214,6 @@ void ModFolderPage::updateMods()
|
|||||||
QMessageBox::critical(this, tr("Error"), tr("Please install a mod loader first!"));
|
QMessageBox::critical(this, tr("Error"), tr("Please install a mod loader first!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (APPLICATION->settings()->get("ModMetadataDisabled").toBool()) {
|
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Mod updates are unavailable when metadata is disabled!"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes();
|
auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes();
|
||||||
|
|
||||||
auto mods_list = m_model->selectedMods(selection);
|
auto mods_list = m_model->selectedMods(selection);
|
||||||
|
Loading…
Reference in New Issue
Block a user