Skip to content

Commit

Permalink
installer fix vanilla fixer D3D10, hide rando for vanilla fixer, defa…
Browse files Browse the repository at this point in the history
…ult to borderless
  • Loading branch information
Die4Ever committed Apr 14, 2024
1 parent 124e7b9 commit 9bcb7e4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion installer/Configs/DXRandoDefault.ini
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ GUIScalingFix=0
SubtitleFix=True
UseAutoFOV=True
RawInput=True
BorderlessFullscreenWindow=False
BorderlessFullscreenWindow=True
BorderlessFullscreenWindowAllMonitors=False
FPSLimit=0
UseSingleCPU=False
Expand Down
2 changes: 1 addition & 1 deletion installer/Configs/DeusExDefault.ini
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ GUIScalingFix=0
SubtitleFix=True
UseAutoFOV=True
RawInput=True
BorderlessFullscreenWindow=False
BorderlessFullscreenWindow=True
BorderlessFullscreenWindowAllMonitors=False
FPSLimit=0
UseSingleCPU=False
Expand Down
30 changes: 23 additions & 7 deletions installer/GUI/InstallerWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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():
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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()


Expand Down
4 changes: 3 additions & 1 deletion installer/Install/Install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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')
Expand All @@ -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:
Expand Down

0 comments on commit 9bcb7e4

Please sign in to comment.