public bool CanDeploy (SolutionItem entry, MakefileType type) { Project project = entry as Project; if ( project == null ) return false; if ( FindSetupForProject ( project ) == null ) return false; return true; }
public bool CanDeploy(SolutionItem entry) { MakefileType mt = generateAutotools ? MakefileType.AutotoolsMakefile : MakefileType.SimpleMakefile; IMakefileHandler handler = AutotoolsContext.GetMakefileHandler(entry, mt); return(handler != null); }
public AutotoolsContext(DeployContext deployContext, string base_directory, string[] configs, MakefileType type) { this.deployContext = deployContext; template_dir = Path.Combine(Path.GetDirectoryName(typeof(AutotoolsContext).Assembly.Location), "templates"); base_dir = base_directory; configurations = configs; makefileType = type; }
// TODO: add an extension point with which addins can implement // autotools functionality. public static IMakefileHandler GetMakefileHandler (SolutionItem entry, MakefileType mt) { foreach (IMakefileHandler mh in AddinManager.GetExtensionObjects ("/MonoDevelop/Autotools/MakefileHandlers", typeof(IMakefileHandler), true)) { if (mh.CanDeploy (entry, mt)) return mh; } return null; }
public bool CanDeploy(SolutionFolderItem entry, MakefileType type) { Project project = entry as Project; if (project == null) { return(false); } if (FindSetupForProject(project) == null) { return(false); } return(true); }
// Recurses into children and tests if they are deployable. public bool CanDeploy(SolutionItem entry, MakefileType type) { return(entry is SolutionFolder); }
// Recurses into children and tests if they are deployable. public bool CanDeploy (SolutionFolderItem entry, MakefileType type) { return entry is SolutionFolder; }
public bool CanDeploy(SolutionFolderItem entry, MakefileType type) { return(entry is TranslationProject); }
public bool GenerateFiles(DeployContext ctx, Solution solution, string defaultConf, IProgressMonitor monitor) { string filesString = generateAutotools ? "Autotools files" : "Makefiles"; monitor.BeginTask(GettextCatalog.GetString("Generating {0} for Solution {1}", filesString, solution.Name), 1); try { solution_dir = Path.GetDirectoryName(solution.FileName); string[] configs = new string [solution.Configurations.Count]; for (int ii = 0; ii < configs.Length; ii++) { configs [ii] = solution.Configurations[ii].Id; } MakefileType mt = generateAutotools ? MakefileType.AutotoolsMakefile : MakefileType.SimpleMakefile; context = new AutotoolsContext(ctx, solution_dir, configs, mt); context.TargetSolution = solution; context.Switches = switchs; IMakefileHandler handler = AutotoolsContext.GetMakefileHandler(solution.RootFolder, mt); if (handler == null) { throw new Exception(GettextCatalog.GetString("MonoDevelop does not currently support generating {0} for one (or more) child projects.", filesString)); } solution_name = solution.Name; solution_version = AutotoolsContext.EscapeStringForAutoconf(solution.Version, true); if (string.IsNullOrEmpty(solution_version)) { solution_version = "0.1"; } Makefile makefile = handler.Deploy(context, solution.RootFolder, monitor); string path = Path.Combine(solution_dir, "Makefile"); if (generateAutotools) { context.AddAutoconfFile(path); CreateAutoGenDotSH(context, monitor); CreateConfigureDotAC(solution, defaultConf, monitor, context); CreateMacros(); } else { CreateConfigureScript(solution, defaultConf, context, monitor); monitor.Log.WriteLine(GettextCatalog.GetString("Creating rules.make")); string rules_make_path = Path.Combine(solution_dir, "rules.make"); File.Copy(Path.Combine(context.TemplateDir, "rules.make"), rules_make_path, true); context.AddGeneratedFile(rules_make_path); } CreateMakefileInclude(context, monitor); AddTopLevelMakefileVars(makefile, monitor); if (generateAutotools) { path = path + ".am"; } StreamWriter writer = new StreamWriter(path); makefile.Write(writer); writer.Close(); context.AddGeneratedFile(path); monitor.ReportSuccess(GettextCatalog.GetString("{0} were successfully generated.", filesString)); monitor.Step(1); } catch (Exception e) { monitor.ReportError(GettextCatalog.GetString("{0} could not be generated: ", filesString), e); LoggingService.LogError(GettextCatalog.GetString("{0} could not be generated: ", filesString), e); DeleteGeneratedFiles(context); return(false); } finally { monitor.EndTask(); } return(true); }
public bool CanDeploy(MonoDevelop.Projects.SolutionItem entry, MakefileType type) { return(entry is ValaProject); }
public AutotoolsContext (DeployContext deployContext, string base_directory, string[] configs, MakefileType type) { this.deployContext = deployContext; template_dir = Path.Combine (Path.GetDirectoryName (typeof ( AutotoolsContext ).Assembly.Location), "templates"); base_dir = base_directory; configurations = configs; makefileType = type; }
public bool CanDeploy (SolutionItem entry, MakefileType type) { return entry is TranslationProject; }
public bool CanDeploy (MonoDevelop.Projects.SolutionItem entry, MakefileType type) { return entry is ValaProject; }