F1, MFG UNLOCKER (MOD, RTX 20/30), off by default. When it is on, the launcher fetches MFG Unlocker v1.7.2 from its author's GitHub release into %LOCALAPPDATA%\victory\mfg-unlocker. The zip and MFGUnlocker.dll are both checked against the SHA-256 the author published (scripts\get-mfg-unlocker.ps1). victory.exe then loads the DLL under its own name before the device is made or Streamline is loaded, so nothing is renamed or put beside the game. - RTX 20 and 30 cards with DLSS on are asked once at the first start (default No), unless the choice was made or a mod DLL is already beside victory.exe. - `victory get-mfg` fetches it by hand. - The menu explains the item while it is picked. - The log records the load. - README updated. The download and the mod itself are not tested here (RTX 50 only). The load path was tested with a Windows DLL in its place: loaded before Streamline, game ran normally. Co-Authored-By: Claude Opus 5.5 <[email protected]>
58 lines
3.5 KiB
PowerShell
58 lines
3.5 KiB
PowerShell
# Fetches MFG Unlocker (github.com/dashdogy/MFG-Unlocker, someone else's MIT-licensed mod, about 5 MB) into
|
|
# %LOCALAPPDATA%\victory\mfg-unlocker, or the folder -To names. It lets DLSS Frame Generation run on GeForce
|
|
# RTX 20 and 30 cards, which NVIDIA does not support. victory.exe loads it only with the F1 menu's MFG UNLOCKER
|
|
# on (VICTORY_MFG_UNLOCKER=1); nothing is renamed or put beside the game. It is not part of this repository and
|
|
# was not tested by this fork. Its release v1.7.2 is pinned: the zip and the DLL in it are checked against the
|
|
# SHA-256 the mod's author published with that release (SHA256SUMS.txt), and nothing else is kept.
|
|
param(
|
|
[string]$To = ''
|
|
)
|
|
$ErrorActionPreference = 'Stop'
|
|
$ProgressPreference = 'SilentlyContinue'
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
|
$dir = if ($To) { $To } else { Join-Path $env:LOCALAPPDATA 'victory\mfg-unlocker' }
|
|
$version = '1.7.2'
|
|
# From the release's SHA256SUMS.txt (also GitHub's own digest of the zip).
|
|
$package = 'E002D624E3E7BA5CEDAB7211043C096FE8F555C30FF43500235A0686C7893F22'
|
|
$module = 'A9B1C01727FA72763BEF8F604E44EC165CE1C98272DE00719572B766A11CF28F'
|
|
$url = "https://github.com/dashdogy/MFG-Unlocker/releases/download/v$version/MFGUnlocker-v$version.zip"
|
|
|
|
$target = Join-Path $dir 'MFGUnlocker.dll'
|
|
if ((Test-Path $target) -and (Get-FileHash $target -Algorithm SHA256).Hash -eq $module) {
|
|
Write-Host "MFG Unlocker $version is already in $dir"
|
|
exit 0
|
|
}
|
|
Write-Host "MFG Unlocker $version (someone else's mod), from github.com/dashdogy/MFG-Unlocker (about 5 MB):"
|
|
New-Item -ItemType Directory -Force $dir | Out-Null
|
|
$part = Join-Path $dir "MFGUnlocker-v$version.zip.part"
|
|
try {
|
|
if (Get-Command curl.exe -ErrorAction SilentlyContinue) {
|
|
& curl.exe --location --fail --silent --show-error --progress-bar --output $part $url
|
|
if ($LASTEXITCODE -ne 0) { throw "could not get $url" }
|
|
} else {
|
|
Invoke-WebRequest -Uri $url -OutFile $part -UseBasicParsing
|
|
}
|
|
$hash = (Get-FileHash $part -Algorithm SHA256).Hash
|
|
if ($hash -ne $package) { throw "the zip is not the v$version release (SHA-256 $hash); not kept" }
|
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
|
$zip = [IO.Compression.ZipFile]::OpenRead($part)
|
|
try {
|
|
$entry = $zip.Entries | Where-Object Name -eq 'MFGUnlocker.dll' | Select-Object -First 1
|
|
if (-not $entry) { throw 'the zip has no MFGUnlocker.dll' }
|
|
$dll = "$target.part"
|
|
[IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $dll, $true)
|
|
# Its licence and notices (Intel's XeSS data in it is under Intel's licence), kept beside it.
|
|
foreach ($name in 'LICENSE', 'LICENSE.txt', 'NOTICE.md', 'NOTICE.txt', 'README.md', 'README.txt') {
|
|
$doc = $zip.Entries | Where-Object Name -eq $name | Select-Object -First 1
|
|
if ($doc) { [IO.Compression.ZipFileExtensions]::ExtractToFile($doc, (Join-Path $dir $name), $true) }
|
|
}
|
|
} finally { $zip.Dispose() }
|
|
$hash = (Get-FileHash $dll -Algorithm SHA256).Hash
|
|
if ($hash -ne $module) { Remove-Item $dll -Force; throw "MFGUnlocker.dll is not the v$version file (SHA-256 $hash); not kept" }
|
|
Move-Item $dll $target -Force
|
|
} finally {
|
|
Remove-Item $part -Force -ErrorAction SilentlyContinue
|
|
}
|
|
Write-Host (' MFGUnlocker.dll {0:N1} MB, v{1}, checked against the published SHA-256' -f ((Get-Item $target).Length / 1MB), $version)
|
|
Write-Host " in $dir (its licence and notices beside it)"
|