diff options
| -rwxr-xr-x | defaults/assets/fgmod.sh | 13 | ||||
| -rw-r--r-- | main.py | 30 | ||||
| -rw-r--r-- | package.json | 6 |
3 files changed, 37 insertions, 12 deletions
diff --git a/defaults/assets/fgmod.sh b/defaults/assets/fgmod.sh index fa36558..cffce14 100755 --- a/defaults/assets/fgmod.sh +++ b/defaults/assets/fgmod.sh @@ -146,6 +146,15 @@ else echo "⚠️ No plugins directory found in fgmod" fi +# === D3D12_Optiscaler Directory (required for FSR4/FidelityFX DX12 path) === +if [[ -d "$fgmod_path/D3D12_Optiscaler" ]]; then + echo "📦 Installing D3D12_Optiscaler directory" + cp -r "$fgmod_path/D3D12_Optiscaler" "$exe_folder_path/" || true + logger -t fgmod "📦 D3D12_Optiscaler directory installed to $exe_folder_path" +else + echo "⚠️ No D3D12_Optiscaler directory found in fgmod" +fi + # === Supporting Libraries === cp -f "$fgmod_path/libxess.dll" "$exe_folder_path/" || true cp -f "$fgmod_path/libxess_dx11.dll" "$exe_folder_path/" || true @@ -159,7 +168,7 @@ cp -f "$fgmod_path/nvngx.dll" "$exe_folder_path/" || true # === Nukem FG Mod Files (now in fgmod directory) === cp -f "$fgmod_path/dlssg_to_fsr3_amd_is_better.dll" "$exe_folder_path/" || true -# Note: dlssg_to_fsr3.ini is not included in v0.9.0-pre4 archive +# Note: dlssg_to_fsr3.ini is not included in v0.9.0-final archive # === FakeNVAPI Files === # Remove legacy nvapi64.dll to avoid conflicts @@ -174,7 +183,7 @@ echo "📦 Installed fakenvapi.dll and fakenvapi.ini" # === Additional Support Files === # cp -f "$fgmod_path/d3dcompiler_47.dll" "$exe_folder_path/" || true -# Note: d3dcompiler_47.dll is not included in v0.9.0-pre4 archive +# Note: d3dcompiler_47.dll is not included in v0.9.0-final archive echo "✅ Installation completed successfully!" echo "📄 For Steam, add this to the launch options: \"$fgmod_path/fgmod\" %COMMAND%" @@ -156,8 +156,11 @@ class Plugin: with open(ini_file, 'r') as f: content = f.read() - # Replace FGType=auto with FGType=nukems - updated_content = re.sub(r'FGType\s*=\s*auto', 'FGType=nukems', content) + # Replace FGInput=auto with FGInput=nukems (final v0.9+ split FGType into FGInput/FGOutput) + updated_content = re.sub(r'FGInput\s*=\s*auto', 'FGInput=nukems', content) + + # Replace FGOutput=auto with FGOutput=nukems + updated_content = re.sub(r'FGOutput\s*=\s*auto', 'FGOutput=nukems', updated_content) # Replace Fsr4Update=auto with Fsr4Update=true updated_content = re.sub(r'Fsr4Update\s*=\s*auto', 'Fsr4Update=true', updated_content) @@ -174,7 +177,7 @@ class Plugin: with open(ini_file, 'w') as f: f.write(updated_content) - decky.logger.info("Modified OptiScaler.ini to set FGType=nukems, Fsr4Update=true, LoadAsiPlugins=true, Path=plugins, UseHQFont=false") + decky.logger.info("Modified OptiScaler.ini to set FGInput=nukems, FGOutput=nukems, Fsr4Update=true, LoadAsiPlugins=true, Path=plugins, UseHQFont=false") return True else: decky.logger.warning(f"OptiScaler.ini not found at {ini_file}") @@ -267,7 +270,7 @@ class Plugin: } # Copy additional individual files from bin directory - # Note: v0.9.0-pre3+ includes dlssg_to_fsr3_amd_is_better.dll, fakenvapi.dll, and fakenvapi.ini in the 7z + # Note: v0.9.0-final includes dlssg_to_fsr3_amd_is_better.dll, fakenvapi.dll, and fakenvapi.ini in the 7z # Only copy files that aren't already in the archive (separate remote binaries) additional_files = [ "nvngx.dll", # nvidia dll from streamline sdk, not bundled in opti @@ -433,7 +436,7 @@ class Plugin: "OptiScaler.dll", "OptiScaler.ini", "dlssg_to_fsr3_amd_is_better.dll", - "fakenvapi.dll", # v0.9.0-pre3+ includes fakenvapi.dll in archive + "fakenvapi.dll", # v0.9.0-final includes fakenvapi.dll in archive "fakenvapi.ini", "nvngx.dll", "amd_fidelityfx_dx12.dll", @@ -442,8 +445,8 @@ class Plugin: "amd_fidelityfx_vk.dll", "libxess.dll", "libxess_dx11.dll", - "libxess_fg.dll", # New in v0.9.0-pre4 - "libxell.dll", # New in v0.9.0-pre4 + "libxess_fg.dll", # added in v0.9.0 + "libxell.dll", # added in v0.9.0 "fgmod", "fgmod-uninstaller.sh", "update-optiscaler-config.py" @@ -549,6 +552,14 @@ class Plugin: else: decky.logger.warning("Plugins directory missing in fgmod bundle") + d3d12_src = fgmod_path / "D3D12_Optiscaler" + d3d12_dest = directory / "D3D12_Optiscaler" + if d3d12_src.exists(): + shutil.copytree(d3d12_src, d3d12_dest, dirs_exist_ok=True) + decky.logger.info(f"Copied D3D12_Optiscaler directory to {d3d12_dest}") + else: + decky.logger.warning("D3D12_Optiscaler directory missing in fgmod bundle") + copied_support = [] missing_support = [] for filename in SUPPORT_FILES: @@ -611,6 +622,11 @@ class Plugin: shutil.rmtree(plugins_dir, ignore_errors=True) decky.logger.info(f"Removed plugins directory at {plugins_dir}") + d3d12_dir = directory / "D3D12_Optiscaler" + if d3d12_dir.exists(): + shutil.rmtree(d3d12_dir, ignore_errors=True) + decky.logger.info(f"Removed D3D12_Optiscaler directory from {d3d12_dir}") + restored_backups = [] for dll in ORIGINAL_DLL_BACKUPS: backup = directory / f"{dll}.b" diff --git a/package.json b/package.json index 9c95117..312d0fc 100644 --- a/package.json +++ b/package.json @@ -53,9 +53,9 @@ "remote_binary": [ { - "sha256hash": "d30d98b9f58e340b8dcd5aa93fc59432e803e071cd6b207d55acc667685d79dc", - "url": "https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/download/opti-9-pre-11/Optiscaler_0.9.0-pre11.20260311._RC4.5.7z", - "name": "Optiscaler_0.9.0-pre11.20260311._RC4.5.7z" + "sha256hash": "a988ce2c0a86bba58a6313659d1ed2ab78f994dbdfab246394a2e4293ac68010", + "url": "https://github.com/optiscaler/OptiScaler/releases/download/v0.9/Optiscaler_0.9.0-final.20260401._AF.7z", + "name": "Optiscaler_0.9.0-final.20260401._AF.7z" }, { "sha256hash": "2604c0b392072d715b400b2f89434274de31995a4b6e68ce38250ebbd3f6c5fc", |
