Пример #1
0
            public LeagueProjectRelease GetLatestRelease()
            {
                LeagueProjectRelease latestRelease = null;

                foreach (LeagueProjectRelease release in this.Releases)
                {
                    uint releaseValue = LeagueInstallation.GetReleaseValue(release.Version);
                    if (latestRelease == null || releaseValue > latestRelease.VersionValue)
                    {
                        latestRelease = release;
                    }
                }
                return(latestRelease);
            }
        public LeagueManager(string managerFolderPath, string gamePath, LeagueRADSDeployRules deployRules)
        {
            _managerFolderPath = managerFolderPath;
            string managerInstallationFolder = GetManagerInstallationFolder(gamePath);

            if (Directory.Exists(gamePath + "/RADS"))
            {
                _installation = new LeagueRADSInstallation(managerInstallationFolder, gamePath, deployRules);
            }
            else
            {
                _installation = new LeagueRawInstallation(managerInstallationFolder, gamePath);
            }
        }
            public LeagueProjectRelease(LeagueProject project, string version)
            {
                this.Project      = project;
                this.Version      = version;
                this.VersionValue = LeagueInstallation.GetReleaseValue(version);
                string manifestPath = this.GetFolder() + "/releasemanifest";

                if (File.Exists(manifestPath))
                {
                    this.GameManifest = new ReleaseManifest(manifestPath);
                }
                else
                {
                    throw new ReleaseManifestNotFoundException();
                }
            }
Пример #4
0
 public LeagueProject(LeagueInstallation installation, string projectName, List <string> releases)
 {
     this.Installation      = installation;
     this.Name              = projectName;
     this.DefaultDeployMode = this.GetDefaultDeployMode();
     foreach (string release in releases)
     {
         try
         {
             this.Releases.Add(new LeagueProjectRelease(this, release));
         }
         catch (LeagueProjectRelease.ReleaseManifestNotFoundException)
         {
         }
     }
     if (this.Releases.Count == 0)
     {
         throw new NoValidReleaseException();
     }
 }
 private string GetFileToInstallPath(string fileFullPath, ReleaseManifest.DeployMode deployMode, uint version)
 {
     if (deployMode == ReleaseManifest.DeployMode.Managed)
     {
         return(String.Format("{0}/managedfiles/{1}/{2}", this.Project.GetFolder(), LeagueInstallation.GetReleaseString(version), fileFullPath));
     }
     else if (deployMode == ReleaseManifest.DeployMode.Deployed)
     {
         return(String.Format("{0}/releases/{1}/deploy/{2}", this.Project.GetFolder(), this.Version, fileFullPath));
     }
     else
     {
         throw new UnsupportedDeployModeException();
     }
 }
 private string GetBackupPath(ReleaseManifest.ReleaseManifestFileEntry fileEntry)
 {
     return(String.Format("{0}lol-manager/backup/{1}/{2}/{3}", AppDomain.CurrentDomain.BaseDirectory, this.Project.Name, LeagueInstallation.GetReleaseString(fileEntry.Version), fileEntry.GetFullPath()));
 }
 public LeagueManager(string gamePath)
 {
     this.Installation = new LeagueInstallation(gamePath);
     this.Installation.LoadOriginalManifests();
     this.DeployRules = new LeagueDeployRules(LeagueFileDeployMode.Managed);
 }