<spanid="build-instructions"></span><h1>Build Instructions<aclass="headerlink"href="#build-instructions"title="Permalink to this headline">¶</a></h1>
<p>Shaka Packager supports building on Windows, Mac and Linux host systems.</p>
<divclass="section"id="linux-build-dependencies">
<spanid="linux-build-dependencies"></span><h2>Linux build dependencies<aclass="headerlink"href="#linux-build-dependencies"title="Permalink to this headline">¶</a></h2>
<p>Most development is done on Ubuntu (currently 14.04, Trusty Tahr). The
dependencies mentioned here are only for Ubuntu. There are some instructions
for <aclass="reference external"href="#notes-for-other-linux-distros">other distros below</a>.</p>
<p>Note that <codeclass="docutils literal"><spanclass="pre">Git</span></code> must be v1.7.5 or above.</p>
</div>
<divclass="section"id="mac-system-requirements">
<spanid="mac-system-requirements"></span><h2>Mac system requirements<aclass="headerlink"href="#mac-system-requirements"title="Permalink to this headline">¶</a></h2>
<li><pclass="first">The OS X 10.10 SDK or later. Run</p>
<divclass="highlight-shell"><divclass="highlight"><pre><span></span>$ ls <spanclass="sb">`</span>xcode-select -p<spanclass="sb">`</span>/Platforms/MacOSX.platform/Developer/SDKs
<spanid="windows-system-requirements"></span><h2>Windows system requirements<aclass="headerlink"href="#windows-system-requirements"title="Permalink to this headline">¶</a></h2>
<ulclass="simple">
<li>Visual Studio 2015 Update 3, see below (no other version is supported).</li>
<li>Windows 7 or newer.</li>
</ul>
<p>Install Visual Studio 2015 Update 3 or later - Community Edition should work if
its license is appropriate for you. Use the Custom Install option and select:</p>
<ulclass="simple">
<li>Visual C++, which will select three sub-categories including MFC</li>
<li>Universal Windows Apps Development Tools > Tools (1.4.1) and Windows 10 SDK
(10.0.14393)</li>
</ul>
</div>
<divclass="section"id="install-depot-tools">
<spanid="install-depot-tools"></span><h2>Install <codeclass="docutils literal"><spanclass="pre">depot_tools</span></code><aclass="headerlink"href="#install-depot-tools"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="linux-and-mac">
<spanid="linux-and-mac"></span><h3>Linux and Mac<aclass="headerlink"href="#linux-and-mac"title="Permalink to this headline">¶</a></h3>
<p>Clone the <codeclass="docutils literal"><spanclass="pre">depot_tools</span></code> repository from Chromium:</p>
<p>Add <codeclass="docutils literal"><spanclass="pre">depot_tools</span></code> to the end of your PATH (you will probably want to put this
in your <codeclass="docutils literal"><spanclass="pre">~/.bashrc</span></code> or <codeclass="docutils literal"><spanclass="pre">~/.zshrc</span></code>). Assuming you cloned <codeclass="docutils literal"><spanclass="pre">depot_tools</span></code> to
<p>Run the <codeclass="docutils literal"><spanclass="pre">gclient</span></code> tool from <codeclass="docutils literal"><spanclass="pre">depot_tools</span></code> to check out the code and its
<codeclass="docutils literal"><spanclass="pre">--no-history</span></code> flag to <codeclass="docutils literal"><spanclass="pre">gclient</span><spanclass="pre">sync</span></code>.</p>
<p>When the above commands completes, it will have created a hidden <codeclass="docutils literal"><spanclass="pre">.gclient</span></code> file
and a directory called <codeclass="docutils literal"><spanclass="pre">src</span></code> in the working directory. The remaining
instructions assume you have switched to the <codeclass="docutils literal"><spanclass="pre">src</span></code> directory:</p>
<spanid="build-shaka-packager"></span><h3>Build Shaka Packager<aclass="headerlink"href="#build-shaka-packager"title="Permalink to this headline">¶</a></h3>
<divclass="section"id="linux-and-mac">
<spanid="id1"></span><h4>Linux and Mac<aclass="headerlink"href="#linux-and-mac"title="Permalink to this headline">¶</a></h4>
<p>Shaka Packager uses <aclass="reference external"href="https://ninja-build.org">Ninja</a> as its main build tool,
which is bundled in depot_tools.</p>
<p>To build the code, run <codeclass="docutils literal"><spanclass="pre">ninja</span></code> command:</p>
<p>If you want to build debug code, replace <codeclass="docutils literal"><spanclass="pre">Release</span></code> above with <codeclass="docutils literal"><spanclass="pre">Debug</span></code>.</p>
<p>We also provide a mechanism to change build settings, for example,
you can change build system to <codeclass="docutils literal"><spanclass="pre">make</span></code> by overriding <codeclass="docutils literal"><spanclass="pre">GYP_GENERATORS</span></code>:</p>
<spanid="id2"></span><h4>Windows<aclass="headerlink"href="#windows"title="Permalink to this headline">¶</a></h4>
<p>The instructions are similar, except that Windows allows using either <codeclass="docutils literal"><spanclass="pre">/</span></code> or <codeclass="docutils literal"><spanclass="pre">\</span></code>
on how to use <codeclass="docutils literal"><spanclass="pre">Shaka</span><spanclass="pre">Packager</span></code>.</p>
</div>
<divclass="section"id="update-your-checkout">
<spanid="update-your-checkout"></span><h3>Update your checkout<aclass="headerlink"href="#update-your-checkout"title="Permalink to this headline">¶</a></h3>
<p>To update an existing checkout, you can run</p>
<spanid="cross-compiling-for-arm-on-ubuntu-host"></span><h2>Cross compiling for ARM on Ubuntu host<aclass="headerlink"href="#cross-compiling-for-arm-on-ubuntu-host"title="Permalink to this headline">¶</a></h2>
<p>The install-build-deps script can be used to install all the compiler
and library dependencies directly from Ubuntu:</p>
<spanid="notes-for-other-linux-distros"></span><h2>Notes for other linux distros<aclass="headerlink"href="#notes-for-other-linux-distros"title="Permalink to this headline">¶</a></h2>
<spanid="arch-linux"></span><h3>Arch Linux<aclass="headerlink"href="#arch-linux"title="Permalink to this headline">¶</a></h3>
<p>Instead of running <codeclass="docutils literal"><spanclass="pre">sudo</span><spanclass="pre">apt-get</span><spanclass="pre">install</span></code> to install build dependencies, run:</p>
<spanid="debian"></span><h3>Debian<aclass="headerlink"href="#debian"title="Permalink to this headline">¶</a></h3>
<p>Same as Ubuntu.</p>
</div>
<divclass="section"id="fedora">
<spanid="fedora"></span><h3>Fedora<aclass="headerlink"href="#fedora"title="Permalink to this headline">¶</a></h3>
<p>Instead of running <codeclass="docutils literal"><spanclass="pre">sudo</span><spanclass="pre">apt-get</span><spanclass="pre">install</span></code> to install build dependencies, run:</p>
<spanid="tips-tricks-and-troubleshooting"></span><h2>Tips, tricks, and troubleshooting<aclass="headerlink"href="#tips-tricks-and-troubleshooting"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="xcode-license-agreement">
<spanid="xcode-license-agreement"></span><h3>Xcode license agreement<aclass="headerlink"href="#xcode-license-agreement"title="Permalink to this headline">¶</a></h3>
<spanid="missing-curl-ca-bundle"></span><h3>Missing curl CA bundle<aclass="headerlink"href="#missing-curl-ca-bundle"title="Permalink to this headline">¶</a></h3>
<p>If you are getting the error</p>
<blockquote>
<div>gyp: Call to ‘config/mac/find_curl_ca_bundle.sh’ returned exit status 1 …</div></blockquote>
<p>curl CA bundle is not able to be located. Installing curl with openssl should