diff --git a/scripts/cli/build_cli_release.ps1 b/scripts/cli/build_cli_release.ps1 index 4e1e8aeb65179d..a2a60fcd274ec7 100755 --- a/scripts/cli/build_cli_release.ps1 +++ b/scripts/cli/build_cli_release.ps1 @@ -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