// To enable unit testing public virtual PlatformVersionInfo GetVersionInfo() { var installedVersions = VersionProviderHelper.GetVersionsFromDirectory( PythonConstants.InstalledPythonVersionsDir); return(PlatformVersionInfo.CreateOnDiskVersionInfo(installedVersions, DefaultOnDiskVersion)); }
// 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)); }
// 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); }
public PlatformVersionInfo GetVersionInfo() { var version = _defaultVersion; if (version == null) { version = PhpVersions.Php73Version; } return(PlatformVersionInfo.CreateOnDiskVersionInfo(_supportedPhpVersions, version)); }
// To enable unit testing public virtual PlatformVersionInfo GetVersionInfo() { if (this.platformVersionInfo == null) { this.platformVersionInfo = this.GetAvailableVersionsFromStorage( platformName: "nodejs", versionMetadataElementName: "Version"); } return(this.platformVersionInfo); }
public PlatformVersionInfo GetVersionInfo() { if (_versionInfo == null) { var installedVersions = VersionProviderHelper.GetVersionsFromDirectory( PhpConstants.InstalledPhpVersionsDir); _versionInfo = PlatformVersionInfo.CreateOnDiskVersionInfo( installedVersions, PhpConstants.DefaultPhpRuntimeVersion); } return(_versionInfo); }
// 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); }
public PlatformVersionInfo GetVersionInfo() { if (this.versionInfo == null) { if (this.options.EnableDynamicInstall) { return(this.sdkStorageVersionProvider.GetVersionInfo()); } this.versionInfo = this.onDiskVersionProvider.GetVersionInfo(); } return(this.versionInfo); }
public PlatformVersionInfo GetVersionInfo() { if (_versionInfo == null) { if (_options.EnableDynamicInstall) { return(_sdkStorageVersionProvider.GetVersionInfo()); } _versionInfo = _onDiskVersionProvider.GetVersionInfo(); } return(_versionInfo); }
//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; } } }
public PlatformVersionInfo GetVersionInfo() { return(PlatformVersionInfo.CreateOnDiskVersionInfo(_supportedNodeVersions, _defaultVersion)); }
public PlatformVersionInfo GetVersionInfo() { return(PlatformVersionInfo.CreateOnDiskVersionInfo(_supportedPhpVersions, PhpVersions.Php73Version)); }
public PlatformVersionInfo GetVersionInfo() { return(PlatformVersionInfo.CreateOnDiskVersionInfo( new[] { PhpConstants.DefaultPhpRuntimeVersion }, defaultVersion: PhpConstants.DefaultPhpRuntimeVersion)); }
public PlatformVersionInfo GetVersionInfo() { return(PlatformVersionInfo.CreateOnDiskVersionInfo( new[] { NodeConstants.NodeLtsVersion }, defaultVersion: NodeConstants.NodeLtsVersion)); }