Пример #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));
        }
Пример #3
0
        // 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));
        }
Пример #5
0
        // 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));
        }
Пример #6
0
        // 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));
 }