Skip to content

Commit 6311d55

Browse files
committed
Final cleanup
1 parent 7b522c1 commit 6311d55

File tree

5 files changed

+80
-58
lines changed

5 files changed

+80
-58
lines changed

.nuke/build.schema.json

+12
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,14 @@
7878
"enum": [
7979
"Clean",
8080
"Compile",
81+
"CompileSample",
8182
"CreatePackages",
8283
"Default",
84+
"ElectronizeCustomWin7TargetSample",
85+
"ElectronizeGenericTargetSample",
86+
"ElectronizeLinuxTargetSample",
87+
"ElectronizeMacOsTargetSample",
88+
"ElectronizeWindowsTargetSample",
8389
"Package",
8490
"PrePublish",
8591
"Publish",
@@ -103,8 +109,14 @@
103109
"enum": [
104110
"Clean",
105111
"Compile",
112+
"CompileSample",
106113
"CreatePackages",
107114
"Default",
115+
"ElectronizeCustomWin7TargetSample",
116+
"ElectronizeGenericTargetSample",
117+
"ElectronizeLinuxTargetSample",
118+
"ElectronizeMacOsTargetSample",
119+
"ElectronizeWindowsTargetSample",
108120
"Package",
109121
"PrePublish",
110122
"Publish",

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Electron.NET Logo](https://github.com/ElectronNET/Electron.NET/raw/main/assets/images/electron.net-logo.png)](https://github.com/ElectronNET/Electron.NET)
22

3-
[![donate](https://img.shields.io/badge/Donate-Donorbox-green.svg)](https://donorbox.org/electron-net) [![Gitter](https://badges.gitter.im/ElectronNET/community.svg)](https://gitter.im/ElectronNET/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Build status](https://ci.appveyor.com/api/projects/status/q95h4xt14papwi05/branch/main?svg=true)](https://ci.appveyor.com/project/robertmuehsig/electron-net/branch/main)
3+
[![donate](https://img.shields.io/badge/Donate-Donorbox-green.svg)](https://donorbox.org/electron-net) [![Gitter](https://badges.gitter.im/ElectronNET/community.svg)](https://gitter.im/ElectronNET/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Build status](https://github.com/ElectronNET/Electron.NET/actions/workflows/ci.yml/badge.svg)](https://github.com/ElectronNET/Electron.NET/actions/workflows/ci.yml)
44

55
Build cross platform desktop apps with .NET 6 and Blazor, ASP.NET Core (Razor Pages, MVC).
66

@@ -30,11 +30,13 @@ Also you should have installed:
3030

3131
Besides the chat on Gitter and the issues [discussed here](https://github.com/ElectronNET/Electron.NET/issues) you can also use [StackOverflow](https://stackoverflow.com/questions/tagged/electron.net) with the tag `electron.net`.
3232

33+
If you want to sponsor the further maintenance and development of this project [see the donate section](#🙏-donate).
34+
3335
## 👩‍🏫 Usage
3436

3537
To activate and communicate with the "native" (sort of native...) Electron API include the [ElectronNET.API NuGet package](https://www.nuget.org/packages/ElectronNET.API/) in your ASP.NET Core app.
3638

37-
```
39+
```ps1
3840
PM> Install-Package ElectronNET.API
3941
```
4042

@@ -198,7 +200,7 @@ Please make sure all commits are properly documented.
198200

199201
This video provides an introduction to development for Electron.NET: [Electron.NET - Contributing Getting Started](https://youtu.be/Po-saU_Z6Ws)
200202

201-
This repository consists of the main parts (API & CLI) and it's own "playground" ASP.NET Core application. Both main parts produce local NuGet packages, that are versioned with 99.0.0. The first thing you will need is to run one of the buildAll scripts (.cmd for Windows, the other for macOS/Linux).
203+
This repository consists of the main parts (API & CLI) and it's own "playground" ASP.NET Core application. Both main parts produce local NuGet packages, that are versioned with 99.0.0. The first thing you will need is to run one of the build scripts (.cmd or .ps1 for Windows, the .sh for macOS/Linux).
202204

203205
If you look for pure __[demo projects](https://github.com/ElectronNET)__ checkout the other repositories.
204206

buildAll.cmd

-45
This file was deleted.

nuke/Build.cs

+63-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class Build : NukeBuild
5252

5353
GitHubActions GitHubActions => GitHubActions.Instance;
5454

55-
// Note: The ChangeLogTasks from Nuke itself look buggy. So using the Cake source code.
5655
IReadOnlyList<ReleaseNotes> ChangeLog { get; set; }
5756

5857
ReleaseNotes LatestReleaseNotes { get; set; }
@@ -167,6 +166,69 @@ protected override void OnBuildInitialized()
167166
});
168167
});
169168

169+
Target CompileSample => _ => _
170+
.DependsOn(Compile)
171+
.Executes(() =>
172+
{
173+
var sample = SourceDirectory / DemoTargetLibName / $"{DemoTargetLibName}.csproj";
174+
DotNetBuild(s => s.SetProjectFile(sample).SetConfiguration(Configuration));
175+
});
176+
177+
Target ElectronizeGenericTargetSample => _ => _
178+
.DependsOn(CompileSample)
179+
.Executes(() =>
180+
{
181+
var sample = SourceDirectory / DemoTargetLibName;
182+
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
183+
var args = "build /target custom win7-x86;win /dotnet-configuration Debug /electron-arch ia32 /electron-params \"--publish never\"";
184+
185+
DotNet($"run --project {cli} -- {args}", sample);
186+
});
187+
188+
Target ElectronizeWindowsTargetSample => _ => _
189+
.DependsOn(CompileSample)
190+
.Executes(() =>
191+
{
192+
var sample = SourceDirectory / DemoTargetLibName;
193+
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
194+
var args = "build /target win /electron-params \"--publish never\"";
195+
196+
DotNet($"run --project {cli} -- {args}", sample);
197+
});
198+
199+
Target ElectronizeCustomWin7TargetSample => _ => _
200+
.DependsOn(CompileSample)
201+
.Executes(() =>
202+
{
203+
var sample = SourceDirectory / DemoTargetLibName;
204+
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
205+
var args = "build /target custom win7-x86;win /electron-params \"--publish never\"";
206+
207+
DotNet($"run --project {cli} -- {args}", sample);
208+
});
209+
210+
Target ElectronizeMacOsTargetSample => _ => _
211+
.DependsOn(CompileSample)
212+
.Executes(() =>
213+
{
214+
var sample = SourceDirectory / DemoTargetLibName;
215+
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
216+
var args = "build /target osx /electron-params \"--publish never\"";
217+
218+
DotNet($"run --project {cli} -- {args}", sample);
219+
});
220+
221+
Target ElectronizeLinuxTargetSample => _ => _
222+
.DependsOn(CompileSample)
223+
.Executes(() =>
224+
{
225+
var sample = SourceDirectory / DemoTargetLibName;
226+
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
227+
var args = "build /target linux /electron-params \"--publish never\"";
228+
229+
DotNet($"run --project {cli} -- {args}", sample);
230+
});
231+
170232
Target PublishPackages => _ => _
171233
.DependsOn(CreatePackages)
172234
.DependsOn(RunUnitTests)

start.cmd

-9
This file was deleted.

0 commit comments

Comments
 (0)