| 22 | using NodeRTLib; |
| 23 | |
| 24 | class Program |
| 25 | { |
| 26 | static void Main(string[] args) |
| 27 | { |
| 28 | var argsDictionary = ParseCommandLineArgs(args); |
| 29 | |
| 30 | if (argsDictionary.ContainsKey("help")) |
| 31 | { |
| 32 | PrintHelp(); |
| 33 | return; |
| 34 | } |
| 35 | |
| 36 | if (!ValidateArguments(argsDictionary)) |
| 37 | { |
| 38 | PrintHelpAndExitWithError(); |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | if (argsDictionary.ContainsKey("namespaces")) |
| 43 | { |
| 44 | PrintNamespaces(argsDictionary); |
| 45 | return; |
| 46 | } |
| 47 | |
| 48 | string winmd = argsDictionary["winmd"]; |
| 49 | string outDir = argsDictionary["outdir"]; |
| 50 | |
| 51 | bool noDefGen = argsDictionary.ContainsKey("nodefgen"); |
| 52 | bool noBuild = argsDictionary.ContainsKey("nobuild"); |
| 53 | bool verbose = argsDictionary.ContainsKey("verbose"); |
| 54 | |
| 55 | if (!Directory.Exists(outDir)) |
| 56 | { |
| 57 | Directory.CreateDirectory(outDir); |
| 58 | } |
| 59 | |
| 60 | string ns = ValueOrNull(argsDictionary, "namespace"); |
| 61 | string customWinMdDir = ValueOrNull(argsDictionary, "customwinmddir"); |
| 62 | |
| 63 | VsVersions vsVersion = VsVersions.Vs2017; |
| 64 | WinVersions winVersion = WinVersions.v10; |
| 65 | |
| 66 | if (argsDictionary.ContainsKey("vs")) |
| 67 | { |
| 68 | if (!Enum.TryParse<VsVersions>(argsDictionary["vs"], true, out vsVersion)) |
| 69 | { |
| 70 | Console.WriteLine("Unsupported VS version. Supported options are: VS2017, VS2015, VS2013, VS2012"); |
| 71 | Environment.Exit(1); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | if (argsDictionary.ContainsKey("winver")) |
| 76 | { |
| 77 | if (!NodeRTProjectGenerator.TryParseWinVersion(argsDictionary["winver"], out winVersion)) |
| 78 | { |
| 79 | Console.WriteLine("Unssuported Windows version. Supported options are: 10, 8.1, 8"); |
| 80 | Environment.Exit(1); |
| 81 | } |
nothing calls this directly
no outgoing calls
no test coverage detected