示例#1
0
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            var installedVersions = VersionProviderHelper.GetVersionsFromDirectory(
                PythonConstants.InstalledPythonVersionsDir);

            return(PlatformVersionInfo.CreateOnDiskVersionInfo(installedVersions, DefaultOnDiskVersion));
        }
示例#2
0
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            _logger.LogDebug("Getting list of versions from {installDir}", RubyConstants.InstalledRubyVersionsDir);

            var installedVersions = VersionProviderHelper.GetVersionsFromDirectory(
                RubyConstants.InstalledRubyVersionsDir);

            return(PlatformVersionInfo.CreateOnDiskVersionInfo(installedVersions, RubyConstants.RubyLtsVersion));
        }
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            var installedVersions = VersionProviderHelper.GetVersionsFromDirectory(
                NodeConstants.InstalledNodeVersionsDir);

            return(PlatformVersionInfo.CreateOnDiskVersionInfo(
                       installedVersions,
                       NodeConstants.NodeLtsVersion));
        }
示例#4
0
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            this.logger.LogDebug("Getting list of versions from {installDir}", PhpConstants.InstalledPhpVersionsDir);

            var installedVersions = VersionProviderHelper.GetVersionsFromDirectory(
                PhpConstants.InstalledPhpVersionsDir);

            return(PlatformVersionInfo.CreateOnDiskVersionInfo(installedVersions, DefaultOnDiskVersion));
        }
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            // we expect Golang to only be installed using dynamic installation
            this.logger.LogDebug("Getting list of versions from {installDir}", GolangConstants.DynamicInstalledGolangVersionsDir);

            var installedVersions = VersionProviderHelper.GetMajorMinorVersionsFromDirectory(
                GolangConstants.DynamicInstalledGolangVersionsDir);

            return(PlatformVersionInfo.CreateOnDiskVersionInfo(installedVersions, GolangConstants.GolangDefaultVersion));
        }
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            if (_platformVersionInfo == null)
            {
                _platformVersionInfo = GetAvailableVersionsFromStorage(
                    platformName: JavaConstants.PlatformName,
                    versionMetadataElementName: "Version");
            }

            return(_platformVersionInfo);
        }
示例#7
0
            public PlatformVersionInfo GetVersionInfo()
            {
                var version = _defaultVersion;

                if (version == null)
                {
                    version = PhpVersions.Php73Version;
                }

                return(PlatformVersionInfo.CreateOnDiskVersionInfo(_supportedPhpVersions, version));
            }
示例#8
0
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            if (this.platformVersionInfo == null)
            {
                this.platformVersionInfo = this.GetAvailableVersionsFromStorage(
                    platformName: "nodejs",
                    versionMetadataElementName: "Version");
            }

            return(this.platformVersionInfo);
        }
示例#9
0
        public PlatformVersionInfo GetVersionInfo()
        {
            if (_versionInfo == null)
            {
                var installedVersions = VersionProviderHelper.GetVersionsFromDirectory(
                    PhpConstants.InstalledPhpVersionsDir);
                _versionInfo = PlatformVersionInfo.CreateOnDiskVersionInfo(
                    installedVersions,
                    PhpConstants.DefaultPhpRuntimeVersion);
            }

            return(_versionInfo);
        }
示例#10
0
        // To enable unit testing
        public virtual PlatformVersionInfo GetVersionInfo()
        {
            if (_platformVersionInfo == null)
            {
                var installedVersions = VersionProviderHelper.GetVersionsFromDirectory(
                    PythonConstants.InstalledPythonVersionsDir);
                _platformVersionInfo = PlatformVersionInfo.CreateOnDiskVersionInfo(
                    installedVersions,
                    _options.PythonDefaultVersion);
            }

            return(_platformVersionInfo);
        }
示例#11
0
        public PlatformVersionInfo GetVersionInfo()
        {
            if (this.versionInfo == null)
            {
                if (this.options.EnableDynamicInstall)
                {
                    return(this.sdkStorageVersionProvider.GetVersionInfo());
                }

                this.versionInfo = this.onDiskVersionProvider.GetVersionInfo();
            }

            return(this.versionInfo);
        }
示例#12
0
        public PlatformVersionInfo GetVersionInfo()
        {
            if (_versionInfo == null)
            {
                if (_options.EnableDynamicInstall)
                {
                    return(_sdkStorageVersionProvider.GetVersionInfo());
                }

                _versionInfo = _onDiskVersionProvider.GetVersionInfo();
            }

            return(_versionInfo);
        }
示例#13
0
        //http文本读取成功
        private void OnHttpReadTextSuccess(object sender, IEventArgs e)
        {
            HttpResponseSuccessEventArgs ne = (HttpResponseSuccessEventArgs)e;

            if (ne != null)
            {
                if (ne.Url == Path.Combine(GameMode.Resource.ResUpdatePath, _assetPlatformVersionText))
                {
                    PlatformVersionInfo assetPlatform = JsonUtility.FromJson <PlatformVersionInfo>(ne.Content);
                    string platformName = GetPlatformName();
                    if (assetPlatform.Platforms.Contains(platformName))
                    {
                        //更新远程资源的路径
                        GameMode.Resource.ResUpdatePath =
                            Path.Combine(GameMode.Resource.ResUpdatePath, platformName);

                        //读取远程的文本
                        string remotePath = Path.Combine(GameMode.Resource.ResUpdatePath, _assetVersionTxt);
                        GameMode.WebRequest.Get(remotePath).Send();
                    }
                }
                else
                {
                    Debug.Log("CheckResourceState:RemoteVersion:" + ne.Content);
                    _remoteVersion = JsonUtility.FromJson <AssetBundleVersionInfo>(ne.Content);
                    if (_remoteVersion == null)
                    {
                        Debug.LogError("Remote Version is null");
                        return;
                    }

                    //如果资源版本不一样 则更新资源
                    if (!CompareVersion())
                    {
                        //更新资源
                        UpdateResource();
                        //下载资源
                        DownloadResource();
                    }
                    else
                    {
                        Debug.Log("No New Update!");
                    }

                    //资源更新完成
                    _resourceUpdateDone = true;
                }
            }
        }
示例#14
0
 public PlatformVersionInfo GetVersionInfo()
 {
     return(PlatformVersionInfo.CreateOnDiskVersionInfo(_supportedNodeVersions, _defaultVersion));
 }
示例#15
0
 public PlatformVersionInfo GetVersionInfo()
 {
     return(PlatformVersionInfo.CreateOnDiskVersionInfo(_supportedPhpVersions, PhpVersions.Php73Version));
 }
示例#16
0
 public PlatformVersionInfo GetVersionInfo()
 {
     return(PlatformVersionInfo.CreateOnDiskVersionInfo(
                new[] { PhpConstants.DefaultPhpRuntimeVersion },
                defaultVersion: PhpConstants.DefaultPhpRuntimeVersion));
 }
示例#17
0
 public PlatformVersionInfo GetVersionInfo()
 {
     return(PlatformVersionInfo.CreateOnDiskVersionInfo(
                new[] { NodeConstants.NodeLtsVersion },
                defaultVersion: NodeConstants.NodeLtsVersion));
 }