zoukankan      html  css  js  c++  java
  • 从源码编译UE4,加快Setup.bat下载文件的环节

    之前很傻,每次运行这个setup.bat都要等很久很久才能把4g多的东西下载完成,知道有一天突然发现了世外桃源……

    从命令行运行setup.bat -help,可以看到参数的说明(没错,参数可选,之前一直以为bat都是拿来双击的……):

    Usage:
       GitDependencies [options]
    
    Options:
       --all                         Sync all folders
       --include=<X>                 Include binaries in folders called <X>
       --exclude=<X>                 Exclude binaries in folders called <X>
       --prompt                      Prompt before overwriting modified files
       --force                       Always overwrite modified files
       --root=<PATH>                 Set the repository directory to be sync
       --threads=<N>                 Use N threads when downloading new files
       --dry-run                     Print a list of outdated files and exit
       --max-retries                 Override maximum number of retries per file
       --proxy=<user:password@url>   Sets the HTTP proxy address and credentials
       --cache=<PATH>                Specifies a custom path for the download cache
       --cache-size-multiplier=<N>   Cache size as multiplier of current download
       --cache-days=<N>              Number of days to keep entries in the cache
       --no-cache                    Disable caching of downloaded files
    
    Detected settings:
       Excluded folders: Mac, Android, Linux
       Proxy server: none
       Download cache: disabled
    
    Default arguments can be set through the UE4_GITDEPS_ARGS environment variable.
    Installing prerequisites...

    我们的优化都是围绕这些参数来的:

    1. --exclude=<XXX> (这些选项前的双横线也可以用单横线)
      非常有用,减少不必要的文件下载。可以排除掉自己不需要的平台和VS版本,例如: setup.bat -exclude=Linux -exclude=IOS -exclude=HTML5  -exclude=Android -exclude=VS2013
      平台可选的参数:Win32Win64osx32,osx64LinuxAndroidIOSHTML5
      VS版本可选参数:VS2012,VS2013,VS2015
      警告: 不要排除Win32 和 VS2012, 不然后期编译会遇到问题
    2. --threads=<N>
      可以多线程下载,速度倍增。例如:setup.bat --threads=20
    3. --cache=<PATH>
      可以把下载的内容缓存在指定的目录,这样如果有多人需要,就可以只下载一次,然后分享给大家,例如:setup.bat --cache=D:Temp
    4. --proxy=<user:password@url>
      可以使用代理下载
  • 相关阅读:
    linux文件属性基础篇
    Linux重定向符号(重点)
    linux---vim和grep
    linux目录文件与系统启动(3)/usr目录、/var目录和/proc目录讲解
    Linux 安装和 连接xshell
    shiro 快速入门详解。
    th 表达式的简单使用。
    springboot 分布式项目,子级项目各自的作用。
    springboot 配置百里香 thymeleaf?
    springboot 配置mybatis 配置mapper.xml
  • 原文地址:https://www.cnblogs.com/AnKen/p/6964465.html
Copyright © 2011-2022 走看看