[TUTORIAL] How to use Setup.bat and how to reduce download size

Hey guys, just wanted to chime in. gitdepsignore and exclude= is super useful. I didn’t find it specified exactly anywhere, but .gitdepsignore has to be in the <workspace>/UE4/ folder. I’m only having my programmers use Setup.bat. For artists, I’ve written a python script for having TeamCity automatically update and submit Editor/Game binaries on every commit, and include all Content folders as well in the case of an engine upgrade.

Here’s my .gitdepsignore:


/Engine/Documentation/**
/Engine/Extras/**
!/Engine/Extras/Redist/**
!/Engine/Extras/VisualStudioDebugging/**
!/Engine/Extras/VisualStudioSnippets/**
/FeaturePacks/**
/Samples/**
/Templates/**
/Engine/**/Android*/**
!/Engine/Plugins/Runtime/AndroidPermission/**
/Engine/**/IOS*/**
/Engine/**/TVOS*/**
/Engine/**/Google*/**
/Engine/**/LeapMotion/**
/Engine/Plugins/Online/OnlineSubsystemFacebook/**
/Engine/Plugins/Online/OnlineSubsystemAmazon/**
/Engine/Plugins/Online/OnlineSubsystemGoogle/**
#i'm excluding engine and plugin content because we're including it in Perforce
#including a / after Engine breaks this because it evaluates to Engine/.*/Content which will not find Engine/Content
/Engine**/Content/**

Here’s part of my Setup.bat:


set EXCLUDES= -exclude=Linux -exclude=Mac -exclude=Android -exclude=TVOS -exclude=IOS -exclude=GoogleVR -exclude=GoogleTest -exclude=LeapMotion -exclude=Dingo -exclude=Switch

rem Sync the dependencies...
.\Engine\Binaries\DotNET\GitDependencies.exe %PROMPT_ARGUMENT% %* %EXCLUDES%

Thanks for this thread!

EDIT: I should note that some of the things I excluded do require engine modifications. I’ve basically removed all Android, IOS, TVOS references in the engine, and deleted related projects.

1 Like