From 54a51392c6d981884783b31192a7464a30dd3246 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 07:21:51 +0000 Subject: [PATCH 01/11] added exe file name without extension to search criteria (see #130) --- BenchManager/BenchLib/AppFacade.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BenchManager/BenchLib/AppFacade.cs b/BenchManager/BenchLib/AppFacade.cs index 78905455..2a68110f 100644 --- a/BenchManager/BenchLib/AppFacade.cs +++ b/BenchManager/BenchLib/AppFacade.cs @@ -1213,6 +1213,7 @@ public int MatchSearchString(string[] searchTokens) { var label = AppSearch.NormalizeForSearch(Label); var id = AppSearch.NormalizeForSearch(ID); + var exe = AppSearch.NormalizeForSearch(IOPath.GetFileNameWithoutExtension(Exe)); var tags = Tags; for (int i = 0; i < tags.Length; i++) tags[i] = AppSearch.NormalizeForSearch(tags[i]); var category = AppSearch.NormalizeForSearch(Category); @@ -1224,6 +1225,7 @@ public int MatchSearchString(string[] searchTokens) { score += Match(token, label) * 5; score += Match(token, id) * 4; + score += Match(token, exe) * 4; foreach (var tag in tags) { score += Match(token, tag) * 3; From e53f647454ebc5d6db5825cf4c3fb50d0eb88ebd Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 08:55:53 +0000 Subject: [PATCH 02/11] updated changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5939352b..1023548f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,10 @@ Add a link to the GitHub diff like [Unreleased]: https://github.com/winbench/bench/compare/master...dev +### Added +* Find apps by searching for the executable filename + ([#130](https://github.com/winbench/bench/issues/130)) + ## [0.21.1] - 2019-02-25 [0.21.1]: https://github.com/winbench/bench/compare/v0.21.0...v0.21.1 From f4ac208b62944d0e1c0a15dc929899cd917d38fc Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 08:56:22 +0000 Subject: [PATCH 03/11] make 64Bit support the default (fixes #136) --- BenchManager/BenchLib/BenchTasks.cs | 5 +++++ BenchManager/BenchLib/UI/InitializeConfigTask.cs | 3 ++- .../UI/MachineArchitectureStepControl.Designer.cs | 6 +++--- .../BenchLib/UI/MachineArchitectureStepControl.resx | 9 ++++++--- CHANGELOG.md | 4 ++++ res/bench-site.template.md | 2 +- res/config.md | 2 +- 7 files changed, 22 insertions(+), 9 deletions(-) diff --git a/BenchManager/BenchLib/BenchTasks.cs b/BenchManager/BenchLib/BenchTasks.cs index 0ba37b74..d44a33fc 100644 --- a/BenchManager/BenchLib/BenchTasks.cs +++ b/BenchManager/BenchLib/BenchTasks.cs @@ -54,6 +54,11 @@ public static BenchConfiguration InitializeSiteConfiguration(string benchRootDir var initSiteConfig = siteConfigFiles.Length == 0; var initUserConfig = !File.Exists(userConfigFile); + if (initSiteConfig) + { + cfg.SetValue(ConfigPropertyKeys.Allow64Bit, Windows.MachineArchitecture.Is64BitOperatingSystem); + } + if (initSiteConfig || initUserConfig) { var wizzardTask = new InitializeConfigTask(cfg, diff --git a/BenchManager/BenchLib/UI/InitializeConfigTask.cs b/BenchManager/BenchLib/UI/InitializeConfigTask.cs index 3ef4f623..606dd3e2 100644 --- a/BenchManager/BenchLib/UI/InitializeConfigTask.cs +++ b/BenchManager/BenchLib/UI/InitializeConfigTask.cs @@ -75,7 +75,8 @@ public override void Before() stepUserIdentification.UserEmail = config.GetStringValue(ConfigPropertyKeys.UserEmail); stepMachineArchitecture = new MachineArchitectureStepControl(); - stepMachineArchitecture.Allow64Bit = config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit); + stepMachineArchitecture.Allow64Bit = config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit) + && Windows.MachineArchitecture.Is64BitOperatingSystem; stepExistingConfig = new ExistingConfigStepControl(); stepExistingConfig.IsConfigGitRepoExisting = false; diff --git a/BenchManager/BenchLib/UI/MachineArchitectureStepControl.Designer.cs b/BenchManager/BenchLib/UI/MachineArchitectureStepControl.Designer.cs index c6ce1bd0..3abdf7e3 100644 --- a/BenchManager/BenchLib/UI/MachineArchitectureStepControl.Designer.cs +++ b/BenchManager/BenchLib/UI/MachineArchitectureStepControl.Designer.cs @@ -29,6 +29,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.Windows.Forms.Label lblAllow64BitHint; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MachineArchitectureStepControl)); this.chkAllow64Bit = new System.Windows.Forms.CheckBox(); lblAllow64BitHint = new System.Windows.Forms.Label(); this.SuspendLayout(); @@ -40,10 +41,9 @@ private void InitializeComponent() lblAllow64BitHint.ForeColor = System.Drawing.SystemColors.ControlDarkDark; lblAllow64BitHint.Location = new System.Drawing.Point(31, 35); lblAllow64BitHint.Name = "lblAllow64BitHint"; - lblAllow64BitHint.Size = new System.Drawing.Size(418, 36); + lblAllow64BitHint.Size = new System.Drawing.Size(418, 58); lblAllow64BitHint.TabIndex = 6; - lblAllow64BitHint.Text = "Do not activate this option, if you intend to use this Bench environment also on " + - "a 32 Bit Windows machine."; + lblAllow64BitHint.Text = resources.GetString("lblAllow64BitHint.Text"); // // chkAllow64Bit // diff --git a/BenchManager/BenchLib/UI/MachineArchitectureStepControl.resx b/BenchManager/BenchLib/UI/MachineArchitectureStepControl.resx index 05a0cd13..e3a2a7cf 100644 --- a/BenchManager/BenchLib/UI/MachineArchitectureStepControl.resx +++ b/BenchManager/BenchLib/UI/MachineArchitectureStepControl.resx @@ -112,12 +112,15 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + False + + Only deactivate this option, if you intend to use this Bench environment on a 32 Bit Windows machine. This is usually not necessary because machines with 32Bit Windows are becoming rare these days. If you do deactivate this option, some apps will not be available to you. + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1023548f..4ccbc495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ Add a link to the GitHub diff like * Find apps by searching for the executable filename ([#130](https://github.com/winbench/bench/issues/130)) +### Changed +* Make 64Bit support the default + ([#136](https://github.com/winbench/bench/issues/136)) + ## [0.21.1] - 2019-02-25 [0.21.1]: https://github.com/winbench/bench/compare/v0.21.0...v0.21.1 diff --git a/res/bench-site.template.md b/res/bench-site.template.md index 8081ce84..d3bb96c7 100644 --- a/res/bench-site.template.md +++ b/res/bench-site.template.md @@ -19,4 +19,4 @@ With the following property, you allow the usage of 64Bit binaries. Set this property to `true` if you intend to use the Bench environment only on systems which support 64Bit code. -* Allow64Bit: `false` +* Allow64Bit: `true` diff --git a/res/config.md b/res/config.md index e5e7edc7..bc7ba20a 100644 --- a/res/config.md +++ b/res/config.md @@ -91,7 +91,7 @@ * IgnoreSystemPath: `true` * RegisterInUserProfile: `false` * UseRegistryIsolation: `true` -* Allow64Bit: `false` +* Allow64Bit: `true` * ProjectRootDir: `projects` * ProjectArchiveDir: `archive` * ProjectArchiveFormat: `zip` From b9145edda1d0246fadc77dfc230a822fc408d7ba Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 11:04:15 +0000 Subject: [PATCH 04/11] added support for initialization from user config template (fixes #137) from directories, existing Bench environment, ZIP file, additionally to Git repo --- BenchManager/BenchLib/BenchConfiguration.cs | 2 + BenchManager/BenchLib/BenchTasks.cs | 80 +++++++++++-- BenchManager/BenchLib/ConfigPropertyKeys.cs | 2 + .../UI/ExistingConfigStepControl.Designer.cs | 106 +++++++++++++++++- .../BenchLib/UI/ExistingConfigStepControl.cs | 106 +++++++++++++++--- .../UI/ExistingConfigStepControl.resx | 4 +- .../BenchLib/UI/InitializeConfigTask.cs | 29 +++-- CHANGELOG.md | 3 + 8 files changed, 290 insertions(+), 42 deletions(-) diff --git a/BenchManager/BenchLib/BenchConfiguration.cs b/BenchManager/BenchLib/BenchConfiguration.cs index 6987db74..532b0163 100644 --- a/BenchManager/BenchLib/BenchConfiguration.cs +++ b/BenchManager/BenchLib/BenchConfiguration.cs @@ -533,6 +533,8 @@ public void CopyBenchInitializationPropertiesFrom(BenchConfiguration sourceCfg) foreach (var key in new[] { ConfigPropertyKeys.UserConfigRepository, + ConfigPropertyKeys.UserConfigInitDirectory, + ConfigPropertyKeys.UserConfigInitZipFile, ConfigPropertyKeys.WizzardIntegrateIntoUserProfile, ConfigPropertyKeys.WizzardStartAutoSetup, ConfigPropertyKeys.WizzardSelectedApps, diff --git a/BenchManager/BenchLib/BenchTasks.cs b/BenchManager/BenchLib/BenchTasks.cs index d44a33fc..18b2b906 100644 --- a/BenchManager/BenchLib/BenchTasks.cs +++ b/BenchManager/BenchLib/BenchTasks.cs @@ -99,19 +99,81 @@ public static BenchConfiguration InitializeUserConfiguration(IBenchManager man) if (!File.Exists(userConfigFile)) { + var dir = man.Config.GetStringValue(ConfigPropertyKeys.UserConfigInitDirectory); + var zip = man.Config.GetStringValue(ConfigPropertyKeys.UserConfigInitZipFile); var repo = man.Config.GetStringValue(ConfigPropertyKeys.UserConfigRepository); - if (repo != null) + if (dir != null) { - // asure no config directory exist for git clone - if (Directory.Exists(userConfigDir)) + // check if template directory exists + if (!Directory.Exists(dir)) { - FileSystem.PurgeDir(userConfigDir); + man.UI.ShowError("Copying User Configuration", + "Template directory for user configuration does not exists: " + dir); + return null; + } + // check if a config.md exists + if (!File.Exists(Path.Combine(dir, "config.md"))) + { + // try to find the config.md in a config sub-directory, e.g. if the given directory is a Bench environment + if (File.Exists(Path.Combine(dir, "config", "config.md"))) + { + dir = Path.Combine(dir, "config"); + } + else + { + man.UI.ShowError("Copying User Configuration", + "No configuration found in template directory for user configuration: " + dir); + return null; + } } // asure the parent directory exists if (!Directory.Exists(Path.GetDirectoryName(userConfigDir))) { Directory.CreateDirectory(Path.GetDirectoryName(userConfigDir)); } + // copy files from template directory + FileSystem.CopyDir(dir, userConfigDir, true); + } + else if (zip != null) + { + // check if template ZIP file exists + if (!File.Exists(zip)) + { + man.UI.ShowError("Extracting User Configuration", + "Template ZIP archive with user configuration does not exists: " + zip); + return null; + } + // asure the target directory exists + FileSystem.AsureDir(userConfigDir); + // open the ZIP file + using (var zipFile = ZipFile.Read(zip)) + { + zipFile.FlattenFoldersOnExtract = false; + // check if a config.md exists + if (zipFile.ContainsEntry("config.md")) + { + // extract everything + zipFile.ExtractAll(userConfigDir, ExtractExistingFileAction.OverwriteSilently); + } + // check if the config.md resides in a config sub-directory + else if (zipFile.ContainsEntry("config\\config.md")) + { + // extract everything beneath config + zipFile.ExtractSelectedEntries("config\\*", null, Path.GetDirectoryName(userConfigDir), + ExtractExistingFileAction.OverwriteSilently); + } + else + { + man.UI.ShowError("Extracting User Configuration", + "No configuration found in template ZIP file for user configuration: " + zip); + return null; + } + } + } + else if (repo != null) + { + // asure the target directory exists and is empty + FileSystem.EmptyDir(userConfigDir); // clone the existing config var result = man.ProcessExecutionHost.RunProcess(man.Env, man.Config.BenchRootDir, man.Config.Apps[AppKeys.Git].Exe, @@ -119,7 +181,7 @@ public static BenchConfiguration InitializeUserConfiguration(IBenchManager man) ProcessMonitoring.ExitCodeAndOutput); if (result.ExitCode != 0) { - man.UI.ShowError("Cloning Custom Configuration", + man.UI.ShowError("Cloning User Configuration", "Executing Git failed: " + Environment.NewLine + Environment.NewLine + result.Output); @@ -128,14 +190,14 @@ public static BenchConfiguration InitializeUserConfiguration(IBenchManager man) } else { - if (!Directory.Exists(userConfigDir)) - { - Directory.CreateDirectory(userConfigDir); - } + // asure the target directory exists + FileSystem.AsureDir(userConfigDir); + // copy the bundled user config template var userConfigTemplateFile = man.Config.GetStringValue(ConfigPropertyKeys.UserConfigTemplateFile); File.Copy(userConfigTemplateFile, userConfigFile, false); + // set some config values in the user configuration according to the wizzard results if (man.Config.GetBooleanValue(ConfigPropertyKeys.WizzardIntegrateIntoUserProfile)) { Markdown.MarkdownPropertyEditor.UpdateFile(userConfigFile, new Dictionary diff --git a/BenchManager/BenchLib/ConfigPropertyKeys.cs b/BenchManager/BenchLib/ConfigPropertyKeys.cs index d32c7b70..8091d378 100644 --- a/BenchManager/BenchLib/ConfigPropertyKeys.cs +++ b/BenchManager/BenchLib/ConfigPropertyKeys.cs @@ -32,6 +32,8 @@ public static class ConfigPropertyKeys public const string UserConfigFile = "UserConfigFile"; public const string UserConfigTemplateFile = "UserConfigTemplateFile"; public const string UserConfigRepository = "UserConfigRepository"; + public const string UserConfigInitDirectory = "UserConfigInitDirectory"; + public const string UserConfigInitZipFile = "UserConfigInitZipFile"; public const string SiteConfigFileName = "SiteConfigFileName"; public const string SiteConfigTemplateFile = "SiteConfigTemplateFile"; diff --git a/BenchManager/BenchLib/UI/ExistingConfigStepControl.Designer.cs b/BenchManager/BenchLib/UI/ExistingConfigStepControl.Designer.cs index 76ef9b15..18a66793 100644 --- a/BenchManager/BenchLib/UI/ExistingConfigStepControl.Designer.cs +++ b/BenchManager/BenchLib/UI/ExistingConfigStepControl.Designer.cs @@ -32,6 +32,14 @@ private void InitializeComponent() this.radExistingConfigInGitRepo = new System.Windows.Forms.RadioButton(); this.lblConfigGitRepo = new System.Windows.Forms.Label(); this.txtConfigGitRepo = new System.Windows.Forms.TextBox(); + this.radExistingConfigInDirectory = new System.Windows.Forms.RadioButton(); + this.txtConfigTemplateDir = new System.Windows.Forms.TextBox(); + this.lblConfigTemplateDir = new System.Windows.Forms.Label(); + this.btnConfigTemplateDirBrowse = new System.Windows.Forms.Button(); + this.btnConfigTemplateZipFileBrowse = new System.Windows.Forms.Button(); + this.txtConfigTemplateZipFile = new System.Windows.Forms.TextBox(); + this.lblConfigTemplateZipFile = new System.Windows.Forms.Label(); + this.radExistingConfigInZipFile = new System.Windows.Forms.RadioButton(); this.SuspendLayout(); // // radNoExistingConfig @@ -49,18 +57,18 @@ private void InitializeComponent() // radExistingConfigInGitRepo // this.radExistingConfigInGitRepo.AutoSize = true; - this.radExistingConfigInGitRepo.Location = new System.Drawing.Point(15, 38); + this.radExistingConfigInGitRepo.Location = new System.Drawing.Point(15, 130); this.radExistingConfigInGitRepo.Name = "radExistingConfigInGitRepo"; this.radExistingConfigInGitRepo.Size = new System.Drawing.Size(209, 17); this.radExistingConfigInGitRepo.TabIndex = 1; this.radExistingConfigInGitRepo.Text = "Existing configuration in a Git repository"; this.radExistingConfigInGitRepo.UseVisualStyleBackColor = true; - this.radExistingConfigInGitRepo.CheckedChanged += new System.EventHandler(this.radExistingConfigInGitRepo_CheckedChanged); + this.radExistingConfigInGitRepo.CheckedChanged += new System.EventHandler(this.ConfigSourceChangedHandler); // // lblConfigGitRepo // this.lblConfigGitRepo.AutoSize = true; - this.lblConfigGitRepo.Location = new System.Drawing.Point(32, 64); + this.lblConfigGitRepo.Location = new System.Drawing.Point(32, 156); this.lblConfigGitRepo.Name = "lblConfigGitRepo"; this.lblConfigGitRepo.Size = new System.Drawing.Size(58, 13); this.lblConfigGitRepo.TabIndex = 2; @@ -68,15 +76,97 @@ private void InitializeComponent() // // txtConfigGitRepo // - this.txtConfigGitRepo.Location = new System.Drawing.Point(96, 61); + this.txtConfigGitRepo.Location = new System.Drawing.Point(96, 153); this.txtConfigGitRepo.Name = "txtConfigGitRepo"; this.txtConfigGitRepo.Size = new System.Drawing.Size(353, 20); this.txtConfigGitRepo.TabIndex = 3; // + // radExistingConfigInDirectory + // + this.radExistingConfigInDirectory.AutoSize = true; + this.radExistingConfigInDirectory.Location = new System.Drawing.Point(15, 38); + this.radExistingConfigInDirectory.Name = "radExistingConfigInDirectory"; + this.radExistingConfigInDirectory.Size = new System.Drawing.Size(364, 17); + this.radExistingConfigInDirectory.TabIndex = 4; + this.radExistingConfigInDirectory.Text = "Existing configuration in a directory file (e.g. existing Bench environment)"; + this.radExistingConfigInDirectory.UseVisualStyleBackColor = true; + this.radExistingConfigInDirectory.CheckedChanged += new System.EventHandler(this.ConfigSourceChangedHandler); + // + // txtConfigTemplateDir + // + this.txtConfigTemplateDir.Location = new System.Drawing.Point(96, 58); + this.txtConfigTemplateDir.Name = "txtConfigTemplateDir"; + this.txtConfigTemplateDir.Size = new System.Drawing.Size(316, 20); + this.txtConfigTemplateDir.TabIndex = 6; + // + // lblConfigTemplateDir + // + this.lblConfigTemplateDir.AutoSize = true; + this.lblConfigTemplateDir.Location = new System.Drawing.Point(32, 61); + this.lblConfigTemplateDir.Name = "lblConfigTemplateDir"; + this.lblConfigTemplateDir.Size = new System.Drawing.Size(49, 13); + this.lblConfigTemplateDir.TabIndex = 5; + this.lblConfigTemplateDir.Text = "Directory"; + // + // btnConfigTemplateDirBrowse + // + this.btnConfigTemplateDirBrowse.Location = new System.Drawing.Point(418, 56); + this.btnConfigTemplateDirBrowse.Name = "btnConfigTemplateDirBrowse"; + this.btnConfigTemplateDirBrowse.Size = new System.Drawing.Size(31, 23); + this.btnConfigTemplateDirBrowse.TabIndex = 7; + this.btnConfigTemplateDirBrowse.Text = "..."; + this.btnConfigTemplateDirBrowse.UseVisualStyleBackColor = true; + this.btnConfigTemplateDirBrowse.Click += new System.EventHandler(this.BrowseTemplateDirHandler); + // + // btnConfigTemplateZipFileBrowse + // + this.btnConfigTemplateZipFileBrowse.Location = new System.Drawing.Point(418, 102); + this.btnConfigTemplateZipFileBrowse.Name = "btnConfigTemplateZipFileBrowse"; + this.btnConfigTemplateZipFileBrowse.Size = new System.Drawing.Size(31, 23); + this.btnConfigTemplateZipFileBrowse.TabIndex = 11; + this.btnConfigTemplateZipFileBrowse.Text = "..."; + this.btnConfigTemplateZipFileBrowse.UseVisualStyleBackColor = true; + this.btnConfigTemplateZipFileBrowse.Click += new System.EventHandler(this.BrowseTemplateZipFileHandler); + // + // txtConfigTemplateZipFile + // + this.txtConfigTemplateZipFile.Location = new System.Drawing.Point(96, 104); + this.txtConfigTemplateZipFile.Name = "txtConfigTemplateZipFile"; + this.txtConfigTemplateZipFile.Size = new System.Drawing.Size(316, 20); + this.txtConfigTemplateZipFile.TabIndex = 10; + // + // lblConfigTemplateZipFile + // + this.lblConfigTemplateZipFile.AutoSize = true; + this.lblConfigTemplateZipFile.Location = new System.Drawing.Point(32, 107); + this.lblConfigTemplateZipFile.Name = "lblConfigTemplateZipFile"; + this.lblConfigTemplateZipFile.Size = new System.Drawing.Size(40, 13); + this.lblConfigTemplateZipFile.TabIndex = 9; + this.lblConfigTemplateZipFile.Text = "ZIP file"; + // + // radExistingConfigInZipFile + // + this.radExistingConfigInZipFile.AutoSize = true; + this.radExistingConfigInZipFile.Location = new System.Drawing.Point(15, 84); + this.radExistingConfigInZipFile.Name = "radExistingConfigInZipFile"; + this.radExistingConfigInZipFile.Size = new System.Drawing.Size(181, 17); + this.radExistingConfigInZipFile.TabIndex = 8; + this.radExistingConfigInZipFile.Text = "Existing configuration in a ZIP file"; + this.radExistingConfigInZipFile.UseVisualStyleBackColor = true; + this.radExistingConfigInZipFile.CheckedChanged += new System.EventHandler(this.ConfigSourceChangedHandler); + // // ExistingConfigStepControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.btnConfigTemplateZipFileBrowse); + this.Controls.Add(this.txtConfigTemplateZipFile); + this.Controls.Add(this.lblConfigTemplateZipFile); + this.Controls.Add(this.radExistingConfigInZipFile); + this.Controls.Add(this.btnConfigTemplateDirBrowse); + this.Controls.Add(this.txtConfigTemplateDir); + this.Controls.Add(this.lblConfigTemplateDir); + this.Controls.Add(this.radExistingConfigInDirectory); this.Controls.Add(this.txtConfigGitRepo); this.Controls.Add(this.lblConfigGitRepo); this.Controls.Add(this.radExistingConfigInGitRepo); @@ -93,5 +183,13 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton radExistingConfigInGitRepo; private System.Windows.Forms.TextBox txtConfigGitRepo; private System.Windows.Forms.Label lblConfigGitRepo; + private System.Windows.Forms.RadioButton radExistingConfigInDirectory; + private System.Windows.Forms.TextBox txtConfigTemplateDir; + private System.Windows.Forms.Label lblConfigTemplateDir; + private System.Windows.Forms.Button btnConfigTemplateDirBrowse; + private System.Windows.Forms.Button btnConfigTemplateZipFileBrowse; + private System.Windows.Forms.TextBox txtConfigTemplateZipFile; + private System.Windows.Forms.Label lblConfigTemplateZipFile; + private System.Windows.Forms.RadioButton radExistingConfigInZipFile; } } diff --git a/BenchManager/BenchLib/UI/ExistingConfigStepControl.cs b/BenchManager/BenchLib/UI/ExistingConfigStepControl.cs index 58eeeab5..d0f15760 100644 --- a/BenchManager/BenchLib/UI/ExistingConfigStepControl.cs +++ b/BenchManager/BenchLib/UI/ExistingConfigStepControl.cs @@ -5,6 +5,7 @@ using System.Data; using System.Text; using System.Windows.Forms; +using System.IO; namespace Mastersign.Bench.UI { @@ -14,45 +15,118 @@ namespace Mastersign.Bench.UI /// internal partial class ExistingConfigStepControl : WizzardStepControl { - public ExistingConfigStepControl() + public enum ConfigSourceType { - Description = "Choose pre-existing configuration..."; - InitializeComponent(); - UpdateControls(); + None, + Directory, + ZipFile, + GitRepo, } - public bool IsConfigGitRepoExisting + public ConfigSourceType ConfigSource { - get { return radExistingConfigInGitRepo.Checked; } + get + { + if (radExistingConfigInDirectory.Checked) return ConfigSourceType.Directory; + if (radExistingConfigInZipFile.Checked) return ConfigSourceType.ZipFile; + if (radExistingConfigInGitRepo.Checked) return ConfigSourceType.GitRepo; + return ConfigSourceType.None; + } set { - if (value) - { - radExistingConfigInGitRepo.Checked = true; - } - else + if (ConfigSource == value) return; + switch (value) { - radNoExistingConfig.Checked = true; + case ConfigSourceType.Directory: + radExistingConfigInDirectory.Checked = true; + break; + case ConfigSourceType.ZipFile: + radExistingConfigInZipFile.Checked = true; + break; + case ConfigSourceType.GitRepo: + radExistingConfigInGitRepo.Checked = true; + break; + default: + radNoExistingConfig.Checked = true; + break; } } } + public ExistingConfigStepControl() + { + Description = "Choose pre-existing configuration..."; + InitializeComponent(); + UpdateControls(); + } + + public string ConfigDirectory + { + get { return txtConfigTemplateDir.Text; } + set { txtConfigTemplateDir.Text = value; } + } + + public string ConfigZipFile + { + get { return txtConfigTemplateZipFile.Text; } + set { txtConfigTemplateZipFile.Text = value; } + } + public string ConfigGitRepo { get { return txtConfigGitRepo.Text; } set { txtConfigGitRepo.Text = value; } } - private void radExistingConfigInGitRepo_CheckedChanged(object sender, EventArgs e) - { - UpdateControls(); - } + private void ConfigSourceChangedHandler(object sender, EventArgs e) => UpdateControls(); private void UpdateControls() { + var existingConfigInDirectory = radExistingConfigInDirectory.Checked; + var existingConfigInZipFile = radExistingConfigInZipFile.Checked; var existingConfigInGitRepo = radExistingConfigInGitRepo.Checked; + lblConfigTemplateDir.Enabled = existingConfigInDirectory; + txtConfigTemplateDir.Enabled = existingConfigInDirectory; + btnConfigTemplateDirBrowse.Enabled = existingConfigInDirectory; + lblConfigTemplateZipFile.Enabled = existingConfigInZipFile; + txtConfigTemplateZipFile.Enabled = existingConfigInZipFile; + btnConfigTemplateZipFileBrowse.Enabled = existingConfigInZipFile; lblConfigGitRepo.Enabled = existingConfigInGitRepo; txtConfigGitRepo.Enabled = existingConfigInGitRepo; } + + private void BrowseTemplateDirHandler(object sender, EventArgs e) + { + var dlg = new FolderBrowserDialog + { + Description = "Select the directory of a Bench environment or a directory with a config.md file in it.", + SelectedPath = Directory.Exists(txtConfigTemplateDir.Text) + ? txtConfigTemplateDir.Text + : null, + }; + var result = dlg.ShowDialog(this); + if (result == DialogResult.OK) + { + txtConfigTemplateDir.Text = dlg.SelectedPath; + } + } + + private void BrowseTemplateZipFileHandler(object sender, EventArgs e) + { + var dlg = new OpenFileDialog + { + CheckFileExists = true, + Filter = "ZIP Archive (*.zip)|*.zip", + Title = "Select ZIP file with Bench configuration...", + InitialDirectory = File.Exists(txtConfigTemplateZipFile.Text) + ? Path.GetDirectoryName(txtConfigTemplateZipFile.Text) + : null, + }; + var result = dlg.ShowDialog(this); + if (result == DialogResult.OK) + { + txtConfigTemplateZipFile.Text = dlg.FileName; + } + } } } diff --git a/BenchManager/BenchLib/UI/ExistingConfigStepControl.resx b/BenchManager/BenchLib/UI/ExistingConfigStepControl.resx index 7080a7d1..1af7de15 100644 --- a/BenchManager/BenchLib/UI/ExistingConfigStepControl.resx +++ b/BenchManager/BenchLib/UI/ExistingConfigStepControl.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/BenchManager/BenchLib/UI/InitializeConfigTask.cs b/BenchManager/BenchLib/UI/InitializeConfigTask.cs index 606dd3e2..cdb13ffc 100644 --- a/BenchManager/BenchLib/UI/InitializeConfigTask.cs +++ b/BenchManager/BenchLib/UI/InitializeConfigTask.cs @@ -53,8 +53,8 @@ public override bool IsStepVisible(WizzardStepControl wsc) if (wsc == stepUserIdentification) return InitSiteConfig; if (wsc == stepMachineArchitecture) return InitSiteConfig && Windows.MachineArchitecture.Is64BitOperatingSystem; if (wsc == stepExistingConfig) return InitUserConfig; - if (wsc == stepIsolation) return InitUserConfig && !stepExistingConfig.IsConfigGitRepoExisting; - if (wsc == stepAppSeletion) return InitUserConfig && !stepExistingConfig.IsConfigGitRepoExisting; + if (wsc == stepIsolation) return InitUserConfig && stepExistingConfig.ConfigSource == ExistingConfigStepControl.ConfigSourceType.None; + if (wsc == stepAppSeletion) return InitUserConfig && stepExistingConfig.ConfigSource == ExistingConfigStepControl.ConfigSourceType.None; if (wsc == stepAdvanced) return true; return false; } @@ -79,7 +79,7 @@ public override void Before() && Windows.MachineArchitecture.Is64BitOperatingSystem; stepExistingConfig = new ExistingConfigStepControl(); - stepExistingConfig.IsConfigGitRepoExisting = false; + stepExistingConfig.ConfigSource = ExistingConfigStepControl.ConfigSourceType.None; stepIsolation = new IsolationStepControl(); stepIsolation.IntegrateIntoUserProfile = false; @@ -127,15 +127,22 @@ public override void After() } if (InitUserConfig) { - if (stepExistingConfig.IsConfigGitRepoExisting) + switch (stepExistingConfig.ConfigSource) { - config.SetValue(ConfigPropertyKeys.UserConfigRepository, stepExistingConfig.ConfigGitRepo); - } - else - { - config.SetValue(ConfigPropertyKeys.UserConfigRepository, (object)null); - config.SetValue(ConfigPropertyKeys.WizzardIntegrateIntoUserProfile, stepIsolation.IntegrateIntoUserProfile); - config.SetValue(ConfigPropertyKeys.WizzardSelectedApps, stepAppSeletion.SelectedApps); + case ExistingConfigStepControl.ConfigSourceType.Directory: + config.SetValue(ConfigPropertyKeys.UserConfigInitDirectory, stepExistingConfig.ConfigDirectory); + break; + case ExistingConfigStepControl.ConfigSourceType.ZipFile: + config.SetValue(ConfigPropertyKeys.UserConfigInitZipFile, stepExistingConfig.ConfigZipFile); + break; + case ExistingConfigStepControl.ConfigSourceType.GitRepo: + config.SetValue(ConfigPropertyKeys.UserConfigRepository, stepExistingConfig.ConfigGitRepo); + break; + default: + config.SetValue(ConfigPropertyKeys.UserConfigRepository, (object)null); + config.SetValue(ConfigPropertyKeys.WizzardIntegrateIntoUserProfile, stepIsolation.IntegrateIntoUserProfile); + config.SetValue(ConfigPropertyKeys.WizzardSelectedApps, stepAppSeletion.SelectedApps); + break; } } config.SetValue(ConfigPropertyKeys.WizzardStartAutoSetup, stepAdvanced.StartAutoSetup); diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ccbc495..a8039cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,9 @@ Add a link to the GitHub diff like ### Added * Find apps by searching for the executable filename ([#130](https://github.com/winbench/bench/issues/130)) +* Initialize new Bench environment from user config template in: + directory, existing Bench environment, ZIP file, additionally to Git repo + ([#137](https://github.com/winbench/bench/issues/137)) ### Changed * Make 64Bit support the default From a3c3a05b5b05abb2fc6c391917e2825362592ede Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 11:04:44 +0000 Subject: [PATCH 05/11] use nested functions, code cleanup --- BenchManager/BenchLib/BenchTasks.cs | 55 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/BenchManager/BenchLib/BenchTasks.cs b/BenchManager/BenchLib/BenchTasks.cs index 18b2b906..c3eb37ec 100644 --- a/BenchManager/BenchLib/BenchTasks.cs +++ b/BenchManager/BenchLib/BenchTasks.cs @@ -316,7 +316,7 @@ public static Downloader InitializeDownloader(BenchConfiguration config) else return Seq(protocolTypes).Reduce((a, b) => a | b); } - private static IUrlResolver EclipseDownloadLinkResolver = new HtmlLinkUrlResolver( + private static readonly IUrlResolver EclipseDownloadLinkResolver = new HtmlLinkUrlResolver( new UrlPattern( new Regex(@"^www\.eclipse\.org$"), new Regex(@"^/downloads/download\.php"), @@ -329,7 +329,7 @@ public static Downloader InitializeDownloader(BenchConfiguration config) { "mirror_id", new Regex(@"^\d+$") } })); - private static IUrlResolver EclipseMirrorResolver = new SurroundedHtmlLinkUrlResolver( + private static readonly IUrlResolver EclipseMirrorResolver = new SurroundedHtmlLinkUrlResolver( new UrlPattern( new Regex(@"^www\.eclipse\.org$"), new Regex(@"^/downloads/download\.php"), @@ -1101,7 +1101,7 @@ private static ActionResult RunTasks(IBenchManager man, var errorIds = new List(); var taskProgress = 0f; - Action myNotify = info => + void myNotify(TaskInfo info) { if (info == null) return; if (info is TaskProgress) @@ -1121,7 +1121,7 @@ private static ActionResult RunTasks(IBenchManager man, } } notify(info); - }; + } for (int i = 0; i < tasks.Length; i++) { @@ -1276,15 +1276,15 @@ private static void LoadAppLibraries(IBenchManager man, var tasks = new List(); var endEvent = new ManualResetEvent(false); - EventHandler downloadStartedHandler = (o, e) => + void downloadStartedHandler(object o, DownloadEventArgs e) { notify(new TaskProgress( string.Format("Started download for app library '{0}'...", e.Task.Id), progress: (float)finished / taskCnt, detailedMessage: e.Task.Url.ToString())); - }; + } - EventHandler downloadEndedHandler = (o, e) => + void downloadEndedHandler(object o, DownloadEventArgs e) { finished++; if (!e.Task.Success) @@ -1309,15 +1309,15 @@ private static void LoadAppLibraries(IBenchManager man, exception: exc)); } } - }; + } - EventHandler workFinishedHandler = null; - workFinishedHandler = (o, e) => + void workFinishedHandler(object o, EventArgs e) { man.Downloader.DownloadEnded -= downloadEndedHandler; man.Downloader.WorkFinished -= workFinishedHandler; endEvent.Set(); - }; + } + man.Downloader.DownloadStarted += downloadStartedHandler; man.Downloader.DownloadEnded += downloadEndedHandler; man.Downloader.WorkFinished += workFinishedHandler; @@ -1440,14 +1440,14 @@ private static void DownloadAppResources(IBenchManager man, ICollection downloadStartedHandler = (o, e) => + void downloadStartedHandler(object o, DownloadEventArgs e) { notify(new TaskProgress( string.Format("Started download for {0}...", e.Task.Id), (float)finished / tasks.Count, e.Task.Id, e.Task.Url.ToString())); - }; + } - EventHandler downloadEndedHandler = (o, e) => + void downloadEndedHandler(object o, DownloadEventArgs e) { finished++; if (!e.Task.Success) @@ -1461,10 +1461,9 @@ private static void DownloadAppResources(IBenchManager man, ICollection + void workFinishedHandler(object o, EventArgs e) { man.Downloader.DownloadEnded -= downloadEndedHandler; man.Downloader.WorkFinished -= workFinishedHandler; @@ -1473,7 +1472,8 @@ private static void DownloadAppResources(IBenchManager man, ICollection downloadStartedHandler = (o, e) => + void downloadStartedHandler(object o, DownloadEventArgs e) { notify(new TaskProgress( string.Format("Started download for {0}...", e.Task.Id), (float)finished / taskCount, e.Task.Id, e.Task.Url.ToString())); - }; + } - EventHandler downloadEndedHandler = (o, e) => + void downloadEndedHandler(object o, DownloadEventArgs e) { finished++; if (!e.Task.Success) @@ -1970,15 +1970,14 @@ private static void DownloadBenchUpdate(IBenchManager man, string.Format("Finished download for {0}.", e.Task.Id), (float)finished / taskCount, e.Task.Id)); } - }; + } - EventHandler workFinishedHandler = null; - workFinishedHandler = (EventHandler)((o, e) => + void workFinishedHandler(object o, EventArgs e) { man.Downloader.DownloadEnded -= downloadEndedHandler; man.Downloader.WorkFinished -= workFinishedHandler; endEvent.Set(); - }); + }; man.Downloader.DownloadStarted += downloadStartedHandler; man.Downloader.DownloadEnded += downloadEndedHandler; man.Downloader.WorkFinished += workFinishedHandler; @@ -2206,7 +2205,7 @@ private static void ExtractMsiPackage(BenchConfiguration config, IProcessExecuti throw new FileNotFoundException("Could not find the executable of LessMSI."); } var env = new BenchEnvironment(config); - + var args = CommandLine.FormatArgumentList("x", archiveFile, targetDir + "\\"); var result = execHost.RunProcess(env, targetDir, lessMsiExe, args, ProcessMonitoring.ExitCodeAndOutput); @@ -3123,7 +3122,7 @@ private static void CloneBenchEnvironment(IBenchManager man, catch (Exception e) { notify(new TaskError( - "Failed to clone the Bench environment files.", + "Failed to clone the Bench environment files.", exception: e)); return; } @@ -3134,7 +3133,7 @@ private static void CloneBenchEnvironment(IBenchManager man, catch (Exception e) { notify(new TaskError( - "Failed to start the initialization of the new Bench environment.", + "Failed to start the initialization of the new Bench environment.", exception: e)); return; } From b6fb9e845e8f65cbf430aa05d14a96cf24e0bd7e Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 12:39:49 +0000 Subject: [PATCH 06/11] prevent file access conflict if two apps use the same resource/archive name (fixes #138) --- BenchManager/BenchLib/BenchTasks.cs | 17 ++++++++++++----- CHANGELOG.md | 6 ++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/BenchManager/BenchLib/BenchTasks.cs b/BenchManager/BenchLib/BenchTasks.cs index c3eb37ec..ef72f511 100644 --- a/BenchManager/BenchLib/BenchTasks.cs +++ b/BenchManager/BenchLib/BenchTasks.cs @@ -1496,12 +1496,19 @@ void workFinishedHandler(object o, EventArgs e) var targetFile = app.ResourceFileName ?? app.ResourceArchiveName; var targetPath = Path.Combine(targetDir, targetFile); - var task = new DownloadTask(app.ID, new Uri(app.Url), targetPath); - task.Headers = app.DownloadHeaders; - task.Cookies = app.DownloadCookies; - tasks.Add(task); + var targetIsAlreadyQueued = Seq((IEnumerable)tasks) + .Any(t => string.Equals(t.TargetFile, targetPath, StringComparison.InvariantCultureIgnoreCase)); + if (!targetIsAlreadyQueued) + { + var task = new DownloadTask(app.ID, new Uri(app.Url), targetPath) + { + Headers = app.DownloadHeaders, + Cookies = app.DownloadCookies + }; + tasks.Add(task); - man.Downloader.Enqueue(task); + man.Downloader.Enqueue(task); + } } if (tasks.Count == 0) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8039cdb..b3e94968 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,12 @@ Add a link to the GitHub diff like * Make 64Bit support the default ([#136](https://github.com/winbench/bench/issues/136)) +### Fixed +* If multiple apps use the same archive or resource name for download, + use the URL of the first app, and download the resource only once + ([#138](https://github.com/winbench/bench/issues/138)) + + ## [0.21.1] - 2019-02-25 [0.21.1]: https://github.com/winbench/bench/compare/v0.21.0...v0.21.1 From 088f5ddcba743930d45951930a6eb1970698226f Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 12:41:22 +0000 Subject: [PATCH 07/11] catch exception when launching an app --- BenchManager/BenchDashboard/Core.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BenchManager/BenchDashboard/Core.cs b/BenchManager/BenchDashboard/Core.cs index 33199ab5..b30357f7 100644 --- a/BenchManager/BenchDashboard/Core.cs +++ b/BenchManager/BenchDashboard/Core.cs @@ -792,6 +792,14 @@ public Process LaunchApp(string id, params string[] args) + e.FileName); return null; } + catch (System.ComponentModel.Win32Exception e) + { + UI.ShowWarning("Launching App", + "Failed to execute the apps main executable." + + Environment.NewLine + Environment.NewLine + + e.Message); + return null; + } } public void ShowAppInfo(string id) From ce5c7baed521143cbef05b3902f7200111c15de7 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Thu, 28 Mar 2019 12:44:34 +0000 Subject: [PATCH 08/11] always launch apps via shell (fixes #139) --- BenchManager/BenchLib/BenchTasks.cs | 14 +++----------- CHANGELOG.md | 4 +++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/BenchManager/BenchLib/BenchTasks.cs b/BenchManager/BenchLib/BenchTasks.cs index ef72f511..2e3104b8 100644 --- a/BenchManager/BenchLib/BenchTasks.cs +++ b/BenchManager/BenchLib/BenchTasks.cs @@ -576,17 +576,9 @@ public static Process LaunchApp(BenchConfiguration config, BenchEnvironment env, { throw new ArgumentException("The launcher executable is not set."); } - if (isAdorned) - { - return StartProcessViaShell(env, cwd, - exe, CommandLine.SubstituteArgumentList(app.LauncherArguments, args), - ProcessWindowStyle.Minimized); - } - else - { - return StartProcess(env, cwd, - exe, CommandLine.SubstituteArgumentList(app.LauncherArguments, args)); - } + return StartProcessViaShell(env, cwd, + exe, CommandLine.SubstituteArgumentList(app.LauncherArguments, args), + isAdorned ? ProcessWindowStyle.Minimized : ProcessWindowStyle.Normal); } private static string GemExe(BenchConfiguration config) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3e94968..fe04bdb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,9 @@ Add a link to the GitHub diff like * If multiple apps use the same archive or resource name for download, use the URL of the first app, and download the resource only once ([#138](https://github.com/winbench/bench/issues/138)) - +* Correct the launch behavior for apps from _Bench Dashboard_ + according to the launcher scripts: always use shell to start process + ([#139](https://github.com/winbench/bench/issues/139)) ## [0.21.1] - 2019-02-25 From 4b98a14efc66e697be4d838fdcb31a5a7a5aee6a Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Fri, 29 Mar 2019 10:08:25 +0100 Subject: [PATCH 09/11] added AppFacade.IsManagedPackageFromRemoteRepo --- .../BenchCLI/Commands/ListAppsCommand.cs | 2 ++ BenchManager/BenchDashboard/AppList.cs | 4 +-- BenchManager/BenchLib/AppFacade.cs | 27 ++++++++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/BenchManager/BenchCLI/Commands/ListAppsCommand.cs b/BenchManager/BenchCLI/Commands/ListAppsCommand.cs index 62bf857b..17f4e8cf 100644 --- a/BenchManager/BenchCLI/Commands/ListAppsCommand.cs +++ b/BenchManager/BenchCLI/Commands/ListAppsCommand.cs @@ -27,6 +27,7 @@ public enum AppSet Groups, MetaApps, ManagedPackages, + ManagedPackagesFromRemote, } private const string OPTION_SET = "set"; @@ -200,6 +201,7 @@ private bool IsIncludedInSet(AppFacade app, AppSet set) case AppSet.Groups: return app.Typ == AppTyps.Group; case AppSet.MetaApps: return app.Typ == AppTyps.Meta; case AppSet.ManagedPackages: return app.IsManagedPackage; + case AppSet.ManagedPackagesFromRemote: return app.IsManagedPackageFromRemoteRepo; default: throw new NotSupportedException(); } } diff --git a/BenchManager/BenchDashboard/AppList.cs b/BenchManager/BenchDashboard/AppList.cs index 0e311d29..a45e5179 100644 --- a/BenchManager/BenchDashboard/AppList.cs +++ b/BenchManager/BenchDashboard/AppList.cs @@ -318,7 +318,7 @@ private void gridApps_RowContextMenuStripNeeded(object sender, DataGridViewRowCo miInstall.Visible = contextApp.CanInstall; miReinstall.Visible = contextApp.CanReinstall; miUpgrade.Visible = contextApp.CanUpgrade; - miPackageUpgrade.Visible = contextApp.IsInstalled && contextApp.IsManagedPackage; + miPackageUpgrade.Visible = contextApp.IsInstalled && contextApp.IsManagedPackageFromRemoteRepo; miUninstall.Visible = contextApp.CanUninstall; miDownloadResource.Visible = contextApp.CanDownloadResource; @@ -327,7 +327,7 @@ private void gridApps_RowContextMenuStripNeeded(object sender, DataGridViewRowCo var g1 = contextApp.CanInstall || contextApp.CanReinstall || contextApp.CanUpgrade - || contextApp.IsInstalled && contextApp.IsManagedPackage + || contextApp.IsInstalled && contextApp.IsManagedPackageFromRemoteRepo || contextApp.CanUninstall; var g2 = contextApp.CanDownloadResource || contextApp.CanDeleteResource; diff --git a/BenchManager/BenchLib/AppFacade.cs b/BenchManager/BenchLib/AppFacade.cs index 2a68110f..d31bad60 100644 --- a/BenchManager/BenchLib/AppFacade.cs +++ b/BenchManager/BenchLib/AppFacade.cs @@ -199,6 +199,27 @@ public bool IsManagedPackage } } + /// + /// Checks, if this app is a package, downloaded from a remote repositry by some kind of package manager. + /// + /// + /// true if this app is managed by a package manager and downloaded + /// from a remote repository by this package manager; otherwise false. + /// + public bool IsManagedPackageFromRemoteRepo + { + get + { + var typ = Typ; + return typ == AppTyps.NodePackage + || typ == AppTyps.RubyPackage + || typ == AppTyps.PythonPackage + || typ == AppTyps.Python2Package + || typ == AppTyps.Python3Package + || typ == AppTyps.NuGetPackage; + } + } + /// /// Gets the version string of the app, or null if the app has no specified version. /// @@ -1279,7 +1300,7 @@ public bool CanUninstall public bool CanReinstall => CanCheckInstallation && IsInstalled && (!HasResource || IsResourceCached) - && !IsManagedPackage + && !IsManagedPackageFromRemoteRepo || !CanCheckInstallation && GetCustomScript("remove") != null && GetCustomScript("setup") != null; @@ -1293,11 +1314,11 @@ public bool CanReinstall public bool CanUpgrade => // App with no version or version difference CanCheckInstallation && IsInstalled - && !IsManagedPackage + && !IsManagedPackageFromRemoteRepo && (!IsVersioned || !IsVersionUpToDate) // App with custom setup and remove || !CanCheckInstallation - && !IsManagedPackage + && !IsManagedPackageFromRemoteRepo && GetCustomScript("remove") != null && GetCustomScript("setup") != null; From 9261fc40a97e521e2d54b8749de161452e527133 Mon Sep 17 00:00:00 2001 From: Tobias Kiertscher Date: Fri, 29 Mar 2019 10:09:26 +0100 Subject: [PATCH 10/11] added new app types python-wheel, python2-wheel, python3-wheel (fixes #120) --- BenchManager/BenchDashboard/AppWrapper.cs | 6 + BenchManager/BenchLib/AppFacade.cs | 339 ++++++++---------- .../BenchLib/AppIndexDefaultValueSource.cs | 6 + BenchManager/BenchLib/AppTyps.cs | 15 +- BenchManager/BenchLib/BenchTasks.cs | 16 +- CHANGELOG.md | 2 + 6 files changed, 198 insertions(+), 186 deletions(-) diff --git a/BenchManager/BenchDashboard/AppWrapper.cs b/BenchManager/BenchDashboard/AppWrapper.cs index ea454ae9..0a046909 100644 --- a/BenchManager/BenchDashboard/AppWrapper.cs +++ b/BenchManager/BenchDashboard/AppWrapper.cs @@ -68,6 +68,12 @@ public string Typ return "Python 2"; case AppTyps.Python3Package: return "Python 3"; + case AppTyps.PythonWheel: + return "Python Wheel"; + case AppTyps.Python2Wheel: + return "Python 2 Wheel"; + case AppTyps.Python3Wheel: + return "Python 3 Wheel"; case AppTyps.NuGetPackage: return "NuGet"; default: diff --git a/BenchManager/BenchLib/AppFacade.cs b/BenchManager/BenchLib/AppFacade.cs index d31bad60..4303fa57 100644 --- a/BenchManager/BenchLib/AppFacade.cs +++ b/BenchManager/BenchLib/AppFacade.cs @@ -195,6 +195,9 @@ public bool IsManagedPackage || typ == AppTyps.PythonPackage || typ == AppTyps.Python2Package || typ == AppTyps.Python3Package + || typ == AppTyps.PythonWheel + || typ == AppTyps.Python2Wheel + || typ == AppTyps.Python3Wheel || typ == AppTyps.NuGetPackage; } } @@ -709,8 +712,8 @@ internal string GetVersionFile() /// Checks, whether this app has a downloadable app resource, or not. /// public bool HasResource - => Typ == AppTyps.Default && - (ResourceFileName != null || ResourceArchiveName != null); + => (Typ == AppTyps.Default && (ResourceFileName != null || ResourceArchiveName != null)) + || ((Typ == AppTyps.PythonWheel || Typ == AppTyps.Python2Wheel || Typ == AppTyps.Python3Wheel) && ResourceFileName != null); /// /// Checks, whether the installation state of this app can be checked, or not. @@ -724,7 +727,10 @@ public bool CanCheckInstallation || Typ == AppTyps.RubyPackage || Typ == AppTyps.PythonPackage || Typ == AppTyps.Python2Package - || Typ == AppTyps.Python3Package; + || Typ == AppTyps.Python3Package + || Typ == AppTyps.PythonWheel + || Typ == AppTyps.Python2Wheel + || Typ == AppTyps.Python3Wheel; } } @@ -752,6 +758,7 @@ private bool GetIsInstalled() var folders = Directory.GetDirectories(gemDirBase, PackageName + "-*"); return folders.Length > 0; case AppTyps.PythonPackage: + case AppTyps.PythonWheel: if (File.Exists(SetupTestFile)) return true; var python2App = new AppFacade(Config, AppIndex, AppKeys.Python2); var pipPackageDir2 = IOPath.Combine( @@ -776,12 +783,14 @@ private bool GetIsInstalled() } return false; case AppTyps.Python2Package: + case AppTyps.Python2Wheel: var python2Dir = AppIndex.GetStringGroupValue(AppKeys.Python2, AppPropertyKeys.Dir); var pip2PackageDir = IOPath.Combine( IOPath.Combine(python2Dir, "lib"), IOPath.Combine("site-packages", PackageName)); return Directory.Exists(pip2PackageDir); case AppTyps.Python3Package: + case AppTyps.Python3Wheel: var python3Dir = AppIndex.GetStringGroupValue(AppKeys.Python3, AppPropertyKeys.Dir); var pip3PackageDir = IOPath.Combine( IOPath.Combine(python3Dir, "lib"), @@ -823,6 +832,10 @@ private bool GetIsResourceCached() : ResourceArchiveName != null ? File.Exists(IOPath.Combine(Config.GetStringValue(ConfigPropertyKeys.AppsCacheDir), ResourceArchiveName)) : true; + case AppTyps.PythonWheel: + case AppTyps.Python2Wheel: + case AppTyps.Python3Wheel: + return File.Exists(IOPath.Combine(Config.GetStringValue(ConfigPropertyKeys.AppsCacheDir), ResourceFileName)); default: return false; } @@ -929,46 +942,153 @@ public string ShortStatus get { if (CanCheckInstallation && IsInstalled) - { if (HasResource && !IsResourceCached) return "not cached"; else return "installed"; - } else - { if (!IsSupported) - { return "not supported"; - } else if (IsDeactivated) - { if (HasResource && IsResourceCached) return "cached"; else return "deactivated"; - } else - { if (IsActive) - { if (CanCheckInstallation) return "pending"; else return "active"; - } else - { if (HasResource && IsResourceCached) return "cached"; else return "inactive"; - } - } - } } } + private string LongStatusInstalledWithResource() + { + if (!IsSupported) + if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) + return "is not supported on this system."; + else + return "is not supported in this configuration."; + else if (IsDeactivated) + if (HasResource && IsResourceCached) + return "is deactivated, but cached and installed."; + else + return "is deactivated, but installed."; + else + if (IsActivated) + if (HasResource && !IsResourceCached) + return "is active and installed, but its resource is not cached."; + else + return "is active and installed."; + else if (IsActive) + if (HasResource && !IsResourceCached) + return "is required and installed, but its resource is not cached."; + else + return "is required and installed."; + else + if (HasResource && !IsResourceCached) + return "is not active, but installed."; + else + return "is not active, but cached and installed."; + } + + private string LongStatusCanNotCheckInstallationWithResource() + { + if (!IsSupported) + if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) + return "is not supported on this system."; + else + return "is not supported in this configuration."; + else if (IsDeactivated) + if (HasResource && IsResourceCached) + return "is deactivated, but cached."; + else + return "is deactivated."; + else + if (IsActivated) + if (HasResource && !IsResourceCached) + return "is active, but not cached."; + else + return "is active."; + else if (IsActive) + if (HasResource && !IsResourceCached) + return "is required, but not cached."; + else + return "is required."; + else + if (HasResource && IsResourceCached) + return "is not active, but cached."; + else + return "is not active."; + } + + private string LongStatusNotInstalledWithResource() + { + if (!IsSupported) + if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) + return "is not supported on this system."; + else + return "is not supported in this configuration."; + else if (IsDeactivated) + if (HasResource && IsResourceCached) + return "is deactivated, but cached."; + else + return "is deactivated."; + else + if (IsActivated) + if (HasResource && !IsResourceCached) + return "is active, but not cached or installed."; + else + return "is active, but not installed."; + else if (IsActive) + if (HasResource && !IsResourceCached) + return "is required, but not cached or installed."; + else + return "is required, but not installed."; + else + if (HasResource && IsResourceCached) + return "is not active, but cached."; + else + return "is not active."; + } + + private string LongStatusInstalled() + { + if (IsDeactivated) + return "is deactivated, but installed."; + else + if (IsActivated) + return "is active and installed."; + else if (IsActive) + return "is required and installed."; + else + return "is not active, but installed."; + } + + private string LongStatusNotInstalled() + { + if (!IsSupported) + if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) + return "is not supported on this system."; + else + return "is not supported in this configuration."; + else if (IsDeactivated) + return "is deactivated."; + else + if (IsActivated) + return "is activated, but not installed."; + else if (IsActive) + return "is required, but not installed."; + else + return "is not active."; + } + /// /// Returns a string with a virtually complete description of the apps overall state. /// @@ -981,129 +1101,15 @@ public string LongStatus case AppTyps.Meta: case AppTyps.Group: case AppTyps.Default: - if (CanCheckInstallation && IsInstalled) - { - if (!IsSupported) - { - if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) - return "App is not supported on this system."; - else - return "App is not supported in this configuration."; - } - else if (IsDeactivated) - { - if (HasResource && IsResourceCached) - return "App is deactivated, but cached and installed."; - else - return "App is deactivated, but installed."; - } - else - { - if (IsActivated) - { - if (HasResource && !IsResourceCached) - return "App is active and installed, but its resource is not cached."; - else - return "App is active and installed."; - } - else if (IsActive) - { - if (HasResource && !IsResourceCached) - return "App is required and installed, but its resource is not cached."; - else - return "App is required and installed."; - } - else - { - if (HasResource && !IsResourceCached) - return "App is not active, but installed."; - else - return "App is not active, but cached and installed."; - } - } - } - else if (!CanCheckInstallation) - { - if (!IsSupported) - { - if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) - return "App is not supported on this system."; - else - return "App is not supported in this configuration."; - } - else if (IsDeactivated) - { - if (HasResource && IsResourceCached) - return "App is deactivated, but cached."; - else - return "App is deactivated."; - } - else - { - if (IsActivated) - { - if (HasResource && !IsResourceCached) - return "App is active, but not cached."; - else - return "App is active."; - } - else if (IsActive) - { - if (HasResource && !IsResourceCached) - return "App is required, but not cached."; - else - return "App is required."; - } - else - { - if (HasResource && IsResourceCached) - return "App is not active, but cached."; - else - return "App is not active."; - } - } - } - else - { - if (!IsSupported) - { - if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) - return "App is not supported on this system."; - else - return "App is not supported in this configuration."; - } - else if (IsDeactivated) - { - if (HasResource && IsResourceCached) - return "App is deactivated, but cached."; - else - return "App is deactivated."; - } - else - { - if (IsActivated) - { - if (HasResource && !IsResourceCached) - return "App is active, but not cached or installed."; - else - return "App is active, but not installed."; - } - else if (IsActive) - { - if (HasResource && !IsResourceCached) - return "App is required, but not cached or installed."; - else - return "App is required, but not installed."; - } - else - { - if (HasResource && IsResourceCached) - return "App is not active, but cached."; - else - return "App is not active."; - } - } - } + case AppTyps.PythonWheel: + case AppTyps.Python2Wheel: + case AppTyps.Python3Wheel: + if (!CanCheckInstallation) + return "App " + LongStatusCanNotCheckInstallationWithResource(); + else if (IsInstalled) + return "App " + LongStatusInstalledWithResource(); + else + return "App " + LongStatusNotInstalledWithResource(); case AppTyps.NodePackage: case AppTyps.RubyPackage: case AppTyps.PythonPackage: @@ -1111,44 +1117,9 @@ public string LongStatus case AppTyps.Python3Package: case AppTyps.NuGetPackage: if (IsInstalled) - { - if (IsDeactivated) - { - return "Package is deactivated, but installed."; - } - else - { - if (IsActivated) - return "Package is active and installed."; - else if (IsActive) - return "Package is required and installed."; - else - return "Package is not active, but installed."; - } - } + return "Package " + LongStatusInstalled(); else - { - if (!IsSupported) - { - if (Config.GetBooleanValue(ConfigPropertyKeys.Allow64Bit)) - return "App is not supported on this system."; - else - return "App is not supported in this configuration."; - } - else if (IsDeactivated) - { - return "Package is deactivated."; - } - else - { - if (IsActivated) - return "Package is activated, but not installed."; - else if (IsActive) - return "Package is required, but not installed."; - else - return "Package is not active."; - } - } + return "Package " + LongStatusNotInstalled(); default: return "Unkown app typ."; } @@ -1273,7 +1244,7 @@ private static int Match(string needle, string haystack) /// /// Checks, whether the app has a resource and the resource is not cached. /// - public bool CanDownloadResource => HasResource && !IsResourceCached; + public bool CanDownloadResource => HasResource && !IsResourceCached && !string.IsNullOrWhiteSpace(Url); /// /// Checks, whether the app has cached resource. @@ -1408,14 +1379,16 @@ private void AddDependency(string app) /// public bool IsPython2Package => Typ == AppTyps.Python2Package - || (Typ == AppTyps.PythonPackage && IsPython2Activated); + || Typ == AppTyps.Python2Wheel + || ((Typ == AppTyps.PythonPackage || Typ == AppTyps.PythonWheel) && IsPython2Activated); /// /// Checks if this app is a Python package which will be installed under Python 3. /// public bool IsPython3Package => Typ == AppTyps.Python3Package - || (Typ == AppTyps.PythonPackage && (IsPython3Activated || !IsPython2Activated)); + || Typ == AppTyps.Python3Wheel + || ((Typ == AppTyps.PythonPackage || Typ == AppTyps.PythonWheel) && (IsPython3Activated || !IsPython2Activated)); private bool IsPython2Activated => AppIndex.GetBooleanGroupValue(AppKeys.Python2, AppPropertyKeys.IsActivated); @@ -1434,12 +1407,15 @@ private void SetupAutoDependencies() AddDependency(AppKeys.RubyGems); break; case AppTyps.PythonPackage: + case AppTyps.PythonWheel: AddDependency(IsPython2Activated ? AppKeys.Python2 : AppKeys.Python3); break; case AppTyps.Python2Package: + case AppTyps.Python2Wheel: AddDependency(AppKeys.Python2); break; case AppTyps.Python3Package: + case AppTyps.Python3Wheel: AddDependency(AppKeys.Python3); break; case AppTyps.NuGetPackage: @@ -1499,13 +1475,16 @@ internal void ResetAutoDependency() deps = RemoveFromSet(deps, AppKeys.RubyGems); break; case AppTyps.PythonPackage: + case AppTyps.PythonWheel: deps = RemoveFromSet(deps, AppKeys.Python2); deps = RemoveFromSet(deps, AppKeys.Python3); break; case AppTyps.Python2Package: + case AppTyps.Python2Wheel: deps = RemoveFromSet(deps, AppKeys.Python2); break; case AppTyps.Python3Package: + case AppTyps.Python3Wheel: deps = RemoveFromSet(deps, AppKeys.Python3); break; case AppTyps.NuGetPackage: diff --git a/BenchManager/BenchLib/AppIndexDefaultValueSource.cs b/BenchManager/BenchLib/AppIndexDefaultValueSource.cs index 4d0837bf..ec4289e7 100644 --- a/BenchManager/BenchLib/AppIndexDefaultValueSource.cs +++ b/BenchManager/BenchLib/AppIndexDefaultValueSource.cs @@ -94,12 +94,15 @@ public object GetGroupValue(string appId, string key) case AppTyps.RubyPackage: return AppIndex.GetGroupValue(AppKeys.Ruby, AppPropertyKeys.Dir); case AppTyps.PythonPackage: + case AppTyps.PythonWheel: return File.Exists(AppIndex.GetStringGroupValue(AppKeys.Python3, AppPropertyKeys.Exe)) ? AppIndex.GetGroupValue(AppKeys.Python3, AppPropertyKeys.Dir) : AppIndex.GetGroupValue(AppKeys.Python2, AppPropertyKeys.Dir); case AppTyps.Python2Package: + case AppTyps.Python2Wheel: return AppIndex.GetGroupValue(AppKeys.Python2, AppPropertyKeys.Dir); case AppTyps.Python3Package: + case AppTyps.Python3Wheel: return AppIndex.GetGroupValue(AppKeys.Python3, AppPropertyKeys.Dir); case AppTyps.Meta: return null; @@ -118,6 +121,7 @@ public object GetGroupValue(string appId, string key) case AppTyps.RubyPackage: return AppIndex.GetGroupValue(AppKeys.Ruby, AppPropertyKeys.Path); case AppTyps.PythonPackage: + case AppTyps.PythonWheel: return File.Exists(AppIndex.GetStringGroupValue(AppKeys.Python3, AppPropertyKeys.Exe)) ? Path.Combine( AppIndex.GetGroupValue(AppKeys.Python3, AppPropertyKeys.Dir) as string, @@ -126,10 +130,12 @@ public object GetGroupValue(string appId, string key) AppIndex.GetGroupValue(AppKeys.Python2, AppPropertyKeys.Dir) as string, "Scripts"); case AppTyps.Python2Package: + case AppTyps.Python2Wheel: return Path.Combine( AppIndex.GetGroupValue(AppKeys.Python2, AppPropertyKeys.Dir) as string, "Scripts"); case AppTyps.Python3Package: + case AppTyps.Python3Wheel: return Path.Combine( AppIndex.GetGroupValue(AppKeys.Python3, AppPropertyKeys.Dir) as string, "Scripts"); diff --git a/BenchManager/BenchLib/AppTyps.cs b/BenchManager/BenchLib/AppTyps.cs index b63ab49b..82f80b90 100644 --- a/BenchManager/BenchLib/AppTyps.cs +++ b/BenchManager/BenchLib/AppTyps.cs @@ -24,15 +24,24 @@ public static class AppTyps /// The name of the app typ for Ruby gems. public const string RubyPackage = "ruby-package"; - /// The name of the app typ for generic Python packages, managed by PIP. + /// The name of the app typ for generic Python packages from PyPI, managed by PIP. public const string PythonPackage = "python-package"; - /// The name of the app typ for Python 2 packages, managed by PIP. + /// The name of the app typ for Python 2 packages from PyPI, managed by PIP. public const string Python2Package = "python2-package"; - /// The name of the app typ for Python 3 packages, managed by PIP. + /// The name of the app typ for Python 3 packages from PyPI, managed by PIP. public const string Python3Package = "python3-package"; + /// The name of the app typ for generic Python wheel files, managed by PIP. + public const string PythonWheel = "python-wheel"; + + /// The name of the app typ for Python 2 wheel files, managed by PIP. + public const string Python2Wheel = "python2-wheel"; + + /// The name of the app typ for Python 3 wheel files, managed by PIP. + public const string Python3Wheel = "python3-wheel"; + /// The name of the app typ for NuGet packages. public const string NuGetPackage = "nuget-package"; } diff --git a/BenchManager/BenchLib/BenchTasks.cs b/BenchManager/BenchLib/BenchTasks.cs index 2e3104b8..54b57507 100644 --- a/BenchManager/BenchLib/BenchTasks.cs +++ b/BenchManager/BenchLib/BenchTasks.cs @@ -2290,7 +2290,13 @@ private static void InstallPythonPackage(BenchConfiguration config, IProcessExec } var argList = new List(); argList.Add("install"); - if (app.IsVersioned) + if (app.IsInstalled) argList.Add("--upgrade"); + //argList.Add("--quiet"); + if (!app.IsManagedPackageFromRemoteRepo) // python wheel file + { + argList.Add(Path.Combine(config.GetStringValue(ConfigPropertyKeys.AppsCacheDir), app.ResourceFileName)); + } + else if (app.IsVersioned) { argList.Add(app.PackageName + "==" + app.Version); } @@ -2298,8 +2304,6 @@ private static void InstallPythonPackage(BenchConfiguration config, IProcessExec { argList.Add(app.PackageName); } - if (app.IsInstalled) argList.Add("--upgrade"); - //argList.Add("--quiet"); var args = CommandLine.FormatArgumentList(argList.ToArray()); var result = execHost.RunProcess(new BenchEnvironment(config), config.BenchRootDir, pipExe, args, ProcessMonitoring.ExitCodeAndOutput); @@ -2400,6 +2404,7 @@ private static bool InstallApp(IBenchManager man, AppFacade app, Action Date: Fri, 29 Mar 2019 10:10:13 +0100 Subject: [PATCH 11/11] pushed version to 0.22.0 --- BenchManager/BenchCLI/Properties/AssemblyInfo.cs | 4 ++-- BenchManager/BenchDashboard/Properties/AssemblyInfo.cs | 4 ++-- BenchManager/BenchLib/Properties/AssemblyInfo.cs | 4 ++-- CHANGELOG.md | 4 ++++ res/bench-install.bat | 2 +- res/version.txt | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/BenchManager/BenchCLI/Properties/AssemblyInfo.cs b/BenchManager/BenchCLI/Properties/AssemblyInfo.cs index 70f8fb06..0a14c7c4 100644 --- a/BenchManager/BenchCLI/Properties/AssemblyInfo.cs +++ b/BenchManager/BenchCLI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.21.1.0")] -[assembly: AssemblyFileVersion("0.21.1.0")] +[assembly: AssemblyVersion("0.22.0.0")] +[assembly: AssemblyFileVersion("0.22.0.0")] diff --git a/BenchManager/BenchDashboard/Properties/AssemblyInfo.cs b/BenchManager/BenchDashboard/Properties/AssemblyInfo.cs index d1f2f8a7..ea832c56 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.21.1.0")] -[assembly: AssemblyFileVersion("0.21.1.0")] +[assembly: AssemblyVersion("0.22.0.0")] +[assembly: AssemblyFileVersion("0.22.0.0")] diff --git a/BenchManager/BenchLib/Properties/AssemblyInfo.cs b/BenchManager/BenchLib/Properties/AssemblyInfo.cs index 7650b298..f439940c 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.21.1.0")] -[assembly: AssemblyFileVersion("0.21.1.0")] +[assembly: AssemblyVersion("0.22.0.0")] +[assembly: AssemblyFileVersion("0.22.0.0")] diff --git a/CHANGELOG.md b/CHANGELOG.md index 03479c90..755df26b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,10 @@ Add a link to the GitHub diff like [Unreleased]: https://github.com/winbench/bench/compare/master...dev +## [0.22.0] - 2019-03-29 + +[0.22.0]: https://github.com/winbench/bench/compare/v0.21.1...v0.22.0 + ### Added * Find apps by searching for the executable filename ([#130](https://github.com/winbench/bench/issues/130)) diff --git a/res/bench-install.bat b/res/bench-install.bat index f4517440..bfc05617 100644 --- a/res/bench-install.bat +++ b/res/bench-install.bat @@ -7,7 +7,7 @@ SetLocal :: https://winbench.org/guide/setup/ :: -SET VERSION=0.21.1 +SET VERSION=0.22.0 SET TAG=v%VERSION% SET ROOT=%~dp0 IF [%1] NEQ [] SET ROOT=%~dpnx1\ diff --git a/res/version.txt b/res/version.txt index b9f8e558..a7f3fc27 100644 --- a/res/version.txt +++ b/res/version.txt @@ -1 +1 @@ -0.21.1 \ No newline at end of file +0.22.0 \ No newline at end of file