From df1122bcd0270e6a4cd6e160fdd50cde9f931eef Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Thu, 9 May 2024 00:18:57 +0300 Subject: [PATCH] RenPy-Unpacker: Add MacOS support --- RenPy-Unpacker/unpack.rpy | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RenPy-Unpacker/unpack.rpy b/RenPy-Unpacker/unpack.rpy index 005e855..905102f 100644 --- a/RenPy-Unpacker/unpack.rpy +++ b/RenPy-Unpacker/unpack.rpy @@ -2,8 +2,13 @@ init 4 python: import os for asset in renpy.list_files(): - if os.path.splitext(asset)[1] != ".rpa" and asset != "unpack.rpyc": - output = "unpack/game/" + asset + if os.path.splitext(asset)[1] != ".rpa" and not asset.count("unpack.rpy"): # Ignore .rpa and script itself + if renpy.macintosh: + game_path = os.path.expanduser('~') + "/" + config.name # Unpack assets to home folder (on mac you cant get cwd) + output = game_path + "/game/" + asset + else: + output = "unpack/game/" + asset # Unpack assets to game folder + if not os.path.exists(os.path.dirname(output)): os.makedirs(os.path.dirname(output))