summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--proto-wine/ftnoir_protocol_wine.cpp13
-rw-r--r--proto-wine/ftnoir_protocol_wine.h6
-rw-r--r--proto-wine/ftnoir_protocol_wine_dialog.cpp1
-rw-r--r--proto-wine/ftnoir_winecontrols.ui72
-rw-r--r--proto-wine/lang/nl_NL.ts10
-rw-r--r--proto-wine/lang/ru_RU.ts10
-rw-r--r--proto-wine/lang/stub.ts10
-rw-r--r--proto-wine/lang/zh_CN.ts10
8 files changed, 108 insertions, 24 deletions
diff --git a/proto-wine/ftnoir_protocol_wine.cpp b/proto-wine/ftnoir_protocol_wine.cpp
index ae7c6c31..bed1fed3 100644
--- a/proto-wine/ftnoir_protocol_wine.cpp
+++ b/proto-wine/ftnoir_protocol_wine.cpp
@@ -70,6 +70,19 @@ module_status wine::initialize()
wine_path = proton_path(s.proton_version);
env = make_steam_environ(s.proton_version, s.proton_appid);
}
+ else
+ {
+ QString wineprefix = "~/.wine";
+ if (!s.wineprefix->isEmpty())
+ wineprefix = s.wineprefix;
+ if (wineprefix[0] == '~')
+ wineprefix = qgetenv("HOME") + wineprefix.mid(1);
+
+ if (wineprefix[0] != '/')
+ error(tr("Wine prefix must be an absolute path (given '%1')").arg(wineprefix));
+
+ env.insert("WINEPREFIX", wineprefix);
+ }
if (s.esync)
env.insert("WINEESYNC", "1");
diff --git a/proto-wine/ftnoir_protocol_wine.h b/proto-wine/ftnoir_protocol_wine.h
index 9266e455..8175be03 100644
--- a/proto-wine/ftnoir_protocol_wine.h
+++ b/proto-wine/ftnoir_protocol_wine.h
@@ -22,8 +22,10 @@ struct settings : opts
variant_wine{b, "variant-wine", true },
fsync{b, "fsync", true},
esync{b, "esync", true};
- value<int> proton_appid{b, "proton-appid", 0};
- value<QString> proton_version{b, "proton-version", {} };
+
+ value<int> proton_appid{b, "proton-appid", 0};
+ value<QString> proton_version{b, "proton-version", {} },
+ wineprefix{b, "wineprefix", "~/.wine"};
};
class wine : TR, public IProtocol
diff --git a/proto-wine/ftnoir_protocol_wine_dialog.cpp b/proto-wine/ftnoir_protocol_wine_dialog.cpp
index b63268d0..f1cb01c2 100644
--- a/proto-wine/ftnoir_protocol_wine_dialog.cpp
+++ b/proto-wine/ftnoir_protocol_wine_dialog.cpp
@@ -19,6 +19,7 @@ FTControls::FTControls()
tie_setting(s.esync, ui.esync);
tie_setting(s.fsync, ui.fsync);
tie_setting(s.proton_appid, ui.proton_appid);
+ tie_setting(s.wineprefix, ui.wineprefix);
connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &FTControls::doOK);
connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &FTControls::doCancel);
diff --git a/proto-wine/ftnoir_winecontrols.ui b/proto-wine/ftnoir_winecontrols.ui
index 12aebd57..a0a1e071 100644
--- a/proto-wine/ftnoir_winecontrols.ui
+++ b/proto-wine/ftnoir_winecontrols.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>492</width>
- <height>400</height>
+ <width>544</width>
+ <height>410</height>
</rect>
</property>
<property name="windowTitle">
@@ -33,10 +33,26 @@
<string>Wine variant</string>
</property>
<layout class="QGridLayout" name="gridLayout">
+ <item row="2" column="1" alignment="Qt::AlignRight">
+ <widget class="QComboBox" name="proton_version">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>120</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ </item>
<item row="0" column="0">
<widget class="QRadioButton" name="variant_wine">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -46,10 +62,10 @@
</property>
</widget>
</item>
- <item row="1" column="0">
+ <item row="2" column="0">
<widget class="QRadioButton" name="variant_proton">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -59,17 +75,17 @@
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QComboBox" name="proton_version">
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="wineprefix">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
- <width>120</width>
+ <width>286</width>
<height>0</height>
</size>
</property>
@@ -86,6 +102,12 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="esync">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -96,6 +118,12 @@
</item>
<item>
<widget class="QCheckBox" name="fsync">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -106,16 +134,34 @@
</item>
<item>
<widget class="QWidget" name="widget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Steam application id (Proton)</string>
+ <string>Steam application id</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="proton_appid">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="maximum">
<number>2147483647</number>
</property>
@@ -129,6 +175,12 @@
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
diff --git a/proto-wine/lang/nl_NL.ts b/proto-wine/lang/nl_NL.ts
index e2d594a3..f71d8ad7 100644
--- a/proto-wine/lang/nl_NL.ts
+++ b/proto-wine/lang/nl_NL.ts
@@ -28,15 +28,15 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Proton (Steam Play)</source>
+ <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <source>Steam application id</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Steam application id (Proton)</source>
+ <source>Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -50,6 +50,10 @@
<source>Must specify application id for Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Wine prefix must be an absolute path (given &apos;%1&apos;)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>wine_metadata</name>
diff --git a/proto-wine/lang/ru_RU.ts b/proto-wine/lang/ru_RU.ts
index afd33eea..9937083f 100644
--- a/proto-wine/lang/ru_RU.ts
+++ b/proto-wine/lang/ru_RU.ts
@@ -28,15 +28,15 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Proton (Steam Play)</source>
+ <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <source>Steam application id</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Steam application id (Proton)</source>
+ <source>Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -50,6 +50,10 @@
<source>Must specify application id for Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Wine prefix must be an absolute path (given &apos;%1&apos;)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>wine_metadata</name>
diff --git a/proto-wine/lang/stub.ts b/proto-wine/lang/stub.ts
index b0ced919..9b74a44d 100644
--- a/proto-wine/lang/stub.ts
+++ b/proto-wine/lang/stub.ts
@@ -28,15 +28,15 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Proton (Steam Play)</source>
+ <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <source>Steam application id</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Steam application id (Proton)</source>
+ <source>Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -50,6 +50,10 @@
<source>Must specify application id for Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Wine prefix must be an absolute path (given &apos;%1&apos;)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>wine_metadata</name>
diff --git a/proto-wine/lang/zh_CN.ts b/proto-wine/lang/zh_CN.ts
index b0ced919..9b74a44d 100644
--- a/proto-wine/lang/zh_CN.ts
+++ b/proto-wine/lang/zh_CN.ts
@@ -28,15 +28,15 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Proton (Steam Play)</source>
+ <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When supported.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <source>Steam application id</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Steam application id (Proton)</source>
+ <source>Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -50,6 +50,10 @@
<source>Must specify application id for Proton (Steam Play)</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Wine prefix must be an absolute path (given &apos;%1&apos;)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>wine_metadata</name>