From 9bcb7e40b24b4b5350d06e1c56f8df787aa76136 Mon Sep 17 00:00:00 2001 From: Die4Ever Date: Sun, 14 Apr 2024 18:20:50 -0500 Subject: [PATCH] installer fix vanilla fixer D3D10, hide rando for vanilla fixer, default to borderless --- installer/Configs/DXRandoDefault.ini | 2 +- installer/Configs/DeusExDefault.ini | 2 +- installer/GUI/InstallerWindow.py | 30 +++++++++++++++++++++------- installer/Install/Install.py | 4 +++- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/installer/Configs/DXRandoDefault.ini b/installer/Configs/DXRandoDefault.ini index 08bdbe6b0..6023769af 100644 --- a/installer/Configs/DXRandoDefault.ini +++ b/installer/Configs/DXRandoDefault.ini @@ -334,7 +334,7 @@ GUIScalingFix=0 SubtitleFix=True UseAutoFOV=True RawInput=True -BorderlessFullscreenWindow=False +BorderlessFullscreenWindow=True BorderlessFullscreenWindowAllMonitors=False FPSLimit=0 UseSingleCPU=False diff --git a/installer/Configs/DeusExDefault.ini b/installer/Configs/DeusExDefault.ini index 29f95411a..661b71a91 100644 --- a/installer/Configs/DeusExDefault.ini +++ b/installer/Configs/DeusExDefault.ini @@ -332,7 +332,7 @@ GUIScalingFix=0 SubtitleFix=True UseAutoFOV=True RawInput=True -BorderlessFullscreenWindow=False +BorderlessFullscreenWindow=True BorderlessFullscreenWindowAllMonitors=False FPSLimit=0 UseSingleCPU=False diff --git a/installer/GUI/InstallerWindow.py b/installer/GUI/InstallerWindow.py index 0dd98b158..399824e7f 100644 --- a/installer/GUI/InstallerWindow.py +++ b/installer/GUI/InstallerWindow.py @@ -28,6 +28,7 @@ def ShowAdvanced(self): for (control, val) in self.controls.items(): control.grid(**val['gridargs']) self.root.update() + self.height = max(500, self.height) self.root.geometry(str(self.width)+"x"+str(self.height)) self.scroll.ReConf() @@ -38,6 +39,9 @@ def initWindow(self): self.advanced = False self.width = 350 self.height = 500 + if IsVanillaFixer(): + self.height = 350 + self.controls = {} if IsVanillaFixer(): @@ -124,7 +128,7 @@ def InitFlavorSettings(self, f: str, pad) -> int: v = BooleanVar(master=self.frame, value=(not IsVanillaFixer())) settings['install'] = v c = Checkbutton(self.frame, text="Install DXRando for "+f, variable=v) - c.grid(column=1,row=self.row, sticky='SW', padx=pad, pady=pad) + self.setgrid(c, advanced=IsVanillaFixer(), column=1,row=self.row, sticky='SW', padx=pad, pady=pad) self.FixColors(c) self.row+=1 @@ -147,7 +151,7 @@ def InitFlavorSettings(self, f: str, pad) -> int: settings['ZeroRando'] = v c = Checkbutton(self.frame, text="Default to Zero Rando mode for "+f, variable=v) Hovertip(c, "This retains the vanilla menu experience for your first launch.\nAnd also sets Zero Rando mode as your default game mode for a new game.\nYou can change this once you get into the game with the Rando menu.") - c.grid(column=1,row=self.row, sticky='SW', padx=pad*10, pady=pad) + self.setgrid(c, advanced=IsVanillaFixer(), column=1,row=self.row, sticky='SW', padx=pad*10, pady=pad) self.FixColors(c) self.row+=1 @@ -156,7 +160,7 @@ def InitFlavorSettings(self, f: str, pad) -> int: settings['DXRando.exe'] = v c = Checkbutton(self.frame, text="Create separate DXRando.exe for "+f, variable=v) Hovertip(c, "Overwriting the original DeusEx.exe makes it easier for Linux Steam players.\nOnly applicable if installing DXRando.") - c.grid(column=1,row=self.row, sticky='SW', padx=pad*10, pady=pad) + self.setgrid(c, advanced=IsVanillaFixer(), column=1,row=self.row, sticky='SW', padx=pad*10, pady=pad) self.FixColors(c) self.row+=1 @@ -278,15 +282,27 @@ def _Install(self): globalsettings[key] = val.get() flavors = Install.Install(self.exe, flavors, globalsettings) - flavorstext = ', '.join(flavors.keys()) + installedflavorstext = '' + for (k,v) in flavors.items(): + if v.get('install'): + installedflavorstext += k + ', ' + if installedflavorstext.endswith(', '): + installedflavorstext = 'Installed DXRando for: ' + installedflavorstext[0:-2] + + if flavors.get('Vanilla', {}).get('FixVanilla'): + installedflavorstext = 'Fixed vanilla.' + installedflavorstext + + if not installedflavorstext: # done with something idk what + installedflavorstext = 'Done.' + extra = '' - if 'Vanilla' in flavors and IsWindows(): + if flavors.get('Vanilla', {}).get('install') and IsWindows(): extra += '\nCreated DXRando.exe' - if 'Vanilla? Madder.' in flavors and IsWindows(): + if flavors.get('Vanilla? Madder.', {}).get('install') and IsWindows(): extra += '\nCreated VMDRandomizer.exe' self.root.title('DXRando Installation Complete!') self.root.update() - messagebox.showinfo('DXRando Installation Complete!', 'Installed DXRando for: ' + flavorstext + extra) + messagebox.showinfo('Installation Complete!', installedflavorstext + extra) self.closeWindow() diff --git a/installer/Install/Install.py b/installer/Install/Install.py index f9e45e2cf..9881ef86d 100644 --- a/installer/Install/Install.py +++ b/installer/Install/Install.py @@ -81,6 +81,7 @@ def Install(exe:Path, flavors:dict, globalsettings:dict) -> dict: EngineDllFix(system) CopyDXVK(system, globalsettings['dxvk']) + CopyD3DRenderers(system, globalsettings['deus_nsf_d3d10_lighting'], globalsettings['deus_nsf_d3d10_retro_textures']) InstallOGL2(system, globalsettings['ogl2']) debug("Install returning", flavors) @@ -146,7 +147,6 @@ def InstallVanilla(system:Path, settings:dict, globalsettings:dict): Mkdir((dxrroot / 'Maps'), exist_ok=True, parents=True) Mkdir((dxrroot / 'System'), exist_ok=True, parents=True) CopyPackageFiles('vanilla', gameroot, ['DeusEx.u']) - CopyD3DRenderers(system, globalsettings['deus_nsf_d3d10_lighting'], globalsettings['deus_nsf_d3d10_retro_textures']) if settings.get('mirrors'): MapVariants.InstallMirrors(dxrroot / 'Maps', settings.get('downloadcallback'), 'Vanilla') @@ -162,6 +162,8 @@ def VanillaFixConfigs(system, exename, kentie, globalsettings:dict, sourceINI: P configs_dest = GetDocumentsDir(system) / 'Deus Ex' / 'System' if SaveDXRando: Mkdir(configs_dest.parent /'SaveDXRando', exist_ok=True, parents=True) + else: + Mkdir(configs_dest.parent /'Save', exist_ok=True, parents=True) else: configs_dest = system if SaveDXRando: