Beispiel #1
0
        public void Load(DCompilerConfiguration config, bool isDebug)
        {
            Configuration = config;
            IsDebug = isDebug;

            if (config == null) {
                Load (null);
                return;
            }

            //compiler targets
            argsStore [DCompileTarget.Executable] = config
                    .GetOrCreateTargetConfiguration (DCompileTarget.Executable)
                    .GetArguments (isDebug)
                    .Clone ();

            argsStore [DCompileTarget.SharedLibrary] = config
                    .GetOrCreateTargetConfiguration (DCompileTarget.SharedLibrary)
                    .GetArguments (isDebug)
                    .Clone ();

            argsStore [DCompileTarget.StaticLibrary] = config
                    .GetOrCreateTargetConfiguration (DCompileTarget.StaticLibrary)
                    .GetArguments (isDebug)
                    .Clone ();

            SelectedCompileTarget = DCompileTarget.Executable;
        }
        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;
        }
Beispiel #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 (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 ();
			}
		}
Beispiel #4
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;
        }