Create unreal package from source

Hello everyone,
i’m building UE (editor) from source (release - tag 5.3.2) using VS2022 (after patching see Error compiling the Automation Tool after updating Visual Studio today (Unreal 5.3.2) - #18 by so_toasty) and use it to compile my projects(BP).
Everything seems fine, i wanted to make a light/minimal package to integrate it into my build farm servers and get rid off around 250Go
My problem is, when i removed source my runuat script doesn’t work anymore.
If i restored Source the project compilation succeeded. I tried to build automationTool as indicated here Unreal Engine version 4.27.2, I get an error when trying to package any project - #2 by mandolor but without any success.
All compilation steps are done in command line, here is what i’ve done:

setup.bat --prompt

GenerateProjectFiles.bat 

msbuild.exe UE5.sln /p:Configuration="Development Editor" /p:platform=Win64 /m -t:restore,clean,build -p:RestorePackagesConfig=true -v:Normal -Filelogger

setup.bat is patched so i have no prompt

get-content "{{ unreal_dir }}/Setup.bat").Replace('^start /wait Engine\\Extras\\Redist\\en-us\\UEPrereqSetup_x64.exe /quiet$','start /wait Engine\\Extras\\Redist\\en-us\\UEPrereqSetup_x64.exe /quiet /norestart') | Set-Content "{{ unreal_dir }}/Setup.bat"
(get-content "{{ unreal_dir }}/Setup.bat").Replace('UnrealVersionSelector-Win64-Shipping.exe /register','UnrealVersionSelector-Win64-Shipping.exe /register /unattended') | Set-Content "{{ unreal_dir }}/Setup.bat"

if i remove Source, i have the following error:

Initializing script modules...
Unhandled exception: System.Exception: Found no script module records.
 at AutomationToolDriver.Program.MainProc() in Engine\Source\Programs\AutomationTool\Program.cs:line 494
 AutomationTool executed for 0h 0m 0s
AutomationTool exiting with ExitCode=1 (Error_Unknown)
BUILD FAILED

What did i miss ? and what are the necessary directories to make a distribuable package of compiled unreal ?

  • Engine/Binaries
  • Engine/Build
  • Engine/Plugins
  • Engine/Shaders
  • Engine/Config
    is it enough ?

thanks for your help
Stephane