command_line.html 13 KB

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