Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Tergoev
PortWINE
Commits
a4359341
Commit
a4359341
authored
May 25, 2020
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gamemoderun fix
parent
a1ca24cf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
128 deletions
+7
-128
proton
data_from_portwine/proton
+0
-120
debug
data_from_portwine/scripts/debug
+1
-1
runlib
data_from_portwine/scripts/runlib
+2
-3
start
data_from_portwine/scripts/start
+1
-1
vars
data_from_portwine/scripts/vars
+2
-2
winefile
data_from_portwine/scripts/winefile
+1
-1
No files found.
data_from_portwine/proton
View file @
a4359341
...
...
@@ -15,8 +15,6 @@ import tarfile
from
filelock
import
FileLock
#To enable debug logging, copy "user_settings.sample.py" to "user_settings.py"
#and edit it if needed.
CURRENT_PREFIX_VERSION
=
"5.6-GE-2"
...
...
@@ -98,7 +96,6 @@ class Proton:
self
.
fonts_dir
=
self
.
path
(
"dist/share/fonts/"
)
self
.
version_file
=
self
.
path
(
"version"
)
self
.
default_pfx_dir
=
self
.
path
(
"dist/share/default_pfx/"
)
self
.
user_settings_file
=
self
.
path
(
"user_settings.py"
)
self
.
wine_bin
=
self
.
bin_dir
+
"wine"
self
.
wineserver_bin
=
self
.
bin_dir
+
"wineserver"
self
.
dist_lock
=
FileLock
(
self
.
path
(
"dist.lock"
),
timeout
=-
1
)
...
...
@@ -385,24 +382,6 @@ class Session:
def
init_session
(
self
):
self
.
env
[
"WINEPREFIX"
]
=
g_compatdata
.
prefix_dir
#load environment overrides
if
os
.
path
.
exists
(
g_proton
.
user_settings_file
):
try
:
import
user_settings
for
key
,
value
in
user_settings
.
user_settings
.
items
():
self
.
env
.
setdefault
(
key
,
value
)
except
:
log
(
"************************************************"
)
log
(
"THERE IS AN ERROR IN YOUR user_settings.py FILE:"
)
log
(
"
%
s"
%
sys
.
exc_info
()[
1
])
log
(
"************************************************"
)
if
"PROTON_LOG"
in
self
.
env
and
nonzero
(
self
.
env
[
"PROTON_LOG"
]):
# self.env.setdefault("WINEDEBUG", "+timestamp,+pid,+tid,+seh,+debugstr,+loaddll,+mscoree")
self
.
env
.
setdefault
(
"DXVK_LOG_LEVEL"
,
"info"
)
self
.
env
.
setdefault
(
"VKD3D_DEBUG"
,
"warn"
)
self
.
env
.
setdefault
(
"WINE_MONO_TRACE"
,
"E:System.NotImplementedException"
)
#default wine-mono override for FNA games
self
.
env
.
setdefault
(
"WINE_MONO_OVERRIDES"
,
"Microsoft.Xna.Framework.*,Gac=n"
)
...
...
@@ -474,96 +453,11 @@ class Session:
f
.
write
(
"
\t
WINEESYNC=
\"
"
+
self
.
env
[
"WINEESYNC"
]
+
"
\"
\\\n
"
)
if
"WINEFSYNC"
in
self
.
env
:
f
.
write
(
"
\t
WINEFSYNC=
\"
"
+
self
.
env
[
"WINEFSYNC"
]
+
"
\"
\\\n
"
)
if
"SteamGameId"
in
self
.
env
:
f
.
write
(
"
\t
SteamGameId=
\"
"
+
self
.
env
[
"SteamGameId"
]
+
"
\"
\\\n
"
)
if
"SteamAppId"
in
self
.
env
:
f
.
write
(
"
\t
SteamAppId=
\"
"
+
self
.
env
[
"SteamAppId"
]
+
"
\"
\\\n
"
)
if
"WINEDLLOVERRIDES"
in
self
.
env
:
f
.
write
(
"
\t
WINEDLLOVERRIDES=
\"
"
+
self
.
env
[
"WINEDLLOVERRIDES"
]
+
"
\"
\\\n
"
)
if
"STEAM_COMPAT_CLIENT_INSTALL_PATH"
in
self
.
env
:
f
.
write
(
"
\t
STEAM_COMPAT_CLIENT_INSTALL_PATH=
\"
"
+
self
.
env
[
"STEAM_COMPAT_CLIENT_INSTALL_PATH"
]
+
"
\"
\\\n
"
)
if
"WINE_LARGE_ADDRESS_AWARE"
in
self
.
env
:
f
.
write
(
"
\t
WINE_LARGE_ADDRESS_AWARE=
\"
"
+
self
.
env
[
"WINE_LARGE_ADDRESS_AWARE"
]
+
"
\"
\\\n
"
)
def
dump_dbg_scripts
(
self
):
exe_name
=
os
.
path
.
basename
(
sys
.
argv
[
2
])
tmpdir
=
self
.
env
.
get
(
"PROTON_DEBUG_DIR"
,
"/tmp"
)
+
"/proton_"
+
os
.
environ
[
"USER"
]
+
"/"
makedirs
(
tmpdir
)
with
open
(
tmpdir
+
"winedbg"
,
"w"
)
as
f
:
f
.
write
(
"#!/bin/bash
\n
"
)
f
.
write
(
"#Run winedbg with args
\n\n
"
)
f
.
write
(
"cd
\"
"
+
os
.
getcwd
()
+
"
\"\n
"
)
self
.
dump_dbg_env
(
f
)
f
.
write
(
"
\t\"
"
+
g_proton
.
wine_bin
+
"
\"
winedbg
\"
$@
\"\n
"
)
os
.
chmod
(
tmpdir
+
"winedbg"
,
0
o755
)
with
open
(
tmpdir
+
"winedbg_run"
,
"w"
)
as
f
:
f
.
write
(
"#!/bin/bash
\n
"
)
f
.
write
(
"#Run winedbg and prepare to run game or given program
\n\n
"
)
f
.
write
(
"cd
\"
"
+
os
.
getcwd
()
+
"
\"\n
"
)
f
.
write
(
"DEF_CMD=("
)
first
=
True
for
arg
in
sys
.
argv
[
2
:]:
if
first
:
f
.
write
(
"
\"
"
+
arg
+
"
\"
"
)
first
=
False
else
:
f
.
write
(
"
\"
"
+
arg
+
"
\"
"
)
f
.
write
(
")
\n
"
)
self
.
dump_dbg_env
(
f
)
f
.
write
(
"
\t\"
"
+
g_proton
.
wine_bin
+
"
\"
winedbg
\"
${@:-${DEF_CMD[@]}}
\"\n
"
)
os
.
chmod
(
tmpdir
+
"winedbg_run"
,
0
o755
)
with
open
(
tmpdir
+
"gdb_attach"
,
"w"
)
as
f
:
f
.
write
(
"#!/bin/bash
\n
"
)
f
.
write
(
"#Run winedbg in gdb mode and auto-attach to already-running program
\n\n
"
)
f
.
write
(
"cd
\"
"
+
os
.
getcwd
()
+
"
\"\n
"
)
f
.
write
(
"EXE_NAME=${1:-
\"
"
+
exe_name
+
"
\"
}
\n
"
)
f
.
write
(
"WPID_HEX=$(
\"
"
+
tmpdir
+
"winedbg
\"
--command 'info process' | grep -i
\"
$EXE_NAME
\"
| cut -f2 -d' ' | tr -d '0')
\n
"
)
f
.
write
(
"if [ -z
\"
$WPID_HEX
\"
]; then
\n
"
)
f
.
write
(
" echo
\"
Program does not appear to be running:
\\\"
$EXE_NAME
\\\"\"\n
"
)
f
.
write
(
" exit 1
\n
"
)
f
.
write
(
"fi
\n
"
)
f
.
write
(
"WPID_DEC=$(printf
%
d 0x$WPID_HEX)
\n
"
)
self
.
dump_dbg_env
(
f
)
f
.
write
(
"
\t\"
"
+
g_proton
.
wine_bin
+
"
\"
winedbg --gdb $WPID_DEC
\n
"
)
os
.
chmod
(
tmpdir
+
"gdb_attach"
,
0
o755
)
with
open
(
tmpdir
+
"gdb_run"
,
"w"
)
as
f
:
f
.
write
(
"#!/bin/bash
\n
"
)
f
.
write
(
"#Run winedbg in gdb mode and prepare to run game or given program
\n\n
"
)
f
.
write
(
"cd
\"
"
+
os
.
getcwd
()
+
"
\"\n
"
)
f
.
write
(
"DEF_CMD=("
)
first
=
True
for
arg
in
sys
.
argv
[
2
:]:
if
first
:
f
.
write
(
"
\"
"
+
arg
+
"
\"
"
)
first
=
False
else
:
f
.
write
(
"
\"
"
+
arg
+
"
\"
"
)
f
.
write
(
")
\n
"
)
self
.
dump_dbg_env
(
f
)
f
.
write
(
"
\t\"
"
+
g_proton
.
wine_bin
+
"
\"
winedbg --gdb
\"
${@:-${DEF_CMD[@]}}
\"\n
"
)
os
.
chmod
(
tmpdir
+
"gdb_run"
,
0
o755
)
with
open
(
tmpdir
+
"run"
,
"w"
)
as
f
:
f
.
write
(
"#!/bin/bash
\n
"
)
f
.
write
(
"#Run game or given command in environment
\n\n
"
)
f
.
write
(
"cd
\"
"
+
os
.
getcwd
()
+
"
\"\n
"
)
f
.
write
(
"DEF_CMD=("
)
first
=
True
for
arg
in
sys
.
argv
[
2
:]:
if
first
:
f
.
write
(
"
\"
"
+
arg
+
"
\"
"
)
first
=
False
else
:
f
.
write
(
"
\"
"
+
arg
+
"
\"
"
)
f
.
write
(
")
\n
"
)
self
.
dump_dbg_env
(
f
)
f
.
write
(
"
\t\"
"
+
g_proton
.
wine_bin
+
"
\"
steam.exe
\"
${@:-${DEF_CMD[@]}}
\"\n
"
)
os
.
chmod
(
tmpdir
+
"run"
,
0
o755
)
def
run_proc
(
self
,
args
,
local_env
=
None
):
if
local_env
is
None
:
...
...
@@ -573,7 +467,6 @@ class Session:
def
run
(
self
):
self
.
run_proc
([
g_proton
.
wine_bin
]
+
sys
.
argv
[
2
:]
+
self
.
cmdlineappend
)
if
__name__
==
"__main__"
:
if
not
"STEAM_COMPAT_DATA_PATH"
in
os
.
environ
:
log
(
"No compat data path?"
)
...
...
@@ -595,19 +488,6 @@ if __name__ == "__main__":
if
sys
.
argv
[
1
]
==
"run"
:
#start target app
g_session
.
run
()
elif
sys
.
argv
[
1
]
==
"waitforexitandrun"
:
#wait for wineserver to shut down
g_session
.
run_proc
([
g_proton
.
wineserver_bin
,
"-w"
])
#then run
g_session
.
run
()
elif
sys
.
argv
[
1
]
==
"getcompatpath"
:
#linux -> windows path
path
=
subprocess
.
check_output
([
g_proton
.
wine_bin
,
"winepath"
,
"-w"
,
sys
.
argv
[
2
]],
env
=
g_session
.
env
,
stderr
=
g_session
.
log_file
)
sys
.
stdout
.
buffer
.
write
(
path
)
elif
sys
.
argv
[
1
]
==
"getnativepath"
:
#windows -> linux path
path
=
subprocess
.
check_output
([
g_proton
.
wine_bin
,
"winepath"
,
sys
.
argv
[
2
]],
env
=
g_session
.
env
,
stderr
=
g_session
.
log_file
)
sys
.
stdout
.
buffer
.
write
(
path
)
else
:
log
(
"Need a verb."
)
sys
.
exit
(
1
)
...
...
data_from_portwine/scripts/debug
View file @
a4359341
...
...
@@ -70,7 +70,7 @@ export WINE_MONO_TRACE="E:System.NotImplementedException"
#"/usr/bin/xterm" -geometry 130x13 -sb -e 'echo "--------------------------------------------------------PORTWINE-LINUX.RU--------------------------------------------------------" && "${PROTONRUN}" "run" "${gamestart}" "${launch_parameters}" &>> "${PORT_WINE_PATH}/${portname}.log"'
"
${
PROTONRUN
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
2>&1 |
${
var_gamemode
}
${
var_gamemode
}
"
${
PROTONRUN
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
2>&1
KILL9_WINEDEVICE | pwzen
STOP_PORTWINE | pwzen
...
...
data_from_portwine/scripts/runlib
View file @
a4359341
...
...
@@ -59,10 +59,9 @@ read "var_dxvk_on" < "${config_path}/dxvk_on"
export
"var_dxvk_on"
if
[
-x
"
`
which
"gamemoderun"
2>/dev/null
`
"
]
then
# LD_PRELOAD="$LD_PRELOAD:/usr/${LIB}/libgamemodeauto.so"
var_gamemode
=
"gamemoderun"
export
var_gamemode
=
gamemoderun
else
var_gamemode
=
`
echo
" "
`
export
var_gamemode
=
""
echo
"Gamemod not installed!"
fi
########################################################################
...
...
data_from_portwine/scripts/start
View file @
a4359341
...
...
@@ -2,5 +2,5 @@
# Author: Tergoev M.A.
.
"
$(
dirname
$(
readlink
-f
"
$0
"
))
/runlib"
START_PORTWINE
"
${
PROTONRUN
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
>
&2 |
${
var_gamemode
}
>
/dev/null & KILL9_WINEDEVICE
"
${
var_gamemode
}
"
"
${
PROTONRUN
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
& KILL9_WINEDEVICE
>
&2
STOP_PORTWINE
data_from_portwine/scripts/vars
View file @
a4359341
...
...
@@ -10,8 +10,8 @@ export PATH_TO_GAME="${PORT_WINE_PATH}/data/pfx/drive_c/Program Files (x86)/${ga
export
gamestart
=
"
${
PATH_TO_GAME
}
/.exe"
########################################################################
export
MESA_GL_VERSION_OVERRIDE
=
4.4COMPAT
export
STAGING_SHARED_MEMORY
=
0
export
PROTON_FORCE_LARGE_ADDRESS_AWARE
=
1
export
STAGING_SHARED_MEMORY
=
1
export
PROTON_FORCE_LARGE_ADDRESS_AWARE
=
0
export
PROTON_USE_SECCOMP
=
0
export
PROTON_NO_ESYNC
=
1
export
WINEDLLOVERRIDES
=
"winemenubuilder.exe=d"
...
...
data_from_portwine/scripts/winefile
View file @
a4359341
...
...
@@ -2,5 +2,5 @@
# Author: PortWINE-Linux.ru
.
"
$(
dirname
$(
readlink
-f
"
$0
"
))
/runlib"
START_PORTWINE
"
${
PROTONRUN
}
"
"run"
"explorer"
|
${
var_gamemode
}
>
/dev/null
& KILL9_WINEDEVICE
${
var_gamemode
}
"
${
PROTONRUN
}
"
"run"
"explorer"
& KILL9_WINEDEVICE
STOP_PORTWINE
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment