| 16 | namespace crown |
| 17 | { |
| 18 | static void help(const char *msg = NULL) |
| 19 | { |
| 20 | printf( |
| 21 | "The Flexible Game Engine\n" |
| 22 | "Copyright (c) 2012-2026 Daniele Bartolini et al.\n" |
| 23 | "SPDX-License-Identifier: MIT\n" |
| 24 | "\n" |
| 25 | "Usage:\n" |
| 26 | " crown [options]\n" |
| 27 | "\n" |
| 28 | "Options:\n" |
| 29 | " -- End of the runtime's options.\n" |
| 30 | " -h --help Display this help.\n" |
| 31 | " -v --version Display engine version.\n" |
| 32 | " --source-dir <path> Specify the <path> of the project's source data.\n" |
| 33 | " --data-dir <path> Run with the data located at <path>.\n" |
| 34 | " --bundle-dir <path> Run with the bundles located at <path>.\n" |
| 35 | " --map-source-dir <name> <path> Mount <path>/<name> at <source-dir>/<name>.\n" |
| 36 | " --boot-dir <prefix> Use <prefix>/boot.config to boot the engine.\n" |
| 37 | " --compile Compile the project's source data.\n" |
| 38 | " --bundle Generate bundles after the data has been compiled.\n" |
| 39 | " --platform <platform> Specify the target <platform> for data compilation.\n" |
| 40 | " android\n" |
| 41 | " html5\n" |
| 42 | " linux\n" |
| 43 | " windows\n" |
| 44 | " --continue Run the engine after the data has been compiled.\n" |
| 45 | " --console-port <port> Set port of the console server.\n" |
| 46 | " --port-file <path> Write selected console port to <path>.\n" |
| 47 | " --wait-console Wait for a console connection before booting the engine.\n" |
| 48 | " --parent-window <handle> Set the parent window <handle> of the main window.\n" |
| 49 | " --server Run the engine in server mode.\n" |
| 50 | " --pumped Do not advance the renderer unless explicitly requested via console.\n" |
| 51 | " --hidden Make the main window initially invisible.\n" |
| 52 | " --keep-above Keep the main window above other windows.\n" |
| 53 | " --renderer <renderer> Set the renderer backend.\n" |
| 54 | " auto\n" |
| 55 | " d3d11\n" |
| 56 | " gl\n" |
| 57 | " gles\n" |
| 58 | " vk\n" |
| 59 | " --window-rect <x y w h> Set the main window's position and size.\n" |
| 60 | " --string-id <string> Print the 32- and 64-bits IDs of <string>.\n" |
| 61 | " --run-unit-tests Run unit tests and quit.\n" |
| 62 | "\n" |
| 63 | "Full documentation at https://docs.crownengine.org/html/" CROWN_MANUAL_VERSION "/reference/command_line.html\n" |
| 64 | ); |
| 65 | |
| 66 | if (msg) |
| 67 | printf("Error: %s\n", msg); |
| 68 | } |
| 69 | |
| 70 | DeviceOptions::DeviceOptions(Allocator &a, int argc, const char **argv) |
| 71 | : _argc(argc) |