public override void OnAfterExportResource(ProjectBuildProcess process, ProjectResource resource)
 {
     foreach (var buildAction in buildActions)
     {
         buildAction.OnAfterExportResource(process, resource);
     }
 }
Beispiel #2
0
        public void Export(BuildPipeline pipeline, string path)
        {
            Directory.CreateDirectory(path);

            var buildProcess = new ProjectBuildProcess(pipeline, this, path);

            buildProcess.PerformBuild();
        }
        public override void IncludeInBuild(ProjectBuildProcess build, string output)
        {
            string accessPath = Path.Combine(DefinitionFile.Path, IncludePath);
            var    accessFile = new FileInfo(accessPath);

            File.Copy(accessPath, Path.Combine(output, accessFile.Name), true);

            string sha = GetChecksum(accessPath);
        }
Beispiel #4
0
        public void ExportFoldersToDirectory(BuildPipeline pipeline, string path)
        {
            var directoryInfo = new DirectoryInfo(path);

            directoryInfo.Create();

            var buildProcess = new ProjectBuildProcess(pipeline, this, directoryInfo.FullName);

            string folderPath = Path.Combine(directoryInfo.FullName, $"{Definition.Properties.Name}");
            var    archive    = new FileSystemArchive(new DirectoryInfo(folderPath));

            buildProcess.PerformBuild(archive.RootDirectory);
        }
Beispiel #5
0
        public override void IncludeInBuild(ProjectBuildProcess build, string output)
        {
            string accessPath = Path.Combine(DefinitionFile.Path, IncludePath);
            var    accessFile = new FileInfo(accessPath);

            File.Copy(accessPath, Path.Combine(output, accessFile.Name), true);

            string sha = GetChecksum(accessPath);

            build.PackageDefinition.ResourceDependancies.Add(
                accessFile.Name,
                new ResourceDependancyDefinition()
            {
                Name = Name,
                Sha  = sha
            }
                );
        }
Beispiel #6
0
        public void ExportZippedToDirectory(BuildPipeline pipeline, string path)
        {
            var directoryInfo = new DirectoryInfo(path);

            directoryInfo.Create();

            var buildProcess = new ProjectBuildProcess(pipeline, this, directoryInfo.FullName);


            string bpkgPath = Path.Combine(directoryInfo.FullName, $"{Definition.Properties.Name}.bpkg");

            using var fileStream = new FileStream(bpkgPath, FileMode.Create, FileAccess.Write);
            using var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Create, false);

            var archive = new PackedArchive(zipArchive);

            buildProcess.PerformBuild(archive.RootDirectory);
        }
Beispiel #7
0
 public void OnAfterBuildResource(ProjectBuildProcess process, ProjectResource resource)
 {
     DrawBar(ProgressBarLeft, ProgressBarTop, process.Progress, ProgressBarLength, process.Project.Name);
 }
Beispiel #8
0
 public override void OnAfterExportResource(ProjectBuildProcess process, ProjectResource resource)
 {
     DrawBar(ProgressBarLeft, ProgressBarTop, process.Progress, ProgressBarLength, process.Project.Definition.Properties.Name);
 }