mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8426c9cac2 | ||
|
|
da4a8dfa9d | ||
|
|
a2efdb3670 | ||
|
|
1ae940613c | ||
|
|
117fd6e7f4 | ||
|
|
f5434a086d | ||
|
|
dc3eec37bb |
17
Changelog.md
17
Changelog.md
@@ -1,11 +1,26 @@
|
||||
# not release
|
||||
|
||||
|
||||
# 0.0.11
|
||||
|
||||
ElectronNET.CLI:
|
||||
|
||||
* Invoke 'npm install' without --prod flag to install needed devDependencies as well.
|
||||
* Enable SourceLink
|
||||
* NuGet Package License Information updated (deprecation of licenseUrl)
|
||||
|
||||
ElectronNET.API:
|
||||
|
||||
* Documentation added for WebContents.GetUrl()
|
||||
* Enable SourceLink
|
||||
* NuGet Package License Information updated (deprecation of licenseUrl)
|
||||
|
||||
# 0.0.10
|
||||
|
||||
ElectronNET.API:
|
||||
|
||||
* manifestJsonFilePath fixed (thanks @smack0007)
|
||||
* Use Electron release 2.0.2 and updated packages (thanks @deinok)
|
||||
* Use Electron release 3.0.0 and updated packages (thanks @deinok)
|
||||
* fixes for Socket interaction (thanks @mojinxun)
|
||||
* Fixing SingleInstances (thanks @yaofeng)
|
||||
* Enhance WebContent.GetUrl (thanks @ru-sh)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
@@ -8,15 +8,17 @@
|
||||
<Authors>Gregor Biswanger, Robert Muehsig</Authors>
|
||||
<Company />
|
||||
<Product>Electron.NET</Product>
|
||||
<PackageLicenseUrl>https://github.com/ElectronNET/Electron.NET/blob/master/LICENSE</PackageLicenseUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/ElectronNET/Electron.NET/</PackageProjectUrl>
|
||||
<Description>Building cross platform electron based desktop apps with .NET Core and ASP.NET NET Core.
|
||||
This package contains the API to access the "native" electron API.</Description>
|
||||
<RepositoryUrl>https://github.com/ElectronNET/Electron.NET/</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<PackageTags>electron aspnetcore</PackageTags>
|
||||
<PackageReleaseNotes>Changelog: https://github.com/ElectronNET/Electron.NET/blob/master/Changelog.md</PackageReleaseNotes>
|
||||
<PackageIconUrl>https://raw.githubusercontent.com/ElectronNET/Electron.NET/master/assets/images/electron.net-logo-square.png</PackageIconUrl>
|
||||
<Version>1.0.0.2</Version>
|
||||
<Version>1.0.0.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@@ -40,6 +42,10 @@ This package contains the API to access the "native" electron API.</Description>
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SocketIoClientDotNet" Version="1.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -132,6 +132,11 @@ namespace ElectronNET.API
|
||||
return taskCompletionSource.Task;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is used to get the Url of the loaded page.
|
||||
/// It's usefull if a web-server redirects you and you need to know where it redirects. For instance, It's useful in case of Implicit Authorization.
|
||||
/// </summary>
|
||||
/// <returns>URL of the loaded page</returns>
|
||||
public Task<string> GetUrl()
|
||||
{
|
||||
var taskCompletionSource = new TaskCompletionSource<string>();
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace ElectronNET.CLI.Commands
|
||||
Console.WriteLine("node_modules missing in: " + checkForNodeModulesDirPath);
|
||||
|
||||
Console.WriteLine("Start npm install...");
|
||||
ProcessHelper.CmdExecute("npm install --production", tempPath);
|
||||
ProcessHelper.CmdExecute("npm install", tempPath);
|
||||
|
||||
Console.WriteLine("Start npm install electron-packager...");
|
||||
|
||||
|
||||
@@ -9,15 +9,17 @@
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageOutputPath>..\artifacts</PackageOutputPath>
|
||||
<PackageId>ElectronNET.CLI</PackageId>
|
||||
<Version>1.0.4.2</Version>
|
||||
<Version>1.0.0.0</Version>
|
||||
<Authors>Gregor Biswanger, Robert Muehsig</Authors>
|
||||
<Product>Electron.NET</Product>
|
||||
<Company />
|
||||
<Description>Building cross platform electron based desktop apps with .NET Core and ASP.NET NET Core.
|
||||
This package contains the dotnet tooling to electronize your application.</Description>
|
||||
<PackageLicenseUrl>https://github.com/ElectronNET/Electron.NET/blob/master/LICENSE</PackageLicenseUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/ElectronNET/Electron.NET/</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/ElectronNET/Electron.NET/</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<PackageTags>electron aspnetcore</PackageTags>
|
||||
<PackageReleaseNotes>Changelog: https://github.com/ElectronNET/Electron.NET/blob/master/Changelog.md</PackageReleaseNotes>
|
||||
<PackageIconUrl>https://raw.githubusercontent.com/ElectronNET/Electron.NET/master/assets/images/electron.net-logo-square.png</PackageIconUrl>
|
||||
@@ -76,6 +78,13 @@ This package contains the dotnet tooling to electronize your application.</Descr
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\ElectronNET.Host\api\clipboard.js" Link="ElectronHost\api\clipboard.js" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(OS)' == 'Windows_NT'">
|
||||
<Exec Command="$(ProjectDir)devCleanup.cmd" IgnoreExitCode="true" />
|
||||
</Target>
|
||||
|
||||
55
README.md
55
README.md
@@ -88,22 +88,6 @@ To start the application make sure you have installed the "[ElectronNET.CLI](htt
|
||||
|
||||
dotnet tool install ElectronNET.CLI -g
|
||||
|
||||
### ElectronNET.CLI Version 0.0.9
|
||||
|
||||
In the Version 0.0.9 the CLI was not a global tool and needed to be registred like this in the .csproj:
|
||||
|
||||
```
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="ElectronNET.CLI" Version="0.0.9" />
|
||||
</ItemGroup>
|
||||
```
|
||||
|
||||
After you edited the .csproj-file, you need to restore your NuGet packages within your Project. Run the follwoing command in your ASP.NET Core folder:
|
||||
|
||||
```
|
||||
dotnet restore
|
||||
```
|
||||
|
||||
* Make sure you have __node.js v8.6.0__ and on __macOS/Linux__ the electron-packager installed!
|
||||
|
||||
sudo npm install electron-packager --global
|
||||
@@ -111,14 +95,14 @@ After you edited the .csproj-file, you need to restore your NuGet packages withi
|
||||
At the first time, you need an Electron.NET project initialization. Type the following command in your ASP.NET Core folder:
|
||||
|
||||
```
|
||||
dotnet electronize init
|
||||
electronize init
|
||||
```
|
||||
|
||||
* Now a electronnet.manifest.json should appear in your ASP.NET Core project
|
||||
* Now run the following:
|
||||
|
||||
```
|
||||
dotnet electronize start
|
||||
electronize start
|
||||
```
|
||||
### Note
|
||||
> Only the first electronize start is slow. The next will go on faster.
|
||||
@@ -136,18 +120,18 @@ In this YouTube video, we show you how you can create a new project, use the Ele
|
||||
|
||||
## Build
|
||||
|
||||
Here you need the Electron.NET CLI too. Type following command in your ASP.NET Core folder:
|
||||
Here you need the Electron.NET CLI as well. Type the following command in your ASP.NET Core folder:
|
||||
|
||||
```
|
||||
dotnet electronize build /target win
|
||||
electronize build /target win
|
||||
```
|
||||
|
||||
There are additional platforms available:
|
||||
|
||||
```
|
||||
dotnet electronize build /target win
|
||||
dotnet electronize build /target osx
|
||||
dotnet electronize build /target linux
|
||||
electronize build /target win
|
||||
electronize build /target osx
|
||||
electronize build /target linux
|
||||
```
|
||||
|
||||
Those three "default" targets will produce x64 packages for those platforms.
|
||||
@@ -155,7 +139,7 @@ Those three "default" targets will produce x64 packages for those platforms.
|
||||
For certain NuGet packages or certain scenarios you may want to build a pure x86 application. To support those things you can define the desired [.NET Core runtime](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog), the [electron platform](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#platform) and [electron architecture](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#arch) like this:
|
||||
|
||||
```
|
||||
dotnet electronize build build /target custom win7-x86;win32 /electron-arch ia32
|
||||
electronize build build /target custom win7-x86;win32 /electron-arch ia32
|
||||
```
|
||||
|
||||
The end result should be an electron app under your __/bin/desktop__ folder.
|
||||
@@ -190,3 +174,26 @@ See also the list of [contributors](https://github.com/ElectronNET/Electron.NET/
|
||||
MIT-licensed
|
||||
|
||||
**Enjoy!**
|
||||
|
||||
# Important notes
|
||||
|
||||
## ElectronNET.CLI Version 0.0.9
|
||||
|
||||
In the Version 0.0.9 the CLI was not a global tool and needed to be registred like this in the .csproj:
|
||||
|
||||
```
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="ElectronNET.CLI" Version="0.0.9" />
|
||||
</ItemGroup>
|
||||
```
|
||||
|
||||
After you edited the .csproj-file, you need to restore your NuGet packages within your Project. Run the follwoing command in your ASP.NET Core folder:
|
||||
|
||||
```
|
||||
dotnet restore
|
||||
```
|
||||
|
||||
|
||||
If you still use this version you will need to invoke it like this:
|
||||
|
||||
dotnet electronize ...
|
||||
|
||||
@@ -2,11 +2,11 @@ echo "Start building Electron.NET dev stack..."
|
||||
echo "Restore & Build API"
|
||||
cd ElectronNet.API
|
||||
dotnet restore
|
||||
dotnet build --configuration Release --force /property:Version=0.0.10
|
||||
dotnet pack /p:Version=0.0.10 --configuration Release --force --output "%~dp0artifacts"
|
||||
dotnet build --configuration Release --force /property:Version=0.0.11
|
||||
dotnet pack /p:Version=0.0.11 --configuration Release --force --output "%~dp0artifacts"
|
||||
cd ..
|
||||
echo "Restore & Build CLI"
|
||||
cd ElectronNet.CLI
|
||||
dotnet restore
|
||||
dotnet build --configuration Release --force /property:Version=0.0.10
|
||||
dotnet pack /p:Version=0.0.10 --configuration Release --force --output "%~dp0artifacts"
|
||||
dotnet build --configuration Release --force /property:Version=0.0.11
|
||||
dotnet pack /p:Version=0.0.11 --configuration Release --force --output "%~dp0artifacts"
|
||||
|
||||
Reference in New Issue
Block a user