Include z3pr's data files in the frozen package.

Warning: requires dev6 version of it
This commit is contained in:
Fabian Dill
2020-08-25 13:27:34 +02:00
parent 2096d6ae5b
commit 606f1fd4f8
2 changed files with 14 additions and 2 deletions

View File

@@ -113,6 +113,16 @@ for data in extra_data:
os.makedirs(buildfolder / "Players", exist_ok=True)
shutil.copyfile("playerSettings.yaml", buildfolder / "Players" / "playerSettings.yaml")
try:
from maseya import z3pr
except ImportError:
print("Maseya Palette Shuffle not found, skipping data files.")
else:
# maseya Palette Shuffle exists and needs its data files
print("Maseya Palette Shuffle found, including data files...")
file = z3pr.__file__
installfile(Path(os.path.dirname(file)) / "data", keep_content=True)
qusb2sneslog = buildfolder / "QUsb2Snes" / "log.txt"
if os.path.exists(qusb2sneslog):
os.remove(qusb2sneslog)
@@ -120,7 +130,7 @@ if os.path.exists(qusb2sneslog):
if signtool:
for exe in exes:
print(f"Signing {exe.targetName}")
os.system(signtool+exe.targetName)
os.system(signtool + exe.targetName)
manifest_creation()