public CombineTestGroup(Combine c)
            : base(c.Name, c)
        {
            string storeId = Path.GetFileName (c.FileName);
            string resultsPath = Path.Combine (c.BaseDirectory, "test-results");
            ResultsStore = new XmlResultsStore (resultsPath, storeId);

            combine = c;
            combine.EntryAdded += new CombineEntryEventHandler (OnEntryChanged);
            combine.EntryRemoved += new CombineEntryEventHandler (OnEntryChanged);
            combine.NameChanged += new CombineEntryRenamedEventHandler (OnCombineRenamed);
        }
 void CountCombine(Combine combine, ref Report all)
 {
     foreach (CombineEntry entry in combine.Entries) {
         if (entry is Project) {
             foreach (ProjectFile finfo in ((Project)entry).ProjectFiles) {
                 if (finfo.Subtype != Subtype.Directory &&
                     finfo.BuildAction == BuildAction.Compile) {
                     Report r = GetReport(finfo.Name);
                     all += r;
                     items.Add(r);
                 }
             }
         } else
             CountCombine ((Combine)entry, ref all);
     }
 }
        public CombineOptionsDialog(Gtk.Window parentWindow, Combine combine, IAddInTreeNode node, IAddInTreeNode configurationNode)
            : base(parentWindow, null, null)
        {
            this.combine = combine;
            this.configurationNode = configurationNode;
            this.Title = GettextCatalog.GetString ("Combine Options");

            configData = ConfigurationData.Build (combine);
            configData.ConfigurationsChanged += new EventHandler (OnConfigChanged);

            properties = new DefaultProperties();
            properties.SetProperty ("Combine", combine);
            properties.SetProperty ("CombineConfigData", configData);

            AddNodes (properties, Gtk.TreeIter.Zero, node.BuildChildItems (this));

            SelectFirstNode ();
        }
 internal void SetCombine(Combine cmb)
 {
     combine = cmb;
 }
 public void GenerateMakefile(Project project, Combine parentCombine)
 {
     // FIXME: dont abort for now
     // throw new NotImplementedException ();
 }
 internal void SetCombine(Combine combine)
 {
     foreach (CombineConfigurationEntry conf in configurations) {
         conf.SetCombine (combine);
         if (conf.ConfigurationName == null)
             conf.ConfigurationName = Name;
     }
 }
            public CombineStartupPanelWidget(IProperties CustomizationObject)
                : base("Base.glade", "CombineStartupPanel")
            {
                this.combine = (Combine)((IProperties)CustomizationObject).GetProperty("Combine");

                singleRadioButton.Active = combine.SingleStartupProject;
                singleRadioButton.Clicked += new EventHandler(OnSingleRadioButtonClicked);
                multipleRadioButton.Active = !combine.SingleStartupProject;
                //singleRadioButton.Clicked += new EventHandler(OptionsChanged);

                // Setting up OptionMenus
                ListStore tmpStore = new ListStore (typeof (string));
                int active = -1;
                for (int i = 0;  i < combine.Entries.Count; i++)  {
                    CombineEntry entry = (CombineEntry) combine.Entries[i];
                    tmpStore.AppendValues (entry.Name);

                    if (combine.StartupEntry == entry)
                        active = i;
                }
                singleCombo.Model = tmpStore;

                CellRendererText cr = new CellRendererText ();
                singleCombo.PackStart (cr, true);
                singleCombo.AddAttribute (cr, "text", 0);
                singleCombo.Active = active;

                tmpStore = new ListStore (typeof (string));
                tmpStore.AppendValues (GettextCatalog.GetString ("None"));
                tmpStore.AppendValues (GettextCatalog.GetString ("Execute"));
                actionCombo.Model = tmpStore;
                actionCombo.PackStart (cr, true);
                actionCombo.AddAttribute (cr, "text", 0);
                actionCombo.Changed += new EventHandler(OptionsChanged);

                // Populating entryTreeView
                CombineExecuteDefinition edef;
                 				store = new ListStore (typeof(string), typeof(string), typeof(CombineExecuteDefinition) );
                entryTreeView.Model = store;

                 				string entryHeader = Runtime.StringParserService.Parse("Entry");
                 				entryTreeView.AppendColumn (entryHeader, new CellRendererText (), "text", 0);
                 				string actionHeader = Runtime.StringParserService.Parse( "Action");
                 				entryTreeView.AppendColumn (actionHeader, new CellRendererText (), "text", 1);

                // sanity check to ensure we had a proper execture definitions save last time rounf
                if(combine.CombineExecuteDefinitions.Count == combine.Entries.Count) {
                    // add the previously saved execute definitions to the treeview list
                    for (int n = 0; n < combine.CombineExecuteDefinitions.Count; n++) {
                        edef = (CombineExecuteDefinition)combine.CombineExecuteDefinitions[n];
                        string action = edef.Type == EntryExecuteType.None ? GettextCatalog.GetString ("None") : GettextCatalog.GetString ("Execute");
                        store.AppendValues (edef.Entry.Name, action, edef);
                    }
                } else {
                    // add an empty set of execute definitions
                    for (int n = 0; n < combine.Entries.Count; n++) {
                        edef = new CombineExecuteDefinition ((CombineEntry) combine.Entries[n],EntryExecuteType.None);
                        string action = edef.Type == EntryExecuteType.None ? GettextCatalog.GetString ("None") : GettextCatalog.GetString ("Execute");
                        store.AppendValues (edef.Entry.Name, action, edef);
                    }

                    // tell the user we encountered and worked around an issue
                    Runtime.MessageService.ShowError(GettextCatalog.GetString ("The Combine Execute Definitions for this Combine were invalid. A new empty set of Execute Definitions has been created."));
                }

                 				entryTreeView.Selection.Changed += new EventHandler(SelectedEntryChanged);
                entryTreeView.Selection.SelectPath(new TreePath ("0"));

                // Setting up Buttons
                moveUpButton.Clicked += new EventHandler(OnMoveUpButtonClicked);
                moveDownButton.Clicked += new EventHandler(OnMoveDownButtonClicked);

                OnSingleRadioButtonClicked(null, null);
            }
 void AddFiles(Combine combine)
 {
     foreach (CombineEntry entry in combine.Entries) {
         if (entry is Project) {
             AddFiles ((Project)entry);
         } else if (entry is Combine) {
             AddFiles ((Combine)entry);
         }
     }
 }
 public void GenerateMakefile(Project project, Combine parentCombine)
 {
     compilerServices.GenerateMakefile(project, parentCombine);
 }
        public CombineEntry AddCombineEntry(Combine parentCombine)
        {
            CombineEntry res = null;

            using (FileSelector fdiag = new FileSelector (GettextCatalog.GetString ("Add to Solution"))) {
                fdiag.SelectMultiple = false;
                if (fdiag.Run () == (int) Gtk.ResponseType.Ok) {
                    try {
                        using (IProgressMonitor monitor = Runtime.TaskService.GetLoadProgressMonitor ()) {
                            res = parentCombine.AddEntry (fdiag.Filename, monitor);
                        }
                    }
                    catch {
                        Runtime.MessageService.ShowError (string.Format (GettextCatalog.GetString ("The file '{0}' could not be loaded."), fdiag.Filename));
                    }
                }

                fdiag.Hide ();
            }
            if (res != null)
                SaveCombine ();

            return res;
        }
        void SaveCombinePreferences(Combine combine)
        {
            string combinefilename = combine.FileName;
            string directory = Runtime.Properties.ConfigDirectory + "CombinePreferences";

            if (!Directory.Exists(directory)) {
                Runtime.FileService.CreateDirectory(directory);
            }
            string combinepath = Path.GetDirectoryName(combinefilename);
            XmlDocument doc = new XmlDocument();
            doc.LoadXml("<?xml version=\"1.0\"?>\n<UserCombinePreferences/>");

            XmlAttribute fileNameAttribute = doc.CreateAttribute("filename");
            fileNameAttribute.InnerText = combinefilename;
            doc.DocumentElement.Attributes.Append(fileNameAttribute);

            XmlElement filesnode = doc.CreateElement("Files");
            doc.DocumentElement.AppendChild(filesnode);

            foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
                if (content.ContentName != null) {
                    XmlElement el = doc.CreateElement("File");

                    XmlAttribute attr = doc.CreateAttribute("filename");
                    attr.InnerText = fileUtilityService.AbsoluteToRelativePath(combinepath, content.ContentName);
                    el.Attributes.Append(attr);

                    filesnode.AppendChild(el);
                }
            }

            XmlElement viewsnode = doc.CreateElement("Views");
            doc.DocumentElement.AppendChild(viewsnode);

            foreach (IPadContent view in WorkbenchSingleton.Workbench.PadContentCollection) {
                if (view is IMementoCapable) {
                    XmlElement el = doc.CreateElement("ViewMemento");
                    el.SetAttribute ("Id", view.Id);
                    el.AppendChild(((IMementoCapable)view).CreateMemento().ToXmlElement(doc));
                    viewsnode.AppendChild(el);
                }
            }

            IProperties properties = new DefaultProperties();
            string name = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow == null ? String.Empty : WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName;
            properties.SetProperty("ActiveWindow", name == null ? String.Empty : name);
            properties.SetProperty("ActiveConfiguration", combine.ActiveConfiguration == null ? String.Empty : combine.ActiveConfiguration.Name);

            XmlElement propertynode = doc.CreateElement("Properties");
            doc.DocumentElement.AppendChild(propertynode);

            propertynode.AppendChild(properties.ToXmlElement(doc));

            fileUtilityService.ObservedSave(new NamedFileOperationDelegate(doc.Save), directory + Path.DirectorySeparatorChar + combine.Name + ".xml", FileErrorPolicy.ProvideAlternative);
        }
예제 #12
0
 internal void SetParentCombine(Combine combine)
 {
     parentCombine = combine;
 }
예제 #13
0
 public virtual void GenerateMakefiles(Combine parentCombine)
 {
 }
 public void WriteCombine(XmlWriter writer, Combine combine)
 {
     this.combine = combine;
     DataItem data = (DataItem) serializer.Serialize (combine, typeof(Combine));
     Write (writer, data);
 }
 public CombineReaderV1(DataSerializer serializer, IProgressMonitor monitor)
 {
     this.serializer = serializer;
     this.file = serializer.SerializationContext.BaseFile;
     combine = new Combine ();
     combine.FileName = file;
     this.monitor = monitor;
 }
 public CombineBuildOptionsWidget(IProperties CustomizationObject)
     : base("Base.glade", "CombineBuildOptions")
 {
     this.combine = (Combine)((IProperties)CustomizationObject).GetProperty("Combine");
     outputDirButton.Filename = combine.OutputDirectory + System.IO.Path.DirectorySeparatorChar;
 }
        public string CreateEntry(ProjectCreateInformation projectCreateInformation, string defaultLanguage)
        {
            Combine newCombine     = new Combine();
            string  newCombineName = Runtime.StringParserService.Parse(name, new string[,] {
                {"ProjectName", projectCreateInformation.ProjectName}
            });

            newCombine.Name = newCombineName;

            string oldCombinePath = projectCreateInformation.CombinePath;
            string oldProjectPath = projectCreateInformation.ProjectBasePath;
            if (relativeDirectory != null && relativeDirectory.Length > 0 && relativeDirectory != ".") {
                projectCreateInformation.CombinePath     = projectCreateInformation.CombinePath + Path.DirectorySeparatorChar + relativeDirectory;
                projectCreateInformation.ProjectBasePath = projectCreateInformation.CombinePath + Path.DirectorySeparatorChar + relativeDirectory;
                if (!Directory.Exists(projectCreateInformation.CombinePath)) {
                    Directory.CreateDirectory(projectCreateInformation.CombinePath);
                }
                if (!Directory.Exists(projectCreateInformation.ProjectBasePath)) {
                    Directory.CreateDirectory(projectCreateInformation.ProjectBasePath);
                }
            }

            // Create sub projects
            foreach (ICombineEntryDescriptor entryDescriptor in entryDescriptors) {
                newCombine.AddEntry (entryDescriptor.CreateEntry (projectCreateInformation, defaultLanguage), null);
            }

            projectCreateInformation.CombinePath = oldCombinePath;
            projectCreateInformation.ProjectBasePath = oldProjectPath;

            // Save combine
            using (IProgressMonitor monitor = Runtime.TaskService.GetSaveProgressMonitor ()) {
                string combineLocation = Runtime.FileUtilityService.GetDirectoryNameWithSeparator(projectCreateInformation.CombinePath) + newCombineName + ".mds";
                if (File.Exists(combineLocation)) {
                    IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
                    if (messageService.AskQuestion(String.Format (GettextCatalog.GetString ("Solution file {0} already exists, do you want to overwrite\nthe existing file ?"), combineLocation))) {
                        newCombine.Save (combineLocation, monitor);
                    }
                } else {
                    newCombine.Save (combineLocation, monitor);
                }

                newCombine.Dispose();
                return combineLocation;
            }
        }
 public CombineEntry CreateCombine(Combine parentCombine)
 {
     return CreateCombineEntry (parentCombine, true);
 }
 public CombineEventArgs(Combine combine)
 {
     this.combine = combine;
 }
 public CombineEntry CreateProject(Combine parentCombine)
 {
     return CreateCombineEntry (parentCombine, false);
 }
 public static CombineTestGroup CreateTest(Combine c)
 {
     return new CombineTestGroup (c);
 }
        void backgroundLoadCombine(object arg)
        {
            object[] data = (object[]) arg;
            string filename = data[0] as string;
            IProgressMonitor monitor = data [1] as IProgressMonitor;

            try {
                if (!fileUtilityService.TestFileExists(filename)) {
                    monitor.ReportError (string.Format (GettextCatalog.GetString ("File not found: {0}"), filename), null);
                    return;
                }

                string validcombine = Path.ChangeExtension (filename, ".mds");

                if (Path.GetExtension (filename).ToLower() != ".mds") {
                    if (File.Exists (validcombine))
                        filename = validcombine;
                } else if (Path.GetExtension (filename).ToLower () != ".cmbx") {
                    if (File.Exists (Path.ChangeExtension (filename, ".cmbx")))
                        filename = Path.ChangeExtension (filename, ".cmbx");
                }

                CombineEntry entry = ReadFile (filename, monitor);
                if (!(entry is Combine)) {
                    Combine loadingCombine = new Combine();
                    loadingCombine.Entries.Add (entry);
                    loadingCombine.Name = entry.Name;
                    loadingCombine.Save (validcombine, monitor);
                    entry = loadingCombine;
                }

                openCombine = (Combine) entry;

                Runtime.FileService.RecentOpen.AddLastProject (filename, openCombine.Name);

                openCombine.FileAddedToProject += new ProjectFileEventHandler (NotifyFileAddedToProject);
                openCombine.FileRemovedFromProject += new ProjectFileEventHandler (NotifyFileRemovedFromProject);
                openCombine.FileRenamedInProject += new ProjectFileRenamedEventHandler (NotifyFileRenamedInProject);
                openCombine.FileChangedInProject += new ProjectFileEventHandler (NotifyFileChangedInProject);
                openCombine.ReferenceAddedToProject += new ProjectReferenceEventHandler (NotifyReferenceAddedToProject);
                openCombine.ReferenceRemovedFromProject += new ProjectReferenceEventHandler (NotifyReferenceRemovedFromProject);

                SearchForNewFiles ();

                parserDatabase.Load (openCombine);
                OnCombineOpened (new CombineEventArgs(openCombine));

                Runtime.DispatchService.GuiDispatch (new StatefulMessageHandler (RestoreCombinePreferences), CurrentOpenCombine);

                SaveCombine ();
                monitor.ReportSuccess (GettextCatalog.GetString ("Combine loaded."));
            } catch (Exception ex) {
                monitor.ReportError ("Load operation failed.", ex);
            } finally {
                monitor.Dispose ();
            }
        }
 void RefreshCombo(Combine combine)
 {
     ((Gtk.ListStore)combo.Model).Clear ();
     combo.Sensitive = true;
     int active = 0;
     for (int n=0; n < combine.Configurations.Count; n++) {
         IConfiguration c = combine.Configurations [n];
         combo.AppendText (c.Name);
         if (combine.ActiveConfiguration == c)
             active = n;
     }
     combo.Active = active;
     combo.ShowAll ();
 }
        CombineEntry CreateCombineEntry(Combine parentCombine, bool createCombine)
        {
            CombineEntry res = null;
            NewProjectDialog npdlg = new NewProjectDialog (createCombine);
            if (npdlg.Run () == (int) Gtk.ResponseType.Ok) {
                IProgressMonitor monitor = Runtime.TaskService.GetLoadProgressMonitor ();
                try {
                    if (createCombine)
                        res = parentCombine.AddEntry (npdlg.NewCombineLocation, monitor);
                    else
                        res = parentCombine.AddEntry (npdlg.NewProjectLocation, monitor);
                }
                catch {
                    Runtime.MessageService.ShowError (string.Format (GettextCatalog.GetString ("The file '{0}' could not be loaded."), npdlg.NewProjectLocation));
                    res = null;
                }
                monitor.Dispose ();
            }

            npdlg = null;

            if (res != null)
                SaveCombine ();

            return res;
        }
 public override void GenerateMakefiles(Combine parentCombine)
 {
     Runtime.LoggingService.Info ("Generating makefiles for " + Name);
     languageBinding.GenerateMakefile (this, parentCombine);
 }
        public void GenerateMakefile(Project project, Combine parentCombine)
        {
            StreamWriter stream = new StreamWriter (Path.Combine (project.BaseDirectory, "Makefile." + project.Name.Replace (" ", "")));

            DotNetProjectConfiguration conf = (DotNetProjectConfiguration) project.ActiveConfiguration;
            CSharpCompilerParameters compilerparameters = (CSharpCompilerParameters) conf.CompilationParameters;

            string outputName = conf.CompiledOutputName;

            string target = "";
            string relativeOutputDir = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, parentCombine.OutputDirectory);

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

            ArrayList compile_files = new ArrayList ();
            ArrayList pkg_references = new ArrayList ();
            ArrayList assembly_references = new ArrayList ();
            ArrayList project_references = new ArrayList ();
            ArrayList system_references = new ArrayList ();
            ArrayList resources = new ArrayList ();

            foreach (ProjectFile finfo in project.ProjectFiles) {
                if (finfo.Subtype != Subtype.Directory) {
                    switch (finfo.BuildAction) {
                    case BuildAction.Compile:
                        string rel_path = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (finfo.Name));
                        if (CanCompile (finfo.Name));
                        compile_files.Add (Path.Combine (rel_path, Path.GetFileName (finfo.Name)));
                        break;

                    case BuildAction.EmbedAsResource:
                        string resource_rel_path = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (finfo.Name));
                        resources.Add (Path.Combine (resource_rel_path, Path.GetFileName (finfo.Name)));
                        break;
                    }
                }
            }

            foreach (ProjectReference lib in project.ProjectReferences) {
                switch (lib.ReferenceType) {
                case ReferenceType.Gac:
                    string pkg = Runtime.SystemAssemblyService.GetPackageFromFullName (lib.Reference);
                    if (pkg.Trim () == String.Empty)
                        continue;
                    if (pkg == "MONO-SYSTEM") {
                        system_references.Add (Path.GetFileName (lib.GetReferencedFileName ()));
                    } else if (!pkg_references.Contains (pkg)) {
                        pkg_references.Add (pkg);
                    }
                    break;
                case ReferenceType.Assembly:
                    string assembly_fileName = lib.GetReferencedFileName ();
                    string rel_path_to = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (assembly_fileName));
                    assembly_references.Add (Path.Combine (rel_path_to, Path.GetFileName (assembly_fileName)));
                    break;
                case ReferenceType.Project:
                    //string project_fileName = lib.GetReferencedFileName ();
                    IProjectService prjService = (IProjectService)ServiceManager.GetService (typeof (IProjectService));
                    CombineEntryCollection allProjects = prjService.CurrentOpenCombine.GetAllProjects();

                    foreach (Project projectEntry in allProjects) {
                        if (projectEntry.Name == lib.Reference) {
                            string project_base_dir = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, projectEntry.BaseDirectory);

                            string project_output_fileName = projectEntry.GetOutputFileName ();
                            project_references.Add (Path.Combine (project_base_dir, Path.GetFileName (project_output_fileName)));
                        }
                    }
                    break;
                }
            }

            stream.WriteLine ("# This makefile is autogenerated by MonoDevelop");
            stream.WriteLine ("# Do not modify this file");
            stream.WriteLine ();
            stream.WriteLine ("SOURCES = \\");
            for (int i = 0; i < compile_files.Count; i++) {
                stream.Write (((string)compile_files[i]).Replace (" ", "\\ "));
                if (i != compile_files.Count - 1)
                    stream.WriteLine (" \\");
                else
                    stream.WriteLine ();
            }
            stream.WriteLine ();

            if (resources.Count > 0) {
                stream.WriteLine ("RESOURCES = \\");
                for (int i = 0; i < resources.Count; i++) {
                    stream.Write (((string)resources[i]).Replace (" ", "\\ "));
                    if (i != resources.Count - 1)
                        stream.WriteLine (" \\");
                    else
                        stream.WriteLine ();
                }
                stream.WriteLine ();
                stream.WriteLine ("RESOURCES_BUILD = $(foreach res,$(RESOURCES), $(addprefix -resource:,$(res)),$(notdir $(res)))");
                stream.WriteLine ();
            }

            if (pkg_references.Count > 0) {
                stream.WriteLine ("PKG_REFERENCES = \\");
                for (int i = 0; i < pkg_references.Count; i++) {
                    stream.Write (pkg_references[i]);
                    if (i != pkg_references.Count - 1)
                        stream.WriteLine (" \\");
                    else
                        stream.WriteLine ();
                }

                stream.WriteLine ();
                stream.WriteLine ("PKG_REFERENCES_BUILD = $(addprefix -pkg:, $(PKG_REFERENCES))");
                stream.WriteLine ();
                stream.WriteLine ("PKG_REFERENCES_CHECK = $(addsuffix .pkgcheck, $(PKG_REFERENCES))");
                stream.WriteLine ();
            }

            if (system_references.Count > 0) {
                stream.WriteLine ("SYSTEM_REFERENCES = \\");
                for (int i = 0; i < system_references.Count; i++) {
                    stream.Write (system_references[i]);
                    if (i != system_references.Count - 1)
                        stream.WriteLine (" \\");
                    else
                        stream.WriteLine ();
                }
                stream.WriteLine ();
                stream.WriteLine ("SYSTEM_REFERENCES_BUILD = $(addprefix -r:, $(SYSTEM_REFERENCES))");
                stream.WriteLine ();
                stream.WriteLine ("SYSTEM_REFERENCES_CHECK = $(addsuffix .check, $(SYSTEM_REFERENCES))");
                stream.WriteLine ();
            }

            if (assembly_references.Count > 0) {
                stream.WriteLine ("ASSEMBLY_REFERENCES = \\");
                for (int i = 0; i < assembly_references.Count; i++) {
                    stream.Write ("\"" + assembly_references[i] + "\"");
                    if (i != assembly_references.Count - 1)
                        stream.WriteLine (" \\");
                    else
                        stream.WriteLine ();
                }

                stream.WriteLine ();
                stream.WriteLine ("ASSEMBLY_REFERENCES_BUILD = $(addprefix -r:, $(ASSEMBLY_REFERENCES))");
                stream.WriteLine ();
            }

            if (project_references.Count > 0) {
                stream.WriteLine ("PROJECT_REFERENCES = \\");
                for (int i = 0; i < project_references.Count; i++) {
                    stream.Write ("\"" + project_references[i] + "\"");
                    if (i != project_references.Count - 1)
                        stream.WriteLine (" \\");
                    else
                        stream.WriteLine ();
                }

                stream.WriteLine ();
                stream.WriteLine ("PROJECT_REFERENCES_BUILD = $(addprefix -r:, $(PROJECT_REFERENCES))");
                stream.WriteLine ();
            }

            stream.WriteLine ("COMPILER = mcs");
            stream.Write ("COMPILER_OPTIONS = ");
            if (compilerparameters.UnsafeCode) {
                stream.Write ("-unsafe ");
            }
            if (compilerparameters.DefineSymbols != null && compilerparameters.DefineSymbols.Length > 0) {
                stream.Write ("-define:" + '"' + compilerparameters.DefineSymbols + '"' + " ");
            }
            if (compilerparameters.MainClass != null && compilerparameters.MainClass.Length > 0) {
                stream.Write ("-main:" + compilerparameters.MainClass + " ");
            }
            stream.WriteLine ();
            stream.WriteLine ();

            stream.WriteLine ("all: " + outputName);
            stream.WriteLine ();

            stream.Write (outputName + ": $(SOURCES)");
            if (resources.Count > 0) {
                stream.WriteLine (" $(RESOURCES)");
            } else {
                stream.WriteLine ();
            }

            stream.Write ("\t$(COMPILER) $(COMPILER_OPTIONS) -target:{0} -out:\"{1}\"", target, outputName);
            if (resources.Count > 0) {
                stream.Write (" $(RESOURCES_BUILD)");
            }
            if (pkg_references.Count > 0) {
                stream.Write (" $(PKG_REFERENCES_BUILD)");
            }
            if (assembly_references.Count > 0) {
                stream.Write (" $(ASSEMBLY_REFERENCES_BUILD)");
            }
            if (project_references.Count > 0) {
                stream.Write (" $(PROJECT_REFERENCES_BUILD)");
            }
            if (system_references.Count > 0) {
                stream.Write (" $(SYSTEM_REFERENCES_BUILD)");
            }
            stream.WriteLine (" $(SOURCES) \\");
            stream.WriteLine ("\t&& cp \"{0}\" {1}/.", outputName, relativeOutputDir);

            stream.WriteLine ();
            stream.WriteLine ("clean:");
            stream.WriteLine ("\trm -f {0}", outputName);
            stream.WriteLine ();

            stream.Write ("depcheck: ");
            if (pkg_references.Count > 0) {
                stream.Write ("PKG_depcheck ");
            }
            if (system_references.Count > 0) {
                stream.Write ("SYSTEM_depcheck");
            }
            stream.WriteLine ();
            stream.WriteLine ();
            if (pkg_references.Count > 0) {
                stream.WriteLine ("PKG_depcheck: $(PKG_REFERENCES_CHECK)");
                stream.WriteLine ();
                stream.WriteLine ("%.pkgcheck:");
                stream.WriteLine ("\t@echo -n Checking for package $(subst .pkgcheck,,$@)...");
                stream.WriteLine ("\t@if pkg-config --libs $(subst .pkgcheck,,$@) &> /dev/null; then \\");
                stream.WriteLine ("\t\techo yes; \\");
                stream.WriteLine ("\telse \\");
                stream.WriteLine ("\t\techo no; \\");
                stream.WriteLine ("\t\texit 1; \\");
                stream.WriteLine ("\tfi");
                stream.WriteLine ();
            }

            if (system_references.Count > 0) {
                stream.WriteLine ("SYSTEM_depcheck: $(SYSTEM_REFERENCES_CHECK)");
                stream.WriteLine ();
                stream.WriteLine ("%.check:");
                stream.WriteLine ("\t@echo -n Checking for $(subst .check,,$@)...");
                stream.WriteLine ("\t@if [ ! -e `pkg-config --variable=libdir mono`/mono/1.0/$(subst .check,,$@) ]; then \\");
                stream.WriteLine ("\t\techo no; \\");
                stream.WriteLine ("\t\texit 1; \\");
                stream.WriteLine ("\telse \\");
                stream.WriteLine ("\t\techo yes; \\");
                stream.WriteLine ("\tfi");
            }

            stream.Flush ();
            stream.Close ();
        }
 internal void SetCombine(Combine combine)
 {
     if (entryName != null)
         Entry = combine.Entries [entryName];
 }
        protected void GetProjectAndCombineFromFile(string fileName, out Project project, out Combine combine)
        {
            combine = Runtime.ProjectService.CurrentOpenCombine;
            project = null;

            if (combine != null)
            {
                foreach (Project projectaux in combine.GetAllProjects())
                {
                    if (projectaux.IsFileInProject (fileName))
                        project = projectaux;
                }
            }
        }
 public void GenerateMakefile(Project project, Combine parentCombine)
 {
     compilerManager.GenerateMakefile (project, parentCombine);
 }
 public void GenerateMakefile(IProject project, Combine parentCombine)
 {
     throw new NotImplementedException ();
 }