Example #1
0
        public void Load(DCompilerConfiguration compiler)
        {
            configuration = compiler;

            if (compiler == null)
            {
                txtBinPath.Text                         =
                    txtCompiler.Text                    =
                        txtConsoleAppLinker.Text        =
                            txtSharedLibLinker.Text     =
                                txtStaticLibLinker.Text = null;

                text_DefaultLibraries.Buffer.Clear();
                text_Includes.Buffer.Clear();

                releaseArgumentsDialog.Load(null, false);
                debugArgumentsDialog.Load(null, true);

                btnMakeDefault.Sensitive = false;
                return;
            }
            //for now, using Executable target compiler command for all targets source compiling
            LinkTargetConfiguration targetConfig;

            targetConfig = compiler.GetOrCreateTargetConfiguration(DCompileTarget.Executable);

            txtBinPath.Text  = compiler.BinPath;
            txtCompiler.Text = compiler.SourceCompilerCommand;
            check_enableLibPrefixing.Active = compiler.EnableGDCLibPrefixing;

            //linker targets
            targetConfig             = compiler.GetOrCreateTargetConfiguration(DCompileTarget.Executable);
            txtConsoleAppLinker.Text = targetConfig.Linker;

            targetConfig            = compiler.GetOrCreateTargetConfiguration(DCompileTarget.SharedLibrary);
            txtSharedLibLinker.Text = targetConfig.Linker;

            targetConfig            = compiler.GetOrCreateTargetConfiguration(DCompileTarget.StaticLibrary);
            txtStaticLibLinker.Text = targetConfig.Linker;

            releaseArgumentsDialog.Load(compiler, false);
            debugArgumentsDialog.Load(compiler, true);

            text_DefaultLibraries.Buffer.Text = string.Join(Environment.NewLine, compiler.DefaultLibraries);
            text_Includes.Buffer.Text         = string.Join(Environment.NewLine, compiler.IncludePaths);

            btnMakeDefault.Active =
                configuration.Vendor == defaultCompilerVendor;
            btnMakeDefault.Sensitive = true;

            using (var buf = new StringWriter())
                using (var xml = new System.Xml.XmlTextWriter(buf)) {
                    xml.Formatting = System.Xml.Formatting.Indented;
                    xml.WriteStartDocument();
                    xml.WriteStartElement("patterns");
                    compiler.ArgumentPatterns.SaveTo(xml);
                    xml.WriteEndDocument();
                    tb_ArgPatterns.Buffer.Text = buf.ToString();
                }
        }
Example #2
0
        public void Load(DCompilerConfiguration config)
        {
            configuration = config;

            if (config == null)
            {
                txtBinPath.Text                             =
                    txtCompiler.Text                        =
                        txtConsoleAppLinker.Text            =
                            txtGUIAppLinker.Text            =
                                txtSharedLibLinker.Text     =
                                    txtStaticLibLinker.Text = null;

                text_DefaultLibraries.Buffer.Clear();
                text_Includes.Buffer.Clear();

                releaseArgumentsDialog.Load(null, false);
                debugArgumentsDialog.Load(null, true);

                btnMakeDefault.Sensitive = false;
                return;
            }
            //for now, using Executable target compiler command for all targets source compiling
            LinkTargetConfiguration targetConfig;

            targetConfig = config.GetOrCreateTargetConfiguration(DCompileTarget.Executable);

            txtBinPath.Text = config.BinPath;

            txtCompiler.Text = targetConfig.Compiler;

            //linker targets
            targetConfig             = config.GetOrCreateTargetConfiguration(DCompileTarget.Executable);
            txtConsoleAppLinker.Text = targetConfig.Linker;

            targetConfig         = config.GetOrCreateTargetConfiguration(DCompileTarget.ConsolelessExecutable);
            txtGUIAppLinker.Text = targetConfig.Linker;

            targetConfig            = config.GetOrCreateTargetConfiguration(DCompileTarget.SharedLibrary);
            txtSharedLibLinker.Text = targetConfig.Linker;

            targetConfig            = config.GetOrCreateTargetConfiguration(DCompileTarget.StaticLibrary);
            txtStaticLibLinker.Text = targetConfig.Linker;

            releaseArgumentsDialog.Load(config, false);
            debugArgumentsDialog.Load(config, true);

            text_DefaultLibraries.Buffer.Text = string.Join("\n", config.DefaultLibraries);
            text_Includes.Buffer.Text         = string.Join("\n", config.ParseCache.ParsedDirectories);

            btnMakeDefault.Active =
                configuration.Vendor == defaultCompilerVendor;
            btnMakeDefault.Sensitive = true;
        }
Example #3
0
        public void Load(DCompilerConfiguration compiler)
        {
            configuration = compiler;

            if (compiler == null)
            {
                txtBinPath.Text                         =
                    txtCompiler.Text                    =
                        txtConsoleAppLinker.Text        =
                            txtSharedLibLinker.Text     =
                                txtStaticLibLinker.Text = null;

                text_DefaultLibraries.Buffer.Clear();
                text_Includes.Buffer.Clear();

                releaseArgumentsDialog.Load(null, false);
                debugArgumentsDialog.Load(null, true);

                btnMakeDefault.Sensitive = false;
                return;
            }
            //for now, using Executable target compiler command for all targets source compiling
            LinkTargetConfiguration targetConfig;

            targetConfig = compiler.GetOrCreateTargetConfiguration(DCompileTarget.Executable);

            txtBinPath.Text  = compiler.BinPath;
            txtCompiler.Text = compiler.SourceCompilerCommand;
            check_enableLibPrefixing.Active = compiler.EnableGDCLibPrefixing;

            //linker targets
            targetConfig             = compiler.GetOrCreateTargetConfiguration(DCompileTarget.Executable);
            txtConsoleAppLinker.Text = targetConfig.Linker;

            targetConfig            = compiler.GetOrCreateTargetConfiguration(DCompileTarget.SharedLibrary);
            txtSharedLibLinker.Text = targetConfig.Linker;

            targetConfig            = compiler.GetOrCreateTargetConfiguration(DCompileTarget.StaticLibrary);
            txtStaticLibLinker.Text = targetConfig.Linker;

            releaseArgumentsDialog.Load(compiler, false);
            debugArgumentsDialog.Load(compiler, true);

            text_DefaultLibraries.Buffer.Text = string.Join("\n", compiler.DefaultLibraries);
            text_Includes.Buffer.Text         = string.Join("\n", compiler.IncludePaths);

            btnMakeDefault.Active =
                configuration.Vendor == defaultCompilerVendor;
            btnMakeDefault.Sensitive = true;
        }
Example #4
0
        public void Load(DCompilerConfiguration config)
        {
            configuration = config;
            //for now, using Executable target compiler command for all targets source compiling
            LinkTargetConfiguration targetConfig;

            targetConfig     = config.GetTargetConfiguration(DCompileTarget.Executable);
            txtCompiler.Text = targetConfig.Compiler;

            //linker targets
            targetConfig             = config.GetTargetConfiguration(DCompileTarget.Executable);
            txtConsoleAppLinker.Text = targetConfig.Linker;

            targetConfig         = config.GetTargetConfiguration(DCompileTarget.ConsolelessExecutable);
            txtGUIAppLinker.Text = targetConfig.Linker;

            targetConfig            = config.GetTargetConfiguration(DCompileTarget.SharedLibrary);
            txtSharedLibLinker.Text = targetConfig.Linker;

            targetConfig            = config.GetTargetConfiguration(DCompileTarget.StaticLibrary);
            txtStaticLibLinker.Text = targetConfig.Linker;

            releaseArgumentsDialog.Load(config, false);
            debugArgumentsDialog.Load(config, true);

            defaultLibStore.Clear();
            foreach (string lib in config.DefaultLibraries)
            {
                defaultLibStore.AppendValues(lib);
            }

            includePathStore.Clear();
            foreach (var p in config.GlobalParseCache.DirectoryPaths)
            {
                includePathStore.AppendValues(p);
            }
        }