Packing and shipping a project: Difference between revisions
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Packaging sequence == | |||
We cannot click on "Build All Levels" as UE 5.1 breaks the lights if you do so. Reason is that "Build Geometry" makes the light disappear from the editor until relaunch, and breaks the relight. | |||
Sequence I used is: | |||
# Load the Persistent level first | |||
# Loaded ALL the submaps | |||
# Be sure to have the current level selected as the Persistent Level | |||
# Build Paths (about 10 minutes) | |||
# Ensure Build->Lighting Quality->Production | |||
# Build Lighting Only (about 1.5 hours) | |||
# Save all | |||
== Generating separate Chunks in Packaging and Cooking == | == Generating separate Chunks in Packaging and Cooking == | ||
Line 12: | Line 27: | ||
Give it a name | Give it a name | ||
Open the Label and assign a chunk ID, and flag "Label Assets in My Directory" | Open the Label and assign a chunk ID, and flag "Label Assets in My Directory" | ||
NOTE: Chunk ID 0 is anyway used by unreal engine as the "default" chunk, so our specific chunks should start from 1 | |||
3) Open the Asset Audit Window | 3) Add the directory to the Asset Manager. | ||
Project Settings -> Game -> Asset Manager -> Directories, add the one you need | |||
4) Open the Asset Audit Window | |||
Window->Developer Tools->Asset Audit -> Add Chunks | Window->Developer Tools->Asset Audit -> Add Chunks | ||
5) Click on Add Chunks | |||
NOTE: In case of subdirectories, you can flag your labels present in subdirectories with higher priority compared to the main dir labels, so those will take priority and will be split into a separate chunk. | |||
== PSUnreal == | |||
'''MacOSX:''' | |||
Got this error while packaging on Mac: | |||
Unable to load module '/Users/luke/PSUnreal/Binaries/Mac/UE4Editor-PSUnreal.dylib' because the file couldn't be loaded by the OS. | |||
I fixed it by running this command after the error occurred, than restart the build: | |||
install_name_tool -change Wordnet.dylib @loader_path/Wordnet.dylib /Users/luke/PSUnreal/Binaries/Mac/UE4Editor-PSUnreal.dylib | |||
Linux : | '''Linux :''' | ||
/home/planeshift/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -project="/home/planeshift/PSUnreal/PSUnreal.uproject" -noP4 -clientconfig=Shipping -utf8output -platform=Linux -targetplatform=Linux -build -cook -allmaps -stage -archive -archivedirectory="/home/planeshift/temp/psunreal_shipping" | /home/planeshift/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -project="/home/planeshift/PSUnreal/PSUnreal.uproject" -noP4 -clientconfig=Shipping -utf8output -platform=Linux -targetplatform=Linux -build -cook -allmaps -stage -archive -archivedirectory="/home/planeshift/temp/psunreal_shipping" | ||
Line 59: | Line 87: | ||
D:\Luca\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project="D:\Unreal Projects\MyProject2\MyProject2.uproject" -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -log -cook -allmaps -build -stage -pak -archive -archivedirectory="F:\temp\myproject2" | D:\Luca\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project="D:\Unreal Projects\MyProject2\MyProject2.uproject" -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -log -cook -allmaps -build -stage -pak -archive -archivedirectory="F:\temp\myproject2" | ||
== Overall timing for packing and shipping == | |||
Numbers are expressed in hours with: measured number (my estimate) | |||
{| class="wikitable" | |||
|- | |||
! OS !! Compile UE !! Compile PS !! Build shipping client !! Upload to updater server !! Upload the full package | |||
|- | |||
| Windows || ? (2) || ? (1)|| ? (2)|| ? (0.2)|| ? (1) | |||
|- | |||
| Linux || ? (2.5) || ? (2)|| ? (2.5)|| ? (0.2)|| ? (1) | |||
|- | |||
| MacOS || ? (10)|| ? (6)|| ? (12)|| ? (0.2)|| ? (1) | |||
|} |
Latest revision as of 16:43, 23 March 2024
Packaging sequence
We cannot click on "Build All Levels" as UE 5.1 breaks the lights if you do so. Reason is that "Build Geometry" makes the light disappear from the editor until relaunch, and breaks the relight.
Sequence I used is:
- Load the Persistent level first
- Loaded ALL the submaps
- Be sure to have the current level selected as the Persistent Level
- Build Paths (about 10 minutes)
- Ensure Build->Lighting Quality->Production
- Build Lighting Only (about 1.5 hours)
- Save all
Generating separate Chunks in Packaging and Cooking
To generate multiple chunks while packaging based on the folders present in your Content Browser do the following:
1) First thing to enable is:
Edit->Project Settings->Packaging->Generate Chunks
2) Create a new Primary Label in one of the directories.
rightclick->Miscellaneous->"Data Asset" then select "Primary Label" as type Give it a name Open the Label and assign a chunk ID, and flag "Label Assets in My Directory" NOTE: Chunk ID 0 is anyway used by unreal engine as the "default" chunk, so our specific chunks should start from 1
3) Add the directory to the Asset Manager.
Project Settings -> Game -> Asset Manager -> Directories, add the one you need
4) Open the Asset Audit Window
Window->Developer Tools->Asset Audit -> Add Chunks
5) Click on Add Chunks
NOTE: In case of subdirectories, you can flag your labels present in subdirectories with higher priority compared to the main dir labels, so those will take priority and will be split into a separate chunk.
PSUnreal
MacOSX:
Got this error while packaging on Mac:
Unable to load module '/Users/luke/PSUnreal/Binaries/Mac/UE4Editor-PSUnreal.dylib' because the file couldn't be loaded by the OS.
I fixed it by running this command after the error occurred, than restart the build:
install_name_tool -change Wordnet.dylib @loader_path/Wordnet.dylib /Users/luke/PSUnreal/Binaries/Mac/UE4Editor-PSUnreal.dylib
Linux :
/home/planeshift/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -project="/home/planeshift/PSUnreal/PSUnreal.uproject" -noP4 -clientconfig=Shipping -utf8output -platform=Linux -targetplatform=Linux -build -cook -allmaps -stage -archive -archivedirectory="/home/planeshift/temp/psunreal_shipping"
Windows 9Gb uncompressed , 3.9Gb after zip, takes about 13 minutes to create the shipping package:
C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project="C:\PSUnreal\PSUnreal.uproject" -noP4 -platform=Win64 -clientconfig=Shipping -cook -allmaps -build -stage -pak -archive -archivedirectory="F:\temp\psunreal_shipping_client"
Check this:
https://pypi.org/project/buildbot-UnrealEngine/
Check this:
https://blog.jamie.holdings/2019/09/15/debug-shipping-builds-in-unreal-engine-4-23/
Example and notes
To package and ship a project you need to have AutomationTool and UnrealBuildTool compiled. You can find those under your project .sln in the "programs" group. Compiling these with DebugGame config gave me errors, so I had to compile those with "Development" config.
Example of packing the VehicleGame sample on my machine. This will compile and package in one command. Consider DebugGame is stilla debug Build. Total is 770Mb (without pdb file)
C:\Luca\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project="F:\Unreal Projects\VehicleGame\VehicleGame.uproject" -noP4 -platform=Win64 -clientconfig=DebugGame -serverconfig=DebugGame -cook -allmaps -build -stage -pak -archive -archivedirectory="F:\temp\vehicle_packaged"
Example of packing the VehicleGame in Shipping config (best optimized). Total is 680Mb (without pdb file)
C:\Luca\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project="F:\Unreal Projects\VehicleGame\VehicleGame.uproject" -noP4 -platform=Win64 -clientconfig=Shipping -serverconfig=Shipping -cook -allmaps -build -stage -pak -archive -archivedirectory="F:\temp\vehicle_packaged_shipping"
Example of packing MyProject2 in Development configuration.
D:\Luca\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project="D:\Unreal Projects\MyProject2\MyProject2.uproject" -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -log -cook -allmaps -build -stage -pak -archive -archivedirectory="F:\temp\myproject2"
Overall timing for packing and shipping
Numbers are expressed in hours with: measured number (my estimate)
OS | Compile UE | Compile PS | Build shipping client | Upload to updater server | Upload the full package |
---|---|---|---|---|---|
Windows | ? (2) | ? (1) | ? (2) | ? (0.2) | ? (1) |
Linux | ? (2.5) | ? (2) | ? (2.5) | ? (0.2) | ? (1) |
MacOS | ? (10) | ? (6) | ? (12) | ? (0.2) | ? (1) |