Fix a few more bugs in 10.1.0
This commit is contained in:
Коммит
798676631c
|
@ -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))
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче