Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c4ff349a0 | ||
|
|
79ec8fb439 |
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -24,29 +24,38 @@ src_assets = Path(project_source_root / "Minecraft.Assets")
|
||||
# clear out any old assets
|
||||
if dest_common.exists():
|
||||
shutil.rmtree(dest_common, ignore_errors=True)
|
||||
shutil.rmtree(client_build_dir / "music", ignore_errors=True)
|
||||
shutil.rmtree(client_build_dir / "Music", ignore_errors=True)
|
||||
shutil.rmtree(client_build_dir / "Sound", ignore_errors=True)
|
||||
# XXX: Check "copy DLC" bellow for info
|
||||
# shutil.rmtree(client_build_dir / "DurangoMedia", ignore_errors=True)
|
||||
|
||||
# copy `Minecraft.Assets/Common` into the build directory for the client.
|
||||
shutil.copytree(
|
||||
src_assets / "Common",
|
||||
dest_common,
|
||||
)
|
||||
try:
|
||||
shutil.copytree(
|
||||
src_assets / "Common",
|
||||
dest_common,
|
||||
)
|
||||
except FileNotFoundError:
|
||||
print(f"Error: source Common directory not found: {src_assets / 'Common'}", file=sys.stderr)
|
||||
raise
|
||||
|
||||
# copy the media archive to `Common/Media` inside the folder we just copied.
|
||||
shutil.copy(media_archive, client_build_dir / "Common" / "Media")
|
||||
|
||||
# copy music and Sound
|
||||
shutil.copytree(
|
||||
src_assets / "Common" / "music",
|
||||
client_build_dir / "music"
|
||||
)
|
||||
shutil.copytree(
|
||||
src_assets / "DurangoMedia" / "Sound",
|
||||
client_build_dir / "Sound"
|
||||
)
|
||||
# copy Sound with updated paths because putting them in root looks ugly.
|
||||
|
||||
sound_src = src_assets / "DurangoMedia" / "Sound"
|
||||
sound_dst = dest_common / "Sound"
|
||||
if sound_src.exists():
|
||||
if sound_dst.exists():
|
||||
print(f"Info: destination {sound_dst} already exists; skipping sound copy", file=sys.stderr)
|
||||
else:
|
||||
try:
|
||||
shutil.copytree(sound_src, sound_dst)
|
||||
except FileExistsError:
|
||||
print(f"Info: race: {sound_dst} already exists; skipping sound copy", file=sys.stderr)
|
||||
else:
|
||||
print(f"Warning: sound source {sound_src} not found!!", file=sys.stderr)
|
||||
|
||||
# copy DLC
|
||||
# XXX: The DLC path is handled inside of 4JLibs, the Windows64 build expects `DurangoMedia/DLC` to load DLC data from
|
||||
@@ -56,4 +65,4 @@ shutil.copytree(
|
||||
# )
|
||||
|
||||
# modify the stamp so this only happens when client or media_archive targets are changed
|
||||
output_stamp.touch()
|
||||
output_stamp.touch()
|
||||
Reference in new issue
Block a user