public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection projectReferences, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
        {
            NemerleParameters cp = (NemerleParameters) configuration.CompilationParameters;
            if (cp == null) cp = new NemerleParameters ();

            string references = "";
            string files   = "";

            foreach (ProjectReference lib in projectReferences)
                references += " -r \"" + lib.GetReferencedFileName() + "\"";

            foreach (ProjectFile f in projectFiles)
                if (f.Subtype != Subtype.Directory)
                    switch (f.BuildAction)
                    {
                        case BuildAction.Compile:
                            files += " \"" + f.Name + "\"";
                        break;
                    }

            if (!Directory.Exists (configuration.OutputDirectory))
                Directory.CreateDirectory (configuration.OutputDirectory);

            string args = "-q -no-color " + GetOptionsString (configuration, cp) + references + files  + " -o " + configuration.CompiledOutputName;
            return DoCompilation (args);
        }
        public override void LoadPanelContents()
        {
            configuration = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
            compilerParameters = (ILAsmCompilerParameters) configuration.CompilationParameters;

            dllTarget = new RadioButton (exeTarget, "dll");
            SetupUI ();
            RestoreValues ();
            this.ShowAll ();
        }
        public override void LoadPanelContents()
        {
            config = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
            parameters = (CSharpCompilerParameters) config.CompilationParameters;

            msnetRadioButton.Active = config.NetRuntime == NetRuntime.MsNet;
            monoRadioButton.Active  = config.NetRuntime == NetRuntime.Mono;
            mintRadioButton.Active  = config.NetRuntime == NetRuntime.MonoInterpreter;

            cscRadioButton.Active = parameters.CsharpCompiler == CsharpCompiler.Csc;
            mcsRadioButton.Active = parameters.CsharpCompiler == CsharpCompiler.Mcs;
        }
        public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
        {
            // FIXME: response file?
            StringBuilder parameters = new StringBuilder();
            foreach (ProjectFile finfo in projectFiles) {
                if (finfo.Subtype != Subtype.Directory) {
                    switch (finfo.BuildAction) {
                        case BuildAction.Compile:
                            if (CanCompile (finfo.Name)) {
                                parameters.Append (finfo.Name);
                                parameters.Append (" ");
                            }
                            break;
                        default:
                            break;
                    }
                }
            }

            parameters.Append("/out:");
            parameters.Append(configuration.CompiledOutputName);
            parameters.Append(" ");

            switch (configuration.CompileTarget) {
                case CompileTarget.Library:
                    parameters.Append("/dll ");
                    break;
                case CompileTarget.Exe:
                    parameters.Append("/exe ");
                    break;
                default:
                    throw new System.NotSupportedException("Unsupported compilation target : " + configuration.CompileTarget);
            }

            if (configuration.DebugMode)
                parameters.Append("/debug ");

            string output = String.Empty;
            string error = String.Empty;
            TempFileCollection tf = new TempFileCollection();
            DoCompilation (parameters.ToString (), tf, ref output, ref error);
            ICompilerResult result = ParseOutput(tf, output, error);
            if (result.CompilerOutput.Trim () != "")
                monitor.Log.WriteLine (result.CompilerOutput);

            File.Delete(output);
            File.Delete(error);
            return result;
        }
            public CodeGenerationPanelWidget(IProperties CustomizationObject)
                : base("Nemerle.glade", "CodeGenerationPanel")
            {
                configuration = (DotNetProjectConfiguration) ((IProperties)CustomizationObject).GetProperty("Config");
                compilerParameters = (NemerleParameters) configuration.CompilationParameters;

                target.Active = (int) configuration.CompileTarget;

                nostdmacros.Active = compilerParameters.Nostdmacros;
                nostdlib.Active    = compilerParameters.Nostdlib;
                ignorewarnings.Active = configuration.RunWithWarnings;
                ot.Active          = compilerParameters.Ot;
                obcm.Active        = compilerParameters.Obcm;
                oocm.Active        = compilerParameters.Oocm;
                oscm.Active        = compilerParameters.Oscm;
            }
 public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
 {
     return compilerServices.Compile (projectFiles, references, configuration, monitor);
 }
        public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
        {
            CSharpCompilerParameters compilerparameters = (CSharpCompilerParameters) configuration.CompilationParameters;
            if (compilerparameters == null) compilerparameters = new CSharpCompilerParameters ();

            string exe = configuration.CompiledOutputName;
            string responseFileName = Path.GetTempFileName();
            StreamWriter writer = new StreamWriter(responseFileName);

            if (compilerparameters.CsharpCompiler == CsharpCompiler.Csc) {
                writer.WriteLine("\"/out:" + exe + '"');

                ArrayList pkg_references = new ArrayList ();

                if (references != null) {
                    foreach (ProjectReference lib in references) {
                        string fileName = lib.GetReferencedFileName ();
                        switch (lib.ReferenceType) {
                        case ReferenceType.Gac:
                            string pkg = Runtime.SystemAssemblyService.GetPackageFromFullName (lib.Reference);
                            if (pkg.Trim () == String.Empty) {
                                string msg = String.Format (GettextCatalog.GetString ("{0} could not be found or is invalid."), lib.Reference);
                                Runtime.MessageService.ShowWarning (msg);
                                continue;
                            }
                            if (pkg == "MONO-SYSTEM") {
                                writer.WriteLine ("\"/r:" + Path.GetFileName (fileName) + "\"");
                            } else if (!pkg_references.Contains (pkg)) {
                                pkg_references.Add (pkg);
                                writer.WriteLine ("\"-pkg:" + pkg + "\"");
                            }
                            break;
                        case ReferenceType.Assembly:
                        case ReferenceType.Project:
                            writer.WriteLine ("\"/r:" + fileName + "\"");
                            break;
                        }
                    }
                }

                writer.WriteLine("/noconfig");
                writer.WriteLine("/nologo");
                writer.WriteLine("/codepage:utf8");
            //				writer.WriteLine("/utf8output");
            //				writer.WriteLine("/w:" + compilerparameters.WarningLevel);;

                if (configuration.DebugMode) {
                    writer.WriteLine("/debug:+");
                    writer.WriteLine("/debug:full");
                    writer.WriteLine("/d:DEBUG");
                }

                // mcs default is + but others might not be
                if (compilerparameters.Optimize)
                    writer.WriteLine("/optimize+");
                else
                    writer.WriteLine("/optimize-");

                if (compilerparameters.Win32Icon != null && compilerparameters.Win32Icon.Length > 0 && File.Exists (compilerparameters.Win32Icon)) {
                    writer.WriteLine("\"/win32icon:" + compilerparameters.Win32Icon + "\"");
                }

                if (compilerparameters.UnsafeCode) {
                    writer.WriteLine("/unsafe");
                }

                if (compilerparameters.DefineSymbols.Length > 0) {
                    writer.WriteLine("/define:" + '"' + compilerparameters.DefineSymbols + '"');
                }

                if (compilerparameters.MainClass != null && compilerparameters.MainClass.Length > 0) {
                    writer.WriteLine("/main:" + compilerparameters.MainClass);
                }

                switch (configuration.CompileTarget) {
                    case CompileTarget.Exe:
                        writer.WriteLine("/t:exe");
                        break;
                    case CompileTarget.WinExe:
                        writer.WriteLine("/t:winexe");
                        break;
                    case CompileTarget.Library:
                        writer.WriteLine("/t:library");
                        break;
                }

                foreach (ProjectFile finfo in projectFiles) {
                    if (finfo.Subtype != Subtype.Directory) {
                        switch (finfo.BuildAction) {
                            case BuildAction.Compile:
                                if (CanCompile (finfo.Name))
                                    writer.WriteLine('"' + finfo.Name + '"');
                                break;
                            case BuildAction.EmbedAsResource:
                                // FIXME: workaround 60990
                                writer.WriteLine(@"""/res:{0},{1}""", finfo.Name, Path.GetFileName (finfo.Name));
                                break;
                        }
                    }
                }
                if (compilerparameters.GenerateXmlDocumentation) {
                    writer.WriteLine("\"/doc:" + Path.ChangeExtension(exe, ".xml") + '"');
                }
            }
            else {
                writer.WriteLine("-o " + exe);

                if (compilerparameters.UnsafeCode) {
                    writer.WriteLine("--unsafe");
                }

                writer.WriteLine("--wlevel " + compilerparameters.WarningLevel);

                if (references != null) {
                    foreach (ProjectReference lib in references) {
                        string fileName = lib.GetReferencedFileName ();
                        writer.WriteLine("-r:" + fileName );
                    }
                }

                switch (configuration.CompileTarget) {
                    case CompileTarget.Exe:
                        writer.WriteLine("--target exe");
                        break;
                    case CompileTarget.WinExe:
                        writer.WriteLine("--target winexe");
                        break;
                    case CompileTarget.Library:
                        writer.WriteLine("--target library");
                        break;
                }
                foreach (ProjectFile finfo in projectFiles) {
                    if (finfo.Subtype != Subtype.Directory) {
                        switch (finfo.BuildAction) {
                            case BuildAction.Compile:
                                writer.WriteLine('"' + finfo.Name + '"');
                                break;

                            case BuildAction.EmbedAsResource:
                                writer.WriteLine("--linkres " + finfo.Name);
                                break;
                        }
                    }
                }
            }
            writer.Close();

            string output = String.Empty;
            string error  = String.Empty;

            string compilerName = compilerparameters.CsharpCompiler == CsharpCompiler.Csc ? GetCompilerName() : System.Environment.GetEnvironmentVariable("ComSpec") + " /c mcs";
            string outstr = compilerName + " @" + responseFileName;
            TempFileCollection tf = new TempFileCollection();

            //StreamReader t = File.OpenText(responseFileName);

            //Executor.ExecWaitWithCapture(outstr,  tf, ref output, ref error);
            DoCompilation(outstr, tf, ref output, ref error);

            ICompilerResult result = ParseOutput(tf, output, error);
            if (result.CompilerOutput.Trim () != "")
                monitor.Log.WriteLine (result.CompilerOutput);

            File.Delete(responseFileName);
            File.Delete(output);
            File.Delete(error);
            return result;
        }
            public CodeGenerationPanelWidget(IProperties CustomizationObject)
                : base("CSharp.glade", "CodeGenerationPanel")
            {
                configuration = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
                project = (Project)((IProperties)CustomizationObject).GetProperty("Project");
                compilerParameters = (CSharpCompilerParameters) configuration.CompilationParameters;

                ListStore store = new ListStore (typeof (string));
                store.AppendValues (GettextCatalog.GetString ("Executable"));
                store.AppendValues (GettextCatalog.GetString ("Library"));
                compileTargetCombo.Model = store;
                CellRendererText cr = new CellRendererText ();
                compileTargetCombo.PackStart (cr, true);
                compileTargetCombo.AddAttribute (cr, "text", 0);
                compileTargetCombo.Active = (int) configuration.CompileTarget;
                compileTargetCombo.Changed += new EventHandler (OnTargetChanged);

                symbolsEntry.Text = compilerParameters.DefineSymbols;

                classListStore = new ListStore (typeof(string));
                mainClassEntry.Model = classListStore;
                mainClassEntry.TextColumn = 0;
                ((Entry)mainClassEntry.Child).Text = compilerParameters.MainClass;

                UpdateTarget ();

                generateDebugInformationCheckButton.Active = configuration.DebugMode;
                generateXmlOutputCheckButton.Active        = compilerParameters.GenerateXmlDocumentation;
                enableOptimizationCheckButton.Active       = compilerParameters.Optimize;
                allowUnsafeCodeCheckButton.Active          = compilerParameters.UnsafeCode;
                generateOverflowChecksCheckButton.Active   = compilerParameters.GenerateOverflowChecks;
                warningsAsErrorsCheckButton.Active         = ! configuration.RunWithWarnings;
                warningLevelSpinButton.Value               = compilerParameters.WarningLevel;
            }
        void CompileToAssembly(IProgressMonitor monitor, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, ProjectReferenceCollection references, TextWriter output, TextWriter error)
        {
            monitor.Log.WriteLine ("Generating assembly ...");

            LogTextWriter chainedError = new LogTextWriter ();
            chainedError.ChainWriter (monitor.Log);
            chainedError.ChainWriter (error);

            LogTextWriter chainedOutput = new LogTextWriter ();
            chainedOutput.ChainWriter (monitor.Log);
            chainedOutput.ChainWriter (output);

            string outdir = configuration.OutputDirectory;
            string outclass = Path.Combine (outdir, configuration.OutputAssembly + ".class");
            string asm = Path.GetFileNameWithoutExtension (outclass);

            string opts = "-assembly:" + asm;

            switch (configuration.CompileTarget) {
                case CompileTarget.Exe:
                    opts += " -target:exe";
                    break;
                case CompileTarget.WinExe:
                    opts += " -target:winexe";
                    break;
                case CompileTarget.Library:
                    opts += " -target:library";
                    break;
            }

            if (configuration.DebugMode)
                opts += " -debug";

            opts += " -srcpath:" + configuration.SourceDirectory;

            if (references != null) {
                foreach (ProjectReference lib in references)
                    opts += " -r:" + lib.GetReferencedFileName ();
            }

            string ikvmc = Path.Combine (Path.Combine (JavaLanguageBinding.Properties.IkvmPath, "bin"), "ikvmc.exe");

            string args = String.Format ("-c \"mono {0} {1} {2}\"", ikvmc, "*.class", opts);
            Process p = Runtime.ProcessService.StartProcess ("/bin/sh", args, configuration.OutputDirectory, chainedOutput, chainedError, null);
            p.WaitForExit ();
        }
 public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
 {
     Debug.Assert(compilerManager != null);
     return compilerManager.Compile (projectFiles, references, configuration, monitor);
 }
        private string GetOptionsString(DotNetProjectConfiguration configuration, NemerleParameters cp)
        {
            string options = " ";
            if (cp.Nostdmacros)
                options += " -no-stdmacros";
            if (cp.Nostdlib)
                options += " -no-stdlib";
            if (cp.Ot)
                options += " -Ot";
            if (cp.Obcm)
                options += " -Obcm";
            if (cp.Oocm)
                options += " -Oocm";
            if (cp.Oscm)
                options += " -Oscm";
            if (configuration.CompileTarget == CompileTarget.Library)
                options += " -tdll";

            return options;
        }
        public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
        {
            if (JavaLanguageBinding.Properties.IkvmPath == "") {
                monitor.Log.WriteLine ("The Java addin has not been properly configured.");
                monitor.Log.WriteLine ("Please set the location of IKVM in the Java configuration section of MonoDevelop preferences.");
                CompilerResults cre = new CompilerResults (new TempFileCollection ());
                CompilerError err = new CompilerError ();
                err.ErrorText = "The Java addin has not been properly configured.";
                cre.Errors.Add (err);
                return new DefaultCompilerResult (cre, "");
            }

            JavaCompilerParameters compilerparameters = (JavaCompilerParameters) configuration.CompilationParameters;
            if (compilerparameters == null)
                compilerparameters = new JavaCompilerParameters ();

            string outdir = configuration.OutputDirectory;
            string options = "";

            string compiler = compilerparameters.CompilerPath;

            if (configuration.DebugMode)
                options += " -g ";
            else
                options += " -g:none ";

            if (compilerparameters.Optimize)
                options += " -O ";

            if (compilerparameters.Deprecation)
                options += " -deprecation ";

            if (compilerparameters.GenWarnings)
                options += " -nowarn ";

            options += " -encoding utf8 ";

            string files  = "";

            foreach (ProjectFile finfo in projectFiles) {
                if (finfo.Subtype != Subtype.Directory) {
                    switch (finfo.BuildAction) {
                        case BuildAction.Compile:
                            files = files + " \"" + finfo.Name + "\"";
                        break;
                    }
                }
            }

            string classpath = compilerparameters.ClassPath;
            string refClasspath = GenerateReferenceStubs (monitor, configuration, compilerparameters, references);
            if (refClasspath.Length > 0) {
                if (classpath.Length > 0) classpath += ":";
                classpath += refClasspath;
            }

            string args = "";

            if (compilerparameters.Compiler == JavaCompiler.Gcj)
                args = "-C ";

            //FIXME re-enable options
            //FIXME re-enable compilerPath
            if (classpath == "") {
                args += files + " -d " + outdir;
            } else {
                args += " -classpath " + classpath + files + " -d " + outdir;
            }
            args = options + " " + args;
            //Console.WriteLine (args);

            CompilerResults cr = new CompilerResults (new TempFileCollection ());
            StringWriter output = new StringWriter ();
            StringWriter error = new StringWriter ();

            bool res = DoCompilation (monitor, compiler, args, configuration, compilerparameters, output, error);
            ParseJavaOutput (compilerparameters.Compiler, error.ToString(), cr);

            if (res) {
                output = new StringWriter ();
                error = new StringWriter ();
                CompileToAssembly (monitor, configuration, compilerparameters, references, output, error);
                ParseIkvmOutput (compilerparameters.Compiler, error.ToString(), cr);
            }

            return new DefaultCompilerResult (cr, "");
        }
        private string GenerateReferenceStubs(IProgressMonitor monitor, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, ProjectReferenceCollection references)
        {
            monitor.Log.WriteLine ("Generating reference stubs ...");

            // Create stubs for referenced assemblies
            string ikvmstub = Path.Combine (Path.Combine (JavaLanguageBinding.Properties.IkvmPath, "bin"), "ikvmstub.exe");

            string classpath = "";

            if (references != null) {
                foreach (ProjectReference lib in references) {
                    string asm = lib.GetReferencedFileName ();
                    ProcessWrapper p = Runtime.ProcessService.StartProcess ("/bin/sh", "-c \"mono " + ikvmstub + " " + asm + "\"", configuration.OutputDirectory, null);
                    p.WaitForExit ();

                    if (classpath.Length > 0) classpath += ":";
                    string name = Path.GetFileNameWithoutExtension (Path.GetFileName (asm));
                    classpath += Path.Combine (configuration.OutputDirectory, name + ".jar");
                }
            }
            return classpath;
        }
        private bool DoCompilation(IProgressMonitor monitor, string compiler, string args, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, TextWriter output, TextWriter error)
        {
            LogTextWriter chainedError = new LogTextWriter ();
            chainedError.ChainWriter (monitor.Log);
            chainedError.ChainWriter (error);

            LogTextWriter chainedOutput = new LogTextWriter ();
            chainedOutput.ChainWriter (monitor.Log);
            chainedOutput.ChainWriter (output);

            monitor.Log.WriteLine ("Compiling Java source code ...");

            Process p = Runtime.ProcessService.StartProcess (compiler, args, null, chainedOutput, chainedError, null);
            p.WaitForExit ();
            return p.ExitCode == 0;
        }
        public override void LoadPanelContents()
        {
            configuration = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
            parameters = (VBCompilerParameters) configuration.CompilationParameters;

            msnetRadioButton.Active = config.NetRuntime == NetRuntime.MsNet;
            monoRadioButton.Active  = config.NetRuntime == NetRuntime.Mono;
            mintRadioButton.Active  = config.NetRuntime == NetRuntime.MonoInterpreter;

            vbcRadioButton.Active = parameters.VBCompiler == VBCompiler.Vbc;
            mbasRadioButton.Active = parameters.VBCompiler == VBCompiler.Mbas;
        }
        string GenerateOptions(DotNetProjectConfiguration configuration, VBCompilerParameters compilerparameters, string outputFileName)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("-out:");sb.Append(outputFileName);/*sb.Append('"');*/sb.Append(Environment.NewLine);

            sb.Append("-nologo");sb.Append(Environment.NewLine);
            sb.Append("-utf8output");sb.Append(Environment.NewLine);

            //			if (compilerparameters.DebugMode) {
            //				sb.Append("--debug+");sb.Append(Environment.NewLine);
            //				sb.Append("--debug:full");sb.Append(Environment.NewLine);
            //			}

            //if (compilerparameters.Optimize) {
            //	sb.Append("-optimize");sb.Append(Environment.NewLine);
            //}

            //if (compilerparameters.OptionStrict) {
            //	sb.Append("-optionstrict");sb.Append(Environment.NewLine);
            //}

            //if (compilerparameters.OptionExplicit) {
            //	sb.Append("-optionexplicit");sb.Append(Environment.NewLine);
            //}// else {
            //	sb.Append("--optionexplicit-");sb.Append(Environment.NewLine);
            //}

            if (compilerparameters.Win32Icon != null && compilerparameters.Win32Icon.Length > 0 && File.Exists(compilerparameters.Win32Icon)) {
                sb.Append("-win32icon:");sb.Append('"');sb.Append(compilerparameters.Win32Icon);sb.Append('"');sb.Append(Environment.NewLine);
            }

            if (compilerparameters.RootNamespace!= null && compilerparameters.RootNamespace.Length > 0) {
                sb.Append("-rootnamespace:");sb.Append('"');sb.Append(compilerparameters.RootNamespace);sb.Append('"');sb.Append(Environment.NewLine);
            }

            if (compilerparameters.DefineSymbols.Length > 0) {
                sb.Append("-define:");sb.Append('"');sb.Append(compilerparameters.DefineSymbols);sb.Append('"');sb.Append(Environment.NewLine);
            }

            if (compilerparameters.MainClass != null && compilerparameters.MainClass.Length > 0) {
                sb.Append("-main:");sb.Append(compilerparameters.MainClass);sb.Append(Environment.NewLine);
            }

            if(compilerparameters.Imports.Length > 0) {
                sb.Append("-imports:");sb.Append(compilerparameters.Imports);sb.Append(Environment.NewLine);
            }

            switch (configuration.CompileTarget) {
                case CompileTarget.Exe:
                    sb.Append("-target:exe");
                    break;
                case CompileTarget.WinExe:
                    sb.Append("-target:winexe");
                    break;
                case CompileTarget.Library:
                    sb.Append("-target:library");
                    break;
                case CompileTarget.Module:
                    sb.Append("-target:module");
                    break;
                default:
                    throw new NotSupportedException("unknown compile target:" + configuration.CompileTarget);
            }
            sb.Append(Environment.NewLine);
            return sb.ToString();
        }
Ejemplo n.º 17
0
 public override IConfiguration CreateConfiguration(string name)
 {
     DotNetProjectConfiguration conf = new DotNetProjectConfiguration ();
     conf.Name = name;
     conf.CompilationParameters = languageBinding.CreateCompilationParameters (null);
     return conf;
 }
        public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
        {
            VBCompilerParameters compilerparameters = (VBCompilerParameters) configuration.CompilationParameters;
            if (compilerparameters == null) compilerparameters = new VBCompilerParameters ();

            string exe = configuration.CompiledOutputName;
            string responseFileName = Path.GetTempFileName();
            //string stdResponseFileName = String.Concat(propertyService.DataDirectory, Path.DirectorySeparatorChar, "vb.rsp");
            StreamWriter writer = new StreamWriter(responseFileName);

            //Console.WriteLine(GenerateOptions(compilerparameters,exe));
            writer.WriteLine(GenerateOptions (configuration, compilerparameters, exe));

            foreach (ProjectReference lib in references) {
                string fileName = lib.GetReferencedFileName();
                //Console.WriteLine(String.Concat("-r:",fileName));
                writer.WriteLine(String.Concat("-r:", fileName));
            }

            // write source files and embedded resources
            foreach (ProjectFile finfo in projectFiles) {
                if (finfo.Subtype != Subtype.Directory) {
                    switch (finfo.BuildAction) {
                        case BuildAction.Compile:
                            //Console.WriteLine(finfo.Name);
                            writer.WriteLine(finfo.Name);
                        break;

                        case BuildAction.EmbedAsResource:
                            //Console.WriteLine(String.Concat("-resource:", finfo.Name));
                            writer.WriteLine(String.Concat("-resource:", finfo.Name));
                        break;
                    }
                }
            }

            TempFileCollection tf = new TempFileCollection ();
            writer.Close();

            string output = "";
            string error  = "";
            string compilerName = GetCompilerName(compilerparameters.VBCompilerVersion);
            string outstr = String.Concat(compilerName, " @", responseFileName); //, " @", stdResponseFileName);

            //Console.WriteLine("Attempting to run: "+outstr);

            //Executor.ExecWaitWithCapture(outstr, tf, ref output, ref error);
            DoCompilation(outstr,tf,ref output,ref error);

            //Console.WriteLine("Output: "+output);
            //Console.WriteLine("Error: "+error);

            ICompilerResult result = ParseOutput(tf, output);
            ParseOutput(tf,error);

            File.Delete(responseFileName);
            File.Delete(output);
            File.Delete(error);
            if (configuration.CompileTarget != CompileTarget.Library) {
                WriteManifestFile(exe);
            }
            return result;
        }
            public OutputOptionsPanelWidget(IProperties CustomizationObject)
                : base("Base.glade", "OutputOptionsPanel")
            {
                configuration = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
                externalConsoleCheckButton.Toggled += new EventHandler (ExternalConsoleToggle);

                assemblyNameEntry.Text = configuration.OutputAssembly;
                outputPathButton.Filename = configuration.OutputDirectory;
                parametersEntry.Text      = configuration.CommandLineParameters;
                executeButton.Filename = configuration.ExecuteScript;
                 				beforeButton.Filename = configuration.ExecuteBeforeBuild;
                 				afterButton.Filename = configuration.ExecuteAfterBuild;

                 				externalConsoleCheckButton.Active = configuration.ExternalConsole;
                 				pauseConsoleOutputCheckButton.Active = configuration.PauseConsoleOutput;
            }
            public CodeGenerationPanelWidget(IProperties CustomizationObject)
                : base("Java.glade", "CodeGenerationPanel")
            {
                configuration = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
                compilerParameters = (JavaCompilerParameters) configuration.CompilationParameters;

                ListStore store = new ListStore (typeof (string));
                store.AppendValues (GettextCatalog.GetString ("Executable"));
                store.AppendValues (GettextCatalog.GetString ("Library"));
                compileTargetCombo.Model = store;
                CellRendererText cr = new CellRendererText ();
                compileTargetCombo.PackStart (cr, true);
                compileTargetCombo.AddAttribute (cr, "text", 0);
                compileTargetCombo.Active = (int) configuration.CompileTarget;

                if (compilerParameters.Compiler == JavaCompiler.Javac)
                    compilerJavacButton.Active = true;
                else
                    compilerGcjButton.Active = true;

                compilerJavacButton.Toggled += new EventHandler (OnCompilerToggled);
                compilerGcjButton.Toggled += new EventHandler (OnCompilerToggled);

                enableOptimizationCheckButton.Active = compilerParameters.Optimize;
                generateDebugInformationCheckButton.Active = configuration.DebugMode;
                deprecationCheckButton.Active = compilerParameters.Deprecation;
                generateWarningsCheckButton.Active = compilerParameters.GenWarnings;
                warningsAsErrorsCheckButton.Active = !configuration.RunWithWarnings;

                compilerEntry.Text = compilerParameters.CompilerPath;
                classPathEntry.Text = compilerParameters.ClassPath;
                mainClassEntry.Text = compilerParameters.MainClass;
                symbolsEntry.Text = compilerParameters.DefineSymbols;
            }