command_line.html 13 KB

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