RenPy-Unpacker: Add MacOS support
This commit is contained in:
parent
ad6ea5aa68
commit
df1122bcd0
1 changed files with 7 additions and 2 deletions
|
@ -2,8 +2,13 @@ init 4 python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for asset in renpy.list_files():
|
for asset in renpy.list_files():
|
||||||
if os.path.splitext(asset)[1] != ".rpa" and asset != "unpack.rpyc":
|
if os.path.splitext(asset)[1] != ".rpa" and not asset.count("unpack.rpy"): # Ignore .rpa and script itself
|
||||||
output = "unpack/game/" + asset
|
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)):
|
if not os.path.exists(os.path.dirname(output)):
|
||||||
os.makedirs(os.path.dirname(output))
|
os.makedirs(os.path.dirname(output))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue