v0.1.1.4: Build scripts moved to scripts/ directory; enhanced documentation; automated release script

This commit is contained in:
mbusc
2025-08-28 20:11:27 +02:00
parent 5528096614
commit 3c2c2b35e2
12 changed files with 186 additions and 20 deletions

22
scripts/build.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
set -euo pipefail
echo "Building PrivateBin API C++ (library + example)"
# Ensure vcpkg exists
VCPKG_ROOT="${VCPKG_ROOT:-$HOME/vcpkg}"
if [ ! -d "$VCPKG_ROOT" ]; then
echo "vcpkg not found under $VCPKG_ROOT, cloning..."
git clone https://github.com/microsoft/vcpkg.git "$VCPKG_ROOT"
"$VCPKG_ROOT/bootstrap-vcpkg.sh" -disableMetrics
fi
# Clean and configure
rm -rf build
cmake -S . -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
# Build all targets
cmake --build build --config Release
echo "Build completed. Artifacts:"
echo " - Library: build/libprivatebinapi.so"
echo " - Example: build/example/example"