public LeagueRADSProjectRelease GetLatestRelease() { LeagueRADSProjectRelease latestRelease = null; foreach (LeagueRADSProjectRelease release in this.Releases) { uint releaseValue = LeagueRADSInstallation.GetReleaseValue(release.Version); if (latestRelease == null || releaseValue > latestRelease.VersionValue) { latestRelease = release; } } return(latestRelease); }
public string GetFileInstallationPath(string fileFullPath, ReleaseManifestFile.DeployMode deployMode, uint version) { if (deployMode == ReleaseManifestFile.DeployMode.Managed) { return(String.Format("{0}/managedfiles/{1}/{2}", GetFolder(), LeagueRADSInstallation.GetReleaseString(version), fileFullPath)); } else if (deployMode == ReleaseManifestFile.DeployMode.Deployed4 || deployMode == ReleaseManifestFile.DeployMode.Deployed0) { return(String.Format("{0}/releases/{1}/deploy/{2}", GetFolder(), version, fileFullPath)); } else { throw new UnsupportedDeployModeException(); } }
public LeagueRADSProjectRelease(LeagueRADSProject project, string version) { this.Project = project; this.Version = version; this.VersionValue = LeagueRADSInstallation.GetReleaseValue(version); string manifestPath = this.GetFolder() + "/releasemanifest"; if (File.Exists(manifestPath)) { this.GameManifest = new ReleaseManifestFile(manifestPath); } else { throw new ReleaseManifestNotFoundException(); } this.LoadOriginalManifest(); }
public LeagueRADSProject(LeagueRADSInstallation installation, string projectName, List <string> releases) { this.Installation = installation; this.Name = projectName; foreach (string release in releases) { try { this.Releases.Add(new LeagueRADSProjectRelease(this, release)); } catch (LeagueRADSProjectRelease.ReleaseManifestNotFoundException) { } } if (this.Releases.Count == 0) { throw new NoValidReleaseException(); } // Load backup archive if it exists string backupArchivePath = Path.Combine(Installation.ManagerInstallationFolder, Name, "backup.zip"); this.BackupArchive = new LeagueBackupArchive(backupArchivePath); }
private string GetBackupPath(ReleaseManifestFileEntry fileEntry) { return(Path.Combine(LeagueRADSInstallation.GetReleaseString(fileEntry.Version), fileEntry.GetFullPath())); }