IsAppInstalled() public static method

public static IsAppInstalled ( string packageFamilyName, ConnectInfo connectInfo ) : bool
packageFamilyName string
connectInfo ConnectInfo
return bool
示例#1
0
 private void InstallAppOnDevicesList(string buildPath, string appName, bool uninstallBeforeInstall, string[] targetList)
 {
     string[] IPlist = ParseIPList(BuildDeployPrefs.TargetIPs);
     for (int i = 0; i < IPlist.Length; i++)
     {
         try
         {
             bool   completedUninstall = false;
             string IP = FinalizeIP(IPlist[i]);
             if (BuildDeployPrefs.FullReinstall &&
                 BuildDeployPortal.IsAppInstalled(appName, new BuildDeployPortal.ConnectInfo(IP, BuildDeployPrefs.DeviceUser, BuildDeployPrefs.DevicePassword)))
             {
                 EditorUtility.DisplayProgressBar("Installing on devices", "Uninstall (" + IP + ")", (float)i / (float)IPlist.Length);
                 if (!UninstallApp(appName, IP))
                 {
                     Debug.LogError("Uninstall failed - skipping install (" + IP + ")");
                     continue;
                 }
                 completedUninstall = true;
             }
             EditorUtility.DisplayProgressBar("Installing on devices", "Install (" + IP + ")", (float)(i + (completedUninstall ? 0.5f : 0.0f)) / (float)IPlist.Length);
             InstallApp(buildPath, appName, IP);
         }
         catch (Exception ex)
         {
             Debug.LogError(ex.ToString());
         }
     }
     EditorUtility.ClearProgressBar();
 }
        private void InstallAppOnDevicesList(string buildPath, string[] targetList)
        {
            string packageFamilyName = CalcPackageFamilyName();

            if (string.IsNullOrEmpty(packageFamilyName))
            {
                return;
            }

            for (int i = 0; i < targetList.Length; i++)
            {
                try
                {
                    bool   completedUninstall = false;
                    string ip = FinalizeIP(targetList[i]);
                    if (BuildDeployPrefs.FullReinstall &&
                        BuildDeployPortal.IsAppInstalled(packageFamilyName, new BuildDeployPortal.ConnectInfo(ip, BuildDeployPrefs.DeviceUser, BuildDeployPrefs.DevicePassword)))
                    {
                        EditorUtility.DisplayProgressBar("Installing on devices", "Uninstall (" + ip + ")", i / (float)targetList.Length);
                        if (!UninstallApp(packageFamilyName, ip))
                        {
                            Debug.LogError("Uninstall failed - skipping install (" + ip + ")");
                            continue;
                        }

                        completedUninstall = true;
                    }

                    EditorUtility.DisplayProgressBar("Installing on devices", "Install (" + ip + ")", (i + (completedUninstall ? 0.5f : 0.0f)) / targetList.Length);
                    InstallApp(buildPath, ip);
                }
                catch (Exception ex)
                {
                    Debug.LogError(ex.ToString());
                }
            }
            EditorUtility.ClearProgressBar();
        }