command_line.html 13 KB

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