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;
        }
Exemplo n.º 2
0
        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());
        }