mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
b3f564e58c
* Add new file 'network_traffic_filter.c/.h" * Add feature to drop or accept specific packet transmit over edge network interface by rules. * fix CMakeLists.txt typo * Update Rule String Format * replace -F (filter) with -R (rule) for traffic restrictions. * Update edge help (-h) message. Update documents. * Pass Build on CircleCI and local Windows 10 VS2019 * Fix cmake build failed because of sn_selection * fix operate void* cause vs2016 build failed * Fix typo to pass build on windows. * add inttypes.h for n2n_typedefs.h to pass windows build * modify headers to pass build on windows.
38 lines
1.3 KiB
PowerShell
38 lines
1.3 KiB
PowerShell
|
|
# Build Vcpkg and install dependency packages.
|
|
#
|
|
# Usage: .ci\install-vcpkg.ps1 <project directory> [vcpkg directory name]
|
|
# - project directory: Path to the project sources where the .vcpkg file is located.
|
|
# - vcpkg directory name: optional name of directory where Vcpkg will be clone'd into
|
|
#
|
|
# Example 1: .ci\install-vcpkg.ps1 $Env:GITHUB_WORKSPACE
|
|
# Example 2: .ci\install-vcpkg.ps1 $Env:APPVEYOR_BUILD_FOLDER vcpkg-msvc
|
|
|
|
$ErrorActionPreference="Stop"
|
|
|
|
if ($args.Count -lt 1) { Exit 1 }
|
|
|
|
$PROJECT_DIR=$args[0]
|
|
$VCPKG_DIR=$args[1]
|
|
|
|
if ($null -eq $VCPKG_DIR) { $VCPKG_DIR="vcpkg" }
|
|
|
|
# do nothing if .vcpkg file doesn't exist
|
|
if (-not (Test-Path "$PROJECT_DIR\.vcpkg" -PathType Leaf)) { Write-Host ".vcpkg file does not exist, skipping Vcpkg installation."; Exit 0 }
|
|
|
|
Write-Host "---- install-vcpkg.ps1 ----"
|
|
Write-Host "PROJECT_DIR: $PROJECT_DIR"
|
|
Write-Host "VCPKG_DIR: $VCPKG_DIR"
|
|
Write-Host "---------------------------"
|
|
|
|
if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
|
|
New-Alias -Name git -Value "$Env:ProgramFiles\Git\bin\git.exe"
|
|
}
|
|
|
|
Push-Location "$HOME"
|
|
git clone --quiet --depth 1 https://github.com/Microsoft/vcpkg.git $VCPKG_DIR
|
|
Set-Location $VCPKG_DIR
|
|
.\bootstrap-vcpkg.bat -disableMetrics
|
|
$packages = Get-Content "$PROJECT_DIR\.vcpkg"
|
|
.\vcpkg.exe install --triplet x64-windows $packages
|
|
Pop-Location |