Skip to content

Commit

Permalink
Release/2.10.1 (#205)
Browse files Browse the repository at this point in the history
* Added code for the new extension store

* Test

* Turned Mnemonic off for all controls supporting it (#158) (#159)

Co-authored-by: Develeon64 <software@develeon.de>

* Feature/check if a instance of macro deck is already running and show main window if (#162)

* First non-working test

* Switched pipe process spawn to STAThread (#161)

* Added SynchronizationContext to prevent thread issues in the ui

* Added SynchronizationContext to prevent thread issues in the ui

* Fixed: tray icon was shown multiple times when Macro Deck was started while running

Co-authored-by: RecklessBoon <16234384+RecklessBoon@users.noreply.github.com>

* Fixed: main Window not shown

* Fixed #155 (#163)

* Fixed #145 (#164)

* Added syntax highlighting

* Syntax highlight improvements (#165)

* syntax highlighting whole words
allow returns in Cottle
readable colours

* renamed variables

* Added option to turn on/off blank line trimming
Added auto complete
Added highlighting for variables

* Feature/template editor syntax highlighting (#166)

* Added syntax highlighting

* Syntax highlight improvements (#165)

* syntax highlighting whole words
allow returns in Cottle
readable colours

* renamed variables

* Added option to turn on/off blank line trimming
Added auto complete
Added highlighting for variables

Co-authored-by: Will <54237626+PhoenixWyllow@users.noreply.github.com>

* Added option to turn on/off blank line trimming

* Updated the plugin api

* Feature/offline plugin installation (#173)

* Feature/offline plugin installation (#168)

* Adds feature to install plugin from zip

- Extracted code that installs from zip to separate func
- Enhanced Manifest to create itself from a file
- Added GUI for picking and installing local zip
  - Needs UI improvement, but it works for now

* Improves manual plugin install GUI

* Added ExtensionManifest

Co-authored-by: RecklessBoon <16234384+RecklessBoon@users.noreply.github.com>

* Update Spanish.xml (#172)

* Feature/extension store (#174)

* Fixed: plugin and extension manifest was not loaded

* Fixed the url for the updater

* Re-added the check of the md5 hash of downloaded extensions

* Feature/extension store (#176)

* Fixed: plugin and extension manifest was not loaded

* Fixed the url for the updater

* Re-added the check of the md5 hash of downloaded extensions

* Fixed download counter

* Added Guid (#177)

* Feature/icon pack rewrite (#179)

* Begin of the rewrite of the icon system
Added converter for old icon packs

* Fixed GIFs

* Added local websocket server for usb connections in the future
Now sending the IconBase64 directly in the button object again

* Added message box

* Added backup for the new icon pack format

* Icon packs can be configured in the extension manager

* Added icon pack export

* Added icon pack import

* Added icon packs to the extension store

* Added icon packs to the extension store

* Fixed missing icon when button state = on

* Fixed installation for icon packs from the extension store

* Fixed installation for icon packs from the extension store

* Fixed ExtensionIcon for icon packs

* Removed plugin and icon pack selection in the initial setup; Added download count for icon packs; changed version to 2.9.0

* Fixed error when searching for extension updates

* Fixed bug that prevented the Extension Store from load (#181)

* Fixed bug that prevented the Extension Store from load (#183)

* Update templates (#184)

* Update bug_report.md

* Update issue templates

* Changed translation files to json

* Update README.md

* Update Crowdin configuration file

* Update Crowdin configuration file

* Update Crowdin configuration file

* Delete crowdin.yml

* Improved the design of the extension manager and added missing translations

* Improved the design of the extension manager and added missing translations (#186)

* Improved the ui of the button editor

* Removed untranslated strings

* Update README.md

* Update README.md

* Added save varible to file action

* Added Hungarian translation by @maketrue

* Update English.json (POEditor.com)

* Update Finnish.json (POEditor.com)

* Update French.json (POEditor.com)

* Update German.json (POEditor.com)

* Update Italian.json (POEditor.com)

* Update Korean.json (POEditor.com)

* Update Portuguese.json (POEditor.com)

* Update Russian.json (POEditor.com)

* Update Spanish.json (POEditor.com)

* Update Turkish.json (POEditor.com)

* Update Hungarian.json (POEditor.com)

* Added "Polish" translation by @kali

* Added translation support for Save variable to file action

* Updated translation files

* Fixed duplicate icon pack after icon pack update

* Fixes missing Author issue (#196)

* Replaced WebView2 with CefSharp (#197)

Co-authored-by: Manuel Mayer <suchbyte@hotmail.com>

* Fixed error label positition when resize

* Fixed error label positition when resize

* Updated version

* Fixed crash if Microsoft Visual C++ Redistributable is not installed

Co-authored-by: Develeon64 <software@develeon.de>
Co-authored-by: RecklessBoon <16234384+RecklessBoon@users.noreply.github.com>
Co-authored-by: Will <54237626+PhoenixWyllow@users.noreply.github.com>
Co-authored-by: l69lAnthony <91178943+l69lAnthony@users.noreply.github.com>
Co-authored-by: Manuel Mayer <suchbyte@hotmail.com>
  • Loading branch information
6 people authored Apr 9, 2022
1 parent 21275c8 commit e1a69b6
Show file tree
Hide file tree
Showing 188 changed files with 8,945 additions and 6,326 deletions.
2 changes: 1 addition & 1 deletion ActionButton/ActionButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ private void UpdateBindingState(Variables.Variable variable)
}
}

public string Guid { get; set; } = System.Guid.NewGuid().ToString();

public event EventHandler StateChanged;
public event EventHandler IconChanged;
public long ButtonId { get; set; }

private bool _state = false;
public bool State
Expand Down
4 changes: 2 additions & 2 deletions ActionButton/Plugin/ActionButtonPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace SuchByte.MacroDeck.ActionButton
{
public class ActionButtonPlugin : MacroDeckPlugin
{
public override string Name => LanguageManager.Strings.PluginActionButton;
public override string Author => "Macro Deck";
internal override string Name => LanguageManager.Strings.PluginActionButton;
internal override string Author => "Macro Deck";
public override void Enable()
{
this.Actions = new List<PluginAction>()
Expand Down
9 changes: 5 additions & 4 deletions Backup/BackupManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,12 @@ public static void CreateBackup()
archive.CreateEntryFromFile(Path.Combine(MacroDeck.PluginCredentialsPath, file.Name), Path.Combine(pluginCredentialsDirectoryInfo.Name, file.Name));
}
DirectoryInfo iconPackDirectoryInfo = new DirectoryInfo(MacroDeck.IconPackDirectoryPath);
foreach (FileInfo file in iconPackDirectoryInfo.GetFiles("*"))
foreach (DirectoryInfo dir in iconPackDirectoryInfo.GetDirectories())
{
archive.CreateEntryFromFile(Path.Combine(MacroDeck.IconPackDirectoryPath, file.Name), Path.Combine(iconPackDirectoryInfo.Name, file.Name));
foreach (FileInfo iconPackFile in dir.GetFiles())
{
archive.CreateEntryFromFile(Path.Combine(MacroDeck.IconPackDirectoryPath, dir.Name, iconPackFile.Name), Path.Combine(iconPackDirectoryInfo.Name, dir.Name, iconPackFile.Name));
}
}

MacroDeckLogger.Info("Backup successfully created: " + backupFileName);
Expand Down Expand Up @@ -289,7 +292,5 @@ public static void DeleteBackup(string fileName)
}
}
}


}
}
26 changes: 5 additions & 21 deletions Device/DeviceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public static void SaveKnownDevices()
{
serializer.Serialize(writer, _macroDeckDevices);
}

if (OnDevicesChange != null)
{
OnDevicesChange(null, EventArgs.Empty);
}
}
catch (Exception ex)
{
Expand All @@ -58,11 +63,6 @@ public static void AddKnownDevice(MacroDeckDevice macroDeckDevice)
_macroDeckDevices.Add(macroDeckDevice);
}
SaveKnownDevices();

if (OnDevicesChange != null)
{
OnDevicesChange(macroDeckDevice, EventArgs.Empty);
}
}

public static bool IsKnownDevice(string clientId)
Expand Down Expand Up @@ -111,10 +111,6 @@ public static void SetProfile(MacroDeckDevice macroDeckDevice, MacroDeckProfile
if (macroDeckDevice.Available)
{
MacroDeckServer.SetProfile(MacroDeckServer.GetMacroDeckClient(macroDeckDevice.ClientId), macroDeckProfile);
}
if (OnDevicesChange != null)
{
OnDevicesChange(macroDeckDevice, EventArgs.Empty);
}
}

Expand All @@ -129,10 +125,6 @@ public static void SetBlocked(MacroDeckDevice macroDeckDevice, bool blocked)
{
MacroDeckServer.GetMacroDeckClient(macroDeckDevice.ClientId).SocketConnection.Close();
}
if (OnDevicesChange != null)
{
OnDevicesChange(macroDeckDevice, EventArgs.Empty);
}
}

public static void RenameMacroDeckDevice(MacroDeckDevice macroDeckDevice, string displayName)
Expand All @@ -142,10 +134,6 @@ public static void RenameMacroDeckDevice(MacroDeckDevice macroDeckDevice, string
macroDeckDevice.DisplayName = displayName;
SaveKnownDevices();
}
if (OnDevicesChange != null)
{
OnDevicesChange(macroDeckDevice, EventArgs.Empty);
}
}

public static void RemoveKnownDevice(MacroDeckDevice macroDeckDevice)
Expand All @@ -155,10 +143,6 @@ public static void RemoveKnownDevice(MacroDeckDevice macroDeckDevice)
_macroDeckDevices.Remove(macroDeckDevice);
SaveKnownDevices();
}
if (OnDevicesChange != null)
{
OnDevicesChange(macroDeckDevice, EventArgs.Empty);
}
}

public static bool IsDisplayNameAvailable(string displayName)
Expand Down
17 changes: 17 additions & 0 deletions Extension/IMacroDeckExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using SuchByte.MacroDeck.ExtensionStore;
using System;
using System.Collections.Generic;
using System.Text;

namespace SuchByte.MacroDeck.Extension
{
public interface IMacroDeckExtension
{
public ExtensionType ExtensionType { get; }
public string ExtensionTypeDisplayName { get; }
public object ExtensionObject { get; }
public bool Configurable { get; }
public void Uninstall();

}
}
27 changes: 27 additions & 0 deletions Extension/IconPackExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using SuchByte.MacroDeck.ExtensionStore;
using SuchByte.MacroDeck.Icons;
using SuchByte.MacroDeck.Language;
using System;
using System.Collections.Generic;
using System.Text;

namespace SuchByte.MacroDeck.Extension
{
public class IconPackExtension : IMacroDeckExtension
{
public ExtensionType ExtensionType => ExtensionType.IconPack;
public string ExtensionTypeDisplayName => LanguageManager.Strings.IconPack;
public object ExtensionObject { get; set; }
public bool Configurable => false;

public IconPackExtension(IconPack iconPack)
{
this.ExtensionObject = iconPack;
}

public void Uninstall()
{

}
}
}
28 changes: 28 additions & 0 deletions Extension/PluginExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using SuchByte.MacroDeck.ExtensionStore;
using SuchByte.MacroDeck.Language;
using SuchByte.MacroDeck.Plugins;
using System;
using System.Collections.Generic;
using System.Text;

namespace SuchByte.MacroDeck.Extension
{
public class PluginExtension : IMacroDeckExtension
{
public ExtensionType ExtensionType => ExtensionType.Plugin;
public string ExtensionTypeDisplayName => LanguageManager.Strings.Plugin;
public object ExtensionObject { get; set; }

public bool Configurable => this.ExtensionObject != null && (this.ExtensionObject as MacroDeckPlugin).CanConfigure;

public PluginExtension(MacroDeckPlugin macroDeckPlugin)
{
this.ExtensionObject = macroDeckPlugin;
}

public void Uninstall()
{

}
}
}
114 changes: 114 additions & 0 deletions ExtensionStore/ExtensionStoreHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
using SuchByte.MacroDeck.GUI.Dialogs;
using SuchByte.MacroDeck.Icons;
using SuchByte.MacroDeck.Model;
using SuchByte.MacroDeck.Plugins;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;

namespace SuchByte.MacroDeck.ExtensionStore
{
public class ExtensionStoreHelper
{
public static event EventHandler OnUpdateCheckFinished;

private static ExtensionStoreDownloader extensionStoreDownloader;

public static void InstallPluginById(string packageId)
{
InstallPackages(new List<ExtensionStoreDownloaderPackageInfoModel> { new ExtensionStoreDownloaderPackageInfoModel() { PackageId = packageId, ExtensionType = ExtensionType.Plugin } });
}

public static void InstallIconPackById(string packageId)
{
InstallPackages(new List<ExtensionStoreDownloaderPackageInfoModel> { new ExtensionStoreDownloaderPackageInfoModel() { PackageId = packageId, ExtensionType = ExtensionType.IconPack } });
}

internal static void InstallById(string packageId)
{
InstallPackages(new List<ExtensionStoreDownloaderPackageInfoModel> { new ExtensionStoreDownloaderPackageInfoModel() { PackageId = packageId } });
}

public static void InstallPackages(List<ExtensionStoreDownloaderPackageInfoModel> packages)
{
if (MacroDeck.MainWindow == null) return;
MacroDeck.MainWindow.Invoke(new Action(() =>
{
extensionStoreDownloader = new ExtensionStoreDownloader(packages)
{
Owner = MacroDeck.MainWindow,
};
extensionStoreDownloader.Show();
}));
}

public static string GetPackageId(MacroDeckPlugin macroDeckPlugin)
{
return new DirectoryInfo(PluginManager.PluginDirectories[macroDeckPlugin]).Name;
}

public static void SearchUpdatesAsync()
{
PluginManager.PluginsUpdateAvailable.Clear();
IconManager.IconPacksUpdateAvailable.Clear();
Task.Run(() =>
{
foreach (MacroDeckPlugin plugin in PluginManager.Plugins.Values)
{
PluginManager.SearchUpdate(plugin);
}
foreach (MacroDeckPlugin plugin in PluginManager.PluginsNotLoaded.Values)
{
PluginManager.SearchUpdate(plugin);
}
foreach (IconPack iconPack in IconManager.IconPacks.FindAll(iP => iP.ExtensionStoreManaged && !iP.Hidden))
{
IconManager.SearchUpdate(iconPack);
}

if (OnUpdateCheckFinished != null)
{
OnUpdateCheckFinished(null, EventArgs.Empty);
}
});
}



public static string InstalledIconPacksAsString
{
get
{
string installedPlugins = "";
foreach (var iconPack in IconManager.IconPacks.FindAll(x => x.ExtensionStoreManaged))
{
installedPlugins += $"{iconPack.PackageId.ToLower()}%20";
}

return installedPlugins;
}
}

public static string InstalledPluginsAsString
{
get
{
string installedPlugins = "";
foreach (var path in PluginManager.PluginDirectories.Values)
{
installedPlugins += $"{new DirectoryInfo(path).Name.ToLower()}%20";
}

return installedPlugins;
}
}
}

public enum ExtensionType
{
Plugin,
IconPack,
}
}
4 changes: 2 additions & 2 deletions Folders/Plugin/FolderPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace SuchByte.MacroDeck.Folders.Plugin
{
public class FolderPlugin : MacroDeckPlugin
{
public override string Name => LanguageManager.Strings.PluginMacroDeckFolder;
public override string Author => "Macro Deck";
internal override string Name => LanguageManager.Strings.PluginMacroDeckFolder;
internal override string Author => "Macro Deck";
public override void Enable()
{
this.Actions = new List<PluginAction>
Expand Down
5 changes: 3 additions & 2 deletions GUI/Colors.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using Windows.UI.ViewManagement;

namespace SuchByte.MacroDeck.GUI
{
public class Colors
{

public static void Initialize()
{
try
Expand Down Expand Up @@ -48,7 +49,7 @@ public static Color DefaultAccentColorDark
{
get
{
return Color.FromArgb(0, 103, 225);
return Color.FromArgb(0, 103, 205);
}
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions GUI/CustomControls/ActionConfiguratorPluginItem.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion GUI/CustomControls/ActionConfiguratorPluginItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void Control_MouseClick(object sender, MouseEventArgs e)
private void ActionConfiguratorPluginItem_Load(object sender, EventArgs e)
{
if (this.Plugin == null) return;
this.pluginIcon.BackgroundImage = this.Plugin.Icon ?? Properties.Resources.Icon;
this.pluginIcon.BackgroundImage = this.Plugin.PluginIcon ?? Properties.Resources.Icon;
this.pluginName.Text = this.Plugin.Name;
this.lblCountActions.Text = String.Format((this.Plugin.Actions.Count == 1 ? LanguageManager.Strings.XAction : LanguageManager.Strings.XActions), this.Plugin.Actions.Count);
}
Expand Down
3 changes: 3 additions & 0 deletions GUI/CustomControls/ButtonEditor/ActionItem.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e1a69b6

Please sign in to comment.