mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-04 18:45:21 +00:00
Merge pull request #25 from loathingKernel/insteam
Add files required for compatibility with Steam
This commit is contained in:
commit
65a9d88d9f
13
ULWGL-Runner/compatibilitytool.vdf
Normal file
13
ULWGL-Runner/compatibilitytool.vdf
Normal file
@ -0,0 +1,13 @@
|
||||
"compatibilitytools"
|
||||
{
|
||||
"compat_tools"
|
||||
{
|
||||
"ULWGL-Runner" // Internal name of this tool
|
||||
{
|
||||
"install_path" "."
|
||||
"display_name" "ULWGL-Runner"
|
||||
"from_oslist" "windows"
|
||||
"to_oslist" "linux"
|
||||
}
|
||||
}
|
||||
}
|
8
ULWGL-Runner/toolmanifest.vdf
Normal file
8
ULWGL-Runner/toolmanifest.vdf
Normal file
@ -0,0 +1,8 @@
|
||||
// Generated file, do not edit
|
||||
"manifest"
|
||||
{
|
||||
"commandline" "/ulwgl-run %verb%"
|
||||
"version" "2"
|
||||
"use_tool_subprocess_reaper" "1"
|
||||
"compatmanager_layer_name" "ulwgl-runner"
|
||||
}
|
1
ULWGL-Runner/ulwgl-run
Symbolic link
1
ULWGL-Runner/ulwgl-run
Symbolic link
@ -0,0 +1 @@
|
||||
../../../ULWGL/ulwgl-run
|
@ -1,9 +0,0 @@
|
||||
// Generated file, do not edit
|
||||
"manifest"
|
||||
{
|
||||
"commandline" "/ULWGL --verb=%verb% --"
|
||||
"version" "2"
|
||||
"use_tool_subprocess_reaper" "1"
|
||||
"unlisted" "1"
|
||||
"compatmanager_layer_name" "container-runtime"
|
||||
}
|
27
ulwgl_run.py
27
ulwgl_run.py
@ -13,6 +13,15 @@ from re import match
|
||||
import subprocess
|
||||
from ulwgl_dl_util import get_ulwgl_proton
|
||||
|
||||
verbs: Set[str] = {
|
||||
"waitforexitandrun",
|
||||
"run",
|
||||
"runinprefix",
|
||||
"destroyprefix",
|
||||
"getcompatpath",
|
||||
"getnativepath",
|
||||
}
|
||||
|
||||
|
||||
def parse_args() -> Union[Namespace, Tuple[str, List[str]]]: # noqa: D103
|
||||
opt_args: Set[str] = {"--help", "-h", "--config"}
|
||||
@ -43,6 +52,11 @@ example usage:
|
||||
if sys.argv[1:][0] in opt_args:
|
||||
return parser.parse_args(sys.argv[1:])
|
||||
|
||||
if sys.argv[1] in verbs:
|
||||
if "PROTON_VERB" not in os.environ:
|
||||
os.environ["PROTON_VERB"] = sys.argv[1]
|
||||
sys.argv.pop(1)
|
||||
|
||||
return sys.argv[1], sys.argv[2:]
|
||||
|
||||
|
||||
@ -135,7 +149,7 @@ def check_env(
|
||||
env["PROTONPATH"] = (
|
||||
Path("~/.local/share/Steam/compatibilitytools.d/")
|
||||
.expanduser()
|
||||
.joinpath(os.environ["PROTONPATH"])
|
||||
.joinpath(os.environ["PROTONPATH"]).as_posix()
|
||||
)
|
||||
elif not Path(os.environ["PROTONPATH"]).expanduser().is_dir():
|
||||
os.environ["PROTONPATH"] = ""
|
||||
@ -143,7 +157,7 @@ def check_env(
|
||||
else:
|
||||
env["PROTONPATH"] = os.environ["PROTONPATH"]
|
||||
|
||||
print(env["PROTONPATH"])
|
||||
print(env["PROTONPATH"], file=sys.stderr)
|
||||
|
||||
# If download fails/doesn't exist in the system, raise an error
|
||||
if not os.environ["PROTONPATH"]:
|
||||
@ -160,15 +174,6 @@ def set_env(
|
||||
|
||||
Filesystem paths will be formatted and expanded as POSIX
|
||||
"""
|
||||
verbs: Set[str] = {
|
||||
"waitforexitandrun",
|
||||
"run",
|
||||
"runinprefix",
|
||||
"destroyprefix",
|
||||
"getcompatpath",
|
||||
"getnativepath",
|
||||
}
|
||||
|
||||
# PROTON_VERB
|
||||
# For invalid Proton verbs, just assign the waitforexitandrun
|
||||
if "PROTON_VERB" in os.environ and os.environ["PROTON_VERB"] in verbs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user