Skip to content

Commit 38785f9

Browse files
Update README.md
1 parent 886b4b8 commit 38785f9

File tree

1 file changed

+61
-14
lines changed

1 file changed

+61
-14
lines changed

README.md

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,23 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
8686

8787
__Please note:__ Currently it is important to use ASP.NET Core with MVC. If you are working with the dotnet CLI, use
8888

89-
dotnet new mvc
89+
```
90+
dotnet new mvc
91+
```
9092

9193
## Start the Application
9294

9395
To start the application make sure you have installed the "[ElectronNET.CLI](https://www.nuget.org/packages/ElectronNET.CLI/)" packages as global tool:
9496

95-
dotnet tool install ElectronNET.CLI -g
97+
```
98+
dotnet tool install ElectronNET.CLI -g
99+
```
96100

97101
* Make sure you have __node.js v8.6.0__ and on __macOS/Linux__ the electron-builder installed!
98-
99-
sudo npm install electron-packager --global
102+
103+
```
104+
sudo npm install electron-builder --global
105+
```
100106

101107
At the first time, you need an Electron.NET project initialization. Type the following command in your ASP.NET Core folder:
102108

@@ -129,23 +135,23 @@ In this YouTube video, we show you how you can create a new project, use the Ele
129135
Here you need the Electron.NET CLI as well. Type the following command in your ASP.NET Core folder:
130136

131137
```
132-
electronize build /target win
138+
electronize build /target win
133139
```
134140

135141
There are additional platforms available:
136142

137143
```
138-
electronize build /target win
139-
electronize build /target osx
140-
electronize build /target linux
144+
electronize build /target win
145+
electronize build /target osx
146+
electronize build /target linux
141147
```
142148

143149
Those three "default" targets will produce x64 packages for those platforms.
144150

145151
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:
146152

147153
```
148-
electronize build /target custom win7-x86;win32 /electron-arch ia32
154+
electronize build /target custom win7-x86;win32 /electron-arch ia32
149155
```
150156

151157
The end result should be an electron app under your __/bin/desktop__ folder.
@@ -187,23 +193,64 @@ MIT-licensed
187193

188194
# Important notes
189195

196+
## ElectronNET.API & ElectronNET.CLI Version 5.22.12
197+
198+
Make sure you also have the new Electron.NET CLI 5.22.12 version. This now uses [electron-builder](https://www.electron.build/configuration/configuration) and the necessary configuration to build is made in the **electron.manifest.json** file. In addition, own Electron.NET configurations are stored. Please make sure that your **electron.manifest.json** file has the following new structure:
199+
200+
```
201+
{
202+
"executable": "{{executable}}",
203+
"splashscreen": {
204+
"imageFile": ""
205+
},
206+
"singleInstance": false,
207+
"build": {
208+
"appId": "com.{{executable}}.app",
209+
"productName": "{{executable}}",
210+
"copyright": "Copyright © 2019",
211+
"buildVersion": "1.0.0",
212+
"compression": "maximum",
213+
"directories": {
214+
"output": "../../../bin/Desktop"
215+
},
216+
"extraResources": [
217+
{
218+
"from": "./bin",
219+
"to": "bin",
220+
"filter": ["**/*"]
221+
}
222+
],
223+
"files": [
224+
{
225+
"from": "./ElectronHostHook/node_modules",
226+
"to": "ElectronHostHook/node_modules",
227+
"filter": ["**/*"]
228+
},
229+
"**/*"
230+
]
231+
}
232+
}
233+
```
234+
190235
## ElectronNET.CLI Version 0.0.9
191236

192237
In the Version 0.0.9 the CLI was not a global tool and needed to be registred like this in the .csproj:
193238

194239
```
195-
<ItemGroup>
196-
<DotNetCliToolReference Include="ElectronNET.CLI" Version="0.0.9" />
197-
</ItemGroup>
240+
<ItemGroup>
241+
<DotNetCliToolReference Include="ElectronNET.CLI" Version="0.0.9" />
242+
</ItemGroup>
198243
```
199244

200245
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:
201246

202247
```
203-
dotnet restore
248+
dotnet restore
204249
```
205250

206251

207252
If you still use this version you will need to invoke it like this:
208253

209-
dotnet electronize ...
254+
```
255+
dotnet electronize ...
256+
```

0 commit comments

Comments
 (0)