private void ShowInstallError(InstallResult installResult)
        {
            string msg = string.Format(
                "Failed to install {0}.\n\n{1}",
                tDebugLaunchOptions.AppId,
                ResourcesInstallMessage.ResourceManager.GetString(installResult.ToString()));

            VsPackage.ShowMessage(MessageDialogType.Error, null, msg);
        }
Example #2
0
 private void ShowWarning(string message)
 {
     VsPackage.ShowMessage(MessageDialogType.Warning, null, message);
 }
Example #3
0
 private void ShowError(string message)
 {
     VsPackage.ShowMessage(MessageDialogType.Error, null, message);
 }
        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);
        }