# Create unreal package from source

**URL:** <https://forums.unrealengine.com/t/create-unreal-package-from-source/1766824>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, editor, question\
**Created:** [March 22, 2024, 2:58pm UTC](https://forums.unrealengine.com/t/create-unreal-package-from-source/1766824 "2024-03-22T14:58:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NQ-MAGNUS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NQ-MAGNUS](https://forums.unrealengine.com/u/NQ-MAGNUS)\
**Post date:** [March 22, 2024, 2:58pm UTC](https://forums.unrealengine.com/t/create-unreal-package-from-source/1766824/1 "2024-03-22T14:58:31Z")

</div>

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](https://forums.unrealengine.com/t/error-compiling-the-automation-tool-after-updating-visual-studio-today-unreal-5-3-2/1393088/18)) 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](https://forums.unrealengine.com/t/unreal-engine-version-4-27-2-i-get-an-error-when-trying-to-package-any-project/270627/2) but without any success.  
All compilation steps are done in command line, here is what i’ve done:

```auto
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

```auto
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:

```auto
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
