From cc7905a326f96e4ebc961aa92178ce3b5285aa93 Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Thu, 19 Oct 2017 21:31:32 +0200 Subject: [PATCH 01/14] build obj per target --- ElectronNET.CLI/Commands/BuildCommand.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index 757f05a..f4d309c 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -34,11 +34,6 @@ namespace ElectronNET.CLI.Commands } - string tempPath = Path.Combine(Directory.GetCurrentDirectory(), "obj", "desktop"); - - Console.WriteLine("Executing dotnet publish in this directory: " + tempPath); - - string tempBinPath = Path.Combine(tempPath, "bin"); string netCorePublishRid = string.Empty; string electronPackerPlatform = string.Empty; @@ -60,16 +55,19 @@ namespace ElectronNET.CLI.Commands default: if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { + desiredPlatform = "win"; netCorePublishRid = "win10-x64"; electronPackerPlatform = "win32"; } if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { + desiredPlatform = "osx"; netCorePublishRid = "osx-x64"; electronPackerPlatform = "darwin"; } if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { + desiredPlatform = "linux"; netCorePublishRid = "ubuntu-x64"; electronPackerPlatform = "linux"; } @@ -77,6 +75,13 @@ namespace ElectronNET.CLI.Commands break; } + + string tempPath = Path.Combine(Directory.GetCurrentDirectory(), "obj", "desktop", desiredPlatform); + + Console.WriteLine("Executing dotnet publish in this directory: " + tempPath); + + string tempBinPath = Path.Combine(tempPath, "bin"); + Console.WriteLine($"Build ASP.NET Core App for {netCorePublishRid}..."); ProcessHelper.CmdExecute($"dotnet publish -r {netCorePublishRid} --output \"{tempBinPath}\"", Directory.GetCurrentDirectory()); @@ -122,7 +127,7 @@ namespace ElectronNET.CLI.Commands } Console.WriteLine("Build Electron Desktop Application..."); - string buildPath = Path.Combine(Directory.GetCurrentDirectory(), "bin", "desktop"); + Console.WriteLine("Executing electron magic in this directory: " + buildPath); // ToDo: Need a solution for --asar support From 8f43d451fdfb7c7a5ef0a777064f51ba93cd95fb Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Thu, 19 Oct 2017 21:32:28 +0200 Subject: [PATCH 02/14] .... --- ElectronNET.CLI/Commands/BuildCommand.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index f4d309c..6fb190f 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -127,6 +127,7 @@ namespace ElectronNET.CLI.Commands } Console.WriteLine("Build Electron Desktop Application..."); + string buildPath = Path.Combine(Directory.GetCurrentDirectory(), "bin"); Console.WriteLine("Executing electron magic in this directory: " + buildPath); From d6e044de926853fd05b9216e1673dbada765b752 Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Thu, 19 Oct 2017 21:46:46 +0200 Subject: [PATCH 03/14] test to kick of appveyor --- ElectronNET.CLI/Commands/BuildCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index 6fb190f..89701ce 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -116,7 +116,7 @@ namespace ElectronNET.CLI.Commands if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - // Works proper on Windows... + // Works proper on Windows... ProcessHelper.CmdExecute("npm install electron-packager --global", tempPath); } else From 740de2b345100908a89710d9d136dce25441f11e Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Thu, 19 Oct 2017 21:58:50 +0200 Subject: [PATCH 04/14] arg - missing desktop part --- ElectronNET.CLI/Commands/BuildCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index 89701ce..802e6ca 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -127,7 +127,7 @@ namespace ElectronNET.CLI.Commands } Console.WriteLine("Build Electron Desktop Application..."); - string buildPath = Path.Combine(Directory.GetCurrentDirectory(), "bin"); + string buildPath = Path.Combine(Directory.GetCurrentDirectory(), "bin", "desktop"); Console.WriteLine("Executing electron magic in this directory: " + buildPath); From 45fc23db9efe1faefc0271c1bfd127d65f3e9cec Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 22:39:19 +0200 Subject: [PATCH 05/14] travis ci --- .travis.yml | 5 +++++ buildAll.cmd | 4 ++-- buildAll.sh | 10 +++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ad171b0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: csharp +mono: none +dotnet: 2.0.0 +script: + - buildAll.sh \ No newline at end of file diff --git a/buildAll.cmd b/buildAll.cmd index 4598875..fed72d4 100755 --- a/buildAll.cmd +++ b/buildAll.cmd @@ -21,5 +21,5 @@ dotnet electronize build win echo "-- linux" dotnet electronize build linux -echo "-- osx" -dotnet electronize build osx +#echo "-- osx" +#dotnet electronize build osx diff --git a/buildAll.sh b/buildAll.sh index 68e41e1..f6e5f41 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -13,5 +13,13 @@ echo "Restore & Build WebApp Demo" cd ElectronNet.WebApp dotnet restore dotnet build + echo "Invoke electronize build in WebApp Demo" -dotnet electronize build \ No newline at end of file +#echo "-- win" +#dotnet electronize build win + +echo "-- linux" +dotnet electronize build linux + +echo "-- osx" +dotnet electronize build osx From ffca2800f68a27be465725c612a1fccde1d12d09 Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 22:42:27 +0200 Subject: [PATCH 06/14] test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ad171b0..844c4f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: csharp mono: none dotnet: 2.0.0 script: - - buildAll.sh \ No newline at end of file + - ./buildAll.sh \ No newline at end of file From 07b9069dc25831a560de4b5511146b9102aa680e Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 22:46:02 +0200 Subject: [PATCH 07/14] folder paths --- buildAll.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildAll.sh b/buildAll.sh index f6e5f41..a01bace 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -1,16 +1,16 @@ echo "Start building Electron.NET dev stack..." echo "Restore & Build API" -cd ElectronNet.API +cd ./ElectronNet.API dotnet restore dotnet build cd .. echo "Restore & Build API" -cd ElectronNet.CLI +cd ./ElectronNet.CLI dotnet restore dotnet build cd .. echo "Restore & Build WebApp Demo" -cd ElectronNet.WebApp +cd ./ElectronNet.WebApp dotnet restore dotnet build From 57e01e325b275f461a2b101bb0ab44e2b4a76af8 Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 22:58:51 +0200 Subject: [PATCH 08/14] linux.... --- buildAll.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildAll.sh b/buildAll.sh index a01bace..bf1bacc 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -1,16 +1,16 @@ echo "Start building Electron.NET dev stack..." echo "Restore & Build API" -cd ./ElectronNet.API +cd /ElectronNet.API dotnet restore dotnet build cd .. echo "Restore & Build API" -cd ./ElectronNet.CLI +cd /ElectronNet.CLI dotnet restore dotnet build cd .. echo "Restore & Build WebApp Demo" -cd ./ElectronNet.WebApp +cd /ElectronNet.WebApp dotnet restore dotnet build From b8b7f1fa84ed9743a8dac2f033328bac9157c16f Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 23:02:02 +0200 Subject: [PATCH 09/14] test --- buildAll.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildAll.sh b/buildAll.sh index bf1bacc..42e3567 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -1,6 +1,8 @@ +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + echo "Start building Electron.NET dev stack..." echo "Restore & Build API" -cd /ElectronNet.API +cd $DIR/ElectronNet.API dotnet restore dotnet build cd .. From 645bafd3f1fc00984f60297a4e71e0d0399a03ea Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 23:06:08 +0200 Subject: [PATCH 10/14] slash --- buildAll.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildAll.sh b/buildAll.sh index 42e3567..fd1d714 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -2,7 +2,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Start building Electron.NET dev stack..." echo "Restore & Build API" -cd $DIR/ElectronNet.API +cd $DIR/ElectronNet.API/ dotnet restore dotnet build cd .. From c4f828dd687160c4fca5f60eeec73f4354360c77 Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 23:30:34 +0200 Subject: [PATCH 11/14] hellllllll --- buildAll.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/buildAll.sh b/buildAll.sh index fd1d714..98f3937 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -1,18 +1,17 @@ -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - +dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) echo "Start building Electron.NET dev stack..." echo "Restore & Build API" -cd $DIR/ElectronNet.API/ +cd $dir/ElectronNET.API dotnet restore dotnet build cd .. echo "Restore & Build API" -cd /ElectronNet.CLI +cd $dir/ElectronNET.CLI dotnet restore dotnet build cd .. echo "Restore & Build WebApp Demo" -cd /ElectronNet.WebApp +cd $dir/ElectronNET.WebApp dotnet restore dotnet build From 24d9ea57c0873f99de5faa501a57e53f63854206 Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 23:37:41 +0200 Subject: [PATCH 12/14] electron packer --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 844c4f4..8557bdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: csharp mono: none dotnet: 2.0.0 +before_script: + - sudo npm install electron-packager --global script: - ./buildAll.sh \ No newline at end of file From 9cfc9221bc522bd31ecc52954c8869331dcedb9a Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Mon, 23 Oct 2017 23:46:30 +0200 Subject: [PATCH 13/14] last one --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8557bdc..deb6486 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,6 @@ language: csharp mono: none dotnet: 2.0.0 before_script: - - sudo npm install electron-packager --global + - npm install electron-packager --global script: - ./buildAll.sh \ No newline at end of file From 7b111fc0669f6d3bf29ef0ea4b4e0343d855d64c Mon Sep 17 00:00:00 2001 From: Robert Muehsig Date: Tue, 24 Oct 2017 21:20:12 +0200 Subject: [PATCH 14/14] win for travis ci --- buildAll.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildAll.sh b/buildAll.sh index 98f3937..38c6694 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -16,8 +16,8 @@ dotnet restore dotnet build echo "Invoke electronize build in WebApp Demo" -#echo "-- win" -#dotnet electronize build win +echo "-- win" +dotnet electronize build win echo "-- linux" dotnet electronize build linux