<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>build_mac.sh - fork/oculante @ 0.9.2</title>
<meta name="description" content="build_mac.sh in fork/oculante at 0.9.2.">
<meta property="og:title" content="build_mac.sh - fork/oculante @ 0.9.2">
<meta property="og:description" content="build_mac.sh in fork/oculante at 0.9.2.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="0.9.2" data-tip="45caafa71eb69831475d06324da4dedd33edc20f">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/oculante</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/oculante</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">Johann Woelper</span><span class="commit-message" data-commit="3ccf95f6e78eecc781edfd31dfde0d93221d0784">Merge pull request #447 from woelper/bundle_libheif_osx</span><span class="snapshot-sha sha" data-commit="3ccf95f6e78eecc781edfd31dfde0d93221d0784">3ccf95f</span><time datetime="2024-10-12T08:34:21+02:00" title="2024-10-12 08:34:21 +0200">2024-10-12</time></p>
<header class="topbar"><details class="switcher"><summary>0.9.2</summary><div class="menu"><strong>branches</strong><a href="/fork/oculante/ref/master/">master</a><strong>tags</strong><a href="/fork/oculante/ref/0.8.19/">0.8.19</a><a href="/fork/oculante/ref/0.8.20/">0.8.20</a><a href="/fork/oculante/ref/0.8.21/">0.8.21</a><a href="/fork/oculante/ref/0.8.22/">0.8.22</a><a href="/fork/oculante/ref/0.8.23/">0.8.23</a><a href="/fork/oculante/ref/0.9.0/">0.9.0</a><a href="/fork/oculante/ref/0.9.1/">0.9.1</a><a class="current" href="/fork/oculante/ref/0.9.2/">0.9.2</a><a class="all" href="/fork/oculante/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/oculante/">oculante</a> / <span class="cur">build_mac.sh</span></nav>
<span class="view-stats"><span>4.2 KiB</span><span>55 lines</span></span><span class="actions"><a class="raw" href="/fork/oculante/raw/6c8109f2fdaf2672e2a3135bad806b811444e6af/build_mac.sh">raw</a></span></header>
<pre class="code src language-bash"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"><a-f>rustup</a-f> target list <a-o>|</a-o> <a-f>grep</a-f> installed</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text"><a-pr>TOOLCHAIN</a-pr>=<a-eb>$(</a-eb><a-f>rustc</a-f><a-eb> </a-eb><a-co>--version</a-co><a-eb> </a-eb><a-co>--verbose</a-co><a-eb> </a-eb><a-o>|</a-o><a-eb> </a-eb><a-f>grep</a-f><a-eb> host </a-eb><a-o>|</a-o><a-eb> </a-eb><a-f>cut</a-f><a-eb> </a-eb><a-co>-f2</a-co><a-eb> </a-eb><a-co>-d</a-co><a-s>&quot;:&quot;</a-s><a-eb> </a-eb><a-o>|</a-o><a-eb> </a-eb><a-f>tr</a-f><a-eb> </a-eb><a-co>-d</a-co><a-eb> </a-eb><a-s>&quot;[:space:]&quot;</a-s><a-eb>)</a-eb></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text"><a-f>echo</a-f> we are using <a-o>$</a-o><a-pr>TOOLCHAIN</a-pr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text"><a-k>export</a-k> <a-pr>MACOSX_DEPLOYMENT_TARGET</a-pr>=10.15</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text"><a-f>cargo</a-f> install cargo-bundle</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text"><a-f>brew</a-f> install libheif</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text"><a-f>brew</a-f> install nasm</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text"><a-f>rustup</a-f> target add aarch64-apple-darwin</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text"><a-f>rustup</a-f> target add x86_64-apple-darwin</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text"><a-f>cargo</a-f> bundle <a-co>--release</a-co></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text"><a-f>cargo</a-f> build <a-co>--release</a-co> <a-co>--target</a-co> aarch64-apple-darwin <a-co>--features</a-co> <a-s>&quot;notan/shaderc heif&quot;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text"><a-f>cargo</a-f> build <a-co>--release</a-co> <a-co>--target</a-co> x86_64-apple-darwin <a-co>--features</a-co> notan/shaderc</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text"><a-f>echo</a-f> otool for aarch64:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text"><a-f>otool</a-f> <a-co>-L</a-co> target/aarch64-apple-darwin/release/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text"><a-f>lipo</a-f> <a-co>-create</a-co> <a-co>-output</a-co> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante target/x86_64-apple-darwin/release/oculante target/aarch64-apple-darwin/release/oculante </span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text"><a-f>file</a-f> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text"><a-f>echo</a-f> otool for universal binary:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text"><a-f>otool</a-f> <a-co>-L</a-co> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text"><a-f>otool</a-f> <a-co>-L</a-co> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text"><a-f>mkdir</a-f> target/release/bundle/osx/oculante.app/Contents/Frameworks/</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text"><a-f>cp</a-f> /opt/homebrew/opt/libheif/lib/libheif.1.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text"><a-f>cp</a-f> /opt/homebrew/opt/x265/lib/libx265.209.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text"><a-f>cp</a-f> /opt/homebrew/opt/libde265/lib/libde265.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text"><a-f>cp</a-f> /opt/homebrew/opt/aom/lib/libaom.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text"><a-f>cp</a-f> /opt/homebrew/opt/webp/lib/libsharpyuv.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text"><a-f>cp</a-f> /opt/homebrew/opt/libvmaf/lib/libvmaf.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L31" href="#L31">31</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-change</a-co> /opt/homebrew/opt/libheif/lib/libheif.1.dylib <a-s>&quot;@executable_path/../Frameworks/libheif.1.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L32" href="#L32">32</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-add_rpath</a-co> <a-s>&quot;@executable_path/../Frameworks/libx265.209.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L33" href="#L33">33</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-add_rpath</a-co> <a-s>&quot;@executable_path/../Frameworks/libde265.0.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L34" href="#L34">34</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-add_rpath</a-co> <a-s>&quot;@executable_path/../Frameworks/libaom.3.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L35" href="#L35">35</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-add_rpath</a-co> <a-s>&quot;@executable_path/../Frameworks/libsharpyuv.0.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L36" href="#L36">36</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-add_rpath</a-co> <a-s>&quot;@executable_path/../Frameworks/libvmaf.3.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L37" href="#L37">37</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-change</a-co> /opt/homebrew/opt/x265/lib/libx265.209.dylib <a-s>&quot;@executable_path/../Frameworks/libx265.209.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L38" href="#L38">38</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-change</a-co> /opt/homebrew/opt/libde265/lib/libde265.0.dylib <a-s>&quot;@executable_path/../Frameworks/libde265.0.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L39" href="#L39">39</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-change</a-co> /opt/homebrew/opt/aom/lib/libaom.3.dylib <a-s>&quot;@executable_path/../Frameworks/libaom.3.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L40" href="#L40">40</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-change</a-co> /opt/homebrew/opt/webp/lib/libsharpyuv.0.dylib <a-s>&quot;@executable_path/../Frameworks/libsharpyuv.0.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L41" href="#L41">41</a><span class="code-text"><a-f>install_name_tool</a-f> <a-co>-change</a-co> /opt/homebrew/opt/libvmaf/lib/libvmaf.3.dylib <a-s>&quot;@executable_path/../Frameworks/libvmaf.3.dylib&quot;</a-s> target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L42" href="#L42">42</a><span class="code-text"><a-f>codesign</a-f> <a-co>-s</a-co> <a-s>&quot;-&quot;</a-s> <a-co>-fv</a-co> target/release/bundle/osx/oculante.app/Contents/Frameworks/libvmaf.3.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L43" href="#L43">43</a><span class="code-text"><a-f>codesign</a-f> <a-co>-s</a-co> <a-s>&quot;-&quot;</a-s> <a-co>-fv</a-co> target/release/bundle/osx/oculante.app/Contents/Frameworks/libsharpyuv.0.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L44" href="#L44">44</a><span class="code-text"><a-f>codesign</a-f> <a-co>-s</a-co> <a-s>&quot;-&quot;</a-s> <a-co>-fv</a-co> target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L45" href="#L45">45</a><span class="code-text"><a-f>codesign</a-f> <a-co>-s</a-co> <a-s>&quot;-&quot;</a-s> <a-co>-fv</a-co> target/release/bundle/osx/oculante.app/Contents/Frameworks/libde265.0.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L46" href="#L46">46</a><span class="code-text"><a-f>codesign</a-f> <a-co>-s</a-co> <a-s>&quot;-&quot;</a-s> <a-co>-fv</a-co> target/release/bundle/osx/oculante.app/Contents/Frameworks/libx265.209.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L47" href="#L47">47</a><span class="code-text"><a-f>codesign</a-f> <a-co>-s</a-co> <a-s>&quot;-&quot;</a-s> <a-co>-fv</a-co> target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L48" href="#L48">48</a><span class="code-text"><a-f>otool</a-f> <a-co>-L</a-co> target/release/bundle/osx/oculante.app/Contents/MacOS/oculante</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L49" href="#L49">49</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L50" href="#L50">50</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L51" href="#L51">51</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L52" href="#L52">52</a><span class="code-text"><a-f>cp</a-f> Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L53" href="#L53">53</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L54" href="#L54">54</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L55" href="#L55">55</a><span class="code-text"></span></span></pre>
</main>
</body>
</html>
