mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-08 17:56:51 +00:00
Update the buildAll.sh so that you can run it successfully on a Mac
This commit is contained in:
@@ -37,6 +37,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
buildReleaseNuGetPackages.cmd = buildReleaseNuGetPackages.cmd
|
||||
Changelog.md = Changelog.md
|
||||
README.md = README.md
|
||||
start.cmd = start.cmd
|
||||
start.sh = start.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
|
||||
56
buildAll.sh
Executable file → Normal file
56
buildAll.sh
Executable file → Normal file
@@ -1,3 +1,17 @@
|
||||
# flag arguments to target specific builds are available.
|
||||
|
||||
# sh ./buildAll.sh
|
||||
# sh ./buildAll.sh -t osx
|
||||
# sh ./buildAll.sh -t win
|
||||
# sh ./buildAll.sh -t linux
|
||||
|
||||
target=default
|
||||
while getopts t: flag; do
|
||||
case "${flag}" in
|
||||
t) target=${OPTARG} ;;
|
||||
esac
|
||||
done
|
||||
|
||||
dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
echo "Start building Electron.NET dev stack..."
|
||||
|
||||
@@ -23,29 +37,35 @@ echo "Restore & Build WebApp Demo"
|
||||
pushd $dir/ElectronNET.WebApp
|
||||
dotnet restore
|
||||
dotnet build
|
||||
|
||||
|
||||
echo "Install CLI as dotnet tool"
|
||||
|
||||
|
||||
dotnet tool uninstall ElectronNET.CLI -g
|
||||
dotnet tool install ElectronNET.CLI -g
|
||||
|
||||
|
||||
echo "Invoke electronize build in WebApp Demo"
|
||||
echo "/target win (dev-build)"
|
||||
electronize build /target win
|
||||
|
||||
echo "/target linux (dev-build)"
|
||||
electronize build /target linux
|
||||
|
||||
# Cannot public osx/win on windows due to:
|
||||
# NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture.
|
||||
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
|
||||
echo "/target osx (dev-build)"
|
||||
electronize build /target osx
|
||||
|
||||
echo "/target custom win7-x86;win (dev-build)"
|
||||
electronize build /target custom "win7-x86;win"
|
||||
|
||||
if [[ "$target" != "default" ]]; then
|
||||
echo "/target $target (dev-build)"
|
||||
electronize build /target $target
|
||||
else
|
||||
echo "/target win (dev-build)"
|
||||
electronize build /target win
|
||||
|
||||
echo "/target linux (dev-build)"
|
||||
electronize build /target linux
|
||||
|
||||
# Cannot publish osx/win on windows due to:
|
||||
# NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture.
|
||||
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
|
||||
echo "/target osx (dev-build)"
|
||||
electronize build /target osx
|
||||
|
||||
echo "/target custom win7-x86;win (dev-build)"
|
||||
electronize build /target custom "win7-x86;win"
|
||||
fi
|
||||
fi
|
||||
popd
|
||||
|
||||
# Be aware, that for non-electronnet-dev environments the correct
|
||||
# Be aware, that for non-electronnet-dev environments the correct
|
||||
# invoke command would be dotnet electronize ...
|
||||
|
||||
Reference in New Issue
Block a user