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); }