static IEnumerable <FilePair> GetCopyFiles(MonoMacProject project, ConfigurationSelector sel, MonoMacProjectConfiguration conf) { var resDir = conf.AppDirectoryResources; var output = conf.CompiledOutputName; yield return(new FilePair(output, resDir.Combine(output.FileName))); if (conf.DebugMode) { FilePath mdbFile = project.TargetRuntime.GetAssemblyDebugInfoFile(output); if (File.Exists(mdbFile)) { yield return(new FilePair(mdbFile, resDir.Combine(mdbFile.FileName))); } } foreach (FileCopySet.Item s in project.GetSupportFileList(sel)) { yield return(new FilePair(s.Src, resDir.Combine(s.Target))); } foreach (var pf in project.Files) { if (pf.BuildAction == BuildAction.Content) { yield return(new FilePair(pf.FilePath, pf.ProjectVirtualPath.ToAbsolute(resDir))); } } }
BuildResult MergeInfoPlist(IProgressMonitor monitor, MonoMacProject proj, MonoMacProjectConfiguration conf, ProjectFile template, FilePath plistOut) { return(MacBuildUtilities.CreateMergedPlist(monitor, template, plistOut, (PlistDocument doc) => { var result = new BuildResult(); var dict = doc.Root as PlistDictionary; if (dict == null) { doc.Root = dict = new PlistDictionary(); } //required keys that the user is likely to want to modify SetIfNotPresent(dict, "CFBundleName", proj.Name); SetIfNotPresent(dict, "CFBundleIdentifier", "com.yourcompany." + proj.Name); SetIfNotPresent(dict, "CFBundleShortVersionString", proj.Version); SetIfNotPresent(dict, "CFBundleVersion", "1"); SetIfNotPresent(dict, "LSMinimumSystemVersion", "10.6"); SetIfNotPresent(dict, "CFBundleDevelopmentRegion", "English"); //required keys that the user probably should not modify dict["CFBundleExecutable"] = conf.LaunchScript.FileName; SetIfNotPresent(dict, "CFBundleInfoDictionaryVersion", "6.0"); SetIfNotPresent(dict, "CFBundlePackageType", "APPL"); SetIfNotPresent(dict, "CFBundleSignature", "????"); return result; })); }
string GetTarget(MonoMacProject project) { var extension = Options.PackagingSettings.CreatePackage ? ".pkg" : ".app"; var outputFile = project.Name + extension; // If tool was passed a path, we make it the target destination. if (Options.Files.Any()) { var path = Options.Files.First(); if (Directory.Exists(path) && !path.EndsWith(extension)) { // We were passed a destination directory (and it's not really a bundle). return(Path.Combine(path, outputFile)); } else { // We were passed a destination filepath, or something erroneous. Either way, // we continue and report any problem with the target during the build phase. return(path); } } return(outputFile); }
public MonoMacXcodeProjectTracker (MonoMacProject project) : base (project, infoService) { }
static IEnumerable<FilePair> GetCopyFiles (MonoMacProject project, ConfigurationSelector sel, MonoMacProjectConfiguration conf) { var resDir = conf.AppDirectoryResources; var output = conf.CompiledOutputName; yield return new FilePair (output, resDir.Combine (output.FileName)); if (conf.DebugMode) { FilePath mdbFile = project.TargetRuntime.GetAssemblyDebugInfoFile (output); if (File.Exists (mdbFile)) yield return new FilePair (mdbFile, resDir.Combine (mdbFile.FileName)); } foreach (FileCopySet.Item s in project.GetSupportFileList (sel)) yield return new FilePair (s.Src, resDir.Combine (s.Target)); foreach (var pf in project.Files) if (pf.BuildAction == BuildAction.Content) yield return new FilePair (pf.FilePath, pf.ProjectVirtualPath.ToAbsolute (resDir)); }
BuildResult MergeInfoPlist (IProgressMonitor monitor, MonoMacProject proj, MonoMacProjectConfiguration conf, ProjectFile template, FilePath plistOut) { return MacBuildUtilities.CreateMergedPlist (monitor, template, plistOut, (PlistDocument doc) => { var result = new BuildResult (); var dict = doc.Root as PlistDictionary; if (dict == null) doc.Root = dict = new PlistDictionary (); //required keys that the user is likely to want to modify SetIfNotPresent (dict, "CFBundleName", proj.Name); SetIfNotPresent (dict, "CFBundleIdentifier", "com.yourcompany." + proj.Name); SetIfNotPresent (dict, "CFBundleShortVersionString", proj.Version); SetIfNotPresent (dict, "CFBundleVersion", "1"); SetIfNotPresent (dict, "LSMinimumSystemVersion", "10.6"); SetIfNotPresent (dict, "CFBundleDevelopmentRegion", "English"); //required keys that the user probably should not modify dict["CFBundleExecutable"] = conf.LaunchScript.FileName; SetIfNotPresent (dict, "CFBundleInfoDictionaryVersion", "6.0"); SetIfNotPresent (dict, "CFBundlePackageType", "APPL"); SetIfNotPresent (dict, "CFBundleSignature", "????"); return result; }); }
public MonoMacXcodeProjectTracker(MonoMacProject project) : base(project, infoService) { }
public MonoMacCodeBehind(MonoMacProject project) : base(project) { }
string GetTarget (MonoMacProject project) { var extension = Options.PackagingSettings.CreatePackage ? ".pkg" : ".app"; var outputFile = project.Name + extension; // If tool was passed a path, we make it the target destination. if (Options.Files.Any ()) { var path = Options.Files.First (); if (Directory.Exists (path) && !path.EndsWith (extension)) { // We were passed a destination directory (and it's not really a bundle). return Path.Combine (path, outputFile); } else { // We were passed a destination filepath, or something erroneous. Either way, // we continue and report any problem with the target during the build phase. return path; } } return outputFile; }
public MonoMacCodeBehind (MonoMacProject project) : base (project) { }