From b7c7619ea6ae9f90bcb0122272ae3f4db03aca8d Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Sat, 2 Jul 2016 18:45:50 +0200 Subject: [PATCH 1/8] add Git as dependency to Bower --- res/apps.md | 1 + 1 file changed, 1 insertion(+) diff --git a/res/apps.md b/res/apps.md index 17d62a59..f169b3be 100644 --- a/res/apps.md +++ b/res/apps.md @@ -723,6 +723,7 @@ the right versions of the packages you need and their dependencies. * ID: `Bower` * Typ: `node-package` +* Dependencies: `Git` * Website: * Docs: + npm Package: From 2aaf31d51e41e81c2628c8e95974a25c7ff26458 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Sat, 2 Jul 2016 18:48:43 +0200 Subject: [PATCH 2/8] updated app list --- docs/content/ref/apps.md | 10 +++++----- docs/src-content/ref/apps.md | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/content/ref/apps.md b/docs/content/ref/apps.md index ebf529ce..443dffa1 100644 --- a/docs/content/ref/apps.md +++ b/docs/content/ref/apps.md @@ -29,7 +29,7 @@ weight = 1 | ID | Name | Version | Website | |----|------|---------|---------| | `SvZ` | [7-Zip](#zip) | 16.02 | | -| `ConEmu` | [ConEmu](#conemu) | 16.03.13 | | +| `ConEmu` | [ConEmu](#conemu) | 16.06.19 | | | `InnoUnp` | [Inno Setup Unpacker](#inno-setup-unpacker) | 0.45 | | | `LessMsi` | [Less MSIerables](#less-msierables) | 1.3 | | @@ -82,7 +82,7 @@ weight = 1 | `MinGwGetGui` | [MinGwGetGui](#mingwgetgui) | latest | | | `MySQL` | [MySQL](#mysql) | 5.7.12 | | | `MySQLWB` | [MySQL Workbench](#mysql-workbench) | 6.3.6 | | -| `Node` | [Node.js](#node.js) | 4.4.5 | | +| `Node` | [Node.js](#node.js) | 4.4.6 | | | `Npm` | [NPM](#npm) | >=3.7.0 <4.0.0 | | | `NuGet` | [NuGet](#nuget) | latest | | | `OpenSSL` | [OpenSSL](#openssl) | 1.0.2h | | @@ -208,7 +208,7 @@ weight = 1 * ID: `ConEmu` * Typ: `default` * Website: -* Version: 16.03.13 +* Version: 16.06.19 ### Inno Setup Unpacker @@ -260,7 +260,7 @@ weight = 1 * Typ: `node-package` * Website: * Version: >=1.7.0 <2.0.0 -* Dependencies: `Npm` +* Dependencies: `Git`, `Npm` ### CMake @@ -560,7 +560,7 @@ weight = 1 * ID: `Node` * Typ: `default` * Website: -* Version: 4.4.5 +* Version: 4.4.6 ### NPM diff --git a/docs/src-content/ref/apps.md b/docs/src-content/ref/apps.md index 7f39d4b8..45d97cb1 100644 --- a/docs/src-content/ref/apps.md +++ b/docs/src-content/ref/apps.md @@ -129,7 +129,7 @@ weight = 1 * ID: `ConEmu` * Typ: `default` * Website: -* Version: 16.03.13 +* Version: 16.06.19 ### Inno Setup Unpacker @@ -181,7 +181,7 @@ weight = 1 * Typ: `node-package` * Website: * Version: >=1.7.0 <2.0.0 -* Dependencies: `Npm` +* Dependencies: `Git`, `Npm` ### CMake @@ -481,7 +481,7 @@ weight = 1 * ID: `Node` * Typ: `default` * Website: -* Version: 4.4.5 +* Version: 4.4.6 ### NPM From 0b7ad5262f37c114ff90754fd79258fa58d77af3 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Sat, 2 Jul 2016 18:49:03 +0200 Subject: [PATCH 3/8] fixed typo in home/start.md --- docs/content/home/start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/home/start.md b/docs/content/home/start.md index ff5fa6c8..cc8a9e63 100644 --- a/docs/content/home/start.md +++ b/docs/content/home/start.md @@ -10,6 +10,6 @@ weight = 3 1. Create a folder for Bench. 2. Install Bench with the [install script][bootstrap-file]. 3. Select some apps for your Bench environment. -4. Spend you time working on the next project. +4. Spend your time working on the next project. [bootstrap-file]: https://github.com/mastersign/bench/raw/master/res/bench-install.bat From 766bdf7d3fff363f0dbdd5487e8a79a87978bd68 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Mon, 4 Jul 2016 21:03:04 +0200 Subject: [PATCH 4/8] improved UI performance by loading icon resources asynchronous --- .../BenchDashboard/AppLauncherControl.cs | 48 ++++++----- BenchManager/BenchDashboard/MainForm.cs | 81 ++++++++++--------- 2 files changed, 68 insertions(+), 61 deletions(-) diff --git a/BenchManager/BenchDashboard/AppLauncherControl.cs b/BenchManager/BenchDashboard/AppLauncherControl.cs index ec62b275..5195c9fb 100644 --- a/BenchManager/BenchDashboard/AppLauncherControl.cs +++ b/BenchManager/BenchDashboard/AppLauncherControl.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; @@ -6,6 +7,7 @@ using System.Text; using System.Windows.Forms; using Mastersign.Bench.Dashboard.Properties; +using System.Threading.Tasks; namespace Mastersign.Bench.Dashboard { @@ -25,29 +27,29 @@ public AppIndexFacade AppIndex get { return appIndex; } set { - if (appIndex != null) ReleaseAppIndex(); appIndex = value; if (appIndex != null) BindAppIndex(); } } - private void ReleaseAppIndex() + private async void BindAppIndex() { - listView.Items.Clear(); icons16.Images.Clear(); icons32.Images.Clear(); - } - - private void BindAppIndex() - { foreach (var app in appIndex.ActiveApps) { if (app.Launcher != null) { - LoadIcons(app); - listView.Items.Add(AppItem(app)); + var icons = await LoadIcons(app); + icons16.Images.Add(app.ID, icons.Item1); + icons32.Images.Add(app.ID, icons.Item2); } } + listView.Items.Clear(); + var items = from app in appIndex.ActiveApps + where app.Launcher != null + select AppItem(app); + listView.Items.AddRange(items.ToArray()); } private ListViewItem AppItem(AppFacade app) @@ -59,20 +61,24 @@ private ListViewItem AppItem(AppFacade app) }; } - private void LoadIcons(AppFacade app) + private Task> LoadIcons(AppFacade app) { - var path = app.LauncherIcon; - Icon icon; - try - { - icon = Icon.ExtractAssociatedIcon(path); - } - catch (Exception) + return Task.Run(() => { - icon = Resources.MissingApp; - } - icons16.Images.Add(app.ID, new Icon(icon, icons16.ImageSize)); - icons32.Images.Add(app.ID, new Icon(icon, icons32.ImageSize)); + var path = app.LauncherIcon; + Icon icon; + try + { + icon = Icon.ExtractAssociatedIcon(path); + } + catch (Exception) + { + icon = Resources.MissingApp; + } + return Tuple.Create( + new Icon(icon, icons16.ImageSize), + new Icon(icon, icons32.ImageSize)); + }); } private void listView_DoubleClick(object sender, EventArgs e) diff --git a/BenchManager/BenchDashboard/MainForm.cs b/BenchManager/BenchDashboard/MainForm.cs index c5991b7b..2d02833e 100644 --- a/BenchManager/BenchDashboard/MainForm.cs +++ b/BenchManager/BenchDashboard/MainForm.cs @@ -10,6 +10,7 @@ using System.Windows.Forms; using Mastersign.Bench.Dashboard.Properties; using TsudaKageyu; +using System.Threading.Tasks; namespace Mastersign.Bench.Dashboard { @@ -75,7 +76,7 @@ private void InitializeAppLauncherList() appLauncherList.AppIndex = core.Config.Apps; } - private void InitializeDocsMenu() + private async void InitializeDocsMenu() { var ctxm = new ContextMenuStrip(); @@ -94,7 +95,7 @@ private void InitializeDocsMenu() var docs = app.Docs; if (string.IsNullOrEmpty(websiteUrl) && (docs == null || docs.Count == 0)) continue; var item = new ToolStripMenuItem(label); - item.Image = ExtractLauncherIcon(app); + item.Image = await ExtractLauncherIcon(app); if (!string.IsNullOrEmpty(websiteUrl)) { if (item.Image == null) @@ -119,20 +120,23 @@ private void InitializeDocsMenu() docsMenu = ctxm; } - private Image ExtractLauncherIcon(AppFacade app) + private Task ExtractLauncherIcon(AppFacade app) { - var path = app.LauncherIcon; - if (string.IsNullOrEmpty(app.Launcher) || string.IsNullOrEmpty(path)) return null; - Icon icon; - try + return Task.Run(() => { - icon = Icon.ExtractAssociatedIcon(path); - } - catch (Exception) - { - return null; - } - return new Icon(icon, new Size(16, 16)).ToBitmap(); + var path = app.LauncherIcon; + if (string.IsNullOrEmpty(app.Launcher) || string.IsNullOrEmpty(path)) return null; + Icon icon; + try + { + icon = Icon.ExtractAssociatedIcon(path); + } + catch (Exception) + { + return null; + } + return new Icon(icon, new Size(16, 16)).ToBitmap(); + }); } private void InitializeStatusStrip() @@ -141,38 +145,35 @@ private void InitializeStatusStrip() tsslAppCount.Text = core.Config.Apps.ActiveApps.Length.ToString(); } - private void InitializeTopPanel() + private async void InitializeTopPanel() { UpdateShellButtons(); - new Thread(() => - { - var cmdImg = ExtractIcon(core.CmdPath, "CMD"); - var psImg = ExtractIcon(core.PowerShellPath, "PowerShell"); - var imageResDllPath = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\System32\imageres.dll"); - var bashImg = ExtractIcon(imageResDllPath, "Bash", 95); - BeginInvoke((ThreadStart)(() => - { - btnShellCmd.Image = cmdImg ?? Resources.missing_app_16; - btnShellPowerShell.Image = psImg ?? Resources.missing_app_16; - btnShellBash.Image = bashImg ?? Resources.missing_app_16; - })); - }).Start(); + var cmdImg = await ExtractIcon(core.CmdPath, "CMD"); + var psImg = await ExtractIcon(core.PowerShellPath, "PowerShell"); + var imageResDllPath = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\System32\imageres.dll"); + var bashImg = await ExtractIcon(imageResDllPath, "Bash", 95); + btnShellCmd.Image = cmdImg ?? Resources.missing_app_16; + btnShellPowerShell.Image = psImg ?? Resources.missing_app_16; + btnShellBash.Image = bashImg ?? Resources.missing_app_16; } - private static Bitmap ExtractIcon(string path, string name, int index = 0) + private static Task ExtractIcon(string path, string name, int index = 0) { - if (!File.Exists(path)) return null; - try + return Task.Run(() => { - var extractor = new IconExtractor(path); - var icon = extractor.GetIcon(index); - return new Icon(icon, new Size(16, 16)).ToBitmap(); - } - catch (Exception e) - { - Debug.WriteLine("Failed to load icon for " + name + ": " + e); - return null; - } + if (!File.Exists(path)) return null; + try + { + var extractor = new IconExtractor(path); + var icon = extractor.GetIcon(index); + return new Icon(icon, new Size(16, 16)).ToBitmap(); + } + catch (Exception e) + { + Debug.WriteLine("Failed to load icon for " + name + ": " + e); + return null; + } + }); } private void UpdateShellButtons() From fda6ec71419c4d2dadb63e12ddba714047886aca Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Mon, 4 Jul 2016 21:05:29 +0200 Subject: [PATCH 5/8] moved Bench configuration from $Script:cfg to $global:BenchConfig --- auto/lib/PsExecHost.ps1 | 2 +- auto/lib/Run-CustomScript.ps1 | 2 +- auto/lib/Setup-Bench.ps1 | 2 +- auto/lib/config.lib.ps1 | 74 +++++++++++++++++------------------ 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/auto/lib/PsExecHost.ps1 b/auto/lib/PsExecHost.ps1 index 22bb1483..115ef590 100644 --- a/auto/lib/PsExecHost.ps1 +++ b/auto/lib/PsExecHost.ps1 @@ -4,7 +4,7 @@ $scriptsDir = [IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition) $rootDir = Resolve-Path "$scriptsDir\..\.." . "$scriptsDir\bench.lib.ps1" . "$scriptsLib\reg.lib.ps1" -$Script:benchEnv = New-Object Mastersign.Bench.BenchEnvironment ($Script:cfg) +$Script:BenchEnv = New-Object Mastersign.Bench.BenchEnvironment ($global:BenchConfig) function _WaitForClient([IO.Pipes.NamedPipeServerStream]$pipe) { diff --git a/auto/lib/Run-CustomScript.ps1 b/auto/lib/Run-CustomScript.ps1 index d6f6c59a..b9e0bd16 100644 --- a/auto/lib/Run-CustomScript.ps1 +++ b/auto/lib/Run-CustomScript.ps1 @@ -3,7 +3,7 @@ param ( [array]$scriptArgs ) -if (!$Script:cfg) +if (!$global:BenchConfig) { $scriptsLib = [IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition) . "$scriptsLib\bench.lib.ps1" diff --git a/auto/lib/Setup-Bench.ps1 b/auto/lib/Setup-Bench.ps1 index 1f5d20e2..6a494b5b 100644 --- a/auto/lib/Setup-Bench.ps1 +++ b/auto/lib/Setup-Bench.ps1 @@ -5,7 +5,7 @@ param ( $myDir = [IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition) . "$myDir\bench.lib.ps1" -$manager = New-Object Mastersign.Bench.DefaultBenchManager ($Script:cfg) +$manager = New-Object Mastersign.Bench.DefaultBenchManager ($global:BenchConfig) $manager.Verbose = $WithInfo $success = $False diff --git a/auto/lib/config.lib.ps1 b/auto/lib/config.lib.ps1 index 61f70fa8..31e543a2 100644 --- a/auto/lib/config.lib.ps1 +++ b/auto/lib/config.lib.ps1 @@ -9,47 +9,47 @@ $Script:pathBackup = $env:PATH $_ = Set-StopOnError $True Debug "Loading configuration ..." -$Script:cfg = New-Object Mastersign.Bench.BenchConfiguration($Script:rootDir) +$global:BenchConfig = New-Object Mastersign.Bench.BenchConfiguration($Script:rootDir) -function Get-ConfigValue([string]$name) { return $Script:cfg.GetValue($name) } -function Get-ConfigBooleanValue([string]$name) { return $Script:cfg.GetBooleanValue($name) } -function Get-ConfigListValue([string]$name) { return $Script:cfg.GetStringListValue($name) } -function Get-AppConfigValue([string]$app, [string]$name) { return $Script:cfg.GetGroupValue($app, $name) } -function Get-AppConfigBooleanValue([string]$app, [string]$name) { return $Script:cfg.GetBooleanGroupValue($app, $name) } -function Get-AppConfigListValue([string]$app, [string]$name) { return $Script:cfg.GetStringListGroupValue($app, $name) } +function Get-ConfigValue([string]$name) { return $global:BenchConfig.GetValue($name) } +function Get-ConfigBooleanValue([string]$name) { return $global:BenchConfig.GetBooleanValue($name) } +function Get-ConfigListValue([string]$name) { return $global:BenchConfig.GetStringListValue($name) } +function Get-AppConfigValue([string]$app, [string]$name) { return $global:BenchConfig.GetGroupValue($app, $name) } +function Get-AppConfigBooleanValue([string]$app, [string]$name) { return $global:BenchConfig.GetBooleanGroupValue($app, $name) } +function Get-AppConfigListValue([string]$app, [string]$name) { return $global:BenchConfig.GetStringListGroupValue($app, $name) } -function App-Typ([string]$name) { return $Script:cfg.Apps[$name].Typ } -function App-Version([string]$name) { return $Script:cfg.Apps[$name].Version } -function App-Dependencies([string]$name) { return $Script:cfg.Apps[$name].Dependencies } -function App-Url([string]$name) { return $Script:cfg.Apps[$name].Url } -function App-DownloadHeaders([string]$name) { return $Script:cfg.Apps[$name].DownloadHeaders } -function App-DownloadCookies([string]$name) { return $Script:cfg.Apps[$name].DownloadCookies } -function App-ResourceFile([string]$name) { return $Script:cfg.Apps[$name].ResourceFileName } -function App-ResourceArchive([string]$name) { return $Script:cfg.Apps[$name].ResourceArchiveName } -function App-ResourceArchiveTyp([string]$name) { return $Script:cfg.Apps[$name].ResourceArchiveTyp } -function App-ResourceArchiveSubDir([string]$name) { return $Script:cfg.Apps[$name].ResourceArchivePath } -function App-Force([string]$name) { return $Script:cfg.Apps[$name].Force } -function App-NpmPackage([string]$name) { return $Script:cfg.Apps[$name].PackageName } -function App-PyPiPackage([string]$name) { return $Script:cfg.Apps[$name].PackageName } -function App-Dir([string]$name) { return $Script:cfg.Apps[$name].Dir } -function App-Paths([string]$name) { return $Script:cfg.Apps[$name].Path } -function App-Exe([string]$name, [bool]$checkExist = $true) { return $Script:cfg.Apps[$name].Exe } -function App-Register([string]$name) { return $Script:cfg.Apps[$name].Register } -function App-Environment([string]$name) { return $Script:cfg.Apps[$name].Environment } -function App-AdornedExecutables([string]$name) { return $Script:cfg.Apps[$name].AdornedExecutables } -function App-RegistryKeys([string]$name) { return $Script:cfg.Apps[$name].RegistryKeys } -function App-Launcher([string]$name) { return $Script:cfg.Apps[$name].Launcher } -function App-LauncherExecutable([string]$name) { return $Script:cfg.Apps[$name].LauncherExecutable } -function App-LauncherArguments([string]$name) { return $Script:cfg.Apps[$name].LauncherArguments } -function App-LauncherIcon([string]$name) { return $Script:cfg.Apps[$name].LauncherIcon } -function App-SetupTestFile([string]$name) { return $Script:cfg.Apps[$name].SetupTestFile } -function Check-DefaultApp([string]$name) { return $Script:cfg.Apps[$name].IsInstalled } -function Check-NpmPackage([string]$name) { return $Script:cfg.Apps[$name].IsInstalled } -function Check-PyPiPackage ([string]$pythonVersion, [string]$name) { return $Script:cfg.Apps[$name].IsInstalled } -function Check-App([string]$name) { return $Script:cfg.Apps[$name].IsInstalled } +function App-Typ([string]$name) { return $global:BenchConfig.Apps[$name].Typ } +function App-Version([string]$name) { return $global:BenchConfig.Apps[$name].Version } +function App-Dependencies([string]$name) { return $global:BenchConfig.Apps[$name].Dependencies } +function App-Url([string]$name) { return $global:BenchConfig.Apps[$name].Url } +function App-DownloadHeaders([string]$name) { return $global:BenchConfig.Apps[$name].DownloadHeaders } +function App-DownloadCookies([string]$name) { return $global:BenchConfig.Apps[$name].DownloadCookies } +function App-ResourceFile([string]$name) { return $global:BenchConfig.Apps[$name].ResourceFileName } +function App-ResourceArchive([string]$name) { return $global:BenchConfig.Apps[$name].ResourceArchiveName } +function App-ResourceArchiveTyp([string]$name) { return $global:BenchConfig.Apps[$name].ResourceArchiveTyp } +function App-ResourceArchiveSubDir([string]$name) { return $global:BenchConfig.Apps[$name].ResourceArchivePath } +function App-Force([string]$name) { return $global:BenchConfig.Apps[$name].Force } +function App-NpmPackage([string]$name) { return $global:BenchConfig.Apps[$name].PackageName } +function App-PyPiPackage([string]$name) { return $global:BenchConfig.Apps[$name].PackageName } +function App-Dir([string]$name) { return $global:BenchConfig.Apps[$name].Dir } +function App-Paths([string]$name) { return $global:BenchConfig.Apps[$name].Path } +function App-Exe([string]$name, [bool]$checkExist = $true) { return $global:BenchConfig.Apps[$name].Exe } +function App-Register([string]$name) { return $global:BenchConfig.Apps[$name].Register } +function App-Environment([string]$name) { return $global:BenchConfig.Apps[$name].Environment } +function App-AdornedExecutables([string]$name) { return $global:BenchConfig.Apps[$name].AdornedExecutables } +function App-RegistryKeys([string]$name) { return $global:BenchConfig.Apps[$name].RegistryKeys } +function App-Launcher([string]$name) { return $global:BenchConfig.Apps[$name].Launcher } +function App-LauncherExecutable([string]$name) { return $global:BenchConfig.Apps[$name].LauncherExecutable } +function App-LauncherArguments([string]$name) { return $global:BenchConfig.Apps[$name].LauncherArguments } +function App-LauncherIcon([string]$name) { return $global:BenchConfig.Apps[$name].LauncherIcon } +function App-SetupTestFile([string]$name) { return $global:BenchConfig.Apps[$name].SetupTestFile } +function Check-DefaultApp([string]$name) { return $global:BenchConfig.Apps[$name].IsInstalled } +function Check-NpmPackage([string]$name) { return $global:BenchConfig.Apps[$name].IsInstalled } +function Check-PyPiPackage ([string]$pythonVersion, [string]$name) { return $global:BenchConfig.Apps[$name].IsInstalled } +function Check-App([string]$name) { return $global:BenchConfig.Apps[$name].IsInstalled } function App-Path([string]$name) { - $path = $Script:cfg.Apps[$name].Path + $path = $global:BenchConfig.Apps[$name].Path if ($path.Length -gt 0) { return $path[0] From ff1824b9ba96ecb497fc3a596baffa63aa3dfeed Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Mon, 4 Jul 2016 21:06:12 +0200 Subject: [PATCH 6/8] fixed issue with slow execution context reloads during activating/deactivating apps --- .../BenchDashboard/ConEmuExecutionHost.cs | 25 +++++++++++++++---- CHANGELOG.md | 3 +++ auto/lib/PsExecHost.ps1 | 15 +++++++++-- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/BenchManager/BenchDashboard/ConEmuExecutionHost.cs b/BenchManager/BenchDashboard/ConEmuExecutionHost.cs index 786a0976..9986d383 100644 --- a/BenchManager/BenchDashboard/ConEmuExecutionHost.cs +++ b/BenchManager/BenchDashboard/ConEmuExecutionHost.cs @@ -37,6 +37,8 @@ class ConEmuExecutionHost : IProcessExecutionHost private IProcessExecutionHost backupHost; + private bool reloadConfigBeforeNextExecution = false; + public ConEmuExecutionHost(Core core, ConEmuControl control, string conEmuExe) { this.core = core; @@ -45,11 +47,12 @@ public ConEmuExecutionHost(Core core, ConEmuControl control, string conEmuExe) backupHost = new DefaultExecutionHost(); config = LoadConfigFromResource(); StartPowerShellExecutionHost(); - this.core.ConfigReloaded += (s, e) => - { - StopPowerShellExecutionHost(); - StartPowerShellExecutionHost(); - }; + this.core.ConfigReloaded += CoreConfigReloadedHandler; + } + + private void CoreConfigReloadedHandler(object sender, EventArgs e) + { + reloadConfigBeforeNextExecution = true; } private XmlDocument LoadConfigFromResource() @@ -185,6 +188,13 @@ private IEnumerable SendCommand(string command, params string[] argument } } + private void ReloadConfiguration() + { + if (!IsPowerShellExecutionHostRunning) return; + SendCommand("reload").Any(l => l == "OK"); + reloadConfigBeforeNextExecution = false; + } + private void StopPowerShellExecutionHost() { if (!IsPowerShellExecutionHostRunning) return; @@ -228,6 +238,10 @@ public ProcessExecutionResult RunProcess(BenchEnvironment env, { return backupHost.RunProcess(env, cwd, executable, arguments, monitoring); } + if (reloadConfigBeforeNextExecution) + { + ReloadConfiguration(); + } var collectOutput = (monitoring & ProcessMonitoring.Output) == ProcessMonitoring.Output; var response = SendCommand("exec", cwd, executable, arguments); var exitCode = 999999; @@ -287,6 +301,7 @@ public void Dispose() { if (IsDisposed) return; IsDisposed = true; + core.ConfigReloaded -= CoreConfigReloadedHandler; StopPowerShellExecutionHost(); backupHost.Dispose(); backupHost = null; diff --git a/CHANGELOG.md b/CHANGELOG.md index 76684f1f..2ab5fedc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ Add a link to the GitHub diff like [Dev Changes](https://github.com/mastersign/bench/compare/master...dev), [App Changes](https://github.com/mastersign/bench/compare/master...apps) +### Fixed +- UI performance when activating/deactivating apps + ## [0.11.3] - 2016-07-02 [Full Changelog](https://github.com/mastersign/bench/compare/v0.11.2...v0.11.3) diff --git a/auto/lib/PsExecHost.ps1 b/auto/lib/PsExecHost.ps1 index 115ef590..fce44755 100644 --- a/auto/lib/PsExecHost.ps1 +++ b/auto/lib/PsExecHost.ps1 @@ -4,6 +4,7 @@ $scriptsDir = [IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition) $rootDir = Resolve-Path "$scriptsDir\..\.." . "$scriptsDir\bench.lib.ps1" . "$scriptsLib\reg.lib.ps1" + $Script:BenchEnv = New-Object Mastersign.Bench.BenchEnvironment ($global:BenchConfig) function _WaitForClient([IO.Pipes.NamedPipeServerStream]$pipe) @@ -85,8 +86,8 @@ function _HandleExecutionRequest([IO.TextReader]$reader, [IO.TextWriter]$writer) Write-Warning "Bench: Could not read execution arguments from named pipe." return } - - $Script:benchEnv.Load() + + $Script:BenchEnv.Load() pushd $cwd $exitCode = 0 $transcriptPath = [IO.Path]::Combine((Get-ConfigValue TempDir), $token) @@ -121,6 +122,15 @@ function _HandleExecutionRequest([IO.TextReader]$reader, [IO.TextWriter]$writer) $writer.WriteLine("TRANSCRIPT $Token $transcriptPath") } +function _ReloadBenchConfig([IO.TextReader]$reader, [IO.TextWriter]$writer) +{ + Write-Host "Reloading Bench configuration..." + $rootDir = $global:BenchConfig.BenchRootDir + $global:BenchConfig = New-Object Mastersign.Bench.BenchConfiguration ($rootDir) + $Script:BenchEnv = New-Object Mastersign.Bench.BenchEnvironment ($global:BenchConfig) + $writer.WriteLine("OK") +} + $server = New-Object System.IO.Pipes.NamedPipeServerStream($Token, [IO.Pipes.PipeDirection]::InOut) $closed = $false @@ -133,6 +143,7 @@ while (!$closed) switch ($cmd) { "exec" { _HandleExecutionRequest $reader $writer | Out-Default } + "reload" { _ReloadBenchConfig $reader $writer | Out-Default } "close" { $closed = $true } } $writer.Flush() From 775cd2f210c95b1c0c4d51d4941da6f1f1376f75 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Mon, 4 Jul 2016 21:06:37 +0200 Subject: [PATCH 7/8] updated Node.js from 4.4.6 to 6.2.2 --- CHANGELOG.md | 3 +++ res/apps.md | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab5fedc..2dbaa464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ Add a link to the GitHub diff like [Dev Changes](https://github.com/mastersign/bench/compare/master...dev), [App Changes](https://github.com/mastersign/bench/compare/master...apps) +### Changed +- Update: Node.js from 4.4.6 to 6.2.2 + ### Fixed - UI performance when activating/deactivating apps diff --git a/res/apps.md b/res/apps.md index f169b3be..17a42c1c 100644 --- a/res/apps.md +++ b/res/apps.md @@ -649,9 +649,9 @@ Node.js' package ecosystem, npm, is the largest ecosystem of open source librari * Label: Node.js * Website: * Docs: - + API Documentation: + + API Documentation: + Guides: -* Version: 4.4.6 +* Version: 6.2.2 * Url: `https://nodejs.org/dist/v$:Version$/win-x86/node.exe` * ResourceName: `node.exe` * Dir: `node` From 9c24a275167fae58fbb703bf96213131a1939042 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Mon, 4 Jul 2016 21:06:51 +0200 Subject: [PATCH 8/8] pushed version to 0.11.4 --- BenchManager/BenchDashboard/Properties/AssemblyInfo.cs | 4 ++-- BenchManager/BenchLib/Properties/AssemblyInfo.cs | 4 ++-- CHANGELOG.md | 3 +++ res/bench-install.bat | 2 +- res/version.txt | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/BenchManager/BenchDashboard/Properties/AssemblyInfo.cs b/BenchManager/BenchDashboard/Properties/AssemblyInfo.cs index a1d093d5..b4d566a5 100644 --- a/BenchManager/BenchDashboard/Properties/AssemblyInfo.cs +++ b/BenchManager/BenchDashboard/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.11.3.0")] -[assembly: AssemblyFileVersion("0.11.3.0")] +[assembly: AssemblyVersion("0.11.4.0")] +[assembly: AssemblyFileVersion("0.11.4.0")] diff --git a/BenchManager/BenchLib/Properties/AssemblyInfo.cs b/BenchManager/BenchLib/Properties/AssemblyInfo.cs index 89bf398c..acfaeb93 100644 --- a/BenchManager/BenchLib/Properties/AssemblyInfo.cs +++ b/BenchManager/BenchLib/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.11.3.0")] -[assembly: AssemblyFileVersion("0.11.3.0")] +[assembly: AssemblyVersion("0.11.4.0")] +[assembly: AssemblyFileVersion("0.11.4.0")] diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dbaa464..d84d2d9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ Add a link to the GitHub diff like [Dev Changes](https://github.com/mastersign/bench/compare/master...dev), [App Changes](https://github.com/mastersign/bench/compare/master...apps) +## [0.11.4] - 2016-07-04 +[Full Changelog](https://github.com/mastersign/bench/compare/v0.11.3...v0.11.4) + ### Changed - Update: Node.js from 4.4.6 to 6.2.2 diff --git a/res/bench-install.bat b/res/bench-install.bat index 452fc734..cd084277 100644 --- a/res/bench-install.bat +++ b/res/bench-install.bat @@ -1,7 +1,7 @@ @ECHO OFF SET ROOT=%~dp0 -SET VERSION=0.11.3 +SET VERSION=0.11.4 SET TAG=v%VERSION% SET BENCH_ZIPURL=https://github.com/mastersign/bench/releases/download/%TAG%/Bench.zip SET BENCH_ZIPFILE=%ROOT%Bench.zip diff --git a/res/version.txt b/res/version.txt index 2bb6a820..aa3545de 100644 --- a/res/version.txt +++ b/res/version.txt @@ -1 +1 @@ -0.11.3 \ No newline at end of file +0.11.4 \ No newline at end of file