public override void CopyFrom(PackageBuilder other) { base.CopyFrom(other); BinariesZipPackageBuilder builder = (BinariesZipPackageBuilder)other; targetFile = builder.targetFile; platform = builder.platform; configuration = builder.configuration; }
public override PackageBuilder[] CreateDefaultBuilders() { List <PackageBuilder> list = new List <PackageBuilder> (); foreach (DeployPlatformInfo plat in DeployService.GetDeployPlatformInfo()) { BinariesZipPackageBuilder pb = (BinariesZipPackageBuilder)Clone(); pb.Platform = plat.Id; string ext = DeployService.GetArchiveExtension(pb.TargetFile); string fn = TargetFile.Substring(0, TargetFile.Length - ext.Length); pb.TargetFile = fn + "-" + plat.Id.ToLower() + ext; list.Add(pb); } return(list.ToArray()); }
public BinariesZipEditorWidget (BinariesZipPackageBuilder builder) { this.Build(); this.builder = builder; loading = true; int pel = 0; platforms = DeployService.GetDeployPlatformInfo (); for (int n=0; n<platforms.Length; n++) { comboPlatform.AppendText (platforms[n].Description); if (platforms[n].Id == builder.Platform) pel = n; } comboPlatform.Active = pel; builder.Platform = platforms [pel].Id; string[] archiveFormats = DeployService.SupportedArchiveFormats; int zel = 1; for (int n=0; n<archiveFormats.Length; n++) { comboZip.AppendText (archiveFormats [n]); if (builder.TargetFile.EndsWith (archiveFormats [n])) zel = n; } if (!string.IsNullOrEmpty (builder.TargetFile)) { string ext = archiveFormats [zel]; folderEntry.Path = System.IO.Path.GetDirectoryName (builder.TargetFile); entryZip.Text = System.IO.Path.GetFileName (builder.TargetFile.Substring (0, builder.TargetFile.Length - ext.Length)); comboZip.Active = zel; } // Fill configurations zel = 0; foreach (string conf in builder.RootSolutionItem.ParentSolution.GetConfigurations ()) { comboConfiguration.AppendText (conf); if (conf == builder.Configuration) comboConfiguration.Active = zel; zel++; } loading = false; }
void RunTestBinariesPackage (string solFile, string[] expectedFiles) { solFile = Util.GetSampleProject (solFile); Solution sol = (Solution) Services.ProjectService.ReadWorkspaceItem (Util.GetMonitor(), solFile); BinariesZipPackageBuilder pb = new BinariesZipPackageBuilder (); pb.SetSolutionItem (sol.RootFolder, sol.GetAllSolutionItems<SolutionItem> ()); pb.TargetFile = GetTempTarFile ("binzip"); pb.Platform = "Linux"; pb.Configuration = "Debug"; if (!DeployService.BuildPackage (Util.GetMonitor (), pb)) Assert.Fail ("Package generation failed"); CheckTarContents (pb.TargetFile, expectedFiles, true); }