Skip to content

Commit

Permalink
Update build_cli_release.ps1 to include openssl
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin committed Aug 3, 2023
1 parent fd7e937 commit 07b4ddc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/cli/build_cli_release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@
$NAME="aptos-cli"
$CRATE_NAME="aptos"
$CARGO_PATH="crates\$CRATE_NAME\Cargo.toml"
$Env:OPENSSL_DIR = 'C:\Program Files\OpenSSL-Win64\'
$Env:OPENSSL_INCLUDE_DIR = 'C:\Program Files\OpenSSL-Win64\include'
$Env:VCPKG_ROOT = 'C:\vcpkg\'

# Get the version of the CLI from its Cargo.toml.
$VERSION = Get-Content $CARGO_PATH | Select-String -Pattern '^\w*version = "(\d*\.\d*.\d*)"' | % {"$($_.matches.groups[1])"}

# Install the developer tools
echo "Installing developer tools"
PowerShell -ExecutionPolicy Bypass -File scripts/windows_dev_setup.ps1

# Note: This is required to bypass openssl isssue on Windows.
echo "Installing OpenSSL"
vcpkg install openssl:x64-windows-static-md --clean-after-build

# Build the CLI.
echo "Building release $VERSION of $NAME for Windows"
cargo build -p $CRATE_NAME --profile cli
Expand Down

0 comments on commit 07b4ddc

Please sign in to comment.