mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 21:27:44 +02:00
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into cat_day
This commit is contained in:
@ -108,12 +108,9 @@ bool openDirectory(const QString& path, [[maybe_unused]] bool ensureExists)
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
|
||||
if (!isSandbox()) {
|
||||
return IndirectOpen(f);
|
||||
} else {
|
||||
return f();
|
||||
}
|
||||
#else
|
||||
return f();
|
||||
#endif
|
||||
return f();
|
||||
}
|
||||
|
||||
bool openFile(const QString& path)
|
||||
|
@ -565,6 +565,22 @@ QProcessEnvironment MinecraftInstance::createEnvironment()
|
||||
for (auto it = variables.begin(); it != variables.end(); ++it) {
|
||||
env.insert(it.key(), it.value());
|
||||
}
|
||||
// custom env
|
||||
|
||||
auto insertEnv = [&env](QMap<QString, QVariant> envMap) {
|
||||
if (envMap.isEmpty())
|
||||
return;
|
||||
|
||||
for (auto iter = envMap.begin(); iter != envMap.end(); iter++)
|
||||
env.insert(iter.key(), iter.value().toString());
|
||||
};
|
||||
|
||||
bool overrideEnv = settings()->get("OverrideEnv").toBool();
|
||||
|
||||
if (!overrideEnv)
|
||||
insertEnv(APPLICATION->settings()->get("Env").toMap());
|
||||
else
|
||||
insertEnv(settings()->get("Env").toMap());
|
||||
return env;
|
||||
}
|
||||
|
||||
@ -606,24 +622,6 @@ QProcessEnvironment MinecraftInstance::createLaunchEnvironment()
|
||||
env.insert("__GLX_VENDOR_LIBRARY_NAME", "nvidia");
|
||||
}
|
||||
#endif
|
||||
|
||||
// custom env
|
||||
|
||||
auto insertEnv = [&env](QMap<QString, QVariant> envMap) {
|
||||
if (envMap.isEmpty())
|
||||
return;
|
||||
|
||||
for (auto iter = envMap.begin(); iter != envMap.end(); iter++)
|
||||
env.insert(iter.key(), iter.value().toString());
|
||||
};
|
||||
|
||||
bool overrideEnv = settings()->get("OverrideEnv").toBool();
|
||||
|
||||
if (!overrideEnv)
|
||||
insertEnv(APPLICATION->settings()->get("Env").toMap());
|
||||
else
|
||||
insertEnv(settings()->get("Env").toMap());
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
|
@ -1198,17 +1198,27 @@ void MainWindow::on_actionViewCentralModsFolder_triggered()
|
||||
|
||||
void MainWindow::on_actionViewIconThemeFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getIconThemesFolder().path());
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getIconThemesFolder().path(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewWidgetThemeFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getApplicationThemesFolder().path());
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getApplicationThemesFolder().path(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewCatPackFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getCatPacksFolder().path());
|
||||
DesktopServices::openDirectory(APPLICATION->themeManager()->getCatPacksFolder().path(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewIconsFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(APPLICATION->icons()->getDirectory(), true);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewLogsFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory("logs", true);
|
||||
}
|
||||
|
||||
void MainWindow::refreshInstances()
|
||||
|
@ -117,6 +117,8 @@ class MainWindow : public QMainWindow {
|
||||
void on_actionViewIconThemeFolder_triggered();
|
||||
void on_actionViewWidgetThemeFolder_triggered();
|
||||
void on_actionViewCatPackFolder_triggered();
|
||||
void on_actionViewIconsFolder_triggered();
|
||||
void on_actionViewLogsFolder_triggered();
|
||||
|
||||
void on_actionViewSelectedInstFolder_triggered();
|
||||
|
||||
|
@ -194,6 +194,9 @@
|
||||
<addaction name="actionViewIconThemeFolder"/>
|
||||
<addaction name="actionViewWidgetThemeFolder"/>
|
||||
<addaction name="actionViewCatPackFolder"/>
|
||||
<addaction name="actionViewIconsFolder"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionViewLogsFolder"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="accountsMenu">
|
||||
<property name="title">
|
||||
@ -545,10 +548,10 @@
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View &Instance Folder</string>
|
||||
<string>&Instances</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Open the instance folder in a file browser.</string>
|
||||
<string>Open the instances folder in a file browser.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewLauncherRootFolder">
|
||||
@ -557,7 +560,7 @@
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View Launcher &Root Folder</string>
|
||||
<string>Launcher &Root</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Open the launcher's root folder in a file browser.</string>
|
||||
@ -569,12 +572,36 @@
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View &Central Mods Folder</string>
|
||||
<string>&Central Mods</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Open the central mods folder in a file browser.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewIconsFolder">
|
||||
<property name="icon">
|
||||
<iconset theme="viewfolder">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Instance Icons</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Open the instance icons folder in a file browser.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewLogsFolder">
|
||||
<property name="icon">
|
||||
<iconset theme="viewfolder">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Logs</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Open the logs folder in a file browser.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionChangeTheme">
|
||||
<property name="text">
|
||||
<string>Themes</string>
|
||||
@ -718,10 +745,10 @@
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View &Widget Themes Folder</string>
|
||||
<string>&Widget Themes</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>View Widget Theme Folder</string>
|
||||
<string>Open the widget themes folder in a file browser.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewIconThemeFolder">
|
||||
@ -730,18 +757,22 @@
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View I&con Theme Folder</string>
|
||||
<string>I&con Theme</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>View Icon Theme Folder</string>
|
||||
<string>Open the icon theme folder in a file browser.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewCatPackFolder">
|
||||
<property name="icon">
|
||||
<iconset theme="viewfolder"/>
|
||||
<iconset theme="viewfolder">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View Cat Packs Folder</string>
|
||||
<string>Cat Packs</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Open the cat packs folder in a file browser.</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
@ -209,6 +209,9 @@
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Note: you only need to set this to access private data. Read the <a href="https://docs.modrinth.com/api-spec/#section/Authentication">documentation</a> for more information.</p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
@ -84,7 +84,7 @@
|
||||
<string notr="true"> MiB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>128</number>
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1048576</number>
|
||||
@ -106,7 +106,7 @@
|
||||
<string notr="true"> MiB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>128</number>
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1048576</number>
|
||||
@ -128,7 +128,7 @@
|
||||
<string notr="true"> MiB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>64</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
|
@ -155,7 +155,7 @@
|
||||
<string notr="true"> MiB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>128</number>
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1048576</number>
|
||||
@ -177,7 +177,7 @@
|
||||
<string notr="true"> MiB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>128</number>
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1048576</number>
|
||||
@ -199,7 +199,7 @@
|
||||
<string notr="true"> MiB</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>64</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
|
@ -80,7 +80,7 @@ void JavaSettingsWidget::setupUi()
|
||||
m_minMemSpinBox = new QSpinBox(m_memoryGroupBox);
|
||||
m_minMemSpinBox->setObjectName(QStringLiteral("minMemSpinBox"));
|
||||
m_minMemSpinBox->setSuffix(QStringLiteral(" MiB"));
|
||||
m_minMemSpinBox->setMinimum(128);
|
||||
m_minMemSpinBox->setMinimum(8);
|
||||
m_minMemSpinBox->setMaximum(1048576);
|
||||
m_minMemSpinBox->setSingleStep(128);
|
||||
m_labelMinMem->setBuddy(m_minMemSpinBox);
|
||||
@ -93,7 +93,7 @@ void JavaSettingsWidget::setupUi()
|
||||
m_maxMemSpinBox = new QSpinBox(m_memoryGroupBox);
|
||||
m_maxMemSpinBox->setObjectName(QStringLiteral("maxMemSpinBox"));
|
||||
m_maxMemSpinBox->setSuffix(QStringLiteral(" MiB"));
|
||||
m_maxMemSpinBox->setMinimum(128);
|
||||
m_maxMemSpinBox->setMinimum(8);
|
||||
m_maxMemSpinBox->setMaximum(1048576);
|
||||
m_maxMemSpinBox->setSingleStep(128);
|
||||
m_labelMaxMem->setBuddy(m_maxMemSpinBox);
|
||||
@ -112,7 +112,7 @@ void JavaSettingsWidget::setupUi()
|
||||
m_permGenSpinBox = new QSpinBox(m_memoryGroupBox);
|
||||
m_permGenSpinBox->setObjectName(QStringLiteral("permGenSpinBox"));
|
||||
m_permGenSpinBox->setSuffix(QStringLiteral(" MiB"));
|
||||
m_permGenSpinBox->setMinimum(64);
|
||||
m_permGenSpinBox->setMinimum(4);
|
||||
m_permGenSpinBox->setMaximum(1048576);
|
||||
m_permGenSpinBox->setSingleStep(8);
|
||||
m_gridLayout_2->addWidget(m_permGenSpinBox, 2, 1, 1, 1);
|
||||
|
Reference in New Issue
Block a user