|
33 | 33 |
|
34 | 34 | typedef enum arg_mode { MODE_MODECHECK, MODE_INPUT, MODE_OUTPUT, MODE_PLATFORM, MODE_API, MODE_INTEGRATION } arg_mode; |
35 | 35 |
|
36 | | -static void help(void) { |
37 | | - printf("No help is coming."); |
| 36 | +static void help(const char* basename) { |
| 37 | + printf("\n"); |
| 38 | + printf("Usage: %s -i|--in <dir> -o|--out <dir> -p|--platform <platform> [options]\n", basename); |
| 39 | + |
| 40 | + printf("\nRequired options:\n"); |
| 41 | + printf(" -i, --in <directory> Shader input directory (contains *.kong files)\n"); |
| 42 | + printf(" -o, --out <directory> Output directory\n"); |
| 43 | + printf(" -p, --platform <platform> Target platform\n"); |
| 44 | + |
| 45 | + printf("\nOptional options:\n"); |
| 46 | + printf(" -h, --help Display this help message\n"); |
| 47 | + printf(" --debug Enable debug mode\n"); |
| 48 | + printf(" -a, --api <api> Shader API (auto-detected if omitted)\n"); |
| 49 | + printf(" -n, --integration <name> Enable Kore3 integration\n"); |
| 50 | + |
| 51 | + printf("\nInformation:\n"); |
| 52 | + printf(" <platform> Automatic API resolution only applies if <platform> is one of:\n"); |
| 53 | + printf(" windows, macos, linux, ios, android, wasm, kompjuta\n"); |
| 54 | + printf(" <api> Supported:\n"); |
| 55 | + printf(" direct3d11, direct3d12, opengl, metal, webgpu, vulkan\n"); |
| 56 | + printf(" <integration> Supported:\n"); |
| 57 | + printf(" kore3\n"); |
| 58 | + printf("\n"); |
38 | 59 | } |
39 | 60 |
|
40 | 61 | static void read_file(char *filename) { |
@@ -105,7 +126,7 @@ int main(int argc, char **argv) { |
105 | 126 | debug = true; |
106 | 127 | } |
107 | 128 | else if (strcmp(&arg[2], "help") == 0) { |
108 | | - help(); |
| 129 | + help(argv[0]); |
109 | 130 | return 0; |
110 | 131 | } |
111 | 132 | else { |
@@ -143,7 +164,7 @@ int main(int argc, char **argv) { |
143 | 164 | mode = MODE_INTEGRATION; |
144 | 165 | break; |
145 | 166 | case 'h': |
146 | | - help(); |
| 167 | + help(argv[0]); |
147 | 168 | return 0; |
148 | 169 | default: { |
149 | 170 | kong_log(LOG_LEVEL_WARNING, "Ignoring unknown parameter %s.", arg); |
|
0 commit comments