command_line.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <!DOCTYPE html>
  2. <html class="writer-html4" lang="en" >
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>Command line &mdash; Crown Manual 0.52.0 documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  7. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  8. <!--[if lt IE 9]>
  9. <script src="../_static/js/html5shiv.min.js"></script>
  10. <![endif]-->
  11. <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
  12. <script type="text/javascript" src="../_static/jquery.js"></script>
  13. <script type="text/javascript" src="../_static/underscore.js"></script>
  14. <script type="text/javascript" src="../_static/doctools.js"></script>
  15. <script type="text/javascript" src="../_static/language_data.js"></script>
  16. <script src="../_static/js/theme.js"></script>
  17. <link rel="index" title="Index" href="../genindex.html" />
  18. <link rel="search" title="Search" href="../search.html" />
  19. <link rel="copyright" title="Copyright" href="../copyright.html" />
  20. <link rel="next" title="Lua API reference" href="../lua_api.html" />
  21. <link rel="prev" title="boot.config reference" href="boot_config.html" />
  22. </head>
  23. <body class="wy-body-for-nav">
  24. <div class="wy-grid-for-nav">
  25. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  26. <div class="wy-side-scroll">
  27. <div class="wy-side-nav-search" >
  28. <a href="../index.html"><img src="../_static/crown-logo-white.svg" class="logo" alt="Logo"/>
  29. </a>
  30. <div class="version">
  31. 0.52.0
  32. </div>
  33. <div role="search">
  34. <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
  35. <input type="text" name="q" placeholder="Search docs" />
  36. <input type="hidden" name="check_keywords" value="yes" />
  37. <input type="hidden" name="area" value="default" />
  38. </form>
  39. </div>
  40. </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
  41. <ul class="current">
  42. <li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li>
  43. <li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
  44. <li class="toctree-l1"><a class="reference internal" href="../basics.html">Basic concepts</a></li>
  45. <li class="toctree-l1 current"><a class="reference internal" href="index.html">Reference</a><ul class="current">
  46. <li class="toctree-l2"><a class="reference internal" href="console_commands.html">Console commands</a></li>
  47. <li class="toctree-l2"><a class="reference internal" href="boot_config.html">boot.config reference</a></li>
  48. <li class="toctree-l2 current"><a class="current reference internal" href="#">Command line</a><ul>
  49. <li class="toctree-l3"><a class="reference internal" href="#examples">Examples</a></li>
  50. <li class="toctree-l3"><a class="reference internal" href="#options">Options</a></li>
  51. </ul>
  52. </li>
  53. </ul>
  54. </li>
  55. <li class="toctree-l1"><a class="reference internal" href="../lua_api.html">Lua API reference</a></li>
  56. <li class="toctree-l1"><a class="reference internal" href="../glossary.html">Glossary</a></li>
  57. <li class="toctree-l1"><a class="reference internal" href="../copyright.html">License</a></li>
  58. <li class="toctree-l1"><a class="reference internal" href="../hackers/index.html">Hackers</a></li>
  59. </ul>
  60. </div>
  61. </div>
  62. </nav>
  63. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  64. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  65. <a href="../index.html">Crown Manual</a>
  66. </nav>
  67. <div class="wy-nav-content">
  68. <div class="rst-content">
  69. <div role="navigation" aria-label="Page navigation">
  70. <ul class="wy-breadcrumbs">
  71. <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
  72. <li><a href="index.html">Reference</a> &raquo;</li>
  73. <li>Command line</li>
  74. <li class="wy-breadcrumbs-aside">
  75. <a href="../_sources/reference/command_line.rst.txt" rel="nofollow"> View page source</a>
  76. </li>
  77. </ul>
  78. <hr/>
  79. </div>
  80. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  81. <div itemprop="articleBody">
  82. <div class="section" id="command-line">
  83. <h1>Command line<a class="headerlink" href="#command-line" title="Permalink to this headline">¶</a></h1>
  84. <div class="section" id="examples">
  85. <h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
  86. <p>Compile and run the project <code class="docutils literal notranslate"><span class="pre">/home/user/crown/samples/01-physics</span></code> using a mapped <code class="docutils literal notranslate"><span class="pre">core</span></code> folder:</p>
  87. <div class="code highlight-default notranslate"><div class="highlight"><pre><span></span>export CROWN=/home/user/crown
  88. cd $CROWN/platforms/linux64/bin
  89. ./crown-development --compile --continue --source-dir $CROWN/samples/01-physics --map-source-dir core $CROWN/samples
  90. </pre></div>
  91. </div>
  92. <p>Compile and run for HTML5:</p>
  93. <div class="code highlight-default notranslate"><div class="highlight"><pre><span></span>./crown-development --compile --continue --platform html5 --source-dir $CROWN/samples/01-physics --map-source-dir core $CROWN/samples
  94. </pre></div>
  95. </div>
  96. <p>Compile a “bundled” version of the project:</p>
  97. <div class="code highlight-default notranslate"><div class="highlight"><pre><span></span>./crown-development --compile --bundle --source-dir $CROWN/samples/01-physics --map-source-dir core $CROWN/samples
  98. </pre></div>
  99. </div>
  100. <p>Run the project from bundled data:</p>
  101. <div class="code highlight-default notranslate"><div class="highlight"><pre><span></span>./crown-development --data-dir $CROWN/samples/01-physics_linux
  102. </pre></div>
  103. </div>
  104. <p>Customize the data directory name:</p>
  105. <div class="code highlight-default notranslate"><div class="highlight"><pre><span></span>./crown-development --compile --data-dir $CROWN/samples/01-physics_custom --source-dir $CROWN/samples/01-physics --map-source-dir core $CROWN/samples
  106. </pre></div>
  107. </div>
  108. </div>
  109. <div class="section" id="options">
  110. <h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
  111. <dl class="docutils">
  112. <dt><code class="docutils literal notranslate"><span class="pre">-h</span></code> <code class="docutils literal notranslate"><span class="pre">--help</span></code></dt>
  113. <dd>Display the help and quit.</dd>
  114. <dt><code class="docutils literal notranslate"><span class="pre">-v</span></code> <code class="docutils literal notranslate"><span class="pre">--version</span></code></dt>
  115. <dd>Display engine version and quit.</dd>
  116. <dt><code class="docutils literal notranslate"><span class="pre">--source-dir</span> <span class="pre">&lt;path&gt;</span></code></dt>
  117. <dd><p class="first">Use &lt;path&gt; as the source directory for resource compilation.</p>
  118. <p class="last">The &lt;path&gt; must be absolute.</p>
  119. </dd>
  120. <dt><code class="docutils literal notranslate"><span class="pre">--data-dir</span> <span class="pre">&lt;path&gt;</span></code></dt>
  121. <dd><p class="first">Run with the data located at &lt;path&gt;.</p>
  122. <p class="last">The &lt;path&gt; must be absolute.</p>
  123. </dd>
  124. <dt><code class="docutils literal notranslate"><span class="pre">--bundle-dir</span> <span class="pre">&lt;path&gt;</span></code></dt>
  125. <dd><p class="first">Run with the bundles located at &lt;path&gt;.</p>
  126. <p class="last">The &lt;path&gt; must be absolute.</p>
  127. </dd>
  128. <dt><code class="docutils literal notranslate"><span class="pre">--map-source-dir</span> <span class="pre">&lt;name&gt;</span> <span class="pre">&lt;path&gt;</span></code></dt>
  129. <dd><p class="first">Mount &lt;path&gt;/&lt;name&gt; at &lt;source-dir&gt;/&lt;name&gt;.</p>
  130. <p class="last">The &lt;path&gt; must be absolute.</p>
  131. </dd>
  132. <dt><code class="docutils literal notranslate"><span class="pre">--boot-dir</span> <span class="pre">&lt;path&gt;</span></code></dt>
  133. <dd><p class="first">Boot the engine with the <code class="docutils literal notranslate"><span class="pre">boot.config</span></code> from given &lt;path&gt;.</p>
  134. <p class="last">The &lt;path&gt; must be relative.</p>
  135. </dd>
  136. <dt><code class="docutils literal notranslate"><span class="pre">--compile</span></code></dt>
  137. <dd><p class="first">Do a full compile of the resources.</p>
  138. <p class="last">When using this option you must also specify <code class="docutils literal notranslate"><span class="pre">--source-dir</span></code>.</p>
  139. </dd>
  140. <dt><code class="docutils literal notranslate"><span class="pre">--bundle</span></code></dt>
  141. <dd>Generate bundles after the data has been compiled.</dd>
  142. <dt><code class="docutils literal notranslate"><span class="pre">--platform</span> <span class="pre">&lt;platform&gt;</span></code></dt>
  143. <dd><p class="first">Compile resources for the given &lt;platform&gt;.
  144. Possible values for &lt;platform&gt; are:</p>
  145. <ul class="last simple">
  146. <li><code class="docutils literal notranslate"><span class="pre">android</span></code></li>
  147. <li><code class="docutils literal notranslate"><span class="pre">html5</span></code></li>
  148. <li><code class="docutils literal notranslate"><span class="pre">linux</span></code></li>
  149. <li><code class="docutils literal notranslate"><span class="pre">windows</span></code></li>
  150. </ul>
  151. </dd>
  152. <dt><code class="docutils literal notranslate"><span class="pre">--continue</span></code></dt>
  153. <dd>Run the engine after resource compilation.</dd>
  154. <dt><code class="docutils literal notranslate"><span class="pre">--console-port</span> <span class="pre">&lt;port&gt;</span></code></dt>
  155. <dd><p class="first">Set port of the console.</p>
  156. <p class="last">When no port is specified, the engine uses the port 10001.</p>
  157. </dd>
  158. <dt><code class="docutils literal notranslate"><span class="pre">--wait-console</span></code></dt>
  159. <dd>Wait for a console connection before starting up.</dd>
  160. <dt><code class="docutils literal notranslate"><span class="pre">--parent-window</span> <span class="pre">&lt;handle&gt;</span></code></dt>
  161. <dd><p class="first">Set the parent window &lt;handle&gt; of the main window.</p>
  162. <p class="last">This option should be used only by the tools.</p>
  163. </dd>
  164. <dt><code class="docutils literal notranslate"><span class="pre">--server</span></code></dt>
  165. <dd><p class="first">Run the engine in server mode.</p>
  166. <p class="last">When using this option you must also specify <code class="docutils literal notranslate"><span class="pre">--source-dir</span></code>.</p>
  167. </dd>
  168. <dt><code class="docutils literal notranslate"><span class="pre">--pumped</span></code></dt>
  169. <dd>Do not advance the renderer unless explicitly requested via console.</dd>
  170. <dt><code class="docutils literal notranslate"><span class="pre">--hidden</span></code></dt>
  171. <dd>Make the main window initially invisible.</dd>
  172. <dt><code class="docutils literal notranslate"><span class="pre">--window-rect</span> <span class="pre">&lt;x</span> <span class="pre">y</span> <span class="pre">w</span> <span class="pre">h&gt;</span></code></dt>
  173. <dd>Sets the main window’s position and size.</dd>
  174. <dt><code class="docutils literal notranslate"><span class="pre">--string-id</span> <span class="pre">&lt;string&gt;</span></code></dt>
  175. <dd>Print the 32- and 64-bits IDs of &lt;string&gt;.</dd>
  176. <dt><code class="docutils literal notranslate"><span class="pre">--run-unit-tests</span></code></dt>
  177. <dd>Run unit tests and quit.</dd>
  178. </dl>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
  184. <a href="boot_config.html" class="btn btn-neutral float-left" title="boot.config reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
  185. <a href="../lua_api.html" class="btn btn-neutral float-right" title="Lua API reference" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  186. </div>
  187. <hr/>
  188. <div role="contentinfo">
  189. <p>&#169; <a href="../copyright.html">Copyright</a> Except where otherwise noted, content on this page is licensed under a CC-BY-SA 4.0 Int. License.</p>
  190. </div>
  191. Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
  192. <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
  193. provided by <a href="https://readthedocs.org">Read the Docs</a>.
  194. </footer>
  195. </div>
  196. </div>
  197. </section>
  198. </div>
  199. <script>
  200. jQuery(function () {
  201. SphinxRtdTheme.Navigation.enable(true);
  202. });
  203. </script>
  204. <!-- Theme Analytics -->
  205. <script async src="https://www.googletagmanager.com/gtag/js?id=G-XNVGCMNDZH"></script>
  206. <script>
  207. window.dataLayer = window.dataLayer || [];
  208. function gtag(){dataLayer.push(arguments);}
  209. gtag('js', new Date());
  210. gtag('config', 'G-XNVGCMNDZH', {
  211. 'anonymize_ip': true,
  212. });
  213. </script>
  214. </body>
  215. </html>