From 51103ed442380404d546a8f551b1fd1073b26d88 Mon Sep 17 00:00:00 2001 From: neroist Date: Mon, 10 Jun 2024 02:41:59 -0400 Subject: [PATCH 1/4] fix https://github.com/HapticX/happyx-native/issues/6 --- src/happyx_native/hpxnative.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/happyx_native/hpxnative.nim b/src/happyx_native/hpxnative.nim index 6ba768b..ed5c999 100644 --- a/src/happyx_native/hpxnative.nim +++ b/src/happyx_native/hpxnative.nim @@ -100,7 +100,7 @@ when isMainModule: styledEcho fgRed, "Unknown subcommand: ", fgWhite, subcmdHelp quit(QuitSuccess) of "": - quit(dispatchmainCommand(cmdline = pars[0..^1])) + quit(mainCommand(pars[0] in ["-v", "--version"])) else: styledEcho fgRed, styleBright, "Unknown subcommand: ", fgWhite, subcmd styledEcho fgYellow, "Use ", fgMagenta, "hpx_native help ", fgYellow, "to get all commands" From ed9ed67aa5b0f9222f43ccfc06b742fae72c796b Mon Sep 17 00:00:00 2001 From: neroist Date: Mon, 10 Jun 2024 02:42:32 -0400 Subject: [PATCH 2/4] remove semicolons and periods from lists --- src/happyx_native/hpxnative.nim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/happyx_native/hpxnative.nim b/src/happyx_native/hpxnative.nim index ed5c999..850ab6e 100644 --- a/src/happyx_native/hpxnative.nim +++ b/src/happyx_native/hpxnative.nim @@ -82,10 +82,10 @@ when isMainModule: styledEcho "Optional arguments:" styledEcho fgBlue, align("target", 14), fgWhite, " - build target. By default target is your OS." styledEcho align("", 14), " Possible targets:" - styledEcho align("", 14), " - windows (win);" - styledEcho align("", 14), " - linux (unix);" - styledEcho align("", 14), " - macosx (mac, macos);" - styledEcho align("", 14), " - android." + styledEcho align("", 14), " - windows (win)" + styledEcho align("", 14), " - linux (unix)" + styledEcho align("", 14), " - macosx (mac, macos)" + styledEcho align("", 14), " - android" styledEcho fgBlue, align("no-x86_64", 14), fgWhite, " - disable building for x86_64 arch (android only)" styledEcho fgBlue, align("no-x86", 14), fgWhite, " - disable building for x86 arch (android only)" styledEcho fgBlue, align("no-armeabi-v7a", 14), fgWhite, " - disable building for armeabi-v7a arch (android only)" @@ -93,9 +93,9 @@ when isMainModule: styledEcho fgBlue, align("release", 14), fgWhite, " - enable release build" styledEcho fgBlue, align("opt", 14), fgWhite, " - Nim compilation option" styledEcho fgBlue, align("", 14), fgWhite, " Possible values:" - styledEcho fgBlue, align("", 14), fgWhite, " - size (optimize build size);" - styledEcho fgBlue, align("", 14), fgWhite, " - speed (optimize app speed);" - styledEcho fgBlue, align("", 14), fgWhite, " - none (no optimizations, by default)." + styledEcho fgBlue, align("", 14), fgWhite, " - size (optimize build size)" + styledEcho fgBlue, align("", 14), fgWhite, " - speed (optimize app speed)" + styledEcho fgBlue, align("", 14), fgWhite, " - none (no optimizations, by default)" else: styledEcho fgRed, "Unknown subcommand: ", fgWhite, subcmdHelp quit(QuitSuccess) From ef4dcdf7067ba8997f39c9cec6fd9effbc4957cb Mon Sep 17 00:00:00 2001 From: neroist Date: Mon, 10 Jun 2024 02:43:42 -0400 Subject: [PATCH 3/4] change wording & sep. cmd name and desc. with tilde --- src/happyx_native/hpxnative.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/happyx_native/hpxnative.nim b/src/happyx_native/hpxnative.nim index 850ab6e..6207507 100644 --- a/src/happyx_native/hpxnative.nim +++ b/src/happyx_native/hpxnative.nim @@ -70,17 +70,17 @@ when isMainModule: of "": quit(helpMessage()) of "init": - styledEcho fgBlue, "HappyX Native", fgMagenta, " init ", fgWhite, " command creates app project." + styledEcho fgBlue, "HappyX Native", fgMagenta, " init ", fgWhite, "~ ", fgGreen, "Create new Happyx Native project." styledEcho "\nUsage:" styledEcho fgMagenta, " hpx-native init\n" styledEcho "Arguments:" styledEcho fgBlue, align("name", 4), fgWhite, " - project name." of "build": - styledEcho fgBlue, "HappyX Native", fgMagenta, " build ", fgWhite, " command builds app." + styledEcho fgBlue, "HappyX Native", fgMagenta, " build ", fgWhite, "~ ", fgGreen, "Build & compile Happyx Native app." styledEcho "\nUsage:" styledEcho fgMagenta, " hpx-native build\n" styledEcho "Optional arguments:" - styledEcho fgBlue, align("target", 14), fgWhite, " - build target. By default target is your OS." + styledEcho fgBlue, align("target", 14), fgWhite, " - build target. Defaults to the current OS." styledEcho align("", 14), " Possible targets:" styledEcho align("", 14), " - windows (win)" styledEcho align("", 14), " - linux (unix)" From 2674dbc5c0d3f0d86544bbfafb67ff24f03fdabe Mon Sep 17 00:00:00 2001 From: neroist Date: Mon, 10 Jun 2024 02:44:14 -0400 Subject: [PATCH 4/4] indent "name" in "Arguments:" list --- src/happyx_native/hpxnative.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/happyx_native/hpxnative.nim b/src/happyx_native/hpxnative.nim index 6207507..e41f2f2 100644 --- a/src/happyx_native/hpxnative.nim +++ b/src/happyx_native/hpxnative.nim @@ -74,7 +74,7 @@ when isMainModule: styledEcho "\nUsage:" styledEcho fgMagenta, " hpx-native init\n" styledEcho "Arguments:" - styledEcho fgBlue, align("name", 4), fgWhite, " - project name." + styledEcho fgBlue, align("name", 6), fgWhite, " - project name." of "build": styledEcho fgBlue, "HappyX Native", fgMagenta, " build ", fgWhite, "~ ", fgGreen, "Build & compile Happyx Native app." styledEcho "\nUsage:"