Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/brainboxdotcc/dpp-web
Browse files Browse the repository at this point in the history
  • Loading branch information
D++ Sitemap Updater Bot committed Jul 20, 2024
2 parents a3d4c90 + ed78ad4 commit e83b3a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
16 changes: 0 additions & 16 deletions install-void-xbps.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,6 @@
<p >You will now be able to use D++ by including its library on the command line:</p>
<div class="fragment"><div class="line">g++ mybot.cpp -o mybot -ldpp</div>
</div><!-- fragment --><p ><dl class="section note"><dt>Note</dt><dd>Compiling your bot with a raw <code>g++</code> command is not advised in any real project, and the example above should be used only as a test. From here, you should learn to create a bot in D++ by moving on to <a class="el" href="buildcmake.html">Building a Discord Bot Using CMake (UNIX)</a> or if you have not yet created a token for your bot, <a class="el" href="creating-a-bot-application.html">Creating a Bot Token</a> - If you are having trouble setting up CMake, you can try <a href="https://github.com/brainboxdotcc/templatebot">our template cmake bot project</a>.</dd></dl>
</p>
<p >To build D++ with coroutine support as an XBPS package, follow the steps below. Ensure that <a href="https://github.com/void-linux/void-packages?tab=readme-ov-file#quick-start">xbps-src is set up</a> beforehand:</p>
<div class="fragment"><div class="line"># Inside the void-packages root folder</div>
<div class="line">git checkout master &amp;&amp; git pull</div>
<div class="line"># Modifies the configure arguments to include coroutine support (-DDPP_CORO=ON)</div>
<div class="line">grep -q &#39;configure_args=.*-DDPP_CORO=ON&#39; srcpkgs/dpp/template || sed -i -e &#39;s/\&zwj;(configure_args=&quot;[^&quot;]*\&zwj;)&quot;/\1 -DDPP_CORO=ON&quot;/&#39; srcpkgs/dpp/template</div>
<div class="line">./xbps-src -K pkg dpp</div>
</div><!-- fragment --><p >Then as root: </p><div class="fragment"><div class="line"># Inside the void-packages root folder</div>
<div class="line">xbps-install --repository hostdir/binpkgs dpp-devel</div>
</div><!-- fragment --><p >This will do the following three things:</p><ul>
<li>Update the void-packages repository to the latest commit on master</li>
<li>Patch the template file of D++ to enable coroutine support</li>
<li>Build an XBPS package for D++ and install it</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Cloning the void-packages repository may take some time</dd></dl>
<p><dl class="section warning"><dt>Warning</dt><dd>D++ Coroutines are a very new feature and are currently only supported by D++ on g++ 13, clang/LLVM 14, and MSVC 19.37 or above. Additionally, D++ must be built with the CMake option DPP_CORO, and your program must both define the macro DPP_CORO and use C++20 or above. The feature is experimental and may have bugs or even crashes, please report any to <a href="https://github.com/brainboxdotcc/DPP/issues">GitHub Issues</a> or to our <a href="https://discord.gg/dpp">Discord Server</a>. </dd></dl>
</p>
</div></div><!-- contents --><script src="https://giscus.app/client.js" data-repo="brainboxdotcc/dpp-comments" data-repo-id="R_kgDOHOY4xg" data-category="General" data-category-id="DIC_kwDOHOY4xs4CRYtj" data-mapping="pathname" data-strict="1" data-reactions-enabled="1" data-emit-metadata="1" data-input-position="top" data-theme="preferred_color_scheme" data-lang="en" data-loading="lazy" crossorigin="anonymous" async></script>
</div><!-- PageDoc -->
Expand Down
22 changes: 0 additions & 22 deletions xml/install-void-xbps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,6 @@
</programlisting></para>
<para><para><simplesect kind="note"><para>Compiling your bot with a raw <computeroutput>g++</computeroutput> command is not advised in any real project, and the example above should be used only as a test. From here, you should learn to create a bot in D++ by moving on to <ref refid="buildcmake" kindref="compound">Building a Discord Bot Using CMake (UNIX)</ref> or if you have not yet created a token for your bot, <ref refid="creating-a-bot-application" kindref="compound">Creating a Bot Token</ref> - If you are having trouble setting up CMake, you can try <ulink url="https://github.com/brainboxdotcc/templatebot">our template cmake bot project</ulink>.</para>
</simplesect>
</para>
</para>
<para>To build D++ with coroutine support as an XBPS package, follow the steps below. Ensure that <ulink url="https://github.com/void-linux/void-packages?tab=readme-ov-file#quick-start">xbps-src is set up</ulink> beforehand:</para>
<para><programlisting filename=".bash"><codeline><highlight class="normal">#<sp/>Inside<sp/>the<sp/>void-packages<sp/>root<sp/>folder</highlight></codeline>
<codeline><highlight class="normal">git<sp/>checkout<sp/>master<sp/>&amp;&amp;<sp/>git<sp/>pull</highlight></codeline>
<codeline><highlight class="normal">#<sp/>Modifies<sp/>the<sp/>configure<sp/>arguments<sp/>to<sp/>include<sp/>coroutine<sp/>support<sp/>(-DDPP_CORO=ON)</highlight></codeline>
<codeline><highlight class="normal">grep<sp/>-q<sp/>&apos;configure_args=.*-DDPP_CORO=ON&apos;<sp/>srcpkgs/dpp/template<sp/>||<sp/>sed<sp/>-i<sp/>-e<sp/>&apos;s/\(configure_args=&quot;[^&quot;]*\)&quot;/\1<sp/>-DDPP_CORO=ON&quot;/&apos;<sp/>srcpkgs/dpp/template</highlight></codeline>
<codeline><highlight class="normal">./xbps-src<sp/>-K<sp/>pkg<sp/>dpp</highlight></codeline>
</programlisting></para>
<para>Then as root: <programlisting filename=".bash"><codeline><highlight class="normal">#<sp/>Inside<sp/>the<sp/>void-packages<sp/>root<sp/>folder</highlight></codeline>
<codeline><highlight class="normal">xbps-install<sp/>--repository<sp/>hostdir/binpkgs<sp/>dpp-devel</highlight></codeline>
</programlisting></para>
<para>This will do the following three things:<itemizedlist>
<listitem><para>Update the void-packages repository to the latest commit on master</para>
</listitem><listitem><para>Patch the template file of D++ to enable coroutine support</para>
</listitem><listitem><para>Build an XBPS package for D++ and install it</para>
</listitem></itemizedlist>
</para>
<para><simplesect kind="note"><para>Cloning the void-packages repository may take some time</para>
</simplesect>
<para><simplesect kind="warning"><para>D++ Coroutines are a very new feature and are currently only supported by D++ on g++ 13, clang/LLVM 14, and MSVC 19.37 or above. Additionally, D++ must be built with the CMake option DPP_CORO, and your program must both define the macro DPP_CORO and use C++20 or above. The feature is experimental and may have bugs or even crashes, please report any to <ulink url="https://github.com/brainboxdotcc/DPP/issues">GitHub Issues</ulink> or to our <ulink url="https://discord.gg/dpp">Discord Server</ulink>. </para>
</simplesect>
</para>
</para>
</detaileddescription>
Expand Down

0 comments on commit e83b3a5

Please sign in to comment.