diff --git a/Changelog.md b/Changelog.md index bd13258..e2d9367 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,8 +1,16 @@ +# 0.1.0 + +## ElectronNET.Core + +- Updated `PrintToPDFOptions` to also allow specifying the `PageSize` with an object (#769) +- Added option to provide floating point value as aspect ratios with `SetAspectRatio` (#793) + # 0.0.18 ## ElectronNET.Core ### Highlights + - **Complete MSBuild Integration**: Eliminated CLI tool dependency, moved all build processes to MSBuild with deep Visual Studio integration - **Modernized Architecture**: Restructured process lifecycle with .NET launching first and running Electron as child process for better control and reliability - **Cross-Platform Development**: Build and debug Linux applications directly from Windows Visual Studio via WSL integration @@ -11,6 +19,7 @@ - **Console App Support**: No longer requires ASP.NET - now works with simple console applications for file system or remote server HTML/JS ### Build System & Project Structure + - Eliminated electron.manifest.json configuration file, replaced with MSBuild project properties - Introduced new package structure: ElectronNET.Core (main package), ElectronNET.Core.Api (API definitions), ElectronNET.Core.AspNet (ASP.NET integration) - Added Runtime Identifier (RID) selection as part of project configuration @@ -19,19 +28,22 @@ - Added custom MSBuild tasks for Electron-specific build operations ### Development Experience + - Implemented unpackaged run-mode for development using regular .NET builds with unpackaged Electron configuration - Added support for building Linux packages on Windows via WSL integration - Enabled running and debugging Linux application outputs on Windows through WSL - Integrated TypeScript compilation with ASP.NET tooling for consistent builds -- Added process orchestration supporting 8 different launch scenarios (packaged/unpackaged console/ASP.NET dotnet-first/electron-first) +- Added process orchestration supporting 8 different launch scenarios (packaged/unpackaged × console/ASP.NET × dotnet-first/electron-first) ### Debugging & Runtime + - Dramatically improved debugging experience with ASP.NET-first launch mode - Added Hot Reload support for ASP.NET code during development - Implemented proper process termination handling for all exit scenarios - Minimized startup times through optimized build and launch procedures ### Technical Improvements + - Enhanced splash screen handling with automatic path resolution - Improved ElectronHostHook integration as proper npm package dependency - Updated to latest TypeScript version with ESLint configuration @@ -40,6 +52,7 @@ - Added build-time Electron version compatibility validation ### Package & Distribution + - Integrated MSBuild publishing mechanisms for creating Electron packages - Added folder publishing support with improved parameter handling - Implemented automated package.json generation from MSBuild properties @@ -47,6 +60,7 @@ - Reduced package sizes by eliminating unnecessary TypeScript dependencies ### Migration & Compatibility + - Maintained backward compatibility for existing ElectronHostHook implementations - Removed ASP.NET requirement: Now works with simple console applications for file system or remote server HTML/JS scenarios - Added support for both console and ASP.NET Core application types @@ -54,4 +68,3 @@ - Added migration path for existing projects through updated package structure This represents a comprehensive modernization of Electron.NET, addressing the major pain points around debugging, build complexity, and platform limitations while maintaining full API compatibility. - diff --git a/README.md b/README.md index 61c43de..bbec26d 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Any support appreciated! 🍻 ## 🎉 License -MIT-licensed. See [LICENSE](./LICENSE) for details. +MIT-licensed. See [LICENSE](https://github.com/ElectronNET/Electron.NET/blob/main/LICENSE) for details. **Enjoy!** diff --git a/src/ElectronNET.API/API/BrowserWindow.cs b/src/ElectronNET.API/API/BrowserWindow.cs index b0461d3..449802e 100644 --- a/src/ElectronNET.API/API/BrowserWindow.cs +++ b/src/ElectronNET.API/API/BrowserWindow.cs @@ -106,7 +106,9 @@ public class BrowserWindow _close -= value; if (_close == null) + { BridgeConnector.Socket.Off("browserWindow-close" + Id); + } } } @@ -137,7 +139,9 @@ public class BrowserWindow _closed -= value; if (_closed == null) + { BridgeConnector.Socket.Off("browserWindow-closed" + Id); + } } } diff --git a/src/ElectronNET.API/API/Dialog.cs b/src/ElectronNET.API/API/Dialog.cs index f8cc413..1194607 100644 --- a/src/ElectronNET.API/API/Dialog.cs +++ b/src/ElectronNET.API/API/Dialog.cs @@ -48,7 +48,7 @@ namespace ElectronNET.API public Task ShowOpenDialogAsync(BrowserWindow browserWindow, OpenDialogOptions options) { var taskCompletionSource = new TaskCompletionSource(); - string guid = Guid.NewGuid().ToString(); + var guid = Guid.NewGuid().ToString(); BridgeConnector.Socket.On("showOpenDialogComplete" + guid, (filePaths) => { @@ -75,7 +75,7 @@ namespace ElectronNET.API public Task ShowSaveDialogAsync(BrowserWindow browserWindow, SaveDialogOptions options) { var taskCompletionSource = new TaskCompletionSource(); - string guid = Guid.NewGuid().ToString(); + var guid = Guid.NewGuid().ToString(); BridgeConnector.Socket.On("showSaveDialogComplete" + guid, (filename) => { diff --git a/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs b/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs index 8ec814c..771b755 100644 --- a/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs +++ b/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs @@ -30,7 +30,7 @@ public class PrintToPDFOptions /// `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing /// `height` and `width` in inches. Defaults to `Letter`. /// - public string PageSize { get; set; } = "Letter"; + public object PageSize { get; set; } = "Letter"; /// /// Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, diff --git a/src/ElectronNET.API/ElectronNET.API.csproj b/src/ElectronNET.API/ElectronNET.API.csproj index 15d7663..3d568fe 100644 --- a/src/ElectronNET.API/ElectronNET.API.csproj +++ b/src/ElectronNET.API/ElectronNET.API.csproj @@ -20,6 +20,7 @@ + diff --git a/src/ElectronNET.AspNet/ElectronNET.AspNet.csproj b/src/ElectronNET.AspNet/ElectronNET.AspNet.csproj index d3a95fe..17cdd14 100644 --- a/src/ElectronNET.AspNet/ElectronNET.AspNet.csproj +++ b/src/ElectronNET.AspNet/ElectronNET.AspNet.csproj @@ -31,6 +31,7 @@ + diff --git a/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj b/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj index 5c58a31..522a05b 100644 --- a/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj +++ b/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj @@ -69,7 +69,7 @@ - + diff --git a/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj b/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj index da1ddc2..12d1f0e 100644 --- a/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj +++ b/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj @@ -71,8 +71,8 @@ - - + + diff --git a/src/ElectronNET/ElectronNET.csproj b/src/ElectronNET/ElectronNET.csproj index c0a909e..9a7e9a2 100644 --- a/src/ElectronNET/ElectronNET.csproj +++ b/src/ElectronNET/ElectronNET.csproj @@ -13,6 +13,7 @@ + diff --git a/src/ElectronNET/build/ElectronNET.Build.dll b/src/ElectronNET/build/ElectronNET.Build.dll index b3794d9..439b112 100644 Binary files a/src/ElectronNET/build/ElectronNET.Build.dll and b/src/ElectronNET/build/ElectronNET.Build.dll differ diff --git a/src/common.props b/src/common.props index 1cab6f2..3f0619b 100644 --- a/src/common.props +++ b/src/common.props @@ -1,6 +1,6 @@ - 0.0.18.0 + 0.1.0.0 ElectronNET.Core Gregor Biswanger, Florian Rappl, softworkz Electron.NET @@ -10,6 +10,7 @@ git true electron aspnetcore + README.md Changelog: https://github.com/ElectronNET/Electron.NET/blob/main/Changelog.md PackageIcon.png Building cross platform electron based desktop apps with .NET Core and - optionally - ASP.NET Core.