This commit is contained in:
Jake Friedman 2021-05-02 14:13:40 -07:00 коммит произвёл GitHub
Родитель 260c61c565 e7abf5bee7
Коммит 798676631c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 26 добавлений и 16 удалений

Просмотреть файл

@ -15,6 +15,15 @@ Param
[Parameter(ParameterSetName = 'CreateZip', Mandatory = $false)][string]$TempDir = $env:FO_SERVICEZIP_TEMP_DIR
)
if ($null -ne $($env:VERSIONSUFFIXVPACK))
{
$version = "$($env:VERSIONPREFIX)$($env:VERSIONSUFFIXVPACK)"
}
else
{
$version = "$($env:VERSIONPREFIX)"
}
if ($PSCmdlet.ParameterSetName -eq "CreateInstallScript")
{
[string]$randString = Get-Random
@ -26,15 +35,6 @@ if ($PSCmdlet.ParameterSetName -eq "CreateInstallScript")
Write-Host "Using $tmpdir as temporary directory."
if ($null -ne $($env:VERSIONSUFFIXVPACK))
{
$version = "$($env:VERSIONPREFIX)$($env:VERSIONSUFFIXVPACK)"
}
else
{
$version = "$($env:VERSIONPREFIX)"
}
# copy install scripts to temp dir
$installdir = Join-Path $PSScriptRoot "../../install"
if ($BuildOS -eq "win")

Просмотреть файл

@ -239,6 +239,16 @@ namespace Microsoft.FactoryOrchestrator.UWP
CloseButtonText = $"Disconnect from {Client.IpAddress}"
};
var popups = Windows.UI.Xaml.Media.VisualTreeHelper.GetOpenPopups(Window.Current);
foreach (var popup in popups)
{
var child = popup.Child as ContentDialog;
if (child != null)
{
child.Hide();
}
}
resultTask = errorDialog.ShowAsync();
});

Просмотреть файл

@ -802,12 +802,12 @@ namespace Microsoft.FactoryOrchestrator.Service
throw new FactoryOrchestratorException(string.Format(CultureInfo.CurrentCulture, Resources.WindowsOnlyError, "TerminateApp"));
}
var apps = WDPHelpers.GetInstalledAppPackagesAsync("localhost", GetWdpHttpPort()).Result;
var apps = WDPHelpers.GetInstalledAppPackagesAsync("localhost", FOService.GetWdpHttpPort()).Result;
var app = apps.Packages.Where(x => x.AppId.Equals(aumid, StringComparison.OrdinalIgnoreCase)).DefaultIfEmpty(null).FirstOrDefault();
if (app != null)
{
WDPHelpers.CloseAppWithWDP(app.FullName, "localhost", GetWdpHttpPort()).Wait();
WDPHelpers.CloseAppWithWDP(app.FullName, "localhost", FOService.GetWdpHttpPort()).Wait();
}
FOService.Instance.ServiceLogger.LogDebug($"{Resources.Finish}: TerminateApp {aumid}");
@ -1014,7 +1014,7 @@ namespace Microsoft.FactoryOrchestrator.Service
}
}
WDPHelpers.InstallAppWithWDP(appPackagePath, dependentPackages, certificateFile, "localhost", GetWdpHttpPort()).Wait();
WDPHelpers.InstallAppWithWDP(appPackagePath, dependentPackages, certificateFile, "localhost", FOService.GetWdpHttpPort()).Wait();
FOService.Instance.ServiceLogger.LogDebug($"{Resources.Finish}: InstallApp {appPackagePath}");
}
@ -1037,7 +1037,7 @@ namespace Microsoft.FactoryOrchestrator.Service
}
// Get installed packages on the system
var apps = WDPHelpers.GetInstalledAppPackagesAsync("localhost", GetWdpHttpPort()).Result;
var apps = WDPHelpers.GetInstalledAppPackagesAsync("localhost", FOService.GetWdpHttpPort()).Result;
List<string> aumids = apps.Packages.Select(x => x.AppId).ToList();
@ -1063,7 +1063,7 @@ namespace Microsoft.FactoryOrchestrator.Service
}
// Get installed packages on the system
var apps = WDPHelpers.GetInstalledAppPackagesAsync("localhost", GetWdpHttpPort()).Result;
var apps = WDPHelpers.GetInstalledAppPackagesAsync("localhost", FOService.GetWdpHttpPort()).Result;
FOService.Instance.ServiceLogger.LogDebug($"{Resources.Finish}: GetInstalledAppsDetailed");
return apps.Packages;
@ -1244,7 +1244,7 @@ namespace Microsoft.FactoryOrchestrator.Service
try
{
FOService.Instance.ServiceLogger.LogDebug($"{Resources.Start}: GetWdpHttpPort");
int ret = GetWdpHttpPort();
int ret = FOService.GetWdpHttpPort();
FOService.Instance.ServiceLogger.LogDebug($"{Resources.Finish}: GetWdpHttpPort");
return ret;
}

Просмотреть файл

@ -412,7 +412,7 @@ namespace Microsoft.FactoryOrchestrator.Service
/// This is called before every WDP operation as the Factory Orchestrator service usually starts before WDP on boot and WDP can use a dynamic port on Desktop.
/// </summary>
/// <returns>The HTTP port.</returns>
private static int GetWdpHttpPort()
internal static int GetWdpHttpPort()
{
using (var osdata = Registry.LocalMachine.OpenSubKey(@"OSDATA\SOFTWARE\Microsoft\Windows\CurrentVersion\WebManagement\Service", false))
{