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
9c0257fc
Commit
9c0257fc
authored
Dec 02, 2020
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Global update of the port_on file
parent
fcc20622
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
284 additions
and
787 deletions
+284
-787
filelock.py
data_from_portwine/filelock.py
+0
-451
port_on
data_from_portwine/port_on
+155
-237
create_shortcut
data_from_portwine/scripts/create_shortcut
+3
-3
debug
data_from_portwine/scripts/debug
+1
-1
lang
data_from_portwine/scripts/lang
+1
-1
port_update
data_from_portwine/scripts/port_update
+11
-11
portproton.sh
data_from_portwine/scripts/portproton.sh
+2
-2
reset
data_from_portwine/scripts/reset
+2
-2
runlib
data_from_portwine/scripts/runlib
+61
-41
setup
data_from_portwine/scripts/setup
+3
-9
start
data_from_portwine/scripts/start
+4
-4
PortGOG_vars
data_from_portwine/scripts/vars/PortGOG_vars
+1
-1
PortProton_vars
data_from_portwine/scripts/vars/PortProton_vars
+16
-0
winecfg
data_from_portwine/scripts/winecfg
+2
-2
winecmd
data_from_portwine/scripts/winecmd
+3
-3
winefile
data_from_portwine/scripts/winefile
+8
-9
winereg
data_from_portwine/scripts/winereg
+1
-1
winetricks
data_from_portwine/scripts/winetricks
+0
-0
winetricks-q-force
data_from_portwine/scripts/winetricks-q-force
+8
-7
PortNAME-XX
portwine_install_script/PortNAME-XX
+2
-2
No files found.
data_from_portwine/filelock.py
deleted
100755 → 0
View file @
fcc20622
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
# of the public at large and to the detriment of our heirs and
# successors. We intend this dedication to be an overt act of
# relinquishment in perpetuity of all present and future rights to this
# software under copyright law.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# For more information, please refer to <http://unlicense.org>
"""
A platform independent file lock that supports the with-statement.
"""
# Modules
# ------------------------------------------------
import
logging
import
os
import
threading
import
time
try
:
import
warnings
except
ImportError
:
warnings
=
None
try
:
import
msvcrt
except
ImportError
:
msvcrt
=
None
try
:
import
fcntl
except
ImportError
:
fcntl
=
None
# Backward compatibility
# ------------------------------------------------
try
:
TimeoutError
except
NameError
:
TimeoutError
=
OSError
# Data
# ------------------------------------------------
__all__
=
[
"Timeout"
,
"BaseFileLock"
,
"WindowsFileLock"
,
"UnixFileLock"
,
"SoftFileLock"
,
"FileLock"
]
__version__
=
"3.0.12"
_logger
=
None
def
logger
():
"""Returns the logger instance used in this module."""
global
_logger
_logger
=
_logger
or
logging
.
getLogger
(
__name__
)
return
_logger
# Exceptions
# ------------------------------------------------
class
Timeout
(
TimeoutError
):
"""
Raised when the lock could not be acquired in *timeout*
seconds.
"""
def
__init__
(
self
,
lock_file
):
"""
"""
#: The path of the file lock.
self
.
lock_file
=
lock_file
return
None
def
__str__
(
self
):
temp
=
"The file lock '{}' could not be acquired."
\
.
format
(
self
.
lock_file
)
return
temp
# Classes
# ------------------------------------------------
# This is a helper class which is returned by :meth:`BaseFileLock.acquire`
# and wraps the lock to make sure __enter__ is not called twice when entering
# the with statement.
# If we would simply return *self*, the lock would be acquired again
# in the *__enter__* method of the BaseFileLock, but not released again
# automatically.
#
# :seealso: issue #37 (memory leak)
class
_Acquire_ReturnProxy
(
object
):
def
__init__
(
self
,
lock
):
self
.
lock
=
lock
return
None
def
__enter__
(
self
):
return
self
.
lock
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
):
self
.
lock
.
release
()
return
None
class
BaseFileLock
(
object
):
"""
Implements the base class of a file lock.
"""
def
__init__
(
self
,
lock_file
,
timeout
=
-
1
):
"""
"""
# The path to the lock file.
self
.
_lock_file
=
lock_file
# The file descriptor for the *_lock_file* as it is returned by the
# os.open() function.
# This file lock is only NOT None, if the object currently holds the
# lock.
self
.
_lock_file_fd
=
None
# The default timeout value.
self
.
timeout
=
timeout
# We use this lock primarily for the lock counter.
self
.
_thread_lock
=
threading
.
Lock
()
# The lock counter is used for implementing the nested locking
# mechanism. Whenever the lock is acquired, the counter is increased and
# the lock is only released, when this value is 0 again.
self
.
_lock_counter
=
0
return
None
@property
def
lock_file
(
self
):
"""
The path to the lock file.
"""
return
self
.
_lock_file
@property
def
timeout
(
self
):
"""
You can set a default timeout for the filelock. It will be used as
fallback value in the acquire method, if no timeout value (*None*) is
given.
If you want to disable the timeout, set it to a negative value.
A timeout of 0 means, that there is exactly one attempt to acquire the
file lock.
.. versionadded:: 2.0.0
"""
return
self
.
_timeout
@timeout.setter
def
timeout
(
self
,
value
):
"""
"""
self
.
_timeout
=
float
(
value
)
return
None
# Platform dependent locking
# --------------------------------------------
def
_acquire
(
self
):
"""
Platform dependent. If the file lock could be
acquired, self._lock_file_fd holds the file descriptor
of the lock file.
"""
raise
NotImplementedError
()
def
_release
(
self
):
"""
Releases the lock and sets self._lock_file_fd to None.
"""
raise
NotImplementedError
()
# Platform independent methods
# --------------------------------------------
@property
def
is_locked
(
self
):
"""
True, if the object holds the file lock.
.. versionchanged:: 2.0.0
This was previously a method and is now a property.
"""
return
self
.
_lock_file_fd
is
not
None
def
acquire
(
self
,
timeout
=
None
,
poll_intervall
=
0.05
):
"""
Acquires the file lock or fails with a :exc:`Timeout` error.
.. code-block:: python
# You can use this method in the context manager (recommended)
with lock.acquire():
pass
# Or use an equivalent try-finally construct:
lock.acquire()
try:
pass
finally:
lock.release()
:arg float timeout:
The maximum time waited for the file lock.
If ``timeout < 0``, there is no timeout and this method will
block until the lock could be acquired.
If ``timeout`` is None, the default :attr:`~timeout` is used.
:arg float poll_intervall:
We check once in *poll_intervall* seconds if we can acquire the
file lock.
:raises Timeout:
if the lock could not be acquired in *timeout* seconds.
.. versionchanged:: 2.0.0
This method returns now a *proxy* object instead of *self*,
so that it can be used in a with statement without side effects.
"""
# Use the default timeout, if no timeout is provided.
if
timeout
is
None
:
timeout
=
self
.
timeout
# Increment the number right at the beginning.
# We can still undo it, if something fails.
with
self
.
_thread_lock
:
self
.
_lock_counter
+=
1
lock_id
=
id
(
self
)
lock_filename
=
self
.
_lock_file
start_time
=
time
.
time
()
try
:
while
True
:
with
self
.
_thread_lock
:
if
not
self
.
is_locked
:
logger
()
.
debug
(
'Attempting to acquire lock
%
s on
%
s'
,
lock_id
,
lock_filename
)
self
.
_acquire
()
if
self
.
is_locked
:
logger
()
.
info
(
'Lock
%
s acquired on
%
s'
,
lock_id
,
lock_filename
)
break
elif
timeout
>=
0
and
time
.
time
()
-
start_time
>
timeout
:
logger
()
.
debug
(
'Timeout on acquiring lock
%
s on
%
s'
,
lock_id
,
lock_filename
)
raise
Timeout
(
self
.
_lock_file
)
else
:
logger
()
.
debug
(
'Lock
%
s not acquired on
%
s, waiting
%
s seconds ...'
,
lock_id
,
lock_filename
,
poll_intervall
)
time
.
sleep
(
poll_intervall
)
except
:
# Something did go wrong, so decrement the counter.
with
self
.
_thread_lock
:
self
.
_lock_counter
=
max
(
0
,
self
.
_lock_counter
-
1
)
raise
return
_Acquire_ReturnProxy
(
lock
=
self
)
def
release
(
self
,
force
=
False
):
"""
Releases the file lock.
Please note, that the lock is only completly released, if the lock
counter is 0.
Also note, that the lock file itself is not automatically deleted.
:arg bool force:
If true, the lock counter is ignored and the lock is released in
every case.
"""
with
self
.
_thread_lock
:
if
self
.
is_locked
:
self
.
_lock_counter
-=
1
if
self
.
_lock_counter
==
0
or
force
:
lock_id
=
id
(
self
)
lock_filename
=
self
.
_lock_file
logger
()
.
debug
(
'Attempting to release lock
%
s on
%
s'
,
lock_id
,
lock_filename
)
self
.
_release
()
self
.
_lock_counter
=
0
logger
()
.
info
(
'Lock
%
s released on
%
s'
,
lock_id
,
lock_filename
)
return
None
def
__enter__
(
self
):
self
.
acquire
()
return
self
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
):
self
.
release
()
return
None
def
__del__
(
self
):
self
.
release
(
force
=
True
)
return
None
# Windows locking mechanism
# ~~~~~~~~~~~~~~~~~~~~~~~~~
class
WindowsFileLock
(
BaseFileLock
):
"""
Uses the :func:`msvcrt.locking` function to hard lock the lock file on
windows systems.
"""
def
_acquire
(
self
):
open_mode
=
os
.
O_RDWR
|
os
.
O_CREAT
|
os
.
O_TRUNC
try
:
fd
=
os
.
open
(
self
.
_lock_file
,
open_mode
)
except
OSError
:
pass
else
:
try
:
msvcrt
.
locking
(
fd
,
msvcrt
.
LK_NBLCK
,
1
)
except
(
IOError
,
OSError
):
os
.
close
(
fd
)
else
:
self
.
_lock_file_fd
=
fd
return
None
def
_release
(
self
):
fd
=
self
.
_lock_file_fd
self
.
_lock_file_fd
=
None
msvcrt
.
locking
(
fd
,
msvcrt
.
LK_UNLCK
,
1
)
os
.
close
(
fd
)
try
:
os
.
remove
(
self
.
_lock_file
)
# Probably another instance of the application
# that acquired the file lock.
except
OSError
:
pass
return
None
# Unix locking mechanism
# ~~~~~~~~~~~~~~~~~~~~~~
class
UnixFileLock
(
BaseFileLock
):
"""
Uses the :func:`fcntl.flock` to hard lock the lock file on unix systems.
"""
def
_acquire
(
self
):
open_mode
=
os
.
O_RDWR
|
os
.
O_CREAT
|
os
.
O_TRUNC
fd
=
os
.
open
(
self
.
_lock_file
,
open_mode
)
try
:
fcntl
.
flock
(
fd
,
fcntl
.
LOCK_EX
|
fcntl
.
LOCK_NB
)
except
(
IOError
,
OSError
):
os
.
close
(
fd
)
else
:
self
.
_lock_file_fd
=
fd
return
None
def
_release
(
self
):
# Do not remove the lockfile:
#
# https://github.com/benediktschmitt/py-filelock/issues/31
# https://stackoverflow.com/questions/17708885/flock-removing-locked-file-without-race-condition
fd
=
self
.
_lock_file_fd
self
.
_lock_file_fd
=
None
fcntl
.
flock
(
fd
,
fcntl
.
LOCK_UN
)
os
.
close
(
fd
)
return
None
# Soft lock
# ~~~~~~~~~
class
SoftFileLock
(
BaseFileLock
):
"""
Simply watches the existence of the lock file.
"""
def
_acquire
(
self
):
open_mode
=
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_EXCL
|
os
.
O_TRUNC
try
:
fd
=
os
.
open
(
self
.
_lock_file
,
open_mode
)
except
(
IOError
,
OSError
):
pass
else
:
self
.
_lock_file_fd
=
fd
return
None
def
_release
(
self
):
os
.
close
(
self
.
_lock_file_fd
)
self
.
_lock_file_fd
=
None
try
:
os
.
remove
(
self
.
_lock_file
)
# The file is already deleted and that's what we want.
except
OSError
:
pass
return
None
# Platform filelock
# ~~~~~~~~~~~~~~~~~
#: Alias for the lock, which should be used for the current platform. On
#: Windows, this is an alias for :class:`WindowsFileLock`, on Unix for
#: :class:`UnixFileLock` and otherwise for :class:`SoftFileLock`.
FileLock
=
None
if
msvcrt
:
FileLock
=
WindowsFileLock
elif
fcntl
:
FileLock
=
UnixFileLock
else
:
FileLock
=
SoftFileLock
if
warnings
is
not
None
:
warnings
.
warn
(
"only soft file lock is available"
)
data_from_portwine/port_on
View file @
9c0257fc
...
...
@@ -15,9 +15,10 @@ import subprocess
import
sys
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.
13
-1"
CURRENT_PREFIX_VERSION
=
"5.
21-GE
-1"
PFX
=
"Proton: "
ld_path_var
=
"LD_LIBRARY_PATH"
...
...
@@ -29,17 +30,6 @@ def log(msg):
sys
.
stderr
.
write
(
PFX
+
msg
+
os
.
linesep
)
sys
.
stderr
.
flush
()
def
file_is_wine_fake_dll
(
path
):
if
not
os
.
path
.
exists
(
path
):
return
False
try
:
sfile
=
open
(
path
,
"rb"
)
sfile
.
seek
(
0x40
)
tag
=
sfile
.
read
(
20
)
return
tag
==
b
"Wine placeholder DLL"
except
IOError
:
return
False
def
makedirs
(
path
):
try
:
os
.
makedirs
(
path
)
...
...
@@ -47,15 +37,23 @@ def makedirs(path):
#already exists
pass
def
try_copy
(
src
,
dst
):
def
try_copy
(
src
,
dst
,
add_write_perm
=
True
):
try
:
if
os
.
path
.
isdir
(
dst
):
dstfile
=
dst
+
"/"
+
os
.
path
.
basename
(
src
)
if
os
.
path
.
lexists
(
dstfile
):
os
.
remove
(
dstfile
)
elif
os
.
path
.
lexists
(
dst
):
os
.
remove
(
dst
)
else
:
dstfile
=
dst
if
os
.
path
.
lexists
(
dst
):
os
.
remove
(
dst
)
shutil
.
copy
(
src
,
dst
)
if
add_write_perm
:
new_mode
=
os
.
lstat
(
dstfile
)
.
st_mode
|
stat
.
S_IWUSR
|
stat
.
S_IWGRP
os
.
chmod
(
dstfile
,
new_mode
)
except
PermissionError
as
e
:
if
e
.
errno
==
errno
.
EPERM
:
#be forgiving about permissions errors; if it's a real problem, things will explode later anyway
...
...
@@ -63,30 +61,28 @@ def try_copy(src, dst):
else
:
raise
def
real_copy
(
src
,
dst
):
if
os
.
path
.
islink
(
src
):
os
.
symlink
(
os
.
readlink
(
src
),
dst
)
else
:
try_copy
(
src
,
dst
)
EXT2_IOC_GETFLAGS
=
0x80086601
EXT2_IOC_SETFLAGS
=
0x40086602
EXT4_CASEFOLD_FL
=
0x40000000
def
try_copyfile
(
src
,
dst
):
try
:
if
os
.
path
.
isdir
(
dst
):
dstfile
=
dst
+
"/"
+
os
.
path
.
basename
(
src
)
if
os
.
path
.
lexists
(
dstfile
):
os
.
remove
(
dstfile
)
elif
os
.
path
.
lexists
(
dst
):
os
.
remove
(
dst
)
shutil
.
copyfile
(
src
,
dst
)
except
PermissionError
as
e
:
if
e
.
errno
==
errno
.
EPERM
:
#be forgiving about permissions errors; if it's a real problem, things will explode later anyway
log
(
'Error while copying to
\"
'
+
dst
+
'
\"
: '
+
e
.
strerror
)
else
:
raise
def
set_dir_casefold_bit
(
dir_path
):
dr
=
os
.
open
(
dir_path
,
0
o644
)
if
dr
<
0
:
return
def
getmtimestr
(
*
path_fragments
):
path
=
os
.
path
.
join
(
*
path_fragments
)
try
:
dat
=
array
.
array
(
'I'
,
[
0
])
if
fcntl
.
ioctl
(
dr
,
EXT2_IOC_GETFLAGS
,
dat
,
True
)
>=
0
:
dat
[
0
]
=
dat
[
0
]
|
EXT4_CASEFOLD_FL
fcntl
.
ioctl
(
dr
,
EXT2_IOC_SETFLAGS
,
dat
,
False
)
except
OSError
:
#no problem
pass
os
.
close
(
dr
)
return
str
(
os
.
path
.
getmtime
(
path
))
except
IOError
:
return
"0"
class
Proton
:
def
__init__
(
self
,
base_dir
):
...
...
@@ -97,104 +93,22 @@ class Proton:
self
.
lib64_dir
=
self
.
path
(
"dist/lib64/"
)
self
.
fonts_dir
=
self
.
path
(
"dist/share/fonts/"
)
self
.
version_file
=
self
.
path
(
"version"
)
self
.
prefix_dir
=
self
.
path
(
"pfx/"
)
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
.
gamemoderun
=
"gamemoderun"
self
.
dist_lock
=
FileLock
(
self
.
path
(
"dist.lock"
),
timeout
=-
1
)
def
path
(
self
,
d
):
return
self
.
base_dir
+
d
def
make_default_prefix
(
self
):
with
self
.
dist_lock
:
local_env
=
dict
(
g_session
.
env
)
if
not
os
.
path
.
isdir
(
self
.
default_pfx_dir
):
#make default prefix
local_env
[
"WINEPREFIX"
]
=
self
.
default_pfx_dir
local_env
[
"WINEDEBUG"
]
=
"-all"
g_session
.
run_proc
([
self
.
wine_bin
,
"wineboot"
],
local_env
)
g_session
.
run_proc
([
self
.
wineserver_bin
,
"-w"
],
local_env
)
class
CompatData
:
def
__init__
(
self
,
compatdata
):
self
.
base_dir
=
os
.
environ
[
"PW_COMPAT_DATA_PATH"
]
self
.
prefix_dir
=
self
.
path
(
"pfx/"
)
self
.
default_pfx_dir
=
self
.
path
(
"dist/share/default_pfx/"
)
self
.
version_file
=
self
.
path
(
"version"
)
self
.
tracked_files_file
=
self
.
path
(
"tracked_files"
)
self
.
prefix_lock
=
FileLock
(
self
.
path
(
"pfx.lock"
),
timeout
=-
1
)
def
path
(
self
,
d
):
return
self
.
base_dir
+
d
def
remove_tracked_files
(
self
):
if
not
os
.
path
.
exists
(
self
.
tracked_files_file
):
log
(
"Prefix has no tracked_files??"
)
return
with
open
(
self
.
tracked_files_file
,
"r"
)
as
tracked_files
:
dirs
=
[]
for
f
in
tracked_files
:
path
=
self
.
prefix_dir
+
f
.
strip
()
if
os
.
path
.
exists
(
path
):
if
os
.
path
.
isfile
(
path
)
or
os
.
path
.
islink
(
path
):
os
.
remove
(
path
)
else
:
dirs
.
append
(
path
)
for
d
in
dirs
:
try
:
os
.
rmdir
(
d
)
except
OSError
:
#not empty
pass
os
.
remove
(
self
.
tracked_files_file
)
os
.
remove
(
self
.
version_file
)
def
upgrade_pfx
(
self
,
old_ver
):
#if old_ver == CURRENT_PREFIX_VERSION:
# return
#replace broken .NET installations with wine-mono support
if
os
.
path
.
exists
(
self
.
prefix_dir
+
"/drive_c/windows/Microsoft.NET/NETFXRepair.exe"
)
and
\
file_is_wine_fake_dll
(
self
.
prefix_dir
+
"/drive_c/windows/system32/mscoree.dll"
):
log
(
"Broken .NET installation detected, switching to wine-mono."
)
#deleting this directory allows wine-mono to work
shutil
.
rmtree
(
self
.
prefix_dir
+
"/drive_c/windows/Microsoft.NET"
)
#fix mono and gecko
if
os
.
path
.
exists
(
self
.
prefix_dir
+
"/drive_c/windows/mono"
):
shutil
.
rmtree
(
self
.
prefix_dir
+
"/drive_c/windows/mono"
)
if
os
.
path
.
exists
(
self
.
prefix_dir
+
"/drive_c/windows/system32/gecko"
):
shutil
.
rmtree
(
self
.
prefix_dir
+
"/drive_c/windows/system32/gecko"
)
if
os
.
path
.
exists
(
self
.
prefix_dir
+
"/drive_c/windows/syswow64/gecko"
):
shutil
.
rmtree
(
self
.
prefix_dir
+
"/drive_c/windows/syswow64/gecko"
)
def
copy_pfx
(
self
):
with
open
(
self
.
tracked_files_file
,
"w"
)
as
tracked_files
:
for
src_dir
,
dirs
,
files
in
os
.
walk
(
g_proton
.
default_pfx_dir
):
rel_dir
=
src_dir
.
replace
(
g_proton
.
default_pfx_dir
,
""
,
1
)
.
lstrip
(
'/'
)
if
len
(
rel_dir
)
>
0
:
rel_dir
=
rel_dir
+
"/"
dst_dir
=
src_dir
.
replace
(
g_proton
.
default_pfx_dir
,
self
.
prefix_dir
,
1
)
if
not
os
.
path
.
exists
(
dst_dir
):
os
.
makedirs
(
dst_dir
)
tracked_files
.
write
(
rel_dir
+
"
\n
"
)
for
dir_
in
dirs
:
src_file
=
os
.
path
.
join
(
src_dir
,
dir_
)
dst_file
=
os
.
path
.
join
(
dst_dir
,
dir_
)
if
os
.
path
.
islink
(
src_file
)
and
not
os
.
path
.
exists
(
dst_file
):
real_copy
(
src_file
,
dst_file
)
for
file_
in
files
:
src_file
=
os
.
path
.
join
(
src_dir
,
file_
)
dst_file
=
os
.
path
.
join
(
dst_dir
,
file_
)
if
not
os
.
path
.
exists
(
dst_file
):
real_copy
(
src_file
,
dst_file
)
tracked_files
.
write
(
rel_dir
+
file_
+
"
\n
"
)
def
create_fonts_symlinks
(
self
):
fontsmap
=
[
(
"LiberationSans-Regular.ttf"
,
"arial.ttf"
),
...
...
@@ -217,63 +131,89 @@ class CompatData:
os
.
symlink
(
fname
,
lname
)
def
setup_prefix
(
self
):
with
self
.
prefix_lock
:
if
os
.
path
.
exists
(
self
.
version_file
):
with
open
(
self
.
version_file
,
"r"
)
as
f
:
self
.
upgrade_pfx
(
f
.
readline
()
.
strip
())
else
:
self
.
upgrade_pfx
(
None
)
if
not
os
.
path
.
exists
(
self
.
prefix_dir
):
makedirs
(
self
.
prefix_dir
+
"/drive_c"
)
set_dir_casefold_bit
(
self
.
prefix_dir
+
"/drive_c"
)
if
not
os
.
path
.
exists
(
self
.
prefix_dir
+
"/user.reg"
):
self
.
copy_pfx
()
with
open
(
self
.
version_file
,
"w"
)
as
f
:
f
.
write
(
CURRENT_PREFIX_VERSION
+
"
\n
"
)
#create font files symlinks
self
.
create_fonts_symlinks
()
#copy openvr files into place
dst
=
self
.
prefix_dir
+
"/drive_c/vrclient/bin/"
makedirs
(
dst
)
try_copy
(
g_proton
.
lib_dir
+
"wine/fakedlls/vrclient.dll"
,
dst
)
try_copy
(
g_proton
.
lib64_dir
+
"wine/fakedlls/vrclient_x64.dll"
,
dst
)
try_copy
(
g_proton
.
lib_dir
+
"wine/dxvk/openvr_api_dxvk.dll"
,
self
.
prefix_dir
+
"/drive_c/windows/syswow64/"
)
try_copy
(
g_proton
.
lib64_dir
+
"wine/dxvk/openvr_api_dxvk.dll"
,
self
.
prefix_dir
+
"/drive_c/windows/system32/"
)
if
"wined3d"
in
g_session
.
compat_config
:
dxvkfiles
=
[
"dxvk_config"
]
wined3dfiles
=
[
"d3d11"
,
"d3d10"
,
"d3d10core"
,
"d3d10_1"
,
"d3d9"
]
else
:
dxvkfiles
=
[
"dxvk_config"
,
"d3d11"
,
"d3d10"
,
"d3d10core"
,
"d3d10_1"
,
"d3d9"
]
wined3dfiles
=
[]
if
not
os
.
path
.
exists
(
self
.
prefix_dir
):
makedirs
(
self
.
prefix_dir
+
"/drive_c"
)
set_dir_casefold_bit
(
self
.
prefix_dir
+
"/drive_c"
)
use_wined3d
=
"wined3d"
in
g_session
.
compat_config
use_dxvk_dxgi
=
"WINEDLLOVERRIDES"
in
g_session
.
env
and
"dxgi=n"
in
g_session
.
env
[
"WINEDLLOVERRIDES"
]
builtin_dll_copy
=
os
.
environ
.
get
(
"PROTON_DLL_COPY"
,
#dxsetup redist
"d3dcompiler_*.dll,"
+
"d3dcsx*.dll,"
+
"d3dx*.dll,"
+
"x3daudio*.dll,"
+
"xactengine*.dll,"
+
"xapofx*.dll,"
+
"xaudio*.dll,"
+
"xinput*.dll,"
+
#vcruntime redist
"atl1*.dll,"
+
"concrt1*.dll,"
+
"msvcp1*.dll,"
+
"msvcr1*.dll,"
+
"vcamp1*.dll,"
+
"vcomp1*.dll,"
+
"vccorlib1*.dll,"
+
"vcruntime1*.dll,"
+
"api-ms-win-crt-conio-l1-1-0.dll,"
+
"api-ms-win-crt-heap-l1-1-0.dll,"
+
"api-ms-win-crt-locale-l1-1-0.dll,"
+
"api-ms-win-crt-math-l1-1-0.dll,"
+
"api-ms-win-crt-runtime-l1-1-0.dll,"
+
"api-ms-win-crt-stdio-l1-1-0.dll,"
+
"ucrtbase.dll,"
+
#some games balk at ntdll symlink(?)
"ntdll.dll,"
+
#some games require official vulkan loader
"vulkan-1.dll"
)
#create font files symlinks
self
.
create_fonts_symlinks
()
#copy openvr files into place
dst
=
self
.
prefix_dir
+
"/drive_c/vrclient/bin/"
makedirs
(
dst
)
try_copy
(
g_proton
.
lib_dir
+
"wine/fakedlls/vrclient.dll"
,
dst
)
try_copy
(
g_proton
.
lib64_dir
+
"wine/fakedlls/vrclient_x64.dll"
,
dst
)
try_copy
(
g_proton
.
lib_dir
+
"wine/dxvk/openvr_api_dxvk.dll"
,
self
.
prefix_dir
+
"/drive_c/windows/syswow64/"
)
try_copy
(
g_proton
.
lib64_dir
+
"wine/dxvk/openvr_api_dxvk.dll"
,
self
.
prefix_dir
+
"/drive_c/windows/system32/"
)
if
use_wined3d
:
dxvkfiles
=
[
"dxvk_config"
]
wined3dfiles
=
[
"d3d11"
,
"d3d10"
,
"d3d10core"
,
"d3d10_1"
,
"d3d9"
]
else
:
dxvkfiles
=
[
"dxvk_config"
,
"d3d11"
,
"d3d10"
,
"d3d10core"
,
"d3d10_1"
,
"d3d9"
]
wined3dfiles
=
[]
#if the user asked for dxvk's dxgi (dxgi=n), then copy it into place
if
"PW_DXGI_NATIVE"
in
os
.
environ
and
"1"
in
os
.
environ
[
"PW_DXGI_NATIVE"
]
:
dxvkfiles
.
append
(
"dxgi"
)
else
:
wined3dfiles
.
append
(
"dxgi"
)
for
f
in
wined3dfiles
:
try_copy
(
g_proton
.
default_pfx_dir
+
"drive_c/windows/system32
/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/system32/"
+
f
+
".dll"
)
try_copy
(
g_proton
.
default_pfx_dir
+
"drive_c/windows/syswow64
/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/syswow64/"
+
f
+
".dll"
)
for
f
in
dxvkfiles
:
try_copy
(
g_proton
.
lib64_dir
+
"wine/dxvk/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/system32/"
+
f
+
".dll"
)
try_copy
(
g_proton
.
lib_dir
+
"wine/dxvk/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/syswow64/"
+
f
+
".dll"
)
g_session
.
dlloverrides
[
f
]
=
"n"
try_copy
(
g_proton
.
lib64_dir
+
"wine/vkd3d-proton/d3d12.dll"
,
#if the user asked for dxvk's dxgi (dxgi=n), then copy it into place
if
use_dxvk_dxgi
:
dxvkfiles
.
append
(
"dxgi"
)
else
:
wined3dfiles
.
append
(
"dxgi"
)
for
f
in
wined3dfiles
:
try_copy
(
g_proton
.
lib64_dir
+
"wine
/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/system32/"
+
f
+
".dll"
)
try_copy
(
g_proton
.
lib_dir
+
"wine
/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/syswow64/"
+
f
+
".dll"
)
for
f
in
dxvkfiles
:
try_copy
(
g_proton
.
lib64_dir
+
"wine/dxvk/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/system32/"
+
f
+
".dll"
)
try_copy
(
g_proton
.
lib_dir
+
"wine/dxvk/"
+
f
+
".dll"
,
self
.
prefix_dir
+
"drive_c/windows/syswow64/"
+
f
+
".dll"
)
g_session
.
dlloverrides
[
f
]
=
"n"
try_copy
(
g_proton
.
lib64_dir
+
"wine/vkd3d-proton/d3d12.dll"
,
self
.
prefix_dir
+
"drive_c/windows/system32/d3d12.dll"
)
try_copy
(
g_proton
.
lib_dir
+
"wine/vkd3d-proton/d3d12.dll"
,
try_copy
(
g_proton
.
lib_dir
+
"wine/vkd3d-proton/d3d12.dll"
,
self
.
prefix_dir
+
"drive_c/windows/syswow64/d3d12.dll"
)
def
comma_escaped
(
s
):
...
...
@@ -286,41 +226,14 @@ def comma_escaped(s):
class
Session
:
def
__init__
(
self
):
self
.
log_file
=
None
self
.
env
=
dict
(
os
.
environ
)
self
.
dlloverrides
=
{
"steam.exe"
:
"n"
,
"steam"
:
"n"
,
"steam2"
:
"n"
,
"steam_api"
:
"n"
,
"steam_api64"
:
"n"
,
"steamwebrtc"
:
"n"
,
"steamservice"
:
"n"
,
"steamclient"
:
"n"
,
"steamclient64"
:
"n"
"dotnetfx35.exe"
:
"b"
#replace the broken installer, as does Windows
}
self
.
compat_config
=
set
()
self
.
cmdlineappend
=
[]
if
"PW_COMPAT_CONFIG"
in
os
.
environ
:
config
=
os
.
environ
[
"PW_COMPAT_CONFIG"
]
while
config
:
(
cur
,
sep
,
config
)
=
config
.
partition
(
','
)
if
cur
.
startswith
(
"cmdlineappend:"
):
while
comma_escaped
(
cur
):
(
a
,
b
,
c
)
=
config
.
partition
(
','
)
cur
=
cur
[:
-
1
]
+
','
+
a
config
=
c
self
.
cmdlineappend
.
append
(
cur
[
14
:]
.
replace
(
'
\\\\
'
,
'
\\
'
))
else
:
self
.
compat_config
.
add
(
cur
)
#turn forcelgadd on by default unless it is disabled in compat config
if
not
"noforcelgadd"
in
self
.
compat_config
:
self
.
compat_config
.
add
(
"forcelgadd"
)
def
init_wine
(
self
):
if
"HOST_LC_ALL"
in
self
.
env
and
len
(
self
.
env
[
"HOST_LC_ALL"
])
>
0
:
#steam sets LC_ALL=C to help some games, but Wine requires the real value
...
...
@@ -332,6 +245,10 @@ class Session:
self
.
env
.
pop
(
"WINEARCH"
,
""
)
if
'ORIG_'
+
ld_path_var
not
in
os
.
environ
:
# Allow wine to restore this when calling an external app.
self
.
env
[
'ORIG_'
+
ld_path_var
]
=
os
.
environ
.
get
(
ld_path_var
,
''
)
if
ld_path_var
in
os
.
environ
:
self
.
env
[
ld_path_var
]
=
g_proton
.
lib64_dir
+
":"
+
g_proton
.
lib_dir
+
":"
+
os
.
environ
[
ld_path_var
]
else
:
...
...
@@ -365,8 +282,10 @@ class Session:
def
init_session
(
self
):
self
.
env
[
"WINEPREFIX"
]
=
g_compatdata
.
prefix_dir
if
"PW_LOG"
in
os
.
environ
and
nonzero
(
os
.
environ
[
"PW_LOG"
]):
self
.
env
.
setdefault
(
"WINEDEBUG"
,
"fixme-all"
)
#load environment overrides
if
"PW_LOG"
in
self
.
env
and
nonzero
(
self
.
env
[
"PW_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"
)
...
...
@@ -401,19 +320,29 @@ class Session:
self
.
check_environment
(
"PW_PULSE_LOWLATENCY"
,
"pulselowlat"
)
self
.
check_environment
(
"PW_HIDE_NVIDIA_GPU"
,
"hidenvgpu"
)
self
.
check_environment
(
"PW_VKD3D_FEATURE_LEVEL"
,
"vkd3dfl12"
)
if
"noesync"
in
self
.
compat_config
:
self
.
env
.
pop
(
"WINEESYNC"
,
""
)
else
:
self
.
env
[
"WINEESYNC"
]
=
"1"
if
"SteamGameId"
in
self
.
env
else
"0"
if
not
"noesync"
in
self
.
compat_config
:
self
.
env
[
"WINEESYNC"
]
=
"1"
if
"nofsync"
in
self
.
compat_config
:
self
.
env
.
pop
(
"WINEFSYNC"
,
""
)
else
:
self
.
env
[
"WINEFSYNC"
]
=
"1"
if
"SteamGameId"
in
self
.
env
else
"0"
if
not
"nofsync
"
in
self
.
compat_config
:
self
.
env
[
"WINE
FSYNC
"
]
=
"1"
if
"nowritewatch
"
in
self
.
compat_config
:
self
.
env
[
"WINE
_DISABLE_WRITE_WATCH
"
]
=
"1"
if
"oldglstr"
in
self
.
compat_config
:
#mesa override
self
.
env
[
"MESA_EXTENSION_MAX_YEAR"
]
=
"2003"
#nvidia override
self
.
env
[
"__GL_ExtensionStringVersion"
]
=
"17700"
if
"forcelgadd"
in
self
.
compat_config
:
self
.
env
[
"WINE_LARGE_ADDRESS_AWARE"
]
=
"1"
if
"vkd3dfl12"
in
self
.
compat_config
:
if
not
"VKD3D_FEATURE_LEVEL"
in
self
.
env
:
self
.
env
[
"VKD3D_FEATURE_LEVEL"
]
=
"12_0"
...
...
@@ -421,20 +350,14 @@ class Session:
if
"hidenvgpu"
in
self
.
compat_config
:
self
.
env
[
"WINE_HIDE_NVIDIA_GPU"
]
=
"1"
if
"forcelgadd"
in
self
.
compat_config
:
self
.
env
[
"WINE_LARGE_ADDRESS_AWARE"
]
=
"1"
if
"dxvkasync"
in
self
.
compat_config
:
self
.
env
[
"DXVK_ASYNC"
]
=
"1"
if
"pulselowlat"
in
self
.
compat_config
:
self
.
env
[
"PULSE_LATENCY_MSEC"
]
=
"60"
else
:
self
.
env
[
"WINEDEBUG"
]
=
"-all"
g_compatdata
.
setup_prefix
()
if
"nod3d12"
in
self
.
compat_config
:
self
.
dlloverrides
[
"d3d12"
]
=
""
if
"nod3d11"
in
self
.
compat_config
:
self
.
dlloverrides
[
"d3d11"
]
=
""
if
"dxgi"
in
self
.
dlloverrides
:
...
...
@@ -449,14 +372,6 @@ class Session:
self
.
dlloverrides
[
"d3d9"
]
=
""
self
.
dlloverrides
[
"dxgi"
]
=
""
if
"novrclient"
in
self
.
compat_config
:
self
.
dlloverrides
[
"vrclient"
]
=
""
self
.
dlloverrides
[
"vrclient_x64"
]
=
""
self
.
dlloverrides
[
"openvr_api_dxvk"
]
=
""
if
"nomfplay"
in
self
.
compat_config
:
self
.
dlloverrides
[
"mfplay"
]
=
"n"
if
"nowritewatch"
in
self
.
compat_config
:
self
.
env
[
"WINE_DISABLE_WRITE_WATCH"
]
=
"1"
...
...
@@ -474,9 +389,8 @@ class Session:
s
=
s
+
";"
+
dll
+
"="
+
setting
else
:
s
=
dll
+
"="
+
setting
if
"WINEDLLOVERRIDES"
in
os
.
environ
:
self
.
env
[
"WINEDLLOVERRIDES"
]
=
os
.
environ
[
"WINEDLLOVERRIDES"
]
+
";"
+
s
if
"WINEDLLOVERRIDES"
in
self
.
env
:
self
.
env
[
"WINEDLLOVERRIDES"
]
=
self
.
env
[
"WINEDLLOVERRIDES"
]
+
";"
+
s
else
:
self
.
env
[
"WINEDLLOVERRIDES"
]
=
s
...
...
@@ -487,9 +401,12 @@ class Session:
def
run
(
self
):
if
"PW_GAMEMODERUN"
in
os
.
environ
and
nonzero
(
os
.
environ
[
"PW_GAMEMODERUN"
]):
self
.
run_proc
([
g_proton
.
gamemoderun
]
+
[
g_proton
.
wine_bin
]
+
sys
.
argv
[
2
:]
+
sys
.
argv
[
3
:])
self
.
run_proc
([
g_proton
.
gamemoderun
]
+
[
g_proton
.
wine_bin
]
+
sys
.
argv
[
2
:]
+
sys
.
argv
[
3
:]
+
sys
.
argv
[
4
:]
)
else
:
self
.
run_proc
([
g_proton
.
wine_bin
]
+
sys
.
argv
[
2
:]
+
sys
.
argv
[
3
:])
self
.
run_proc
([
g_proton
.
wine_bin
]
+
sys
.
argv
[
2
:]
+
sys
.
argv
[
3
:]
+
sys
.
argv
[
4
:])
def
init_run
(
self
):
self
.
run_proc
([
g_proton
.
wine_bin
]
+
" wineboot"
)
if
__name__
==
"__main__"
:
if
not
"PW_COMPAT_DATA_PATH"
in
os
.
environ
:
...
...
@@ -497,21 +414,22 @@ if __name__ == "__main__":
sys
.
exit
(
1
)
g_proton
=
Proton
(
os
.
path
.
dirname
(
sys
.
argv
[
0
]))
g_compatdata
=
CompatData
(
os
.
environ
[
"PW_COMPAT_DATA_PATH"
])
g_session
=
Session
()
g_session
.
init_wine
()
g_proton
.
make_default_prefix
()
g_session
.
init_session
()
#determine mode
if
sys
.
argv
[
1
]
==
"run"
:
#start target app
g_session
.
run
()
elif
sys
.
argv
[
1
]
==
"init_run"
:
#first start
g_session
.
init_run
()
elif
sys
.
argv
[
1
]
==
"waitforexitandrun"
:
#wait for wineserver to shut down
g_session
.
run_proc
([
g_proton
.
wineserver_bin
,
"-w"
])
...
...
@@ -519,11 +437,11 @@ if __name__ == "__main__":
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
)
path
=
subprocess
.
check_output
([
g_proton
.
wine_bin
,
"winepath"
,
"-w"
,
sys
.
argv
[
2
]],
env
=
g_session
.
env
)
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
)
path
=
subprocess
.
check_output
([
g_proton
.
wine_bin
,
"winepath"
,
sys
.
argv
[
2
]],
env
=
g_session
.
env
)
sys
.
stdout
.
buffer
.
write
(
path
)
else
:
log
(
"Need a verb."
)
...
...
data_from_portwine/scripts/create_shortcut
View file @
9c0257fc
...
...
@@ -42,10 +42,10 @@ start_settings=`zenity --title "${ss_title}" --text "${ss_text}" --list --radio
if
[
!
-z
$hud_settings
]
;
then
for
hud_set
in
$hud_settings
do
echo
"
${
hud_set
}
"
>>
"
${
config_path
}
/dxvk_on_shortcut"
echo
"
${
hud_set
}
"
>>
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on_shortcut"
done
sed
-i
"s/|/,/g"
"
${
config_path
}
/dxvk_on_shortcut"
read
"hud_set"
<
"
${
config_path
}
/dxvk_on_shortcut"
sed
-i
"s/|/,/g"
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on_shortcut"
read
"hud_set"
<
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on_shortcut"
export
dxvk_ogl_var
=
"
$hud_set
"
else
dxvk_ogl_var
=
"0"
...
...
data_from_portwine/scripts/debug
View file @
9c0257fc
...
...
@@ -7,7 +7,7 @@ echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
echo
"
${
port_deb2
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"--------------------------------------------------------"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"PortWINE version:"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
read
install_ver <
"
${
config_path
}
/
${
portname
}
_ver"
read
install_ver <
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
echo
"
${
portname
}
-
${
install_ver
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"-------------------------------------------------------"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"var_dxvk_on =
${
var_dxvk_on
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
...
...
data_from_portwine/scripts/lang
View file @
9c0257fc
#!/bin/bash
# Author: PortWINE-Linux.ru
read
"update_loc"
<
"
${
config_path
}
/
${
portname
}
_loc"
read
"update_loc"
<
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_loc"
export
update_loc
=
${
update_loc
}
if
[
"
${
update_loc
}
"
=
"RUS"
]
...
...
data_from_portwine/scripts/port_update
View file @
9c0257fc
#!/bin/bash
# Author: PortWINE-Linux.ru
if
[
!
-f
"
${
config_path
}
/
${
portname
}
_ver"
]
if
[
!
-f
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
]
then
echo
"10"
>
"
${
config_path
}
/
${
portname
}
_ver"
echo
"10"
>
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
fi
if
[
!
-f
"
${
config_path
}
/update_notifier"
]
if
[
!
-f
"
${
PORT_WINE_TMP_PATH
}
/update_notifier"
]
then
echo
"1"
>
"
${
config_path
}
/update_notifier"
echo
"1"
>
"
${
PORT_WINE_TMP_PATH
}
/update_notifier"
fi
read
"update_not"
<
"
${
config_path
}
/update_notifier"
read
"update_not"
<
"
${
PORT_WINE_TMP_PATH
}
/update_notifier"
if
[
"
${
update_not
}
"
=
"1"
]
then
wget
-T
2
--output-document
=
"
${
config_path
}
/
${
portname
}
_cur_ver"
"http://portwine-linux.ru/current_version/
${
portname
}
_ver"
wget
-T
2
--output-document
=
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_cur_ver"
"http://portwine-linux.ru/current_version/
${
portname
}
_ver"
sleep
1
if
[
-f
"
${
config_path
}
/
${
portname
}
_ver"
]
if
[
-f
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
]
then
read
current_ver <
"
${
config_path
}
/
${
portname
}
_cur_ver"
read
install_ver <
"
${
config_path
}
/
${
portname
}
_ver"
rm
-f
"
${
config_path
}
/
${
portname
}
_cur_ver"
read
current_ver <
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_cur_ver"
read
install_ver <
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
rm
-f
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_cur_ver"
if
[
"
${
current_ver
}
"
-gt
"
${
install_ver
}
"
]
then
xsd
=
`
zenity
--title
"
${
port_upd1
}
"
--text
"
${
port_upd2
}
"
--list
--radiolist
--height
=
220
--column
=
"
${
inst_set
}
"
--column
"
${
port_upd3
}
"
\
...
...
@@ -34,7 +34,7 @@ then
"
${
port_upd5
}
"
)
echo
" "
;;
"
${
port_upd6
}
"
)
echo
"0"
>
"
${
config_path
}
/update_notifier"
;;
echo
"0"
>
"
${
PORT_WINE_TMP_PATH
}
/update_notifier"
;;
esac
fi
fi
...
...
data_from_portwine/scripts/portproton.sh
View file @
9c0257fc
...
...
@@ -6,9 +6,9 @@ if [ -f "$1" ]; then
export
PATH_TO_GAME
=
"
$(
cd
"
$(
dirname
"
$1
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
START_PORTWINE
if
[
!
-z
${
optirun_on
}
]
;
then
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"
$portwine_exe
"
"
${
PW_RUNTIME
}
"
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"
$portwine_exe
"
else
$PW_TERM
"
${
port_on_run
}
"
"run"
"
$portwine_exe
"
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
port_on_run
}
"
"run"
"
$portwine_exe
"
fi
else
START_PORTWINE
...
...
data_from_portwine/scripts/reset
View file @
9c0257fc
...
...
@@ -6,8 +6,8 @@ wine_pids=$(ls -l /proc/*/exe 2>/dev/null | grep -E 'wine(64)?-preloader|wineser
if
!
[
-z
"
${
wine_pids
}
"
]
;
then
kill
-9
${
wine_pids
}
fi
if
[
-e
"
${
config_path
}
/dxvk_on"
]
;
then
rm
-f
"
${
config_path
}
/dxvk_on"
if
[
-e
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
]
;
then
rm
-f
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
fi
START_PORTWINE
STOP_PORTWINE | pwzen
data_from_portwine/scripts/runlib
View file @
9c0257fc
#!/bin/bash
# Author: PortWINE-Linux.ru
########################################################################
clear
&&
echo
'
████─████─████─███─█───█─███─█──█─███
█──█─█──█─█──█──█──█───█──█──██─█─█
████─█──█─████──█──█─█─█──█──█─██─███
█────█──█─█─█───█──█████──█──█──█─█
█────████─█─█───█───█─█──███─█──█─███
'
########################################################################
[
$(
id
-u
)
=
0
]
&&
echo
"Do not run this script as root!"
&&
zenity
--error
--text
"Do not run this script as root!"
&&
exit
1
########################################################################
sszen
()
{
...
...
@@ -20,29 +29,30 @@ export portname
cd
"
${
PORT_SCRIPTS_PATH
}
"
.
"
${
PORT_SCRIPTS_PATH
}
/vars/
${
portname
}
_vars"
########################################################################
export
config_path
=
"
${
PORT_WINE_PATH
}
/data/tmp"
if
[
!
-d
"
${
config_path
}
"
]
;
then
mkdir
-p
"
${
config_path
}
"
export
PORT_WINE_TMP_PATH
=
"
${
PORT_WINE_PATH
}
/data/tmp"
if
[
!
-d
"
${
PORT_WINE_TMP_PATH
}
"
]
;
then
mkdir
-p
"
${
PORT_WINE_TMP_PATH
}
"
fi
if
[
!
-d
"
${
HOME
}
/.PortWINE/tmp"
]
;
then
mkdir
-p
"
${
HOME
}
/.PortWINE/tmp"
fi
if
[
!
-e
"
${
config_path
}
/
${
portname
}
_loc"
]
;
then
if
[
!
-e
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_loc"
]
;
then
SET_LANG
=
`
zenity
--title
"Install
$portname
"
--text
"Select the language"
--list
--radiolist
\
--column
=
"Set:"
--column
"Language:"
\
TRUE
"RUS"
\
FALSE
"ENG"
`
echo
"
${
SET_LANG
}
"
>
"
${
config_path
}
/
${
portname
}
_loc"
echo
"
${
SET_LANG
}
"
>
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_loc"
fi
########################################################################
.
"
${
PORT_SCRIPTS_PATH
}
"
/lang
if
[
!
-e
"
${
config_path
}
/
${
portname
}
_ver"
]
;
then
echo
"10"
>
"
${
config_path
}
/
${
portname
}
_ver"
if
[
!
-e
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
]
;
then
echo
"10"
>
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
fi
########################################################################
export
pw_libs_ver
=
"_v2"
export
port_on_run
=
"
${
PORT_WINE_PATH
}
/data/port_on"
export
WINEDIR
=
"
${
PORT_WINE_PATH
}
"
/data/dist
export
WINELIB
=
"
${
HOME
}
/.PortWINE/libs"
export
WINELIB
=
"
${
HOME
}
/.PortWINE/libs
${
pw_libs_ver
}
"
export
WINEARCH
=
win64
export
WINELOADER
=
"
${
WINEDIR
}
/bin/wine"
export
WINEDLLPATH
=
"
${
WINEDIR
}
/lib64/wine:
${
WINEDIR
}
/lib/wine"
...
...
@@ -52,11 +62,18 @@ export PATH="${WINEDIR}/bin:${PATH}"
export
WINESTART
=
"C:
\\
windows
\\
command
\\
start.exe"
export
PW_COMPAT_DATA_PATH
=
"
${
PORT_WINE_PATH
}
/data/"
export
PW_COMPAT_MEDIA_PATH
=
"
${
PW_COMPAT_MEDIA_PATH
}
"
export
PW_RUNTIME
=
"
$WINELIB
/run.sh"
########################################################################
export
urlg
=
"https://portwine-linux.ru/portwine-faq/"
export
PW_FTP_URL
=
"https://portwine-linux.ru/ftp"
########################################################################
export
PW_TERM
=
""
#if [ ! -f "${PORT_WINE_TMP_PATH}/init_run_suc" ]; then
# export PW_USE_TERMINAL="1"
#fi
########################################################################
START_PORTWINE
()
{
if
[
"
${
PW_USE_TERMINAL
}
"
=
"1"
]
;
then
if
[
-x
"
`
which konsole 2>/dev/null
`
"
]
;
then
export
PW_TERM
=
"konsole -e"
...
...
@@ -70,38 +87,25 @@ if [ "${PW_USE_TERMINAL}" = "1" ]; then
# export PW_TERM="xfce4-terminal -x" #test
fi
fi
########################################################################
START_PORTWINE
()
{
sh
"
${
PORT_SCRIPTS_PATH
}
"
/port_update
echo
"########################"
########################################################################
if
[
!
-d
"
${
WINELIB
}
"
]
;
then
echo
"Download and install libraries..."
wget
-T
2
--output-document
=
"
${
HOME
}
/.PortWINE/tmp/libs.tar.xz"
"
${
PW_FTP_URL
}
"
/dist/libs.tar.xz | sszen
&&
tar
-Jxvf
"
${
HOME
}
/.PortWINE/tmp/libs.tar.xz"
-C
"
${
HOME
}
/.PortWINE/"
| sszen
&&
rm
-f
"
${
HOME
}
/.PortWINE/tmp/libs.tar.xz"
wget
-T
2
--output-document
=
"
${
HOME
}
/.PortWINE/tmp/libs
${
pw_libs_ver
}
.tar.xz"
"
${
PW_FTP_URL
}
"
/dist/libs
${
pw_libs_ver
}
.tar.xz | sszen
&&
tar
-Jxvf
"
${
HOME
}
/.PortWINE/tmp/libs
${
pw_libs_ver
}
.tar.xz"
-C
"
${
HOME
}
/.PortWINE/"
| sszen
&&
rm
-f
"
${
HOME
}
/.PortWINE/tmp/libs
${
pw_libs_ver
}
.tar.xz"
"
${
WINELIB
}
"
/setup.sh
--force
fi
if
[
-d
"
${
WINELIB
}
"
]
;
then
host_lib_paths
=
/sbin/ldconfig
-XNv
|
grep
"/"
|
cut
-d
:
-f1
1>
"
${
config_path
}
"
/default_lib_paths
while
read
lib_path_prefix
;
do
export
host_lib_paths
=
$host_lib_paths$lib_path_prefix
:
done
<
"
${
config_path
}
"
/default_lib_paths
host_lib_paths
=
"
${
WINELIB
}
/pinned_libs_32:
${
WINELIB
}
/pinned_libs_64:
$host_lib_paths
"
portwine_runtime_libs_paths
=
"
$host_lib_paths
${
WINELIB
}
/lib/i386-linux-gnu:
${
WINELIB
}
/usr/lib/i386-linux-gnu:
${
WINELIB
}
/lib/x86_64-linux-gnu:
${
WINELIB
}
/usr/lib/x86_64-linux-gnu:
${
WINELIB
}
/lib:
${
WINELIB
}
/usr/lib"
if
[
!
-z
$LD_LIBRARY_PATH
]
;
then
export
LD_LIBRARY_PATH
=
"
$portwine_runtime_libs_paths
:
${
LD_LIBRARY_PATH
-
}
"
else
export
LD_LIBRARY_PATH
=
"
$portwine_runtime_libs_paths
"
fi
echo
"########################"
echo
"######################################################"
echo
"Runtime libraries is enabled"
# "${PW_RUNTIME}" --print-steam-runtime-library-paths
else
echo
"########################"
echo
"########################
##############################
"
echo
"Runtime libraries is disabled"
fi
########################################################################
if
[
!
-f
"
${
config_path
}
/dxvk_on"
]
if
[
!
-f
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
]
then
start_settings
=
`
zenity
--title
"
${
ss_title
}
"
--text
"
${
ss_text
}
"
--list
--radiolist
\
--column
=
"
${
inst_set
}
"
--column
"
${
ss_ver
}
"
--column
"
${
ss_dr
}
"
--width
=
500
--height
=
220
\
...
...
@@ -110,7 +114,7 @@ then
if
[
$?
-eq
1
]
;
then
exit
1
;
fi
case
$start_settings
in
"VKD3D and OpenGL"
)
echo
"off"
>
"
${
config_path
}
/dxvk_on"
;;
echo
"off"
>
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
;;
"DXVK"
)
hud_settings
=
`
zenity
--list
--title
"HUD"
--text
"
${
hud_text
}
"
--list
--checklist
\
--column
=
"
${
inst_set
}
"
--column
=
"HUD info:"
--column
=
"
${
hud_info
}
"
--width
=
800
--height
=
550
\
...
...
@@ -130,11 +134,11 @@ then
if
[
!
-z
$hud_settings
]
;
then
for
hud_set
in
$hud_settings
do
echo
"
${
hud_set
}
"
>>
"
${
config_path
}
/dxvk_on"
echo
"
${
hud_set
}
"
>>
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
done
sed
-i
"s/|/,/g"
"
${
config_path
}
/dxvk_on"
sed
-i
"s/|/,/g"
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
else
echo
"0"
>
"
${
config_path
}
/dxvk_on"
echo
"0"
>
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
fi
;;
esac
fi
...
...
@@ -142,7 +146,7 @@ fi
if
[
!
-z
$dxvk_ogl_var
]
;
then
var_dxvk_on
=
"
${
dxvk_ogl_var
}
"
else
read
"var_dxvk_on"
<
"
${
config_path
}
/dxvk_on"
read
"var_dxvk_on"
<
"
${
PORT_WINE_TMP_PATH
}
/dxvk_on"
fi
export
DXVK_HUD
=
"
${
var_dxvk_on
}
"
echo
"DXVK_HUD=
${
DXVK_HUD
}
"
...
...
@@ -150,7 +154,6 @@ echo "DXVK_HUD=${DXVK_HUD}"
if
[
"
${
var_dxvk_on
}
"
!=
"off"
]
;
then
export
PW_USE_WINED3D
=
0
echo
"Use DXVK and D9VK (DX9-DX11 to Vulkan)"
export
PW_VKD3D_FEATURE_LEVEL
=
0
else
export
PW_USE_WINED3D
=
1
echo
"Use OpenGL and VKD3D (DX9-DX11 to OpenGL and DX12 to vulkan)"
...
...
@@ -201,10 +204,6 @@ case "$PW_FORCE_USE_VSYNC" in # 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
esac
export
DXVK_CONFIG_FILE
=
"
${
PORT_WINE_PATH
}
/data/dxvk.conf"
########################################################################
export
def_pfx
=
"
${
PORT_WINE_PATH
}
/data/dist/share/default_pfx/"
if
[
!
-d
"
${
def_pfx
}
"
]
;
then
"
${
port_on_run
}
"
"run"
| pwzen
fi
export
int_xneur
=
0
if
[
$(
pgrep xneur
)
>
'0'
]
;
then
killall xneur
...
...
@@ -224,7 +223,28 @@ else
export
PW_GAMEMODERUN
=
0
echo
"Gamemod is not installed or disabled in vars script: PW_FORCE_DISABLED_GAMEMOD=
$PW_FORCE_DISABLED_GAMEMOD
"
fi
echo
"########################"
echo
"######################################################"
########################################################################
if
[
!
-d
"
${
WINEPREFIX
}
"
]
||
[
!
-d
"
${
WINEPREFIX
}
"
/dosdevices
]
||
[
!
-d
"
${
WINEPREFIX
}
"
/drive_c/windows
]
||
[
!
-f
"
${
WINEPREFIX
}
"
/system.reg
]
||
[
!
-f
"
${
WINEPREFIX
}
"
/user.reg
]
||
[
!
-f
"
${
WINEPREFIX
}
"
/userdef.reg
]
;
then
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
WINELOADER
}
"
wineboot
-u
fi
########################################################################
#if [ ! -f "${PORT_WINE_TMP_PATH}/init_run_suc" ]; then
# "${PW_RUNTIME}" "${port_on_run}" "init_run"
# if [ -f "${PORT_WINE_TMP_PATH}"/winetricks ]; then
# rm -f "${PORT_WINE_TMP_PATH}"/winetricks
# fi
# wget -T 3 --output-document=${PORT_WINE_TMP_PATH}/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
# chmod +x "${PORT_WINE_TMP_PATH}/winetricks"
# PW_INIT_RUN
# echo "#####################PW_INIT_RUN######################"
# cat "${PORT_WINE_TMP_PATH}/init_run_suc"
# echo "######################################################"
#fi
########################################################################
cp
-f
"
${
WINEDIR
}
/lib/wine/fakedlls/dxgi.dll"
"
${
WINEDIR
}
/lib/wine/dxgi.dll"
cp
-f
"
${
WINEDIR
}
/lib64/wine/fakedlls/dxgi.dll"
"
${
WINEDIR
}
/lib64/wine/dxgi.dll"
ADD_IN_START_PORTWINE
}
########################################################################
...
...
data_from_portwine/scripts/setup
View file @
9c0257fc
...
...
@@ -3,13 +3,8 @@
.
"
$(
dirname
$(
readlink
-f
"
$0
"
))
/runlib"
rm
-f
"
${
PORT_WINE_PATH
}
/"
*
".log"
rm
-f
"
${
PORT_WINE_PATH
}
/data/"
*
".lock"
rm
-f
"
${
config_path
}
/update_notifier"
if
[
-d
"
${
PORT_WINE_PATH
}
/data/__pycache__"
]
;
then
rm
-fr
"
${
PORT_WINE_PATH
}
/data/__pycache__"
fi
rm
-f
"
${
PORT_WINE_TMP_PATH
}
/update_notifier"
rm
-f
"
${
PORT_WINE_TMP_PATH
}
/init_run_suc"
if
[
!
-d
"/home/
${
USER
}
/.local/share/applications"
]
then
...
...
@@ -121,7 +116,6 @@ fi
if
[
-f
"
${
PORT_WINE_PATH
}
/restart.desktop"
]
;
then
rm
"
${
PORT_WINE_PATH
}
/restart.desktop"
fi
START_PORTWINE
ADD_IN_POST_INSTALL
update-desktop-database
-q
"
${
HOME
}
/.local/share/applications"
xdg-open
"http://portwine-linux.ru/portwine-faq/"
>
/dev/null 2>&1 &
exit
0
data_from_portwine/scripts/start
View file @
9c0257fc
...
...
@@ -6,15 +6,15 @@ START_PORTWINE
if
[
!
-z
"
$1
"
]
;
then
if
[
!
-z
$optirun_on
]
;
then
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"
$1
"
"
${
PW_RUNTIME
}
"
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"
$1
"
else
$PW_TERM
"
${
port_on_run
}
"
"run"
"
$1
"
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
port_on_run
}
"
"run"
"
$1
"
fi
else
if
[
!
-z
$optirun_on
]
;
then
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
"
${
PW_RUNTIME
}
"
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
else
$PW_TERM
"
${
port_on_run
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
port_on_run
}
"
"run"
"
${
gamestart
}
"
${
launch_parameters
}
fi
fi
...
...
data_from_portwine/scripts/vars/PortGOG_vars
View file @
9c0257fc
...
...
@@ -12,7 +12,7 @@ export gamestart="${PATH_TO_GAME}/GalaxyClient.exe"
export
MESA_GL_VERSION_OVERRIDE
=
4.4COMPAT
export
WINEDLLOVERRIDES
=
"winemenubuilder.exe=d"
export
STAGING_SHARED_MEMORY
=
1
export
PW_LOG
=
1
# Enable debug mode fo terminal
export
PW_LOG
=
0
# Enable debug mode fo terminal
export
PW_NO_VR
=
1
# Disabled VR support
export
PW_NO_D3D9
=
0
# Disable d3d9.dll
export
PW_NO_D3D10
=
0
# Disable d3d10.dll, for d3d10 games which can fall back to and run better with d3d9
...
...
data_from_portwine/scripts/vars/PortProton_vars
View file @
9c0257fc
...
...
@@ -45,6 +45,22 @@ ADD_IN_STOP_PORTWINE ()
echo
" "
}
########################################################################
PW_INIT_RUN
()
{
export
PW_DLL_INSTALL
=
"vb5run vb6run vcrun6 vcrun6sp6 b1ab1ab1a"
for
dll_install
in
$PW_DLL_INSTALL
do
echo
"######################################################"
echo
"winetricks -q --force
${
dll_install
}
"
"
${
PW_RUNTIME
}
"
"
${
PORT_WINE_TMP_PATH
}
/winetricks"
-q
--force
${
dll_install
}
if
[
$?
-eq
0
]
;
then
echo
"OK:
${
dll_install
}
"
>>
"
${
PORT_WINE_TMP_PATH
}
/init_run_suc"
else
echo
"ERROR:
${
dll_install
}
"
>>
"
${
PORT_WINE_TMP_PATH
}
/init_run_suc"
fi
done
}
########################################################################
ADD_IN_POST_INSTALL
()
{
`
zenity
--info
--title
"
${
inst_set_top
}
"
--text
"
${
inst_succ
}
"
--no-wrap
`
>
/dev/null 2>&1
...
...
data_from_portwine/scripts/winecfg
View file @
9c0257fc
...
...
@@ -6,8 +6,8 @@ START_PORTWINE
PW_LOG
=
1
if
[
!
-z
${
optirun_on
}
]
then
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"winecfg"
>
&2
"
${
PW_RUNTIME
}
"
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"winecfg"
>
&2
else
$PW_TERM
"
${
port_on_run
}
"
"run"
"winecfg"
>
&2
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
port_on_run
}
"
"run"
"winecfg"
>
&2
fi
STOP_PORTWINE
data_from_portwine/scripts/winecmd
View file @
9c0257fc
#!/bin/bash
# Author: PortWINE-Linux.ru
.
"
$(
dirname
$(
readlink
-f
"
$0
"
))
/runlib"
export
PW_LOG
=
1
START_PORTWINE
PW_LOG
=
1
if
[
!
-z
${
optirun_on
}
]
then
$PW_TERM
'"${optirun_on}" "${port_on_run}" "run" "cmd"'
"
${
PW_RUNTIME
}
"
$PW_TERM
'"${optirun_on}" "${port_on_run}" "run" "cmd"'
else
$PW_TERM
'"${port_on_run}" "run" "cmd"'
"
${
PW_RUNTIME
}
"
$PW_TERM
'"${port_on_run}" "run" "cmd"'
fi
STOP_PORTWINE
data_from_portwine/scripts/winefile
View file @
9c0257fc
...
...
@@ -4,15 +4,15 @@
"
${
WINESERVER
}
"
-k
START_PORTWINE
if
[
-z
"
${
PATH_TO_GAME
}
"
]
;
then
export
DXVK_STATE_CACHE_PATH
=
"
${
config_path
}
"
export
__GL_SHADER_DISK_CACHE_PATH
=
"
${
config_path
}
"
export
MESA_GLSL_CACHE_DIR
=
"
${
config_path
}
"
export
DXVK_STATE_CACHE_PATH
=
"
${
PORT_WINE_TMP_PATH
}
"
export
__GL_SHADER_DISK_CACHE_PATH
=
"
${
PORT_WINE_TMP_PATH
}
"
export
MESA_GLSL_CACHE_DIR
=
"
${
PORT_WINE_TMP_PATH
}
"
fi
echo
"
${
port_deb1
}
"
>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"
${
port_deb2
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"--------------------------------------------------------"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"PortWINE version:"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
read
install_ver <
"
${
config_path
}
/
${
portname
}
_ver"
read
install_ver <
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_ver"
echo
"
${
portname
}
-
${
install_ver
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"-------------------------------------------------------"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"var_dxvk_on =
${
var_dxvk_on
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
...
...
@@ -67,14 +67,14 @@ echo "Version WINE in the Port" >> "${PORT_WINE_PATH}/${portname}.log"
echo
"-------------------------------------------"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"log WINE"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
export
DXVK_HUD
=
"f
ull
"
export
DXVK_HUD
=
"f
ps
"
export
PW_LOG
=
1
export
PW_WINEDBG_DISABLE
=
0
if
[
!
-z
${
optirun_on
}
]
then
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"explorer"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
2>&1 &
"
${
PW_RUNTIME
}
"
$PW_TERM
${
optirun_on
}
"
${
port_on_run
}
"
"run"
"explorer"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
2>&1 &
else
$PW_TERM
"
${
port_on_run
}
"
"run"
"explorer"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
2>&1 &
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
port_on_run
}
"
"run"
"explorer"
>>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
2>&1 &
fi
zenity
--info
--title
"DEBUG"
--text
"
${
port_debug
}
"
--no-wrap
&&
"
${
WINESERVER
}
"
-k
STOP_PORTWINE | pwzen
...
...
@@ -83,4 +83,4 @@ deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo
"
$deb_text
"
>
"
${
PORT_WINE_PATH
}
/
${
portname
}
.log"
echo
"
$deb_text
"
| zenity
--text-info
--editable
\
--width
=
800
--height
=
600
\
--title
=
"
${
portname
}
.log"
\ No newline at end of file
--title
=
"
${
portname
}
.log"
data_from_portwine/scripts/winereg
View file @
9c0257fc
...
...
@@ -3,5 +3,5 @@
.
"
$(
dirname
$(
readlink
-f
"
$0
"
))
/runlib"
"
${
WINESERVER
}
"
-k
START_PORTWINE
$PW_TERM
"
${
port_on_run
}
"
"run"
"regedit"
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
port_on_run
}
"
"run"
"regedit"
STOP_PORTWINE
data_from_portwine/scripts/winetricks
deleted
100755 → 0
View file @
fcc20622
This source diff could not be displayed because it is too large. You can
view the blob
instead.
data_from_portwine/scripts/winetricks-q-force
View file @
9c0257fc
...
...
@@ -6,11 +6,12 @@ wine_pids=$(ls -l /proc/*/exe 2>/dev/null | grep -E 'wine(64)?-preloader|wineser
if
!
[
-z
"
${
wine_pids
}
"
]
;
then
kill
-9
${
wine_pids
}
fi
rm
-f
${
PORT_SCRIPTS_PATH
}
/winetricks
wget
-T
3
--output-document
=
${
PORT_SCRIPTS_PATH
}
/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod
+x
"
${
PORT_SCRIPTS_PATH
}
/winetricks"
sed
-i
'18a . $(dirname $(readlink -f "$0"))/runlib\nSTART_PORTWINE\nexport WINELOADER="${WINEDIR}/bin/wine" '
"
${
PORT_SCRIPTS_PATH
}
/winetricks"
sleep
1
export
PW_LOG
=
1
$PW_TERM
sh
"
${
PORT_SCRIPTS_PATH
}
/winetricks"
-q
--force
if
[
-f
"
${
PORT_WINE_TMP_PATH
}
"
/winetricks
]
;
then
rm
-f
"
${
PORT_WINE_TMP_PATH
}
"
/winetricks
fi
wget
-T
3
--output-document
=
${
PORT_WINE_TMP_PATH
}
/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod
+x
"
${
PORT_WINE_TMP_PATH
}
/winetricks"
export
PW_USE_TERMINAL
=
1
START_PORTWINE
"
${
PW_RUNTIME
}
"
$PW_TERM
"
${
PORT_WINE_TMP_PATH
}
/winetricks"
-q
--force
STOP_PORTWINE
portwine_install_script/PortNAME-XX
View file @
9c0257fc
...
...
@@ -123,8 +123,8 @@ case $SET_LANG in
echo
"ENG"
>
"
${
PORT_WINE_PATH
}
/data/tmp/
${
portname
}
_loc"
;;
esac
if
[
$?
-eq
1
]
;
then
echo
"error"
&&
exit
1
;
fi
export
config_path
=
"
${
PORT_WINE_PATH
}
/data/tmp"
read
"update_loc"
<
"
${
config_path
}
/
${
portname
}
_loc"
export
PORT_WINE_TMP_PATH
=
"
${
PORT_WINE_PATH
}
/data/tmp"
read
"update_loc"
<
"
${
PORT_WINE_TMP_PATH
}
/
${
portname
}
_loc"
export
update_loc
=
${
update_loc
}
########################################################################
cd
"
${
PORT_WINE_PATH
}
"
...
...
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