From 542dde73e8eecb93e413480eaa5453c889f29342 Mon Sep 17 00:00:00 2001 From: mulderf0x <200639147+mulderf0x@users.noreply.github.com> Date: Sat, 10 Oct 2026 16:13:24 +0200 Subject: [PATCH 1/2] Add Silent Hills PT (Unofficial PC Port) --- games/silent-hills-pt/byof-installer.nsi | 60 ++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 games/silent-hills-pt/byof-installer.nsi diff --git a/games/silent-hills-pt/byof-installer.nsi b/games/silent-hills-pt/byof-installer.nsi new file mode 100644 index 0000000..9d5446d --- /dev/null +++ b/games/silent-hills-pt/byof-installer.nsi @@ -0,0 +1,60 @@ +!define MUI_WELCOMEPAGE_TEXT "This installer requires user-provided copy of the original USA P.T. (CUSA01127)$\r$\n\ +$\r$\n\ +It will verify the integrity of the provided image, install P.T. Unofficial PC Port (Windows or Linux, depending on your OS), and extract the game files to the installation folder.$\r$\n\ +$\r$\n\ +Special thanks to LoreanXavier for successfully bringing this legendary demo to the PC platform!$\r$\n\ +$\r$\n\ +${TXT_WELCOMEPAGE_MULDERLAND_2}$\r$\n\ +$\r$\n\ +This installer and the PC port are not affiliated with or endorsed by Konami, Kojima Productions or any of the original developers." + +!include "..\..\includes\templates\ByofTemplate.nsh" +!include "..\..\includes\tools\7z.nsh" +!include "..\..\includes\tools\I6Comp.nsh" +!include "..\..\includes\tools\XDelta3.nsh" + +Name "Silent Hills: P.T. (Unofficial PC port)" +InstallDir "C:\Mulderland\Silent Hills P.T." + +!insertmacro BYOF_DEFINE "USAdemo" "PKG files|*.pkg" "0627b5b3cbf0e05a2ba99b058999a81d0fac153a" +!insertmacro BYOF_PAGE_CREATE +!insertmacro BYOF_WRITE_ENABLE_NEXT_BUTTON + +Section "P.T. PC Port v1.02 (by LoreanXavier)" + SetOutPath "$INSTDIR" + + !insertmacro DETECT_OS $R0 + ${If} $R0 == "Linux" + !insertmacro DOWNLOAD_2 "https://github.com/LoreanXavier/pt-pc/releases/download/v1.0.2/P.T.PC.Port-portable-linux.zip" \ + "https://cdn.mulderload.eu/games/silent-hills-pt/P.T.PC.Port-portable-linux-v1.0.2.zip" \ + "P.T.PC.Port-portable.zip" \ + "7cb174e984591bed2183b2555192128592e50781727dc4ad7a4d0cb85224495a" + ${Else} + !insertmacro DOWNLOAD_2 "https://github.com/LoreanXavier/pt-pc/releases/download/v1.0.2/P.T.PC.Port-portable-windows.zip" \ + "https://cdn.mulderload.eu/games/silent-hills-pt/P.T.PC.Port-portable-windows-v1.0.2.zip" \ + "P.T.PC.Port-portable.zip" \ + "0b3470da25a8d217ef952d3ed543eee822fa47372cde6986b251098ae1904dea" + ${EndIf} + !insertmacro NSISUNZ_EXTRACT "P.T.PC.Port-portable.zip" ".\" "AUTO_DELETE" + !insertmacro FOLDER_MERGE "$INSTDIR\pt-port-20261010-943efa66" "$INSTDIR" + AddSize 472259 +SectionEnd + +Section "Extract game files from PKG" + SetOutPath "$INSTDIR" + + DetailPrint " // Get pkgextract" + !insertmacro DOWNLOAD_2 "https://github.com/paulomanrique/ps4-pkg-extractor/releases/download/v0.0.1/pkgextract-x86_64-pc-windows-msvc.zip" \ + "https://cdn.mulderload.eu/dependencies/ps4-pkg-extractor/v0.0.1/pkgextract-x86_64-pc-windows-msvc.zip" \ + "pkgextract.zip" \ + "0c736ee02779fb5cf4403a91da23f94fdaa72debf995be0c400ac9c36acee63a" + + !insertmacro NSISUNZ_EXTRACT "pkgextract.zip" ".\" "AUTO_DELETE" + + DetailPrint " // Extracting game files from PKGs" + nsExec::ExecToStack '"$INSTDIR\pkgextract.exe" -o ".\CUSA01127" -f "$byofPath_USAdemo"' + AddSize 1320712 + + DetailPrint " // Cleaning up" + Delete "pkgextract.exe" +SectionEnd From 71324c85ffce65eade9c54199e47ca258b22a091 Mon Sep 17 00:00:00 2001 From: mulderf0x <200639147+mulderf0x@users.noreply.github.com> Date: Sat, 10 Oct 2026 22:06:38 +0200 Subject: [PATCH 2/2] Silent Hills PT - Fix default INSTDIR on Linux --- games/silent-hills-pt/byof-installer.nsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/games/silent-hills-pt/byof-installer.nsi b/games/silent-hills-pt/byof-installer.nsi index 9d5446d..ae46ed9 100644 --- a/games/silent-hills-pt/byof-installer.nsi +++ b/games/silent-hills-pt/byof-installer.nsi @@ -58,3 +58,16 @@ Section "Extract game files from PKG" DetailPrint " // Cleaning up" Delete "pkgextract.exe" SectionEnd + +Function .onInit + !insertmacro DETECT_OS $R0 + ${If} $R0 == "Linux" + ReadEnvStr $R0 STEAM_APP_PATH + ${If} $R0 != "" + MessageBox MB_ICONEXCLAMATION "Please run this installer with Wine, not Protontricks." + Quit + ${EndIf} + ReadEnvStr $R0 "USERNAME" + StrCpy $INSTDIR "Z:\home\$R0\Mulderland\Silent Hills P.T." + ${EndIf} +FunctionEnd