2 ..
"- init: Initializes a new game project. Requires a game path.\n"
3 ..
"- build: Builds the game for distribution. Defaults to the 'ginga' core.\n"
4 ..
"- run: Executes the specified game. Defaults to the 'love' core.\n"
5 ..
"- meta: Displays metadata for the specified game.\n"
6 ..
"- bundler: Builds the game using the specified bundler file.\n"
7 ..
"- compiler: Compiles the specified file into an executable.\n"
8 ..
"- tool-love-zip: Creates a zip file for the specified path.\n"
9 ..
"- tool-love-exe: Creates an executable for the specified file.\n"
10 ..
"- fs-replace: Replaces content in a file with specified format and replacement.\n"
11 ..
"- fs-download: Downloads a file from the specified URL to the specified directory.\n"
12 ..
"- cli-build: Bootstrap the CLI as a single file\n"
13 ..
"- cli-test: Runs tests with optional coverage.\n"
14 ..
"- cli-dump: Extract source code (when bootstrapped).\n"
15 ..
"- version: Displays the current version of the tool.\n"
16 ..
"- help: Displays this help message.\n"
18 ..
"Available cores:\n"
19 ..
"- repl: Runs the REPL core.\n"
20 ..
"- love: Runs the Love2D core.\n"
21 ..
"- ginga: Runs the Ginga core.\n"
22 ..
"- html5_webos: Builds for HTML5 on WebOS.\n"
23 ..
"- html5_tizen: Builds for HTML5 on Tizen.\n"
24 ..
"- html5_ginga: Runs the Ginga core for HTML5.\n"
25 ..
"- html5: Runs the standard HTML5 core.\n"
26 ..
"- nintendo_wii: Builds for the Nintendo Wii.\n"
29 ..
"- To run a command, use: ./cli.sh <command> <game_path> [options]\n"
30 ..
"- Example: ./cli.sh build ./examples/asteroids/game.lua " ..
"-" ..
"-core ginga\n"
32 ..
"Available options:\n"
33 ..
"-" ..
"-dist <path>: Specifies the distribution directory (default: './dist/').\n"
34 ..
"-" ..
"-core <core_name>: Specifies the core to use (default varies by command).\n"
35 ..
"-" ..
"-screen <resolution>: Specifies the screen resolution (default: '1280x720').\n"
36 ..
"-" ..
"-bundler: Indicates to use the bundler during the build process.\n"
37 ..
"-" ..
"-run: Indicates to run the game after building.\n"
38 ..
"-" ..
"-format <format>: Specifies the format for metadata display.\n"
39 ..
"-" ..
"-coverage: Enables coverage reporting for tests.\n"
42 ..
"- To initialize a new game: ./cli.sh init ./my_game\n"
43 ..
"- To build a game: ./cli.sh build ./examples/asteroids/game.lua " ..
"-" ..
"-core html5\n"
44 ..
"- To run a game: ./cli.sh run ./examples/asteroids/game.lua " ..
"-" ..
"-core repl\n"
45 ..
"- To display metadata: ./cli.sh meta ./examples/asteroids/game.lua\n"
57--! @todo
show all commands with complete flags
58local function
show(args)
59 return false, 'not implemented!'
63 local description = 'not implemented!'
68 author=
'RodrigoDornelles',
69 description=description
81 return false,
'command not found: '..args[
'command']
86 local lua = args[0] or
'gly-cli'
87 local
command =
'usage: '..lua..
' '..args.command
89 while index <= #args.params
do
90 local
param = args.params[index]
96 while index <= #args.option_get
do
97 local option = args.option_get[index]
103 while index <= #args.option_has
do
104 local option = args.option_has[index]
local function show(args)
local function not_found(args)
local function correct_usage(args)
local function exit(self)
local function param(self, name, value)
local function draw(std, game)
local function init(args)
local function loop(std, game, application, dt)