Hydra vNext: New features

This topic will contain brief information about interesting new features, significant bugfixes and breaking changes in the next releases of Hydra.

New feature: Custom App.config support for .NET plugins loaded by Delphi hosts

Currently .NET plugins use default App.config file that should be bundled with the host .exe. This is a major issue in case App.config should contain assembly rebinding configuration (a very common case for projects using NuGet packages) or framework configuration (WCF / EF / etc). Main issue is that it was not possible to use different .config files for different plugins.

Starting next release the following approach will be used for App.config configuration files handling:

  • If a .NET plugin is loaded into a custom .NET domain and there is a file named [plugin assembly name].config (f.e. MyPlugin.dll.config) then this configuration file will be applied. Each .NET plugin loaded into a custom .NET domain can use its own App.config file

  • If a .NET plugin is loaded into the default .NET domain and there is a file named Hydra Global AppDomain.config then this configuration file will be applied. Note: Due to platform restrictions only one .config file can be used for the default .NET domain. So only one .config file will be applied.

  • If no custom App.config files are provided then the default .config file named [host exe name].config (f.e. DelphiHostapp.exe.config) will be used. This file should be placed next to the host .exe file. Its settings are applied to all plugins loaded by the host. Configuration is applied when the first .NET plugin is loaded and cannot be changed afterwards. This is the current behavior that remains unchanged.

1 Like

Delphi only, since v1265

  • breaking change: Library was refactored and unit names were renamed and divided by logical namespaces.

    • VCL interfaces now have VCL prefix, i.e. IHYVisualPlugin => IHYVCLVisualPlugin, etc
      old interfaces names are provided for backward compatibility as aliases.
alias table
  IHYControl = IHYVCLControl;
  IHYHost = IHYVCLHost;
  IHYHostAware = IHYVCLHostAware;
  IHYImage = IHYVCLImage;
  IHYInstanceCounting = IHYVCLInstanceCounting;
  IHYMenuController = IHYVCLMenuController;
  IHYMenuItem = IHYVCLMenuItem;
  IHYModuleController = IHYVCLModuleController;
  IHYNonVisualPlugin = IHYVCLNonVisualPlugin;
  IHYObjectReference = IHYVCLObjectReference;
  IHYPlugin = IHYVCLPlugin;
  IHYServicePlugin = IHYVCLServicePlugin;
  IHYSubImageList = IHYVCLSubImageList;
  IHYToolbar = IHYVCLToolbar;
  IHYToolbarController = IHYVCLToolbarController;
  IHYToolbarItem = IHYVCLToolbarItem;
  IHYUpdateableController = IHYVCLUpdateableController;
  IHYVisualPlugin = IHYVCLVisualPlugin;

    • At opening project in IDE, old units started with uHY* in uses section will be replaced with new names.
units' renaming table
old unit name new unit name
Hydra_Core_Reg.pas Hydra.Core.Reg.pas
Hydra_DX_Reg.pas Hydra.DX.Reg.pas
Hydra_FMX_Reg.pas Hydra.FMX.Reg.pas
Hydra_RO_Reg.pas Hydra.RO.Reg.pas
Hydra_TB2K_Reg.pas Hydra.TB2K.Reg.pas
Hydra_VCL_Reg.pas Hydra.VCL.Reg.pas
uHYActions.pas Hydra.VCL.Actions.pas
uHYAutoUpdateClient.pas Hydra.RO.AutoUpdateClient.pas
uHYBaseCrossPlatformPluginWrapper.pas Hydra.Core.BasePluginWrapper.pas
uHYBaseModule.pas <deleted>
uHYBaseModule_FMX.pas Hydra.FMX.HostWrapper.pas
uHYBaseModuleManager.pas Hydra.Core.BaseModuleManager.pas
uHYCLRHelpers.pas Hydra.Managed.Helpers.pas
uHYCLRManagedModuleController.pas Hydra.VCL.ManagedModuleController.pas
uHYCLRManagedPluginFactories.pas <deleted>
uHYCLRmscoree_TLB.pas Hydra.Managed.mscoree_TLB.pas
uHYCLRmscorlib_TLB.pas Hydra.Managed.mscorlib_TLB.pas
uHYCLRWrappers.pas Hydra.Managed.Wrappers.pas
uHYConsts.pas Hydra.Core.Consts.pas
uHYCrossPlatformDescriptorWrapper.pas Hydra.Core.CrossPlatformDescriptorWrapper.pas
uHYCrossPlatformHostWrapper.pas Hydra.Core.HostWrapper.pas
uHYCrossPlatformInterfaces.pas Hydra.Core.Interfaces.pas
uHYCrossPlatformModule.pas Hydra.Core.Module.pas
uHYCrossPlatformModuleController.pas Hydra.Core.ModuleController.pas
uHYCrossPlatformNonVisualPlugin.pas Hydra.Core.NonVisualPlugin.pas
uHYCrossPlatformNonVisualPluginWrapper.pas Hydra.Core.NonVisualPluginWrapper.pas
uHYCrossPlatformPlugin.pas Hydra.Core.Plugin.pas
uHYCrossPlatformPluginWrapper.pas Hydra.Core.PluginWrapper.pas
uHYCrossPlatformVisualPluginWrapper.pas Hydra.Core.VisualPluginWrapper.pas
uHYD5Helpers.pas <deleted>
uHYD5MSXML_TLB.pas <deleted>
uHYDXUI.pas Hydra.DX.UI.pas
uHYEntryPoints.pas <deleted>
uHYEnumProcs.pas Hydra.Core.EnumProcs.pas
uHYFileUtils.pas Hydra.RO.FileUtils.pas
uHYFireMonkeyModule.pas Hydra.VCL.FireMonkeyModule.pas
uHYFireMonkeyModule_FMX.pas Hydra.FMX.FireMonkeyModule.pas
uHYFireMonkeyPluginFactories.pas <deleted>
uHYFireMonkeyPluginWrappers_FMX.pas Hydra.FMX.FireMonkeyPluginWrappers.pas
uHYFMXCrossPlatformPluginPanel.pas <deleted>
uHYFMXCrossPlatformPluginWrapper.pas <deleted>
uHYGDIPlus.pas Hydra.Core.GDIPlus.pas
uHYInterfaceHelpers.pas Hydra.Core.FakeIDispatch.pas
uHYIntf.pas Hydra.VCL.Interfaces.pas
uHYIntf_FMX.pas Hydra.FMX.Interfaces.pas
uHYJarClassDescriptor.pas Hydra.Java.JarClassDescriptor.pas
uHYJavaBridge.pas Hydra.Java.Bridge.pas
uHYJavaEnvironment.pas Hydra.Java.Environment.pas
uHYJavaInterfaces.pas Hydra.Java.Interfaces.pas
uHYJavaModule.pas Hydra.VCL.JavaModule.pas
uHYJavaModule_FMX.pas Hydra.Core.JavaModule.pas
uHYJavaModuleController.pas Hydra.Java.ModuleController.pas
uHYJavaNativeInterface.pas Hydra.Java.NativeInterface.pas
uHYJavaNonVisualPluginWrapper.pas Hydra.Java.NonVisualPluginWrapper.pas
uHYJavaPluginDescriptor.pas Hydra.Java.PluginDescriptor.pas
uHYJavaPluginFactory.pas <deleted>
uHYJavaPluginWrapper.pas Hydra.Java.PluginWrapper.pas
uHYJavaTypes.pas Hydra.Java.Types.pas
uHYJavaVisualPluginWrapper.pas Hydra.Java.VisualPluginWrapper.pas
uHYJavaVM.pas Hydra.Java.VM.pas
uHYLocalService.pas Hydra.RO.LocalService.pas
uHYManagedDescriptor.pas Hydra.Managed.Descriptor.pas
uHYManagedModule.pas Hydra.VCL.ManagedModule.pas
uHYManagedModule_FMX.pas Hydra.Core.ManagedModule.pas
uHYManagedSupport.pas Hydra.Managed.Support.pas
uHYModuleController.pas Hydra.VCL.ModuleController.pas
uHYModuleController_FMX.pas Hydra.FMX.ModuleController.pas
uHYModuleManager.pas Hydra.VCL.ModuleManager.pas
uHYModuleManager_FMX.pas Hydra.FMX.ModuleManager.pas
uHYNativePanel_FMX.pas Hydra.FMX.NativePanel.pas
uHYNonVisualPlugin.pas Hydra.VCL.NonVisualPlugin.pas
uHYNonVisualPlugin_FMX.pas Hydra.FMX.NonVisualPlugin.pas
uHYPluginControlsRepository.pas Hydra.VCL.PluginControlsRepository.pas
uHYPluginDescriptors.pas Hydra.Core.PluginDescriptors.pas
uHYPluginFactories.pas Hydra.VCL.PluginFactories.pas
uHYPluginHelpers_FMX.pas Hydra.FMX.PluginHelpers.pas
uHYRes.pas Hydra.Core.Res.pas
uHYRODLReader.pas Hydra.RO.RODLReader.pas
uHYROFactory.pas Hydra.RO.VCL.Factory.pas
uHYROIntf.pas Hydra.RO.Intf.pas
uHYROModuleManager.pas Hydra.RO.VCL.ModuleManager.pas
uHYSilverlight_TLB.pas Hydra.Silverlight.TLB.pas
uHYSilverlightModule.pas Hydra.VCL.SilverlightModule.pas
uHYSilverlightModule_FMX.pas Hydra.FMX.SilverlightModule.pas
uHYSilverlightModuleController.pas Hydra.Silverlight.ModuleController.pas
uHYSilverlightPluginControl.pas Hydra.VCL.SilverlightPluginControl.pas
uHYSilverlightPluginFactories.pas Hydra.Silverlight.PluginDescriptor.pas
uHYSilverlightPluginWrappers.pas Hydra.VCL.SilverlightPluginWrappers.pas
uHYSilverlightPluginWrappers_FMX.pas Hydra.FMX.SilverlightPluginWrappers.pas
uHYStdVCLUI.pas Hydra.VCL.StdVCLUI.pas
uHYTB2KUI.pas Hydra.TB2K.UI.pas
uHYUnmanagedCrossPlatformModule.pas Hydra.VCL.UnmanagedModule.pas
uHYUnmanagedCrossPlatformPluginDescriptor.pas Hydra.Core.UnmanagedPluginDescriptor.pas
uHYUnmanagedCrossPlatformRegisteredPlugin.pas Hydra.Core.UnmanagedRegisteredPlugin.pas
uHYUnmanagedModule_FMX.pas Hydra.Core.UnmanagedModule.pas
uHYUserInterface.pas Hydra.VCL.UserInterface.pas
uHYUserProfile.pas Hydra.VCL.UserProfile.pas
uHYVCLControlAsNonVisualPlugin.pas Hydra.VCL.ControlAsNonVisualPlugin.pas
uHYVCLControlAsVisualPlugin.pas Hydra.VCL.VisualPluginWrapper
uHYVCLCrossPlatformNonVisualPluginWrapper.pas Hydra.VCL.NonVisualPluginWrapper.pas
uHYVCLCrossPlatformPanel.pas Hydra.VCL.CrossPlatformPanel.pas
uHYVCLCrossPlatformPluginFactories.pas Hydra.VCL.CrossPlatformPluginFactories.pas
uHYVCLCrossPlatformPluginHostWrapper.pas Hydra.VCL.HostWrapper.pas
uHYVCLCrossPlatformPluginWrapper.pas Hydra.VCL.PluginWrapper.pas
uHYVCLCrossPlatformVisualPluginWrapper.pas Hydra.VCL.VisualPluginWrapper.pas
uHYVCLJavaModule.pas <deleted>
uHYVCLModule.pas Hydra.VCL.VCLModule.pas
uHYVisualPlugin.pas Hydra.VCL.VisualPlugin.pas
uHYVisualPlugin_FMX.pas Hydra.FMX.VisualPlugin.pas

Also we provide ...\Hydra for Delphi\Bin\HYConvert.exe utility that performs such replacing in batch mode.

HYConvert syntax

Hydra Converter for Delphi platform
RemObjects Hydra Conversion Utility - Version 0.1

Syntax:
HYConvert [/wait] [/nobackup] [/s] /folder:
HYConvert [/wait] [/nobackup] <filename1> [<filename2> […]]

The specified filenames can be the .pas, .dpr or .dpk

The optional switchs:
‘wait’ - waits ‘Enter’ for continue
‘s’ - allows to process subfolders
‘nobackup’ - disables creating .bak files


  • new feature: Java non-visual plugins are supported by Linux and OSX platforms

the HYD\Java plugin sample shows this feature.


  • new feature: Remoting SDK service plugins are supported by all frameworks (None, VCL, FMX)

new syntax is

RegisterServicePlugin('PluginService');

old VCL syntax is

  THYROFactory.Create(HInstance,
    TROClassFactory.Create('SecondModuleService', Create_SecondModuleService, TSecondModuleService_Invoker)  
  );

Note: both syntaxes are supported.


  • new feature: Remoting SDK service plugins are supported by Linux and OSX platforms

These samples show this feature:

  • the Remoting SDK Modular Server sample
  • the Remoting SDK Plugin Server sample

  • minor feature: new component: THYSimpleModuleController

this component is designed for using in cross-platform plugins.
if you need to access to VCL interfaces (like IHYVCLHost, etc), use the THYVCLModuleController component


  • minor feature: new component: THYSimpleModuleManager

this component is designed for loading non-visual cross-platform plugins with minimal overhead.
loaded plugins can be accessible via IHYCrossPlatformNonVisualPlugin.
supports Remoting SDK service plugins.


  • minor feature: new component: THYVCLSimpleModuleManager

this component is designed for loading cross-platform plugins with minimal overhead.
loaded plugins can be accessible via IHYCrossPlatformNonVisualPlugin and IHYCrossPlatformVisualPlugin.
supports Remoting SDK service plugins.


  • minor feature: Wizard allows to create console applications and non-visual plugins with none framework.

it is usable for creating host and non-visual/Remoting SDK service plugins for Linux and OSX platforms.

4 Likes

5 posts were split to a new topic: Hydra vNext: New Features - Discussion

EvgenyK WOW!!!

1 Like

6.3.0.1267 was released last week.

Note: this build requires RO/DA 10.0.0.1505+ for proper generation of service modules (*_Impl.pas).

1 Like

New feature: Delphi Host can load COM plugins

THYBaseModuleManager (and his descendants) can load COM plugins.
usage:

ModuleManager.LoadModule('{C590127E-FCBB-4FBA-A6A6-3BF2C5F7D359}');

or

ModuleManager.LoadComModule('{C590127E-FCBB-4FBA-A6A6-3BF2C5F7D359}');

where is {C590127E-FCBB-4FBA-A6A6-3BF2C5F7D359} - guid of COM object.

COM object have to support IHYCrossPlatformModule interface.


New feature: Delphi templates allow to generate COM plugins

New plugin modules are generated from template contain COM_PLUGIN definition that allows to use them as COM plugins:

{.$DEFINE COM_PLUGIN}

After you uncomment above definition and build plugin, you have to register it with regsvr32.exe and admin rights as

C:\Windows\System32\regsvr32.exe <fullname_with_path>

or

C:\Windows\SysWOW64\regsvr32.exe <fullname_with_path>

depending on your platform.

Plugin contains Class_HydraComServer guid constant that should be used for loading this COM plugin

Note: since .1281

1 Like

Island COM plugin example - island-complugin.zip (3.1 KB).

Note: should be registered with admin rights:

C:\Windows\SysWOW64\regsvr32.exe <fullname_with_path>

requires the latest Island snapshot or Elements .2693+.

2 posts were merged into an existing topic: Hydra vNext: New Features - Discussion

Major feature: .NET Core / .NET 5+ plugins

Next Hydra release will provide support for .NET Core / .NET 5+ - based plugins, including Non-Visual, Visual WinForms and Visual WPF plugins

https://docs.hydra4.com/Plugins/VisualPlugin_NETCore_WinForms/
https://docs.hydra4.com/Plugins/VisualPlugin_NETCore_WPF/
https://docs.hydra4.com/Plugins/NonVisualPlugin_NETCore/

3 Likes

since .1297
Feature: Linux platform is supported by Hydra for Island.

untitled

2 Likes

since .1333

feature: NET Core host

limitation: Silverlight plugins aren’t supported by .NET Core host

2 Likes