Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
d29cbe2a
Commit
d29cbe2a
authored
4 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
pv-test-ui: Update to use PRESSURE_VESSEL_GRAPHICS_PROVIDER
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
698ce8e9
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!248
Use a better default for the graphics stack
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pressure-vessel/pressure-vessel-test-ui
+42
-19
42 additions, 19 deletions
pressure-vessel/pressure-vessel-test-ui
with
42 additions
and
19 deletions
pressure-vessel/pressure-vessel-test-ui
+
42
−
19
View file @
d29cbe2a
...
...
@@ -395,18 +395,47 @@ class Gui:
self
.
grid
.
attach
(
label
,
1
,
row
,
1
,
1
)
row
+=
1
self
.
host_graphics_check
=
Gtk
.
CheckButton
.
new_with_label
(
'
Use host-system graphics stack
'
)
value
=
boolean_environment
(
'
PRESSURE_VESSEL_HOST_GRAPHICS
'
,
True
)
self
.
host_graphics_check
.
set_active
(
value
)
self
.
grid
.
attach
(
self
.
host_graphics_check
,
1
,
row
,
1
,
1
)
label
=
Gtk
.
Label
.
new
(
'
Graphics stack
'
)
self
.
grid
.
attach
(
label
,
0
,
row
,
1
,
1
)
self
.
graphics_provider_combo
=
Gtk
.
ComboBoxText
.
new
()
env
=
os
.
getenv
(
'
PRESSURE_VESSEL_GRAPHICS_PROVIDER
'
)
if
env
is
not
None
:
self
.
graphics_provider_combo
.
append
(
env
,
'
$PRESSURE_VESSEL_GRAPHICS_PROVIDER ({})
'
.
format
(
env
or
'
empty
'
),
)
if
env
is
None
or
env
!=
'
/
'
:
self
.
graphics_provider_combo
.
append
(
'
/
'
,
'
Current execution environment
'
,
)
if
(
(
env
is
None
or
env
!=
'
/run/host
'
)
and
os
.
path
.
isdir
(
'
/run/host/etc
'
)
and
os
.
path
.
isdir
(
'
/run/host/usr
'
)
):
self
.
graphics_provider_combo
.
append
(
'
/run/host
'
,
'
Host system
'
,
)
if
env
is
None
or
env
!=
''
:
self
.
graphics_provider_combo
.
append
(
''
,
"
Container
'
s own libraries (probably won
'
t work)
"
,
)
self
.
graphics_provider_combo
.
set_active
(
0
)
self
.
grid
.
attach
(
self
.
graphics_provider_combo
,
1
,
row
,
1
,
1
)
row
+=
1
label
=
Gtk
.
Label
.
new
(
''
)
label
.
set_markup
(
'
<small><i>
'
"
Most games and GPUs won
'
t work
when
this is
disabl
ed.
"
"
Most games and GPUs won
'
t work
if
this is
chang
ed.
"
'
</i></small>
'
)
label
.
set_halign
(
Gtk
.
Align
.
START
)
...
...
@@ -602,11 +631,11 @@ class Gui:
if
combo
.
get_active_id
()
==
'
/
'
:
self
.
copy_runtime_check
.
set_sensitive
(
False
)
self
.
gc_runtimes_check
.
set_sensitive
(
False
)
self
.
host_
graphics_
check
.
set_sensitive
(
False
)
self
.
graphics_
provider_combo
.
set_sensitive
(
False
)
else
:
self
.
copy_runtime_check
.
set_sensitive
(
True
)
self
.
gc_runtimes_check
.
set_sensitive
(
True
)
self
.
host_
graphics_
check
.
set_sensitive
(
True
)
self
.
graphics_
provider_combo
.
set_sensitive
(
True
)
def
run_cb
(
self
,
_ignored
=
None
):
# type: (typing.Any) -> None
...
...
@@ -633,16 +662,10 @@ class Gui:
else
:
argv
.
append
(
'
--runtime=
'
+
id
)
if
self
.
host_graphics_check
.
get_active
():
if
(
os
.
path
.
isdir
(
'
/run/host/etc
'
)
and
os
.
path
.
isdir
(
'
/run/host/usr
'
)
):
argv
.
append
(
'
--graphics-provider=/run/host
'
)
else
:
argv
.
append
(
'
--graphics-provider=/
'
)
else
:
argv
.
append
(
'
--graphics-provider=
'
)
argv
.
append
(
'
--graphics-provider=
'
+
self
.
graphics_provider_combo
.
get_active_id
()
)
if
self
.
copy_runtime_check
.
get_active
():
os
.
makedirs
(
self
.
var_path
,
mode
=
0o755
,
exist_ok
=
True
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment