private void OnInstallerExited(/*object sender, EventArgs e*/) { //InstallEmulator(); InstallDotnetCliExt(); ToolsPathInfo.StartToolsUpdateMonitor(); StartDeviceMonitor(); }
/// <summary> /// Install packages on the target. /// </summary> /// <param name="packageNames">E.g. "profctl", "heaptrack", "coreprofiler".</param> /// <returns>True iff installed successfully</returns> public bool Install(params string[] packageNames) { if ((packageNames == null) || (packageNames.Length == 0)) { throw new ArgumentException(nameof(packageNames)); } ErrorMessage = ""; var cap = new SDBCapability(_device); string tizenVersion = cap.GetValueByKey("platform_version"); if (!DeployHelper.IsTizenVersionSupported(tizenVersion)) { ErrorMessage = $"The target system platform version {tizenVersion} is not supported"; return(false); } _sdkOnDemandFolder = ToolsPathInfo.GetOnDemandFolderPath(tizenVersion); if (string.IsNullOrEmpty(_sdkOnDemandFolder)) { ErrorMessage = $"Can not find the folder with target packages for version \"{tizenVersion}\""; return(false); } if (!Directory.Exists(_sdkOnDemandFolder)) { ErrorMessage = $"Folder \"{_sdkOnDemandFolder}\" not found"; return(false); } _isSecureProtocol = cap.GetAvailabilityByKey("secure_protocol"); if (_isSecureProtocol) { if (!_supportTarGz) { ErrorMessage = "The target uses secure protocol. Only tar.gz packages are supported for secure targets"; } _supportRpms = false; } _sdkToolPath = cap.GetValueByKey("sdk_toolpath"); _cpuArch = DeployHelper.GetPackageSuffix(cap.GetValueByKey("cpu_arch")); var unavailablePackages = new List <string>(); CheckAvailable(packageNames, unavailablePackages); bool result = true; try { if (unavailablePackages != null) { foreach (string packageName in unavailablePackages) { Version installedVersion = GetInstalledPackageVersion(packageName); if (installedVersion == null) { ErrorMessage = $"Package \"{packageName}\" not found both in \"{_sdkOnDemandFolder}\" and on the target system"; return(false); } } } CheckInstalled(); if (_packages.Any(p => p.Value.NeedToInstall)) { result = InstallPackages(_sdkToolPath + "/on-demand"); } } finally { // } _packages.Clear(); return(result); }
public virtual bool InstallPackage(string tizenVersion, IVsOutputWindowPane outputPane, IVsThreadedWaitDialogFactory dlgFactory /*uint debugTargetTypeId,*/) { this.outputPane = outputPane; if (this.outputPane != null) { this.outputPane.Activate(); } // Check the lldb package was installed in previous or not. // Check lldb.tar.gz extractor. //GetPkgInstalledStatus(out isInstalled); try { // Changed the logic from commanding rpm -qa to ls command to checkout the version. if (!IsPackageInstalled()) { //source = ondemandPath + @"\" + GetLldbPkgName(); // chagned by Sebeom to suport Tizen 4.0 debugger. string onDemandPath = ToolsPathInfo.GetOnDemandFolderPath(tizenVersion); string source = Path.Combine(onDemandPath, GetPackageFileName()); string destination = GetPackageDestinationPath(); string errorMessage; if (!PushPackage(source, destination, out errorMessage)) { ErrorMessage = errorMessage; string msg = "Cannot push package\n" + $"\"{source}\"\n" + "to\n" + $"\"{destination}\"."; if (!String.IsNullOrEmpty(errorMessage)) { if (errorMessage.Contains(source) && errorMessage.Contains(destination)) { msg = errorMessage; } else { msg += "\n\n"; msg += errorMessage; } } VsPackage.ShowMessage(MessageDialogType.Error, null, msg); return(false); } // Install Debug package if (!DeployPackage(destination)) { ErrorMessage = $"Cannot deploy package \"{destination}\""; VsPackage.ShowMessage(MessageDialogType.Error, null, ErrorMessage); return(false); } } } finally { // } return(true); }
protected string GetOnDemandFolderPath() { return(ToolsPathInfo.GetOnDemandFolderPath(_tizenVersion)); }