Fix missing assets in the source archive
The assets are required to build proper Blender release, so they can not be skipped from packing. The packing ignores the `working` directory as it seems to be big and sounds that it is not needed for the release. The assets are bundled under the `release/datafiles/assets` folder in the blender sources. This is where they will reside after switch to the Git LFS. Pull Request: blender/blender#106536
This commit is contained in:
@@ -112,6 +112,7 @@ def create_manifest(
|
||||
print(f'Building manifest of files: "{outpath}"...', end="", flush=True)
|
||||
with outpath.open("w", encoding="utf-8") as outfile:
|
||||
main_files_to_manifest(blender_srcdir, outfile)
|
||||
assets_to_manifest(blender_srcdir, outfile)
|
||||
submodules_to_manifest(blender_srcdir, version, outfile)
|
||||
|
||||
if packages_dir:
|
||||
@@ -140,6 +141,18 @@ def submodules_to_manifest(
|
||||
print(path, file=outfile)
|
||||
|
||||
|
||||
def assets_to_manifest(blender_srcdir: Path, outfile: TextIO) -> None:
|
||||
assert not blender_srcdir.is_absolute()
|
||||
|
||||
assets_dir = blender_srcdir.parent / "lib" / "assets"
|
||||
for path in assets_dir.glob("*"):
|
||||
if path.name == "working":
|
||||
continue
|
||||
if path.name in SKIP_NAMES:
|
||||
continue
|
||||
print(path, file=outfile)
|
||||
|
||||
|
||||
def packages_to_manifest(outfile: TextIO, packages_dir: Path) -> None:
|
||||
for path in packages_dir.glob("*"):
|
||||
if not path.is_file():
|
||||
@@ -170,7 +183,9 @@ def create_tarball(
|
||||
command += [
|
||||
"--transform",
|
||||
f"s,^{blender_srcdir.name}/,blender-{version}/,g",
|
||||
"--use-compress-program=xz -9",
|
||||
"--transform",
|
||||
f"s,^lib/assets/,blender-{version}/release/datafiles/assets/,g",
|
||||
"--use-compress-program=xz -1",
|
||||
"--create",
|
||||
f"--file={tarball}",
|
||||
f"--files-from={manifest}",
|
||||
|
@@ -1473,7 +1473,11 @@ install(
|
||||
# -----------------------------------------------------------------------------
|
||||
# Bundle assets
|
||||
|
||||
set(ASSET_BUNDLE_DIR ${CMAKE_SOURCE_DIR}/../lib/assets/publish/)
|
||||
set(ASSET_BUNDLE_DIR ${CMAKE_SOURCE_DIR}/release/datafiles/assets/publish/)
|
||||
|
||||
if(NOT EXISTS "${ASSET_BUNDLE_DIR}")
|
||||
set(ASSET_BUNDLE_DIR ${CMAKE_SOURCE_DIR}/../lib/assets/publish/)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${ASSET_BUNDLE_DIR}")
|
||||
install(
|
||||
|
Reference in New Issue
Block a user