void GenerateLaunchMinGW(ref VCLaunch vcLaunch, string configure, string platform, string configure_exe)
        {
            VCLaunch.Configurate configurate = new VCLaunch.Configurate();
            configurate.name = configure + "_" + platform;

            Config.Global.BinariesPlatformPath = Path.Combine(Config.Global.BinariesPath, platform);
            if (!Directory.Exists(Config.Global.BinariesPlatformPath))
            {
                Directory.CreateDirectory(Config.Global.BinariesPlatformPath);
            }
            if (String.IsNullOrEmpty(configure_exe))
            {
                configurate.program = Path.Combine(Config.Global.BinariesPlatformPath, Name + ".exe").Replace('\\', '/');
            }
            else
            {
                configurate.program = Path.Combine(Config.Global.BinariesPlatformPath, Name + "_" + configure_exe + ".exe").Replace('\\', '/');
            }

            configurate.cwd            = Config.Global.BinariesPlatformPath.Replace('\\', '/');
            configurate.miDebuggerPath = Path.Combine(Config.Global.MinGWPath, "bin", "gdb.exe").Replace('\\', '/');
            configurate.preLaunchTask  = "build " + configure + "_" + platform;;
            vcLaunch.configurations.Add(configurate);
        }
 void GenerateLaunchMinGW(ref VCLaunch vcLaunch, string configure, string configure_exe)
 {
     GenerateLaunchMinGW(ref vcLaunch, configure, "MinGW", configure_exe);
 }
        public void Write()
        {
            if (Config.Global.IsWindows)
            {
                List <string> GlobalDefines = new List <string>();

                GlobalDefines.AddRange(new string[] { "WINDOWS", "LIB", "_LIB" });
                if (Config.Global.UNICODE)
                {
                    GlobalDefines.Add("_UNICODE;");
                    GlobalDefines.Add("UNICODE");
                }


                VCCppProperties vcCppProperties = new VCCppProperties();

                string[][] PlatfromsDefines      = { new string[] { "WIN64", "X64" } };
                string[][] ConfigurationsDefines = { new string[] { "DEBUG", "_DEBUG", "GCC" }, new string[] { "MIXED", "DEBUG", "GCC" }, new string[] { "NDEBUG", "GCC" } };
                {
                    for (int i = 0; i < Platfroms.Length; i++)
                    {
                        for (int a = 0; a < Configurations.Length; a++)
                        {
                            List <string> LocalDefines = new List <string>();
                            LocalDefines.AddRange(GlobalDefines);
                            LocalDefines.AddRange(PlatfromsDefines[i]);
                            LocalDefines.AddRange(ConfigurationsDefines[a]);
                            GenerateCPPConfigureMinGW(ref vcCppProperties, Platfroms[i], i, a, Name, LocalDefines.ToArray());
                        }
                    }
                    File.WriteAllText(Path.Combine(VCDirectory, "c_cpp_properties.json"), JsonConvert.SerializeObject(vcCppProperties, Formatting.Indented));
                }
                if (General)
                {
                    {
                        VCTasks vcTasks = new VCTasks();
                        for (int i = 0; i < Platfroms.Length; i++)
                        {
                            for (int a = 0; a < Configurations.Length; a++)
                            {
                                GenerateTasksMinGW(ref vcTasks, Name, Configurations[a], Platfroms[i]);
                            }
                        }

                        File.WriteAllText(Path.Combine(VCDirectory, "tasks.json"), JsonConvert.SerializeObject(vcTasks, Formatting.Indented));
                    }
                    {
                        VCLaunch vcLaunch = new VCLaunch();
                        GenerateLaunchMinGW(ref vcLaunch, "Debug", "debug");
                        GenerateLaunchMinGW(ref vcLaunch, "Mixed", "mixed");
                        GenerateLaunchMinGW(ref vcLaunch, "Release", "");
                        File.WriteAllText(Path.Combine(VCDirectory, "launch.json"), JsonConvert.SerializeObject(vcLaunch, Formatting.Indented));
                    }
                }
            }

            else
            {
                {
                }
            }
        }