Commit 290a6840 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Major changes

parent 8721598d
#!/usr/bin/env python3
#script to launch Wine with the correct environment
import fcntl
import array
import filecmp
import fnmatch
import json
import os
import os.path
import shutil
import errno
import stat
import subprocess
import sys
import tarfile
#To enable debug logging, copy "user_settings.sample.py" to "user_settings.py"
#and edit it if needed.
PFX="Proton: "
ld_path_var = "LD_LIBRARY_PATH"
def nonzero(s):
return len(s) > 0 and s != "0"
def log(msg):
sys.stderr.write(PFX + msg + os.linesep)
sys.stderr.flush()
def makedirs(path):
try:
os.makedirs(path)
except OSError:
#already exists
pass
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)
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
log('Error while copying to \"' + dst + '\": ' + e.strerror)
else:
raise
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 getmtimestr(*path_fragments):
path = os.path.join(*path_fragments)
try:
return str(os.path.getmtime(path))
except IOError:
return "0"
class Proton:
def __init__(self, base_dir):
self.base_dir = os.environ["PW_COMPAT_DATA_PATH"]
self.dist_dir = os.environ["WINEDIR"]
self.bin_dir = self.dist_dir + "/bin/"
self.lib_dir = self.dist_dir + "/lib/"
self.lib64_dir = self.dist_dir + "/lib64/"
self.fonts_dir = self.dist_dir + "/share/fonts/"
self.wine_bin = self.bin_dir + "/wine"
self.wineserver_bin = self.bin_dir + "/wineserver"
self.gamemoderun = "gamemoderun"
self.pw_launch_parameters = os.environ["LAUNCH_PARAMETERS"]
def path(self, d):
return self.base_dir + d
class CompatData:
def __init__(self, compatdata):
self.base_dir = os.environ["PW_COMPAT_DATA_PATH"]
self.prefix_dir = self.path("pfx/")
def path(self, d):
return self.base_dir + d
def create_fonts_symlinks(self):
fontsmap = [
( "LiberationSans-Regular.ttf", "arial.ttf" ),
( "LiberationSans-Bold.ttf", "arialbd.ttf" ),
( "LiberationSerif-Regular.ttf", "times.ttf" ),
( "LiberationMono-Regular.ttf", "cour.ttf" ),
( "SourceHanSansSCRegular.otf", "msyh.ttf" ),
]
windowsfonts = self.prefix_dir + "/drive_c/windows/Fonts"
makedirs(windowsfonts)
for p in fontsmap:
lname = os.path.join(windowsfonts, p[1])
fname = os.path.join(g_proton.fonts_dir, p[0])
if os.path.lexists(lname):
if os.path.islink(lname):
os.remove(lname)
os.symlink(fname, lname)
else:
os.symlink(fname, lname)
def setup_prefix(self):
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
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()
if "var_pw_vulkan" in os.environ and nonzero(os.environ["var_pw_vulkan"]):
#copy openvr files into place
if os.path.isfile(g_proton.lib_dir + "wine/fakedlls/vrclient.dll"):
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)
if os.path.isfile(g_proton.lib_dir + "wine/dxvk/openvr_api_dxvk.dll"):
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 = []
wined3dfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "d3d9"]
if os.path.isfile(g_proton.lib64_dir + "wine/dxvk/dxvk_config.dll"):
dxvkfiles.append("dxvk_config")
os.system("echo PW_VULKAN_USE=vkd3d")
else:
dxvkfiles = ["dxvk_config", "d3d11", "d3d10", "d3d10core", "d3d10_1", "d3d9"]
wined3dfiles = []
os.system("echo PW_VULKAN_USE=dxvk")
#if the user asked for dxvk's dxgi (dxgi=n), then copy it into place
if "PW_DXGI_FROM_DXVK" in os.environ and nonzero(os.environ["PW_DXGI_FROM_DXVK"]):
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:
if os.path.isfile(g_proton.lib64_dir + "wine/dxvk/" + f + ".dll"):
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"
if os.path.isfile(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12.dll"):
try_copy(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12.dll", self.prefix_dir + "drive_c/windows/system32/d3d12.dll")
if os.path.isfile(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")
else:
os.system("echo PW_VULKAN_USE=0 - Vulkan is disabled")
def comma_escaped(s):
escaped = False
idx = -1
while s[idx] == '\\':
escaped = not escaped
idx = idx - 1
return escaped
class Session:
def __init__(self):
self.env = dict(os.environ)
self.dlloverrides = {
"winemenubuilder.exe": "",
"dotnetfx35.exe": "b", #replace the broken installer, as does Windows
"mfplay": "n", #disable built-in mfplay
"steam_api": "n", #disable built-in steam dll
"steam_api64": "n", #disable built-in steam dll
"steamclient": "n", #disable built-in steam dll
"steamclient64": "n", #disable built-in steam dll
"steamworks.net": "n" #disable built-in steam dll
}
self.compat_config = set()
self.cmdlineappend = []
def init_wine(self):
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:
self.env[ld_path_var] = g_proton.lib64_dir + ":" + g_proton.lib_dir
self.env["WINEDLLPATH"] = g_proton.lib64_dir + "/wine:" + g_proton.lib_dir + "/wine"
self.env["GST_PLUGIN_SYSTEM_PATH_1_0"] = g_proton.lib64_dir + "gstreamer-1.0" + ":" + g_proton.lib_dir + "gstreamer-1.0"
self.env["WINE_GST_REGISTRY_DIR"] = g_compatdata.path("/tmp/gstreamer-1.0/")
if "PW_COMPAT_MEDIA_PATH" in os.environ:
self.env["MEDIACONV_AUDIO_DUMP_FILE"] = os.environ["PW_COMPAT_MEDIA_PATH"] + "/audio.foz"
self.env["MEDIACONV_AUDIO_TRANSCODED_FILE"] = os.environ["PW_COMPAT_MEDIA_PATH"] + "/transcoded_audio.foz"
self.env["MEDIACONV_VIDEO_DUMP_FILE"] = os.environ["PW_COMPAT_MEDIA_PATH"] + "/video.foz"
self.env["MEDIACONV_VIDEO_TRANSCODED_FILE"] = os.environ["PW_COMPAT_MEDIA_PATH"] + "/transcoded_video.foz"
if "PATH" in os.environ:
self.env["PATH"] = g_proton.bin_dir + ":" + os.environ["PATH"]
else:
self.env["PATH"] = g_proton.bin_dir
def check_environment(self, env_name, config_name):
if not env_name in self.env:
return False
if nonzero(self.env[env_name]):
self.compat_config.add(config_name)
else:
self.compat_config.discard(config_name)
return True
def init_session(self):
self.env["WINEPREFIX"] = g_compatdata.prefix_dir
#load environment overrides
if "PW_LOG" in os.environ and nonzero(os.environ["PW_LOG"]):
self.env.setdefault("WINEDEBUG", "fixme-all,err+loaddll,err+dll,err+file,err+reg")
self.env.setdefault("DXVK_LOG_LEVEL", "info")
self.env.setdefault("VKD3D_DEBUG", "warn")
self.env.setdefault("WINE_MONO_TRACE", "E:System.NotImplementedException")
else:
self.env.setdefault("WINEDEBUG", "-all")
self.env.setdefault("DXVK_LOG_LEVEL", "none")
self.env.setdefault("VKD3D_DEBUG", "none")
self.env.setdefault("DXVK_LOG_PATH","none")
#default wine-mono override for FNA games
self.env.setdefault("WINE_MONO_OVERRIDES", "Microsoft.Xna.Framework.*,Gac=n")
if "wined3d11" in self.compat_config:
self.compat_config.add("wined3d")
if not self.check_environment("PW_USE_WINED3D", "wined3d"):
self.check_environment("PW_USE_WINED3D11", "wined3d")
self.check_environment("PW_NO_ESYNC", "noesync")
self.check_environment("PW_NO_FSYNC", "nofsync")
self.check_environment("PW_FORCE_LARGE_ADDRESS_AWARE", "forcelgadd")
self.check_environment("PW_OLD_GL_STRING", "oldglstr")
self.check_environment("PW_NO_WINEMFPLAY", "nomfplay")
self.check_environment("PW_NO_WRITE_WATCH", "nowritewatch")
self.check_environment("PW_DXVK_NO_ASYNC", "dxvknoasync")
self.check_environment("PW_NVAPI_DISABLE", "nonvapi")
self.check_environment("PW_WINEDBG_DISABLE", "nowinedbg")
self.check_environment("PW_HIDE_NVIDIA_GPU", "hidenvgpu")
self.check_environment("PW_VKD3D_FEATURE_LEVEL", "vkd3dfl12")
self.check_environment("PW_DX12_DISABLED", "nod3d12")
if "noesync" in self.compat_config:
self.env.pop("WINEESYNC", "")
else:
self.env["WINEESYNC"] = "1"
if "nofsync" in self.compat_config:
self.env.pop("WINEFSYNC", "")
else:
self.env["WINEFSYNC"] = "1"
if "dxvknoasync" in self.compat_config:
self.env["RADV_DEBUG"] = "llvm"
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"
if "hidenvgpu" in self.compat_config:
self.env["WINE_HIDE_NVIDIA_GPU"] = "1"
g_compatdata.setup_prefix()
if "nowritewatch" in self.compat_config:
self.env["WINE_DISABLE_WRITE_WATCH"] = "1"
if "nonvapi" in self.compat_config:
self.dlloverrides["nvapi"] = ""
self.dlloverrides["nvapi64"] = ""
if "nowinedbg" in self.compat_config:
self.dlloverrides["winedbg.exe"] = ""
if "var_pw_vulkan" in os.environ and nonzero(os.environ["var_pw_vulkan"]):
os.system("echo Use vulkan")
else:
self.dlloverrides["vrclient"] = ""
self.dlloverrides["openvr_api_dxvk"] = ""
self.dlloverrides["dxvk_config"] = ""
self.dlloverrides["dxgi"] = "b"
self.dlloverrides["d3d11"] = "b"
self.dlloverrides["d3d10"] = "b"
self.dlloverrides["d3d10core"] = "b"
self.dlloverrides["d3d10_1"] = "b"
self.dlloverrides["d3d9"] = "b"
self.dlloverrides["d3d12"] = "b"
os.system("echo All d3d dll use as built-in")
if "nod3d12" in self.compat_config:
self.dlloverrides["d3d12"] = ""
s = ""
for dll in self.dlloverrides:
setting = self.dlloverrides[dll]
if len(s) > 0:
s = s + ";" + dll + "=" + setting
else:
s = dll + "=" + setting
if "WINEDLLOVERRIDES" in self.env:
self.env["WINEDLLOVERRIDES"] = self.env["WINEDLLOVERRIDES"] + ";" + s
else:
self.env["WINEDLLOVERRIDES"] = s
def run_proc(self, args, local_env=None):
if local_env is None:
local_env = self.env
subprocess.call(args, env=local_env)
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:] + [g_proton.pw_launch_parameters])
else:
self.run_proc([g_proton.wine_bin] + sys.argv[2:] + [g_proton.pw_launch_parameters])
if __name__ == "__main__":
if not "PW_COMPAT_DATA_PATH" in os.environ:
log("No compat data path?")
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_session.init_session()
#determine mode
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)
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)
sys.stdout.buffer.write(path)
else:
log("Need a verb.")
sys.exit(1)
sys.exit(0)
#pylint --disable=C0301,C0326,C0330,C0111,C0103,R0902,C1801,R0914,R0912,R0915
# vim: set syntax=python:
#!/bin/bash
#Author:
#ACM.exe
#Rating=?
################################################
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author:
#Botanicula.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
#!/bin/bash
#Author:PortWINE
#Brokgame.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author:
#CoJBiBGame_x86.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_DLL_INSTALL="d3dx9" # Install DDL in port prefix (used winetricks)
export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
#!/bin/bash
#Author: xuser
#CyberShadow.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: PortWINE-Linux.ru
#DOOMEternalx64vk.exe
#Rating=1-5
#Rating=?
################################################
export PW_VULKAN_USE=vkd3d
export WINEDLLOVERRIDES="amd_ags_x64=b,n"
export WINEDLLOVERRIDES="amd_ags_x64=n,b"
#export PW_LOG=0 # Enable debug mode fo terminal
export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
export PW_DXVK_NO_ASYNC=1
#export PW_DXVK_NO_ASYNC=1
#export PW_USE_TERMINAL=1
#export PW_OLD_GL_STRING=0
#export PW_NVAPI_DISABLE=1
......@@ -16,13 +16,12 @@ export PW_DXVK_NO_ASYNC=1
#export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
#export PW_HIDE_NVIDIA_GPU=0
#export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
#export PW_WINEDBG_DISABLE=1
#export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
#export PW_WINEDBG_DISABLE=0
#export PW_FORCE_DISABLED_GAMEMOD=1 # Force disabele gamemod
#export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
#export PULSE_LATENCY_MSEC=60
export PULSE_LATENCY_MSEC=60
#export PW_DLL_INSTALL="foo bar"
export LAUNCH_PARAMETERS="+com_skipIntroVideo 1 +com_skipSignInManager 1"
#export VK_ICD_FILENAMES="/home/xuser/.PortWINE/libs_v5/usr/lib/x86_64-linux-gnu/amd_icd64.json"
declare -a LAUNCH_PARAMETERS
export LAUNCH_PARAMETERS=('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')
#export PW_GUI_DISABLED_CS=1
export PW_DXGI_FROM_DXVK=1
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
\ No newline at end of file
#export PW_DXGI_FROM_DXVK=1
#!/bin/bash
#Author:
#Dead Space.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
#!/bin/bash
#Author: PortWINE
#FSD.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: xuser
#Disjunction.exe
#Rating=5
################################################
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: PortWINE
#EDLaunch.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_DLL_INSTALL=""
ADD_IN_START_PORTWINE ()
{
${PW_XTERM} wget -c -T 3 --output-document="${PORT_WINE_TMP_PATH}/wine-mono-5.1.1.2_ED-x86.msi" "https://github.com/redmcg/wine-mono/releases/download/wine-mono-5.1.1.2_ED/wine-mono-5.1.1.2_ED-x86.msi"
${PW_XTERM} "${WINELOADER}" msiexec /i "${PORT_WINE_TMP_PATH}/wine-mono-5.1.1.2_ED-x86.msi"
}
\ No newline at end of file
......@@ -3,6 +3,7 @@
#EpicGamesLauncher.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export WINEDLLOVERRIDES="libglesv2="
export LAUNCH_PARAMETERS="-opengl -SkipBuildPatchPrereq"
export PW_DLL_INSTALL="vcrun2013 vcrun2019 d3dcompiler_43 d3dcompiler_47"
export PW_DLL_INSTALL="vcrun2012 vcrun2013 vcrun2019 d3dcompiler_43 d3dcompiler_47 arial cjkfonts d3dx9"
export MESA_GL_VERSION_OVERRIDE=4.4COMPAT
#!/bin/bash
#Author: PortWINE
#FSD.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
......@@ -3,7 +3,7 @@
#FarCry.exe
#Rating=5
#################################
export PW_VULKAN_USE=dxvk #dxvk or vkd3d
export PW_VULKAN_USE=0
export WINEDLLOVERRIDES="cgD3D9,cgD3D9d=n"
#export PW_LOG=0 # Enable debug mode fo terminal
export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
......
#!/bin/bash
#Author: Dezert1r
#GalaxyClient.exe
#GOG_Galaxy_2.0.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export WINEDLLOVERRIDES="galaxycommunication.exe=n"
export LAUNCH_PARAMETERS="/runWithoutUpdating /deelevated"
export PW_DLL_INSTALL="vcrun2019 vcrun6 mfc140"
ADD_IN_START_PORTWINE ()
{
if [ -e "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data/GOG.com/Galaxy/Configuration/config.json" ] ; then
sed -i 's/"featureOverlay" : true,/"featureOverlay" : false,/' "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data/GOG.com/Galaxy/Configuration/config.json"
fi
}
\ No newline at end of file
#!/bin/bash
#Author: PortWINE-Linux.ru
#Hades.exe
#Rating=1-5
#export PW_COMMENT_DB="blablabla"
################################################
export PW_VULKAN_USE=dxvk #dxvk or vkd3d
#export WINEDLLOVERRIDES="blabla=n,b"
#export PW_LOG=0 # Enable debug mode fo terminal
#export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
#export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
#export PW_DXVK_NO_ASYNC=1
#export PW_USE_TERMINAL=0
#export PW_OLD_GL_STRING=0
#export PW_NVAPI_DISABLE=1
#export PW_VKD3D_FEATURE_LEVEL=0
#export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
#export PW_HIDE_NVIDIA_GPU=0
#export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
#export PW_WINEDBG_DISABLE=1
#export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
#export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
#export PULSE_LATENCY_MSEC=60
#export PW_DLL_INSTALL="foo bar"
#export LAUNCH_PARAMETERS="-d3d9"
#export PW_GUI_DISABLED_CS=1
#export MANGOHUD=1 MANGOHUD_CONFIG=full,height=500,font_size=32,position=top-right,toggle_hud=F9
export PW_DLL_INSTALL="vcrun2019 d3dcompiler_47 d3dx9_43"
#!/bin/bash
#Author: xuser
#Heroes3.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: xuser
#Heroes3 HD.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: PortWINE-Linux.ru
#Author: Nixon
#HorizonZeroDawn.exe
#Rating=5
#Rating=?
################################################
export PW_VULKAN_USE=vkd3d #dxvk or vkd3d
export WINEDLLOVERRIDES="nvngx_dlss=;amd_ags_x64=b,n;d3dcompiler_47=n"
#export PW_LOG=0 # Enable debug mode fo terminal
#export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
#export PW_USE_TERMINAL=0
#export PW_OLD_GL_STRING=0
#export PW_NVAPI_DISABLE=1
#export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
#export PW_HIDE_NVIDIA_GPU=0
#export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
#export PW_WINEDBG_DISABLE=1
#export PW_FORCE_DISABLED_GAMEMOD=1 # Force disabele gamemod
#export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
export PW_DLL_INSTALL="d3dx9 d3dcompiler_47 vcrun2019"
export WINEDLLOVERRIDES=""
export PW_DLL_INSTALL="vcrun2017"
export LAUNCH_PARAMETERS="-EpicPortal"
#export RADV_DEBUG=llvm
export PW_DXVK_NO_ASYNC=1
#!/bin/bash
#Author: Сергей 33(46)
#hulk.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export PW_WINDOWS_VER="XP"
export PW_FORCE_DISABLED_GAMEMOD=1
export LAUNCH_PARAMETERS="-d3d9"
#!/bin/bash
#Author: xuser
#Mad Games Tycoon 2.exe
#Rating=5
################################################
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: Ridbowt (Nikola P.)
#MOHAA.exe
#moh_spearhead.exe
#moh_breakthrough.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
export MESA_EXTENSION_MAX_YEAR=2002
#!/bin/bash
#Author:
#MetroExodus.exe
#Rating=?
################################################
export PW_VULKAN_USE=vkd3d
export LAUNCH_PARAMETERS=""
export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
#!/bin/bash
#Author:
#speed.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: xuser
#OrangeCast.exe
#Rating=5
################################################
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: PortWINE
#Origin.exe
#Rating=
#Rating=?
################################################
export PW_VULKAN_USE=vkd3d
export LAUNCH_PARAMETERS=""
sed -i 's%key="EnableIgo" value="true"%key="EnableIgo" value="false"%g' "${WINEPREFIX}/drive_c/users/steamuser/Application Data/Origin/local_"*".xml"
#!/bin/bash
#Author: PortWINE
#Praest.exe
#Rating=5
################################################
export PW_VULKAN_USE=vkd3d
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author:
#RAGE2.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=vkd3d
export LAUNCH_PARAMETERS=""
\ No newline at end of file
......@@ -2,11 +2,12 @@
#Author:
#RDR2.exe
#PlayRDR2.exe
#Rating=1-5
#Rating=?
################################################
export PW_VULKAN_USE=vkd3d
export WINEDLLOVERRIDES="amd_ags_x64=b,n"
export PW_DXGI_FROM_DXVK=1
export LAUNCH_PARAMETERS="-adapter 1 -vulkan -width 1920 -height 1080 -USEALLAVAILABLECORES -cpuLoadRebalancing -ignorepipelinecach"
export LAUNCH_PARAMETERS="-adapter=1 -vulkan -width=1920 -height=1080 -USEALLAVAILABLECORES -cpuLoadRebalancing -ignorepipelinecach"
export PULSE_LATENCY_MSEC=60
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
#export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
#?PID=$(pgrep RDR2.exe); kill -s SIGSTOP $PID; kill -s SIGCONT $PID
#!/bin/bash
#Author: xuser
#Rayman Legends.exe
#Rating=5
################################################
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: PortWINE
#Revival.exe
#Rating=5
################################################
export LAUNCH_PARAMETERS=""
export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
#!/bin/bash
#Author:
#sekiro.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: xuser
#Skellboy.exe
#Rating=5
################################################
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author:
#SpideyPC.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export PW_WINDOWS_VER="XP"
export PW_FORCE_DISABLED_GAMEMOD=1
export LAUNCH_PARAMETERS="-d3d9"
#!/bin/bash
#Author: PortWINE
#wgc.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk #dxvk, vkd3d or 0 for OpenGL
#export PW_DLL_INSTALL="" # Install DDL in port prefix (used winetricks)
export LAUNCH_PARAMETERS="--disable-gpu" # Additional launch options
#!/bin/bash
#Author: xuser
#WorldOfTanks.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk #dxvk, vkd3d or 0 for OpenGL
export PW_DLL_INSTALL="lucida" # Install DDL in port prefix (used winetricks)
export WINEDLLOVERRIDES="xaudio2_7="
#!/bin/bash
#Author:
#avengers.exe
#Rating=1-5
#Rating=?
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
......
......@@ -3,24 +3,29 @@
#name_exe_file.exe
#Rating=1-5
#export PW_COMMENT_DB="blablabla"
################################################
#export PW_VULKAN_USE=dxvk #dxvk, vkd3d or 0 for OpenGL
#export WINEDLLOVERRIDES="blabla=n,b"
#export PW_LOG=0 # Enable debug mode fo terminal
#export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
#export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
#export PW_DXVK_NO_ASYNC=1
#export PW_USE_TERMINAL=0
#export PW_OLD_GL_STRING=0
#export PW_NVAPI_DISABLE=1
#export PW_VKD3D_FEATURE_LEVEL=0
#export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
#export PW_HIDE_NVIDIA_GPU=0
#export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
#export PW_WINEDBG_DISABLE=1
#export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
#export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
#export PULSE_LATENCY_MSEC=60
#export PW_DLL_INSTALL="foo bar"
#export LAUNCH_PARAMETERS="-d3d9"
#export PW_GUI_DISABLED_CS=1
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
##export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
##export PW_DXVK_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_TERMINAL=0 # Force run in terminal
##export PW_OLD_GL_STRING=0
##export PW_NVAPI_DISABLE=1
##export PW_VKD3D_FEATURE_LEVEL=0
##export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HIDE_NVIDIA_GPU=0
##export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
##export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##export VKD3D_CONFIG=force_bindless_texel_buffer
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_VIRTUAL_DESKTOP=1
##ADD_IN_START_PORTWINE () { commands ; }
##export DXVK_HUD=fps,devinfo
#!/bin/bash
#Author: MrM0der
#samp.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
......@@ -8,20 +8,20 @@
export PW_VULKAN_USE=0 #dxvk or vkd3d
#export WINEDLLOVERRIDES="blabla=n,b"
#export PW_LOG=0 # Enable debug mode fo terminal
export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
#export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
#export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
#export PW_DXVK_NO_ASYNC=1
#export PW_USE_TERMINAL=0
#export PW_OLD_GL_STRING=0
#export PW_NVAPI_DISABLE=1
export PW_VKD3D_FEATURE_LEVEL=0
#export PW_VKD3D_FEATURE_LEVEL=0
export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
#export PW_HIDE_NVIDIA_GPU=0
#export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
export PW_WINEDBG_DISABLE=0
export PW_WINEDBG_DISABLE=1
export PW_FORCE_DISABLED_GAMEMOD=1 # Force disabele gamemod
export PW_FORCE_LARGE_ADDRESS_AWARE=0 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
#export PULSE_LATENCY_MSEC=60
export PW_DLL_INSTALL="vcrun6 mfc42 cmd"
export PW_DLL_INSTALL="vcrun6 mfc42"
#export LAUNCH_PARAMETERS="-d3d9"
export PW_GUI_DISABLED_CS=1
#!/bin/bash
#Author: MrM0der
#steam.exe
#Rating=5
################################################
export LAUNCH_PARAMETERS=""
export WINEDLLOVERRIDES="libglesv2="
......@@ -31,7 +31,7 @@ if [ ! -z "${start_progress_yad_pid}" ] ; then
kill "${start_progress_yad_pid}"
fi
}
########################################################################
export PW_WINDOWS_VER="7"
cd "$(dirname "`readlink -f "$0"`")"
export PORT_SCRIPTS_PATH="$(pwd)"
cd "${PORT_SCRIPTS_PATH}/../../"
......@@ -40,7 +40,6 @@ read "portname" < "${PORT_WINE_PATH}/data/tmp/portname"
export portname
cd "${PORT_SCRIPTS_PATH}"
. "${PORT_SCRIPTS_PATH}/vars/${portname}_vars"
########################################################################
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
if [ ! -d "${PORT_WINE_TMP_PATH}" ]; then
mkdir -p "${PORT_WINE_TMP_PATH}"
......@@ -60,31 +59,28 @@ if [ "${portname}" = "PortProton" ]; then
rm -f "${PORT_WINE_TMP_PATH}/pw_vulkan"
fi
fi
########################################################################
. "${PORT_SCRIPTS_PATH}"/lang
if [ ! -e "${PORT_WINE_TMP_PATH}/${portname}_ver" ]; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
########################################################################
export LAUNCH_PARAMETERS=""
export pw_libs_ver="_v5"
export pw_gecko_mono_ver="_v1"
export port_on_run="${PORT_SCRIPTS_PATH}/port_on"
export PW_VULKAN_DLL="${PORT_WINE_PATH}"/data/vulkan
export WINEDIR="${PORT_WINE_PATH}"/data/dist
export WINELIB="${HOME}/.PortWINE/libs${pw_libs_ver}"
export WINE_MONO_GECKO="${HOME}/.PortWINE/mono_gecko${pw_gecko_mono_ver}"
export WINEARCH=win64
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx/"
export PW_COMPAT_DATA_PATH="${PORT_WINE_PATH}/data/"
export PW_COMPAT_MEDIA_PATH="${PORT_WINE_TMP_PATH}/"
export PW_RUNTIME="$WINELIB/run.sh"
export PW_GUI_ICON_PATH="${PORT_WINE_PATH}/data/img/gui"
########################################################################
export urlg="https://portwine-linux.ru/portwine-faq/"
export PW_FTP_URL="https://portwine-linux.ru/ftp"
########################################################################
export PW_TERM=""
export PW_WINE_VER_DXVK=""
if [ -z "${WINEDLLOVERRIDES}" ] ; then
export WINEDLLOVERRIDES="winemenubuilder.exe="
fi
zen_width=500
if [ -f "${WINEDIR}"_dxvk/version ]; then
read PW_WINE_VER_DXVK < "${WINEDIR}"_dxvk/version
......@@ -97,7 +93,6 @@ if [ -f "${WINEDIR}"_vkd3d/version ]; then
PW_WINE_VER_VKD3D="( wine: $PW_WINE_VER_VKD3D )"
zen_width=1000
fi
########################################################################
if [ ! -e "${WINELIB}/run.sh" ] || [ ! -e "${WINELIB}/usr/bin/yad" ] || [ ! -e "${WINELIB}/amd64/usr/bin/vkcube" ] || [ ! -e "${WINELIB}/amd64/usr/bin/xterm" ]; then
echo "Download and install libraries..."
wget -c -T 2 --output-document="${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz" "${PW_FTP_URL}"/dist/libs${pw_libs_ver}.tar.xz | sszen &&
......@@ -114,7 +109,6 @@ else
echo "######################################################"
echo "Runtime libraries is disabled"
fi
########################################################################
if [ ! -d "${WINE_MONO_GECKO}/gecko" ] || [ ! -d "${WINE_MONO_GECKO}/mono" ] ; then
echo "######################################################"
echo "Download and install wine mono and gecko..."
......@@ -146,15 +140,15 @@ do
fi
fi
done
########################################################################
if [ ! -z "${gamestart}" ]; then
export PORTWINE_DB=`echo "${gamestart}" | awk -F '/' 'NF>1{print $NF}' | awk -F '.exe' '{print $1}'`
export PORTWINE_DB=`echo "${gamestart}" | awk -F '/' 'NF>1{print $NF}' | sed s/".exe"/""/gi`
elif [ ! -z "${portwine_exe}" ]; then
export PORTWINE_DB=`echo "${portwine_exe}" | awk -F '/' 'NF>1{print $NF}' | awk -F '.exe' '{print $1}'`
export PORTWINE_DB=`echo "${portwine_exe}" | awk -F '/' 'NF>1{print $NF}' | sed s/".exe"/""/gi`
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
export WIN_PATH_TO_GAME=`echo "C:${PATH_TO_GAME}" | sed "s%$WINEPREFIX%%g" | sed "s/drive_c//g" | sed 's#/#\\\#g'`
fi
if [ ! -z "${PORTWINE_DB}" ]; then
PORTWINE_DB_FILE=`grep -il "${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | awk -F '.exe' '{print $1}'`
PORTWINE_DB_FILE=`grep -il "#${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [ ! -z "${PORTWINE_DB_FILE}" ]; then
. "${PORTWINE_DB_FILE}"
echo "Use ${PORTWINE_DB_FILE} db file."
......@@ -180,7 +174,6 @@ if [ "${PW_USE_TERMINAL}" = "1" ]; then
fi
fi
PW_UPDATE
########################################################################
if [ ! -z "${PW_VULKAN_USE}" ]; then
export var_pw_vulkan="${PW_VULKAN_USE}"
echo "${var_pw_vulkan}" > "${PORT_WINE_TMP_PATH}/pw_vulkan"
......@@ -192,46 +185,161 @@ PW_START_PROGRESS_BAR
if [ "${var_pw_vulkan}" = "0" ]; then
if [ -d "${WINEDIR}_dxvk" ]; then
export WINEDIR="${WINEDIR}_dxvk"
fi
export MESA_GLSL_CACHE_DIR="${PORT_WINE_TMP_PATH}"
export mesa_glthread=true
export __GL_THREADED_OPTIMIZATIONS=1
export __GL_SHARPEN_IGNORE_FILM_GRAIN=0
export __GL_LOG_MAX_ANISO=0
export __GL_ALLOW_FXAA_USAGE=0
export __GL_SHARPEN_ENABLE=1
export __GL_SHARPEN_VALUE=0
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}"
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_SIZE=1000000000
# export mesa_glthread=true
# export GL_THREADED_OPTIMIZATIONS=1
export GL_NO_DSO_FINALIZER=1 #Modded by Rus_Nor
export GL_YIELD="NOTHING" #Modded by Rus_Nor
export GL_SHARPEN_IGNORE_FILM_GRAIN=0 #Modded by Rus_Nor
export GL_SHARPEN_ENABLE=1 #Modded by Rus_Nor
export __GL_SHARPEN_VALUE=0 #Modded by Rus_Nor
for wine_build_dll in d3d11 d3d10 d3d10core d3d10_1 d3d9 ; do
cp -f "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
cp -f "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
done
cp -f "${WINEDIR}"/lib/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/"
cp -f "${WINEDIR}"/lib64/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/system32/"
export WINEESYNC=""
echo "Use OpenGL"
fi #Modded by Rus_Nor
elif [ "${var_pw_vulkan}" = "dxvk" ]; then
export PW_USE_WINED3D=0
export PW_DXGI_FROM_DXVK=1
export PW_DX12_DISABLED=1
if [ -d "${WINEDIR}_dxvk" ]; then
export WINEDIR="${WINEDIR}_dxvk"
fi
echo "Use DXVK and D9VK (DX9-DX11 to Vulkan)"
for wine_dxvk_dll in d3d11 d3d10 d3d10core d3d10_1 d3d9 dxgi ; do
if [ -f "${PW_VULKAN_DLL}/dxvk/x32/${wine_dxvk_dll}.dll" ] ; then
cp -f "${PW_VULKAN_DLL}/dxvk/x32/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
fi
if [ -f "${PW_VULKAN_DLL}/dxvk/x64/${wine_dxvk_dll}.dll" ] ; then
cp -f "${PW_VULKAN_DLL}/dxvk/x64/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
fi
if [ ! -z "${WINEDLLOVERRIDES}" ] ; then
export WINEDLLOVERRIDES="${wine_dxvk_dll}=n;${WINEDLLOVERRIDES}"
else
export WINEDLLOVERRIDES="${wine_dxvk_dll}=n"
fi
done
echo "Use DXVK (DX9-DX11 to Vulkan)"
else
export PW_USE_WINED3D=1
if [ -d "${WINEDIR}_vkd3d" ]; then
export WINEDIR="${WINEDIR}_vkd3d"
fi
for wine_vkd3d_dll in d3d12 ; do
if [ -f "${PW_VULKAN_DLL}/vkd3d-proton/x86/${wine_vkd3d_dll}.dll" ] ; then
cp -f "${PW_VULKAN_DLL}/vkd3d-proton/x86/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
fi
if [ -f "${PW_VULKAN_DLL}/vkd3d-proton/x64/${wine_vkd3d_dll}.dll" ] ; then
cp -f "${PW_VULKAN_DLL}/vkd3d-proton/x64/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
fi
if [ ! -z "${WINEDLLOVERRIDES}" ] ; then
export WINEDLLOVERRIDES="${wine_vkd3d_dll}=n;${WINEDLLOVERRIDES}"
else
export WINEDLLOVERRIDES="${wine_vkd3d_dll}=n"
fi
done
cp -f "${WINEDIR}"/lib/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/"
cp -f "${WINEDIR}"/lib64/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/system32/"
export PW_WINDOWS_VER="10"
echo "Use VKD3D (DX12 to vulkan)"
fi
if [ -f "${PW_VULKAN_DLL}/dxvk/x32/dxvk_config.dll" ] ; then
cp -f "${PW_VULKAN_DLL}/dxvk/x32/dxvk_config.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
fi
if [ -f "${PW_VULKAN_DLL}/dxvk/x64/dxvk_config.dll" ] ; then
cp -f "${PW_VULKAN_DLL}/dxvk/x64/dxvk_config.dll" "${WINEPREFIX}/drive_c/windows/system32/"
fi
export WINELOADER="${WINEDIR}/bin/wine"
export WINEDLLPATH="${WINEDIR}/lib64/wine:${WINEDIR}/lib/wine"
export WINESERVER="${WINEDIR}/bin/wineserver"
export PATH="${WINEDIR}/bin:${PATH}"
if [ ! -z "${PATH}" ] ; then
export PATH="${WINEDIR}/bin:${PATH}"
else
export PATH="${WINEDIR}/bin"
fi
export WINE="${WINELOADER}"
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
rm -f "${WINEDIR}"*/lib*/*steam*
rm -f "${WINEDIR}"*/lib*/wine/*steam*
rm -f "${WINEDIR}"*/lib*/wine/fakedlls/*steam*
rm -f "${WINEPREFIX}/drive_c/windows/system32"/steam*
rm -f "${WINEPREFIX}/drive_c/windows/syswow64"/steam*
cp -f "${WINEDIR}/share/fonts/"LiberationSans-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"arial.ttf
cp -f "${WINEDIR}/share/fonts/"LiberationSans-Bold.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"arialbd.ttf
cp -f "${WINEDIR}/share/fonts/"LiberationSerif-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"times.ttf
cp -f "${WINEDIR}/share/fonts/"LiberationMono-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"cour.ttf
cp -f "${WINEDIR}/share/fonts/"SourceHanSansSCRegular.otf "${WINEPREFIX}/drive_c/windows/Fonts/"msyh.ttf
for wine_build_dll in ntdll mf mf3216 mferror mfmediaengine mfplat mfplay mfreadwrite vulkan-1 ; do
cp -f "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
cp -f "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
done
export WINEDLLOVERRIDES="mf,mf3216,mferror,mfmediaengine,mfplat,mfplay,mfreadwrite=b;steam_api,steam_api64,steamclient,steamclient64=n;${WINEDLLOVERRIDES}"
export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/gstreamer-1.0:${WINEDIR}/gstreamer-1.0"
export WINE_GST_REGISTRY_DIR="${PORT_WINE_TMP_PATH}"
export MEDIACONV_AUDIO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/audio.foz
export MEDIACONV_AUDIO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_audio.foz
export MEDIACONV_VIDEO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/video.foz
export MEDIACONV_VIDEO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_video.foz
if [ ! -z "${PW_LOG}" ] && [ "${PW_LOG}" != 0 ] ; then
export WINEDEBUG="fixme-all,err+loaddll,err+dll,err+file,err+reg"
export DXVK_LOG_LEVEL="info"
export VKD3D_DEBUG="warn"
export WINE_MONO_TRACE="E:System.NotImplementedException"
else
export WINEDEBUG="-all"
export DXVK_LOG_LEVEL="none"
export VKD3D_DEBUG="none"
export DXVK_LOG_PATH="none"
fi
#default wine-mono override for FNA games
export WINE_MONO_OVERRIDES="Microsoft.Xna.Framework.*,Gac=n"
if [ ! -z "${PW_NO_ESYNC}" ] && [ "${PW_NO_ESYNC}" != 0 ] ; then
export WINEESYNC=""
else
export WINEESYNC="1"
fi
if [ ! -z "${PW_NO_FSYNC}" ] && [ "${PW_NO_FSYNC}" != 0 ] ; then
export WINEFSYNC=""
export WINEFSYNC_FUTEX2="0"
else
export WINEFSYNC="1"
export WINEFSYNC_FUTEX2="1"
fi
if [ ! -z "${PW_FORCE_LARGE_ADDRESS_AWARE}" ] && [ "${PW_FORCE_LARGE_ADDRESS_AWARE}" != 0 ] ; then
export WINE_LARGE_ADDRESS_AWARE="1"
fi
if [ ! -z "${PW_OLD_GL_STRING}" ] && [ "${PW_OLD_GL_STRING}" != 0 ] ; then
export MESA_EXTENSION_MAX_YEAR="2003" #mesa override
export __GL_ExtensionStringVersion="17700" #nvidia override
fi
if [ ! -z "${PW_NO_WRITE_WATCH}" ] && [ "${PW_NO_WRITE_WATCH}" != 0 ] ; then
export WINE_DISABLE_WRITE_WATCH="1"
fi
if [ ! -z "${PW_DXVK_NO_ASYNC}" ] && [ "${PW_DXVK_NO_ASYNC}" != 0 ] ; then
export RADV_DEBUG="llvm"
fi
if [ ! -z "${PW_NVAPI_DISABLE}" ] && [ "${PW_NVAPI_DISABLE}" != 0 ] ; then
export WINEDLLOVERRIDES="nvapi,nvapi64=;${WINEDLLOVERRIDES}"
fi
export DXVK_STATE_CACHE_PATH="${PATH_TO_GAME}"
if [ ! -z "${PW_WINEDBG_DISABLE}" ] && [ "${PW_WINEDBG_DISABLE}" != 0 ] ; then
export WINEDLLOVERRIDES="winedbg.exe=;${WINEDLLOVERRIDES}"
fi
if [ ! -z "${PW_HIDE_NVIDIA_GPU}" ] && [ "${PW_HIDE_NVIDIA_GPU}" != 0 ] ; then
export WINE_HIDE_NVIDIA_GPU="1"
fi
if [ ! -z "${PW_VKD3D_FEATURE_LEVEL}" ] && [ "${PW_VKD3D_FEATURE_LEVEL}" != 0 ] ; then
export VKD3D_FEATURE_LEVEL="12_0"
fi
if [ ! -d "${PORT_WINE_TMP_PATH}"/dxvk_cache ] ; then
mkdir -p "${PORT_WINE_TMP_PATH}"/dxvk_cache
fi
export DXVK_STATE_CACHE_PATH="${PORT_WINE_TMP_PATH}"/dxvk_cache
export DXVK_STATE_CACHE=1
export STAGING_SHARED_MEMORY=1
########################################################################
export optirun_on=
export check_optimus_manager=
export PW_NVIDIA="$(lspci | grep NVIDIA)"
......@@ -253,13 +361,15 @@ if [ ! -z "${PW_NVIDIA}" ] && [ "${check_optimus_manager}" != "intel" ]; then
fi
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}"
if [ ! -d "${PORT_WINE_TMP_PATH}"/gl_shader_cache ] ; then
mkdir -p "${PORT_WINE_TMP_PATH}"/gl_shader_cache
fi
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}/gl_shader_cache"
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_SIZE=1000000000
export __GL_DXVK_OPTIMIZATIONS=1
else
export DRI_PRIME=1
export VKD3D_CONFIG=force_bindless_texel_buffer
fi
case "$PW_FORCE_USE_VSYNC" in # 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
"0")
......@@ -270,7 +380,6 @@ case "$PW_FORCE_USE_VSYNC" in # 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
export __GL_SYNC_TO_VBLANK=1 ;;
esac
#export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/"
########################################################################
export int_xneur=0
if [ $(pgrep xneur)>'0' ]; then
killall xneur
......@@ -280,7 +389,6 @@ export PW_XKBD="$(setxkbmap -query | grep -w ru | awk '{print($2)}')"
if [ ! -z ${PW_XKBD} ]; then
setxkbmap us,ru
fi
########################################################################
if [ -x "`which "gamemoderun" 2>/dev/null`" ] && [ "$PW_FORCE_DISABLED_GAMEMOD" -eq "0" ]; then
# systemctl --user enable gamemoded.service
# systemctl --user restart gamemoded.service
......@@ -291,7 +399,6 @@ else
echo "Gamemod is not installed or disabled in vars script: PW_FORCE_DISABLED_GAMEMOD=$PW_FORCE_DISABLED_GAMEMOD"
fi
echo "######################################################"
########################################################################
PW_CREATE_PFX
RUN_WINETRICKS_FROM_DB
ADD_IN_START_PORTWINE
......@@ -323,11 +430,11 @@ fi
if [ ! -z ${PW_XKBD} ]; then
setxkbmap ${PW_XKBD}
fi
PW_STOP_PROGRESS_BAR
rm -f "${PORT_WINE_PATH}"/1
rm -f "${PORT_SCRIPTS_PATH}"/1
rm -f "${PORT_WINE_PATH}"/0
rm -f "${PORT_SCRIPTS_PATH}"/0
PW_STOP_PROGRESS_BAR
}
########################################################################
UPDATE_WINETRICKS ()
......@@ -347,11 +454,17 @@ W_TRX_INT_VER="$(cat "${PORT_WINE_TMP_PATH}/winetricks" | grep -i 'WINETRICKS_VE
chmod u+x "${PORT_WINE_TMP_PATH}/winetricks"
fi
fi #modded by Cefeiko
sed -i '/w_try winetricks_early_wine cmd/d' "${PORT_WINE_TMP_PATH}/winetricks"
}
########################################################################
RUN_WINETRICKS_FROM_DB ()
{
UPDATE_WINETRICKS
if [ -d "${HOME}/.cache/winetricks/" ] ; then
rm -fr "${HOME}/.cache/winetricks/"
fi
if [ ! -z "${PW_DLL_INSTALL}" ]; then
PW_STOP_PROGRESS_BAR
export USE_WT_FROM_DB=0
if [ -e "${WINEPREFIX}/winetricks.log" ] ; then
for need_install_dll_to_pfx in ${PW_DLL_INSTALL} ; do
......@@ -370,25 +483,28 @@ if [ ! -z "${PW_DLL_INSTALL}" ]; then
${PW_XTERM} "${PW_RUNTIME}" "${PORT_WINE_TMP_PATH}/winetricks" -q ${PW_DLL_INSTALL}
PW_START_PROGRESS_BAR
fi
PW_START_PROGRESS_BAR
fi
if [[ -z `cat "${WINEPREFIX}/system.reg" | grep "Windows $PW_WINDOWS_VER"` ]] ; then
if [ ! -z "${PW_WINDOWS_VER}" ] && [ `echo "$PW_WINDOWS_VER" | sed 's/.*/\L&/'` == "xp" ] ; then
export PW_WINDOWS_VER="xp64"
fi
"${PW_RUNTIME}" "${WINELOADER}" winecfg -v `echo "win${PW_WINDOWS_VER}" | sed 's/.*/\L&/'`
echo "Set to win${PW_WINDOWS_VER}"
fi
}
########################################################################
PW_UPDATE ()
{
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ]
then
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ]
then
if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/update_notifier"
fi
read "update_not" < "${PORT_WINE_TMP_PATH}/update_notifier"
if [ "${update_not}" = "1" ]
then
wget -T 2 --output-document="${PORT_WINE_TMP_PATH}/${portname}_cur_ver" "http://portwine-linux.ru/current_version/${portname}_ver"
sleep 1
if [ "${update_not}" = "1" ] ; then
wget -T 2 --output-document="${PORT_WINE_TMP_PATH}/${portname}_cur_ver" "${PW_FTP_URL}/current_version/${portname}_ver" &&
if [ -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ]
then
read current_ver < "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
......@@ -430,8 +546,7 @@ else
TRUE "${port_time4}" \
FALSE "${port_time5}" \
FALSE "${port_time6}" `
if [ $? = 1 ]
then
if [ $? = 1 ] ; then
echo "1" > "${HOME}/.config/.PortTime"
else
case $xsd2 in
......@@ -456,25 +571,71 @@ else
fi
fi
}
########################################################################
PW_CREATE_PFX ()
{
sed -i '/HKCU,Software\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf
sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKCU,Software\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf
rm -f "${WINEDIR}"*/lib*/*steam*
rm -f "${WINEDIR}"*/lib*/wine/*steam*
rm -f "${WINEDIR}"*/lib*/wine/fakedlls/*steam*
if [ ! -d "${WINEPREFIX}" ] || [ ! -d "${WINEPREFIX}"/drive_c/windows ]; then
if [ ! -d "${WINEPREFIX}" ] || [ ! -d "${WINEPREFIX}"/drive_c/windows ] || [ ! -f "${WINEPREFIX}"/user.reg ] || [ ! -f "${WINEPREFIX}"/userdef.reg ] || [ ! -f "${WINEPREFIX}"/system.reg ] ; then
PW_STOP_PROGRESS_BAR
${PW_XTERM} "${PW_RUNTIME}" "${WINELOADER}" wineboot -u
PW_START_PROGRESS_BAR
`zenity --info --title "Info..." --text " Updating prefix completed successfully.\n\n Restart ${portname}." --no-wrap ` > /dev/null 2>&1
exit 0
fi
#sed -i '/steamclient/d' "${WINEPREFIX}"/*.reg
#sed -i '/SteamPath/d' "${WINEPREFIX}"/*.reg
}
########################################################################
PW_SCRIPTS_UPDATE ()
{
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ] ; then
echo "1000" > "${PORT_WINE_TMP_PATH}/scripts_ver"
fi
wget -T 2 --output-document="${PORT_WINE_TMP_PATH}/scripts_cur_ver" "${PW_FTP_URL}/current_version/scripts_ver"
if [ "$?" == "0" ] ; then
read scripts_current_ver < "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
read scripts_install_ver < "${PORT_WINE_TMP_PATH}/scripts_ver"
if [ -f "${PORT_WINE_TMP_PATH}/scripts_cur_ver" ] ; then
rm -f "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
fi
if [ "${scripts_current_ver}" -gt "${scripts_install_ver}" ] ; then
echo "######################################################"
echo "Update scripts..."
wget -c -T 2 --output-document="${PORT_WINE_TMP_PATH}/scripts.tar.xz" "${PW_FTP_URL}/dist/scripts.tar.xz"
tar -Jxvf "${PORT_WINE_TMP_PATH}/scripts.tar.xz" -C "${PORT_WINE_PATH}/data/"
if [ "$?" == "0" ] ; then
rm -f "${PORT_WINE_TMP_PATH}/scripts.tar.xz"
echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver"
`zenity --info --title "Info..." --text " Updating scripts and database of games\n and programs completed successfully.\n\n Restart ${portname}." --no-wrap ` > /dev/null 2>&1
exit 0
fi
fi
fi
}
########################################################################
PW_RUN ()
{
if [ ! -z "$portwine_exe" ] ; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
else
cd "${WINEPREFIX}/drive_c"
fi
if [ ! -z "${PW_GAMEMODERUN}" ] && [ "${PW_GAMEMODERUN}" != 0 ] ; then
if [ ! -z ${optirun_on} ]; then
${optirun_on} $PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
else
$PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
fi
else
if [ ! -z ${optirun_on} ]; then
${optirun_on} $PW_TERM "${PW_RUNTIME}" "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
else
$PW_TERM "${PW_RUNTIME}" "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
fi
fi
sed -i '/steamclient/d' "${WINEPREFIX}"/*.reg
sed -i '/SteamPath/d' "${WINEPREFIX}"/*.reg
rm -f "${WINEPREFIX}/drive_c/windows/system32"/steam*
rm -f "${WINEPREFIX}/drive_c/windows/syswow64"/steam*
}
......@@ -83,13 +83,10 @@ do
"Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
done
chmod u+x "${PORT_SCRIPTS_PATH}/"*
if [ ! -d "${PORT_WINE_PATH}/drive_c" ]; then
ln -s "${PORT_WINE_PATH}/data/pfx/drive_c/" "${PORT_WINE_PATH}/drive_c"
fi
if [ -d "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public" ] && [ ! -L "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public" ]; then
cp -fr "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public"/* "${PORT_WINE_PATH}/data/pfx/drive_c/users/steamuser/"
rm -fr "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public"
......@@ -97,14 +94,13 @@ elif [ -L "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public" ]; then
rm -fr "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public"
fi
ln -s "${PORT_WINE_PATH}/data/pfx/drive_c/users/steamuser" "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public"
if [ ! -d "${PORT_WINE_PATH}/data/pfx/drive_c/users/${USER}" ]; then
ln -s "${PORT_WINE_PATH}/data/pfx/drive_c/users/steamuser" "${PORT_WINE_PATH}/data/pfx/drive_c/users/${USER}"
fi
sed -i "s/xuser/${USER}/g" "${PORT_WINE_PATH}/data/pfx/"*.reg
sed -i "s/vagrant/${USER}/g" "${PORT_WINE_PATH}/data/pfx/"*.reg
if [ -e "${PORT_WINE_PATH}/data/pfx/system.reg" ] || [ -e "${PORT_WINE_PATH}/data/pfx/user.reg" ] || [ -e "${PORT_WINE_PATH}/data/pfx/userdef.reg" ]; then
sed -i "s/xuser/${USER}/g" "${PORT_WINE_PATH}/data/pfx/"*.reg
sed -i "s/vagrant/${USER}/g" "${PORT_WINE_PATH}/data/pfx/"*.reg
fi
if [ "${s_install}" = "1" ]; then
echo "Installation completed successfully."
else
......
......@@ -4,6 +4,7 @@ if [ -f "$1" ]; then
export portwine_exe="$(readlink -f "$1")"
fi
. "$(dirname $(readlink -f "$0"))/runlib"
PW_SCRIPTS_UPDATE
########################################################################
PORTWINE_LAUNCH ()
{
......@@ -11,44 +12,21 @@ KILL_PORTWINE
START_PORTWINE
PORTWINE_MSI=`basename "${portwine_exe}" | grep .msi`
PORTWINE_BAT=`basename "${portwine_exe}" | grep .bat`
if [ ! -z "${PORTWINE_MSI}" ]; then
if [ ! -z "${PW_VIRTUAL_DESKTOP}" ] && [ "${PW_VIRTUAL_DESKTOP}" == "1" ] ; then
pw_screen_resolution=`xrandr --current | grep "*" | awk '{print $1;}' | head -1`
PW_RUN explorer "/desktop=portwine,${pw_screen_resolution}" "$portwine_exe"
elif [ ! -z "${PORTWINE_MSI}" ]; then
echo "PORTWINE_MSI=${PORTWINE_MSI}"
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z ${optirun_on} ]; then
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" msiexec /i "$portwine_exe"
else
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" msiexec /i "$portwine_exe"
fi
PW_RUN msiexec /i "$portwine_exe"
elif [ ! -z "${PORTWINE_BAT}" ]; then
echo "PORTWINE_BAT=${PORTWINE_BAT}"
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z ${optirun_on} ]; then
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" explorer "$portwine_exe"
else
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" explorer "$portwine_exe"
fi
PW_RUN explorer "$portwine_exe"
elif [ ! -z "${portwine_exe}" ]; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z ${optirun_on} ]; then
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "$portwine_exe"
else
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "$portwine_exe"
fi
PW_RUN "$portwine_exe"
elif [ -z "${gamestart}" ]; then
if [ ! -z $optirun_on ]; then
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" explorer
else
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" explorer
fi
PW_RUN explorer
else
if [ ! -z $optirun_on ]; then
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "${gamestart}"
else
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "${gamestart}"
fi
PW_RUN "${gamestart}"
fi
}
########################################################################
......@@ -61,7 +39,7 @@ else
--title="${sc_path}" --filename="${PORT_WINE_PATH}/data/pfx/drive_c/")
if [ $? -eq 1 ];then exit 1; fi
fi
PORTPROTON_NAME="$(basename "${PORTPROTON_EXE}" | sed s/".exe"/""/g )"
PORTPROTON_NAME="$(basename "${PORTPROTON_EXE}" | sed s/".exe"/""/gi )"
PORTPROTON_PATH="$( cd "$( dirname "${PORTPROTON_EXE}" )" >/dev/null 2>&1 && pwd )"
if [ -x "`which wrestool 2>/dev/null`" ]; then
wrestool -x --output="${PORTPROTON_PATH}/" -t14 "${PORTPROTON_EXE}"
......@@ -69,23 +47,21 @@ if [ -x "`which wrestool 2>/dev/null`" ]; then
cp -f "${PORTPROTON_EXE}.ico" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.ico"
rm -f "${PORTPROTON_PATH}/"*.ico
fi
PORTPROTON_CMD=""
PORTPROTON_CMD=$(zenity --entry --text "${sc_cmd}")
if [ $? -eq 1 ];then exit 1; fi
export PW_VULKAN_TO_DB=`cat "${PORT_WINE_TMP_PATH}/pw_vulkan"`
if [ ! -z "${PORTWINE_DB}" ]; then
PORTWINE_DB_FILE=`grep -il "${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | awk -F '.exe' '{print $1}'`
PORTWINE_DB_FILE=`grep -il "${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [ ! -z "${PORTWINE_DB_FILE}" ] && [ -z "${PW_VULKAN_USE}" ]; then
echo "export PW_VULKAN_USE=${PW_VULKAN_TO_DB}" >> "${PORTWINE_DB_FILE}"
elif [ -z "${PORTWINE_DB_FILE}" ]; then
echo "#!/bin/bash
#Author:
#Author: "${USER}"
#"${PORTWINE_DB}.exe"
#Rating=1-5
################################################
export PW_VULKAN_USE=${PW_VULKAN_TO_DB}
export LAUNCH_PARAMETERS=\"${PORTPROTON_CMD}\"" > "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
export PW_VULKAN_USE=${PW_VULKAN_TO_DB}" > "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
fi
cat "${PORT_SCRIPTS_PATH}/portwine_db/default" | grep "##" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
fi
name_desktop="${PORTPROTON_NAME}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
......@@ -108,7 +84,9 @@ xdg-open "${PORT_WINE_PATH}" 2>1 >/dev/null &
PORTWINE_DEBUG ()
{
KILL_PORTWINE
export PW_USE_TERMINAL=1
export PW_LOG=1
export PW_WINEDBG_DISABLE=0
export PW_XTERM="${WINELIB}/amd64/usr/bin/xterm -l -lf ${PORT_WINE_PATH}/${portname}.log.wine -geometry 159x37 -e"
START_PORTWINE
echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
echo "${port_deb2}" >> "${PORT_WINE_PATH}/${portname}.log"
......@@ -166,9 +144,7 @@ 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 PW_LOG=1
export DXVK_HUD="full"
export PW_WINEDBG_DISABLE=0
export PW_XTERM="${WINELIB}/amd64/usr/bin/xterm -l -lf ${PORT_WINE_PATH}/${portname}.log.wine -geometry 159x37 -e"
if [ -f "${PORT_WINE_PATH}/${portname}.log.wine" ]; then
......@@ -178,23 +154,26 @@ if [ ! -z "${portwine_exe}" ]; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z ${optirun_on} ]; then
$PW_XTERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "$portwine_exe" 2>&1 &
$PW_XTERM "${WINELOADER}" ${optirun_on} "$portwine_exe" ${LAUNCH_PARAMETERS} 2>&1 &
else
$PW_XTERM "${PW_RUNTIME}" "${port_on_run}" "run" "$portwine_exe" 2>&1 &
$PW_XTERM "${WINELOADER}" "$portwine_exe" ${LAUNCH_PARAMETERS} 2>&1 &
fi
elif [ -z "${gamestart}" ]; then
if [ ! -z $optirun_on ]; then
$PW_XTERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" explorer 2>&1 &
$PW_XTERM "${WINELOADER}" ${optirun_on} explorer 2>&1 &
else
$PW_XTERM "${PW_RUNTIME}" "${port_on_run}" "run" explorer 2>&1 &
$PW_XTERM "${WINELOADER}" explorer 2>&1 &
fi
else
export PATH_TO_GAME="$( cd "$( dirname "${gamestart}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z $optirun_on ]; then
$PW_XTERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "${gamestart}" 2>&1 &
$PW_XTERM "${WINELOADER}" ${optirun_on} "${gamestart}" ${LAUNCH_PARAMETERS} 2>&1 &
else
$PW_XTERM "${PW_RUNTIME}" "${port_on_run}" "run" "${gamestart}" 2>&1 &
$PW_XTERM "${WINELOADER}" "${gamestart}" ${LAUNCH_PARAMETERS} 2>&1 &
fi
fi
zenity --info --title "DEBUG" --text "${port_debug}" --no-wrap && "${WINESERVER}" -k
STOP_PORTWINE | sszen
cat "${PORT_WINE_PATH}/${portname}.log.wine" >> "${PORT_WINE_PATH}/${portname}.log"
......@@ -209,37 +188,26 @@ echo "$deb_text" | zenity --text-info --editable \
PW_WINECFG ()
{
START_PORTWINE
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "winecfg"
PW_RUN winecfg
}
########################################################################
PW_WINEFILE ()
{
START_PORTWINE
cd "${WINEPREFIX}/drive_c/"
if [ ! -z ${optirun_on} ]
then
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "explorer"
else
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "explorer"
fi
PW_RUN "explorer"
}
########################################################################
PW_WINECMD ()
{
export PW_USE_TERMINAL=1
START_PORTWINE
if [ ! -z ${optirun_on} ]
then
$PW_TERM "${PW_RUNTIME}" "${optirun_on}" "${port_on_run}" "run" "cmd"
else
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "cmd"
fi
PW_RUN "cmd"
}
########################################################################
PW_WINEREG ()
{
START_PORTWINE
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "regedit"
PW_RUN "regedit"
}
########################################################################
PW_WINETRICKS ()
......@@ -247,7 +215,7 @@ PW_WINETRICKS ()
UPDATE_WINETRICKS
export PW_USE_TERMINAL=1
START_PORTWINE
$PW_TERM "${PW_RUNTIME}" "${PORT_WINE_TMP_PATH}/winetricks" -q --force
$PW_TERM "${PORT_WINE_TMP_PATH}/winetricks" -q --force
}
########################################################################
if [ ! -z "${portwine_exe}" ]; then
......
......@@ -117,11 +117,14 @@ else
rm -fR "${PORT_WINE_PATH}/data/${CLEAN_PORT}"
fi
done
if [ -d "${PORT_WINE_PATH}/data/pfx/" ];then
if [ -d "${PORT_WINE_PATH}/data/pfx/" ] ; then
export PORT_PFX="${PORT_WINE_PATH}/data/pfx"
mv -f "${PORT_PFX}" "${PORT_PFX}_old"
fi
fi
if [ -d "${PORT_WINE_PATH}/data/scripts" ] ; then
rm -f "${PORT_WINE_PATH}/data/scripts/"* > /dev/null 2>&1
fi
########################################################################
mkdir -p "${PORT_WINE_PATH}/data/tmp"
echo "${port_ver}" > "${PORT_WINE_PATH}/data/tmp/${portname}_ver"
......@@ -137,7 +140,7 @@ read "update_loc" < "${PORT_WINE_TMP_PATH}/${portname}_loc"
export update_loc=${update_loc}
########################################################################
cd "${PORT_WINE_PATH}"
tail -n +159 "${links}/${setup_script}" > "${PORT_WINE_PATH}/${ARCH_NAME}"
tail -n +162 "${links}/${setup_script}" > "${PORT_WINE_PATH}/${ARCH_NAME}"
if [ "${s_install}" = "1" ]; then
tar -Jxvf "${PORT_WINE_PATH}/${ARCH_NAME}" -C "${PORT_WINE_PATH}/"
else
......@@ -145,7 +148,7 @@ else
fi
chmod 755 -R "${PORT_WINE_PATH}"
mv -f "${PORT_WINE_PATH}/${ARCH_NAME}" "${PORT_WINE_PATH}/data/tmp"
sed -n 1,158p "${links}/${setup_script}" > "${PORT_WINE_PATH}/data/tmp/${setup_script}"
sed -n 1,161p "${links}/${setup_script}" > "${PORT_WINE_PATH}/data/tmp/${setup_script}"
########################################################################
if [ -d "${PORT_PFX}_old" ];then
rm -fR "${PORT_PFX}"
......@@ -154,5 +157,5 @@ fi
echo "${portname}" > "${PORT_WINE_PATH}/data/tmp/portname"
########################################################################
cd "${PORT_WINE_PATH}/data/scripts"
sh "${PORT_WINE_PATH}/data/scripts/setup" && exit 0
sh "${PORT_WINE_PATH}/data/scripts/setup.sh" && exit 0
################################ARCH_BIN################################
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment