implement electron build with electron-packager into build.cmd and change the current root path from WebApp

This commit is contained in:
Gregor Biswanger
2017-10-05 03:47:09 +02:00
parent 12472746bc
commit 68bc483f52
11 changed files with 1510 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using System.IO;
using System;
namespace ElectronNET.WebApp
{
@@ -11,9 +11,11 @@ namespace ElectronNET.WebApp
BuildWebHost(args).Run();
}
// WICHTIG! UseContentRoot auf Assembly Ordner Essentiell!
// Ggf. kann man via Parameter den Content Root durchreichen?
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseContentRoot(Path.Combine(Directory.GetCurrentDirectory(), "..", "ElectronNET.WebApp"))
.UseContentRoot(AppDomain.CurrentDomain.BaseDirectory)
.UseStartup<Startup>()
.Build();
}