Major fix. Add debug in winefile. Choose mod for shurtcut.

This commit is contained in:
castro-fidel
2020-09-27 16:44:31 +03:00
parent 8610f9467c
commit 88d4f20ad3
8 changed files with 187 additions and 65 deletions

View File

@ -152,15 +152,23 @@ class CompatData:
os.remove(self.version_file)
def upgrade_pfx(self, old_ver):
if old_ver == CURRENT_PREFIX_VERSION:
return
#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")
#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:
@ -228,16 +236,16 @@ class CompatData:
if "wined3d" in g_session.compat_config:
dxvkfiles = ["dxvk_config"]
wined3dfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "d3d9"]
wined3dfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "d3d9", "dxgi"]
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_FOR_VKD3D" in os.environ and nonzero(os.environ["PW_DXGI_FOR_VKD3D"]):
wined3dfiles.append("dxgi") #VKD3D
if "WINEDLLOVERRIDES" in os.environ and "dxgi=n" in os.environ["WINEDLLOVERRIDES"]:
dxvkfiles.append("dxgi")
else:
dxvkfiles.append("dxgi") #OPENGL and DXVK
wined3dfiles.append("dxgi")
for f in wined3dfiles:
try_copy(g_proton.default_pfx_dir + "drive_c/windows/system32/" + f + ".dll",
@ -252,6 +260,7 @@ class CompatData:
self.prefix_dir + "drive_c/windows/syswow64/" + f + ".dll")
g_session.dlloverrides[f] = "n"
def comma_escaped(s):
escaped = False
idx = -1
@ -348,7 +357,7 @@ class Session:
self.check_environment("PW_USE_WINED3D11", "wined3d")
self.check_environment("PW_NO_D3D11", "nod3d11")
self.check_environment("PW_NO_D3D10", "nod3d10")
self.check_environment("PW_NO_D9VK", "nod3d9")
self.check_environment("PW_NO_D3D9", "nod3d9")
self.check_environment("PW_NO_ESYNC", "noesync")
self.check_environment("PW_NO_FSYNC", "nofsync")
self.check_environment("PW_FORCE_LARGE_ADDRESS_AWARE", "forcelgadd")
@ -400,6 +409,7 @@ class Session:
if "nod3d9" in self.compat_config:
self.dlloverrides["d3d9"] = ""
self.dlloverrides["dxgi"] = ""
if "novrclient" in self.compat_config:
self.dlloverrides["vrclient"] = ""