summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-24 14:49:54 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-24 14:49:54 +0200
commitdfb0a3b724f624532557fe7cb20e8678560f444c (patch)
tree64ea831d95c2bb84c360c9f79559ffa5f7140467 /application
parentce99fabe1396ed2956dc7ecb468760ef88f98765 (diff)
downloadMultiMC-dfb0a3b724f624532557fe7cb20e8678560f444c.tar
MultiMC-dfb0a3b724f624532557fe7cb20e8678560f444c.tar.gz
MultiMC-dfb0a3b724f624532557fe7cb20e8678560f444c.tar.lz
MultiMC-dfb0a3b724f624532557fe7cb20e8678560f444c.tar.xz
MultiMC-dfb0a3b724f624532557fe7cb20e8678560f444c.zip
GH-991 implement wrapper commands
Diffstat (limited to 'application')
-rw-r--r--application/MultiMC.cpp3
-rw-r--r--application/pages/global/JavaPage.cpp2
-rw-r--r--application/pages/global/JavaPage.ui24
3 files changed, 24 insertions, 5 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 122890d1..baeb9de1 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -472,6 +472,9 @@ void MultiMC::initGlobalSettings(bool test_mode)
m_settings->registerSetting("JavaDetectionHack", "");
m_settings->registerSetting("JvmArgs", "");
+ // Wrapper command for launch
+ m_settings->registerSetting("WrapperCommand", "");
+
// Custom Commands
m_settings->registerSetting({"PreLaunchCommand", "PreLaunchCmd"}, "");
m_settings->registerSetting({"PostExitCommand", "PostExitCmd"}, "");
diff --git a/application/pages/global/JavaPage.cpp b/application/pages/global/JavaPage.cpp
index 3daf35dc..d201bb2f 100644
--- a/application/pages/global/JavaPage.cpp
+++ b/application/pages/global/JavaPage.cpp
@@ -70,6 +70,7 @@ void JavaPage::applySettings()
// Custom Commands
s->set("PreLaunchCommand", ui->preLaunchCmdTextBox->text());
+ s->set("WrapperCommand", ui->wrapperCmdTextBox->text());
s->set("PostExitCommand", ui->postExitCmdTextBox->text());
}
void JavaPage::loadSettings()
@@ -86,6 +87,7 @@ void JavaPage::loadSettings()
// Custom Commands
ui->preLaunchCmdTextBox->setText(s->get("PreLaunchCommand").toString());
+ ui->wrapperCmdTextBox->setText(s->get("WrapperCommand").toString());
ui->postExitCmdTextBox->setText(s->get("PostExitCommand").toString());
}
diff --git a/application/pages/global/JavaPage.ui b/application/pages/global/JavaPage.ui
index f9c629c2..f1bc3781 100644
--- a/application/pages/global/JavaPage.ui
+++ b/application/pages/global/JavaPage.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>545</width>
- <height>609</height>
+ <height>559</height>
</rect>
</property>
<property name="sizePolicy">
@@ -238,7 +238,7 @@
<string>Custom Commands</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
- <item row="1" column="0">
+ <item row="3" column="0">
<widget class="QLabel" name="labelPostExitCmd">
<property name="text">
<string>Post-exit command:</string>
@@ -255,9 +255,19 @@
<item row="0" column="1">
<widget class="QLineEdit" name="preLaunchCmdTextBox"/>
</item>
- <item row="1" column="1">
+ <item row="3" column="1">
<widget class="QLineEdit" name="postExitCmdTextBox"/>
</item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="labelWrapperCmd">
+ <property name="text">
+ <string>Wrapper command:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="wrapperCmdTextBox"/>
+ </item>
</layout>
</widget>
</item>
@@ -270,7 +280,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Pre-launch command runs before the instance launches and post-exit command runs after it exits. Both will be run in MultiMC's working directory with INST_ID, INST_DIR, and INST_NAME as environment variables.</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pre-launch command runs before the instance launches and post-exit command runs after it exits. Both will be run in MultiMC's working directory with INST_ID, INST_DIR, and INST_NAME as environment variables.&lt;/p&gt;&lt;p&gt;Wrapper command allows running java using an extra wrapper program (like 'optirun' on Linux)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -290,11 +300,15 @@
<tabstop>minMemSpinBox</tabstop>
<tabstop>maxMemSpinBox</tabstop>
<tabstop>permGenSpinBox</tabstop>
- <tabstop>javaPathTextBox</tabstop>
<tabstop>javaBrowseBtn</tabstop>
+ <tabstop>javaPathTextBox</tabstop>
<tabstop>jvmArgsTextBox</tabstop>
+ <tabstop>javaDetectBtn</tabstop>
+ <tabstop>javaTestBtn</tabstop>
<tabstop>preLaunchCmdTextBox</tabstop>
+ <tabstop>wrapperCmdTextBox</tabstop>
<tabstop>postExitCmdTextBox</tabstop>
+ <tabstop>tabWidget</tabstop>
</tabstops>
<resources/>
<connections/>