Play your Steam library's Windows games on a jailbroken PS5.
C++
Lead the README install with a plain folder copy
Leonardo Lobato5b4e15a2f894
diff --git a/README.md b/README.mdindex 5ead9bd..66c9ccd 100644--- a/README.md+++ b/README.md@@ -92,7 +92,7 @@ you sign in:(port 2120), and optionally [ps5-web-file-manager](https://github.com/owendswang/ps5-web-file-manager)(port 8888).- **Windows games:** a Steam account with games, or game folders you already have (see [Import Windows games](#import-windows-games)).-- **A computer with Python 3** on the same network as the PS5, to copy Playden and the kit to it.+- **A computer on the same network as the PS5**, to copy Playden and the kit to it. The kit upload needs Python 3.- **To build it yourself (optional):** a Mac with Apple Silicon. Linux should also work, but we have not tested ityet. See [Build from source](#build-from-source).@@ -114,24 +114,28 @@ Other versions can work, but these are the ones we know.Download both files from the latest [release](../../releases):- `playden-ps5-0.6.0.zip`: the Playden app (`FAKE77031`) and the console tools used below.-- `playden-kit-0.12.zip`: the runtime kit 0.12 (`hl2-fw1360-dev1`), with its source list and license texts.+- `playden-kit-0.12.zip`: the runtime kit 0.12, with its source list and license texts.-You need Python 3 on your computer for the tools. Unzip both files next to each other, then run the commands from-the `playden-ps5-<version>` folder, which holds `tools/`.+Unzip both files next to each other. Installing takes two copies over the network: the app folder, then the+runtime kit folder. After that, Playden updates itself (see [Update Playden](#update-playden)).++Like other PS5 homebrew, Playden is a folder in `/data/homebrew/`, and+ShadowMountPlus adds its tile to the Home screen.### Install Playden-1. Copy the app to the console over FTP. `--install` creates `/data/homebrew/FAKE77031` and its folders, so it also- works on a console that has never had Playden (or was just reinstalled):+1. Copy the `FAKE77031` folder from `playden-ps5-<version>` into `/data/homebrew/` on the console. Use any FTP client+ (FileZilla, Cyberduck, etc.) or the web file manager in a browser. Create `/data/homebrew` first if it isn't there.+ You do not need to `chmod` anything: Playden checks the folders it writes to and fixes their permissions before+ it writes. If it can't fix one, it names that folder.++ Or, from a computer with Python 3, run this in the `playden-ps5-<version>` folder. It creates the folders, copies+ only what changed, and keeps a backup of the files it replaces:```shpython3 tools/console_title_deploy.py --host <PS5 IP> deploy --install FAKE77031 --backup backups/<name>```- Copying the `FAKE77031` folder by hand with an FTP client or the web file manager also works. You do not need to- `chmod` any folder: Playden checks the folders it writes to and fixes their permissions itself before it writes.- If it can't fix one, it names that folder.-From 0.6.0, Playden keeps its data outside the app folder and moves it there once, at startup:- Your sign-in, settings and other user data: `/data/playden/user/`.@@ -164,20 +168,23 @@ The previous app and kit are kept until the next update, in `/data/playden/self-closes, swaps the previous version and its kit in, and opens again. If the swap does not take and the previousversion opens again, it says so and puts its kit back. If the new version itself fails to start, nothing can report it: reinstall Playden over FTP asdescribed above (your games, sign-in and settings are kept), and put the previous kit folder back in place of-`hl2-fw1360-dev1` if the new kit is at fault.+the installed one if the new kit is at fault.After the version that added import, going back to an older version keeps your old favorites, but loses the favoritesand collections you changed since. The console's organization data now lives in one file that older versions don't read.-You can also update by hand: run the install command without `--install`. It copies only the changed files, keeps a-backup of what it replaced, and puts those three folders' modes right if they changed.+You can also update by hand: copy the new `FAKE77031` folder over the old one, or run the install command without+`--install`. The command copies only the changed files, keeps a backup of what it replaced, and puts those three+folders' modes right if they changed.### Install the runtime kit-This release uses **kit 0.12**. Upload the kit folder from `playden-kit-0.12.zip`:+This release uses **kit 0.12**. Upload the kit folder from `playden-kit-0.12.zip` with the upload tool. This step+needs Python 3. A plain FTP copy does not work for the kit: Playden checks each kit file's permissions against the+kit's manifest, and a plain copy doesn't set them. Run it from the `playden-ps5-<version>` folder:```sh-python3 tools/console_kit_upload.py ../playden-kit-0.12/hl2-fw1360-dev1 --host <PS5 IP> --replace+python3 tools/console_kit_upload.py ../playden-kit-0.12 --host <PS5 IP> --replace```The upload checks every file before it switches to the new kit, and creates `/data/playden/kits` on a console thatdiff --git a/cmake/HomebrewUI.cmake b/cmake/HomebrewUI.cmakeindex aeb1208..6fb5545 100644--- a/cmake/HomebrewUI.cmake+++ b/cmake/HomebrewUI.cmake@@ -670,6 +670,7 @@ if(BUILD_TESTING)find_package(Python3 REQUIRED COMPONENTS Interpreter)add_test(NAME native_startup_order COMMAND "${Python3_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/tests/test_native_startup_order.py")+ add_test(NAME console_kit_upload COMMAND "${Python3_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/tests/test_console_kit_upload.py")add_test(NAME ui_comparison_fixtureCOMMAND "${Python3_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/tools/verify_ui_comparison.py""${CMAKE_SOURCE_DIR}/fixtures/ui-comparison")diff --git a/tests/test_console_kit_upload.py b/tests/test_console_kit_upload.pynew file mode 100644index 0000000..b2c3d4c--- /dev/null+++ b/tests/test_console_kit_upload.py@@ -0,0 +1,48 @@+from pathlib import Path+import sys+import tempfile+import unittest++ROOT = Path(__file__).resolve().parents[1]+sys.path.insert(0, str(ROOT / 'tools'))++import console_kit_upload # noqa: E402+++def make_kit(folder):+ folder.mkdir(parents=True)+ (folder / 'manifest.json').write_text('{}')+ return folder+++class KitFolderTests(unittest.TestCase):+ def setUp(self):+ self.temp = tempfile.TemporaryDirectory()+ self.root = Path(self.temp.name)++ def tearDown(self):+ self.temp.cleanup()++ def test_takes_the_kit_folder_itself(self):+ kit = make_kit(self.root / 'kit')+ self.assertEqual(console_kit_upload.kit_folder(kit), kit)++ def test_finds_the_kit_inside_the_release_folder(self):+ release = self.root / 'playden-kit-0.12'+ kit = make_kit(release / 'some-kit')+ (release / 'licenses').mkdir()+ self.assertEqual(console_kit_upload.kit_folder(release), kit)++ def test_refuses_a_folder_without_exactly_one_kit(self):+ release = self.root / 'playden-kit-0.12'+ release.mkdir()+ with self.assertRaises(SystemExit):+ console_kit_upload.kit_folder(release)+ make_kit(release / 'a')+ make_kit(release / 'b')+ with self.assertRaises(SystemExit):+ console_kit_upload.kit_folder(release)+++if __name__ == '__main__':+ unittest.main()diff --git a/tools/console_kit_upload.py b/tools/console_kit_upload.pyindex 9aa5d73..68cc43a 100644--- a/tools/console_kit_upload.py+++ b/tools/console_kit_upload.py@@ -53,9 +53,19 @@ def remote_sha256(ftp, path):return digest.hexdigest()+def kit_folder(path):+ """The kit folder: the given one, or the one kit inside it (an unzipped playden-kit-<version> folder)."""+ if (path / "manifest.json").is_file():+ return path+ kits = [child for child in sorted(path.iterdir()) if (child / "manifest.json").is_file()]+ if len(kits) != 1:+ raise SystemExit(f"{path}: no kit found (a folder with manifest.json, or one that holds exactly one)")+ return kits[0]++def main():parser = argparse.ArgumentParser(description=__doc__)- parser.add_argument("kit", type=Path)+ parser.add_argument("kit", type=Path, help="the kit folder, or the unzipped playden-kit-<version> folder")parser.add_argument("--host", default=os.environ.get("PLAYDEN_PS5_HOST"),help="the PS5's IP address (or set PLAYDEN_PS5_HOST)")parser.add_argument("--port", type=int, default=2120)@@ -65,6 +75,7 @@ def main():args = parser.parse_args()if not args.host:parser.error("give the PS5's address with --host or PLAYDEN_PS5_HOST")+ args.kit = kit_folder(args.kit)manifest = json.loads((args.kit / "manifest.json").read_text())kit_id = manifest["kit_id"]final = f"{args.remote_parent}/{kit_id}"