Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Microsoft/AttackSurfaceAn…
- Loading branch information
Showing
4 changed files
with
109 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,53 @@ | ||
# Build How-to | ||
Zeroth: Install Node.js, the .NET Core 2.1 SDK, and Visual Studio 2017. | ||
|
||
Download the code and open the command line in the “GUI” directory. | ||
## Pre-requisites | ||
|
||
Run: dotnet tool install ElectronNET.CLI -g | ||
Followed by: npm install electron-packager --global | ||
Finally: electronize start | ||
### CLI: | ||
- .NET Core 2.1 SDK | ||
- Visual Studio 2017 | ||
|
||
### GUI: | ||
- Node.js | ||
- .NET Core 2.1 SDK | ||
- Visual Studio 2017. | ||
- Electron.NET CLI tool - ```dotnet tool install ElectronNET.CLI -g``` | ||
|
||
## Building | ||
|
||
### CLI: | ||
|
||
#### Building a Debug version | ||
|
||
``` | ||
dotnet build | ||
``` | ||
|
||
#### Building a Release version | ||
On Windows you can use the script at Cli\Build.ps1 to build the release package. | ||
``` | ||
.\build.ps1 -release Release | ||
``` | ||
|
||
Linux | ||
``` | ||
sh build-linux.sh -r Release | ||
``` | ||
|
||
Mac | ||
``` | ||
sh build-mac.sh -r Release | ||
``` | ||
|
||
### GUI | ||
|
||
#### Running | ||
``` | ||
electronize start | ||
``` | ||
|
||
#### Building | ||
|
||
``` | ||
electronize build /target win | ||
``` | ||
Will create the Electron application in ```AttackSurfaceAnalyzer\Gui\bin\desktop``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
release = "Debug" | ||
|
||
while [ "$1" != "" ]; do | ||
case $1 in | ||
-r | --release ) shift | ||
release=$1 | ||
esac | ||
shift | ||
done | ||
|
||
if ["$release" = "Debug"); then | ||
dotnet build | ||
fi | ||
if ["$release" = "Release"]; then | ||
dotnet publish -c Release -r linux-x64 --self-contained true && ../Tools/linux-x64.warp-packer --arch linux-x64 --input_dir bin/Release/netcoreapp2.1/linux-x64/publish/ --exec AttackSurfaceAnalyzerCli --output AttackSurfaceAnalyzerCli | ||
chmod +x AttackSurfaceAnalyzerCli | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
release = "Debug" | ||
|
||
while [ "$1" != "" ]; do | ||
case $1 in | ||
-r | --release ) shift | ||
release=$1 | ||
esac | ||
shift | ||
done | ||
|
||
if ["$release" = "Debug"); then | ||
dotnet build | ||
fi | ||
if ["$release" = "Release"]; then | ||
dotnet publish -c Release -r osx-x64 --self-contained true && ../Tools/macos-x64.warp-packer --arch osx-x64 --input_dir bin/Release/netcoreapp2.1/osx-x64/publish/ --exec AttackSurfaceAnalyzerCli --output AttackSurfaceAnalyzerCli | ||
chmod +x AttackSurfaceAnalyzerCli | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters